-
Notifications
You must be signed in to change notification settings - Fork 5
fix(fee-info): update tendermint, erc20, and qrc20 fee_details response format
#60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tendermint fee_details has an `amount` field which returns the fee, so no calculation is required
added as optional parameters to mitigate potential breaking changes
WalkthroughThe changes introduce a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI
participant FeeInfo
participant JSON
User->>UI: Requests fee info display
UI->>FeeInfo: Receives FeeInfo instance (could be Tendermint, EthGas, Qrc20Gas, etc.)
FeeInfo->>JSON: Parses/serializes as needed
FeeInfo-->>UI: Provides fee type and details
UI-->>User: Displays fee breakdown (including Tendermint if present)
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (33)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Visit the preview URL for this PR (updated for commit 327fb85): https://komodo-defi-sdk--pr60-bugfix-tendermint-fe-1b4yhlbt.web.app (expires Wed, 28 May 2025 17:57:52 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 7f9f5ac39928f333b6e8fcefb7138575e24ed347 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request updates the fee_info handling with new support for Tendermint fee details while enhancing EthGas and Qrc20Gas fee types to optionally accept a total fee override. It also updates UI display components accordingly and adds a new utility export.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/komodo_ui/lib/src/core/displays/fee_info_display.dart | Adds UI elements for displaying tendermint fee details |
| packages/komodo_defi_types/lib/src/transactions/fee_info.freezed.dart | Introduces new totalGasFee field for EthGas and Qrc20Gas, and adds the new FeeInfoTendermint case |
| packages/komodo_defi_types/lib/src/transactions/fee_info.dart | Updates JSON parsing and serialization to support optional total fee overrides and the new Tendermint fee type |
| packages/komodo_defi_types/lib/komodo_defi_type_utils.dart | Exports a new backoff_strategy utility |
| final FeeInfoTendermint fee => [ | ||
| Text('Gas Limit:', style: Theme.of(context).textTheme.bodyMedium), | ||
| Text( | ||
| '${fee.gasLimit}', | ||
| style: Theme.of(context).textTheme.labelLarge, | ||
| ), | ||
| Text('Amount:', style: Theme.of(context).textTheme.bodyMedium), | ||
| Text( | ||
| fee.formatTotal(precision: 8), | ||
| style: Theme.of(context).textTheme.labelLarge, | ||
| ), | ||
| ], |
Copilot
AI
May 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The inline lambda declaration for FeeInfoTendermint is somewhat unconventional within the widget tree. It would improve readability and maintainability to extract this logic into a clearly named helper or builder method.
| final FeeInfoTendermint fee => [ | |
| Text('Gas Limit:', style: Theme.of(context).textTheme.bodyMedium), | |
| Text( | |
| '${fee.gasLimit}', | |
| style: Theme.of(context).textTheme.labelLarge, | |
| ), | |
| Text('Amount:', style: Theme.of(context).textTheme.bodyMedium), | |
| Text( | |
| fee.formatTotal(precision: 8), | |
| style: Theme.of(context).textTheme.labelLarge, | |
| ), | |
| ], | |
| final FeeInfoTendermint fee => _buildTendermintFeeDetails(fee, context), |
CharlVS
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTMTYSM
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * docs(analytics): add event implementation plan * feat(analytics): log onboarding and app lifecycle events * feat(analytics): add send and swap event callbacks * feat(analytics): log events for hd address and page metrics * feat(analytics): add portfolio and asset event logging * fix(analytics): Fix analytics type errors * fix(analytics): fix missing import * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 * feat(analytics): add high priority events * fix: update alpha version warning * feat(analytics): add cross-chain events and triggers * feat(analytics): trigger new event logs * fix: various analytics fixes/enhancements * refactor(analytics): log events directly * fix: various analytics fixes * feat: analytics event queuing --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * docs(analytics): add event implementation plan * feat(analytics): log onboarding and app lifecycle events * feat(analytics): add send and swap event callbacks * feat(analytics): log events for hd address and page metrics * feat(analytics): add portfolio and asset event logging * fix(analytics): Fix analytics type errors * fix(analytics): fix missing import * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 * feat(analytics): add high priority events * fix: update alpha version warning * feat(analytics): add cross-chain events and triggers * feat(analytics): trigger new event logs * fix: various analytics fixes/enhancements * refactor(analytics): log events directly * fix: various analytics fixes * feat: analytics event queuing --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * docs(analytics): add event implementation plan * feat(analytics): log onboarding and app lifecycle events * feat(analytics): add send and swap event callbacks * feat(analytics): log events for hd address and page metrics * feat(analytics): add portfolio and asset event logging * fix(analytics): Fix analytics type errors * fix(analytics): fix missing import * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 * feat(analytics): add high priority events * fix: update alpha version warning * feat(analytics): add cross-chain events and triggers * feat(analytics): trigger new event logs * fix: various analytics fixes/enhancements * refactor(analytics): log events directly * fix: various analytics fixes * feat: analytics event queuing --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * docs(analytics): add event implementation plan * feat(analytics): log onboarding and app lifecycle events * feat(analytics): add send and swap event callbacks * feat(analytics): log events for hd address and page metrics * feat(analytics): add portfolio and asset event logging * fix(analytics): Fix analytics type errors * fix(analytics): fix missing import * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 * feat(analytics): add high priority events * fix: update alpha version warning * feat(analytics): add cross-chain events and triggers * feat(analytics): trigger new event logs * fix: various analytics fixes/enhancements * refactor(analytics): log events directly * fix: various analytics fixes * feat: analytics event queuing --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * docs(analytics): add event implementation plan * feat(analytics): log onboarding and app lifecycle events * feat(analytics): add send and swap event callbacks * feat(analytics): log events for hd address and page metrics * feat(analytics): add portfolio and asset event logging * fix(analytics): Fix analytics type errors * fix(analytics): fix missing import * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 * feat(analytics): add high priority events * fix: update alpha version warning * feat(analytics): add cross-chain events and triggers * feat(analytics): trigger new event logs * fix: various analytics fixes/enhancements * refactor(analytics): log events directly * fix: various analytics fixes * feat: analytics event queuing --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 --------- Co-authored-by: Francois <[email protected]>
* fix: fix SDK roll CI script issues - Fix SDK roll CI script issues - Roll SDK version * CI Test #1 * build: update remaining SDK commit refs in lockfiles * CI Test 2 * fix(icon-pre-caching): exclude excluded assets to remove NFT_ coins `NFT_` prefixed coins do not have icons and should not be shown to users, so filter them out from the icon pre-caching * chore: roll SDK * docs(analytics): add event implementation plan * feat(analytics): log onboarding and app lifecycle events * feat(analytics): add send and swap event callbacks * feat(analytics): log events for hd address and page metrics * feat(analytics): add portfolio and asset event logging * fix(analytics): Fix analytics type errors * fix(analytics): fix missing import * chore(deps): upgrade SDK to include fee info fix GLEECBTC/komodo-defi-sdk-flutter#60 * feat(analytics): add high priority events * fix: update alpha version warning * feat(analytics): add cross-chain events and triggers * feat(analytics): trigger new event logs * fix: various analytics fixes/enhancements * refactor(analytics): log events directly * fix: various analytics fixes * feat: analytics event queuing --------- Co-authored-by: Francois <[email protected]>
Updated
FeeInfofields to match the response structure in the docs, which includes newtotal_gas amount fields in the response.Fixed
toJsonformat for QRC20 and Tendermint coins, which expect f64 (double/decimal) values instead of stringSummary by CodeRabbit
New Features
Enhancements
Chores