fix: apply whitelist denoms on feeabstration genesis#304
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe oracle module's genesis initialization was modified to apply whitelist bank denoms immediately upon initialization rather than deferring this to end-of-block behavior. The Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@x/feeabstraction/keeper/msg_server.go`:
- Around line 110-120: The code zeroes out FeeTokenMetadata.Price in the
UpdateFeeTokens path causing convertERC20ForFees to see zero prices until
BeginBlocker repopulates them; instead, in the block that builds resetItems (the
loop over msg.FeeTokens.Items that currently sets token.Price =
math.LegacyZeroDec()), populate token.Price with the current TWAP or retain the
last positive stored price for that token (read from ms.FeeTokens or the same
FeeToken metadata collection) so BeginBlocker refresh is not required for the
current block; then call ms.FeeTokens.Set with that collection (avoid writing
zero prices), ensuring convertERC20ForFees will see a usable Price and not
return ErrInsufficientFunds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0ed3340c-a753-40b1-85c4-1e9f5f9078e0
📒 Files selected for processing (11)
CHANGELOG.mdx/feeabstraction/keeper/msg_server.gox/feeabstraction/keeper/msg_server_test.gox/feeabstraction/keeper/oracle.gox/feeabstraction/keeper/oracle_test.gox/feeabstraction/types/expected_keepers.gox/feeabstraction/types/params.gox/feeabstraction/types/params_test.gox/oracle/genesis.gox/oracle/genesis_test.gox/oracle/keeper/vote_target.go
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ea1bb40 to
9643e44
Compare
411f9d5 to
ae58b1b
Compare
Description
Fixes:
Type of change
How Has This Been Tested?
Added tests for each case
PR Checklist:
Make sure each step was done:
make lint-fix