fix: gas fees sponsored full swap native in transaction display#28930
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3f57b98. Configure here.
3f57b98 to
1d54e44
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokeTrade is selected because these changes directly affect bridge/swap transaction history display and the TransactionDetails component used in bridge flows. SmokeConfirmations is required per the tag dependency rule: "When selecting SmokeTrade for swap or bridge flows, also select SmokeConfirmations." No other tags are needed as the changes are isolated to Bridge UI components and utilities, with no impact on accounts, identity, network management, onboarding, or other wallet features. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |




Description
This pull request updates how the source token amount is displayed for gas-sponsored swap transactions, ensuring that the full amount sent by the user is shown instead of the post-fee amount. The changes affect both the transaction details UI and the transaction history decoding logic, and include new tests and mock data to cover this scenario.
The fix mirror the extension's display logic for this use case.
Gas-sponsored transaction handling:
BridgeTransactionDetailsto display the full user amount (pricingData.amountSent) whenquote.gasSponsoredis true, instead of the fee-deductedsrcTokenAmount. (app/components/UI/Bridge/components/TransactionDetails/TransactionDetails.tsx)decodeSwapsTxto usepricingData.amountSentfor gas-sponsored transactions, ensuring transaction history reflects the correct sent amount. (app/components/UI/Bridge/utils/transaction-history.ts)Testing and mock data:
app/components/UI/Bridge/components/TransactionDetails/TransactionDetails.test.tsx)decodeSwapsTxusespricingData.amountSentwhen gas is sponsored. (app/components/UI/Bridge/utils/transaction-history.test.ts)app/components/UI/Bridge/_mocks_/initialState.ts)Changelog
CHANGELOG entry: display correct amount in swap native in transaction display for gas fees sponsored trx
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Swapping 0.1 SEI for USDC on SEI gas fees sponsored network
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Display-only changes that switch the source amount calculation for a specific gas-sponsored swap case; covered by new unit tests and mock state.
Overview
Fixes gas-sponsored swap/bridge UI and activity decoding to show the full user sent amount (
pricingData.amountSent) instead of the fee-deductedquote.srcTokenAmount.Updates
BridgeTransactionDetailsanddecodeSwapsTxto preferpricingData.amountSentwhenquote.gasSponsoredis true, and adds a dedicated gas-sponsored transaction fixture plus tests to prevent regressions in both the details screen and transaction history decoding.Reviewed by Cursor Bugbot for commit 3f57b98. Bugbot is set up for automated code reviews on this repo. Configure here.