Skip to content

fix: Add a default Asteria and don't filter Tokens#142

Merged
gonzalezzfelipe merged 2 commits intomainfrom
fix/add-default-asteria-and-dont-filter-tokens
Mar 10, 2026
Merged

fix: Add a default Asteria and don't filter Tokens#142
gonzalezzfelipe merged 2 commits intomainfrom
fix/add-default-asteria-and-dont-filter-tokens

Conversation

@gonzalezzfelipe
Copy link
Contributor

@gonzalezzfelipe gonzalezzfelipe commented Mar 10, 2026

Summary by CodeRabbit

  • New Features
    • Added fallback object injection for radius queries when no results are initially found, ensuring consistent query responses.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 34aabfeb-fbf7-42c2-807d-8771aec0fd93

📥 Commits

Reviewing files that changed from the base of the PR and between 1cafa77 and 8218908.

📒 Files selected for processing (1)
  • backend/src/main.rs

📝 Walkthrough

Walkthrough

Changes to backend/src/main.rs modify token asset-unit lookup logic from using policy_id + asset_name to policy_id only, add Debug derives to public structs (Asset, Token, Position, PolicyId), introduce a fallback Asteria object injection in QueryRoot.objects_in_radius, and refactor minor formatting in rocket() setup.

Changes

Cohort / File(s) Summary
Token & Asset Logic
backend/src/main.rs
Modified TryFrom implementation to compute raw_amount using policy_id instead of policy_id + asset_name; adds Debug derive to Asset, Token, Position, and PolicyId structs; introduces has_asteria flag in QueryRoot.objects_in_radius with fallback Asteria object injection when none found; minor formatting adjustments in rocket() setup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mduthey

Poem

🐰 A token's path now simplified with grace,
Policy_id takes the central place,
Debug derives unlock the debug's light,
Asteria fallback keeps queries tight,
Small changes made, but thoughtfully done! ✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/add-default-asteria-and-dont-filter-tokens

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gonzalezzfelipe gonzalezzfelipe merged commit c23a0d0 into main Mar 10, 2026
1 check failed
@gonzalezzfelipe gonzalezzfelipe deleted the fix/add-default-asteria-and-dont-filter-tokens branch March 10, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants