-
Notifications
You must be signed in to change notification settings - Fork 107
Fix/fee table for fee bump tx #2108
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
5bfb62a to
5321337
Compare
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 PR fixes a bug in fee calculation for fee bump transactions that wrap Soroban transactions. Previously, the resource fees were being miscalculated because the code wasn't looking at the inner transaction's resource fee for fee bump transactions.
Key changes include:
- Updated fee bump transaction handling to extract resource fees from the inner transaction
- Refactored fee calculation logic into separate
ProposedFeesandChargedFeesstructs for better organization - Updated table display constants to distinguish between proposed and charged fees
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/soroban-cli/src/commands/tx/fetch/fee.rs | Main fee calculation logic fix for fee bump transactions and structural refactoring |
| cmd/crates/soroban-test/tests/it/integration/tx/fetch.rs | Test updates to match new fee structure |
What
Closes #2101
Why
We were previously miscalculating the resource fees for fee bump transactions that wrap soroban transactions. This PR fixes that by looking at the inner transaction to get the proposed resource fee.
This PR also includes some refactoring to make the fee calculation easier to understand & test.
Before:
After:
Known limitations
n/a