Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the resource fee display on the send flow by adding a detailed fee breakdown pane to the review transaction screen, showing inclusion fee and resource fee separately for Soroban transactions.
Changes:
- Added a new "Fee breakdown" pane in
ReviewTransactionshowing inclusion fee, resource fee, and total fee with contextual descriptions for classic vs Soroban transactions - Propagated
inclusionFeeandresourceFeefrom simulation results through both send and collectible flows - Added "Calculating..." loading state for fees and a loading indicator on the continue button during simulation
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| extension/src/popup/components/InternalTransaction/ReviewTransaction/index.tsx | New fees breakdown pane with fee detail rows and info button |
| extension/src/popup/components/InternalTransaction/ReviewTransaction/styles.scss | Styles for the fees breakdown pane and info button |
| extension/src/popup/components/send/SendAmount/index.tsx | Show "Calculating..." during simulation, loading state on button |
| extension/src/popup/components/send/SendAmount/hooks/useSimulateTxData.tsx | Pass inclusionFee and resourceFee from simulation |
| extension/src/popup/components/sendCollectible/SelectedCollectible/hooks/useSimulateTxData.ts | Pass inclusionFee and resourceFee from simulation |
| extension/src/popup/locales/en/translation.json | New i18n keys for fee breakdown UI |
| extension/src/popup/locales/pt/translation.json | Portuguese translations for new keys (with one regression) |
| @shared/api/internal.ts | Added network_url to simulate-tx request body |
| extension/e2e-tests/reviewTxFees.test.ts | E2E tests for fee breakdown in token, classic, and collectible sends |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
….com:stellar/freighter into feature/improve-resource-fee-display-on-send
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
extension/src/popup/components/InternalTransaction/ReviewTransaction/index.tsx
Show resolved
Hide resolved
extension/src/popup/components/InternalTransaction/FeesPane/index.tsx
Outdated
Show resolved
Hide resolved
extension/src/popup/components/InternalTransaction/FeesPane/index.tsx
Outdated
Show resolved
Hide resolved
|
@leofelix077 looks nice! few notes:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@sdfcharles applied the adjustments to the UI parts now. thanks for checking!
|
- Extract SimulateTxData interface to types/transactions.ts to remove duplicate definitions in send and collectible hooks - Both hooks now re-export the shared type - FeesPane and ReviewTransaction import directly from types/transactions - Fix FeesPane top/bottom padding and reset padding inside multi-pane-slider Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…//github.com/stellar/freighter into feature/improve-resource-fee-display-on-send
| body: JSON.stringify({ | ||
| xdr, | ||
| network_passphrase: networkDetails.networkPassphrase, | ||
| network_url: networkDetails.sorobanRpcUrl, |
There was a problem hiding this comment.
why was this change needed? It's actually only used for Soroswap, which is disabled right now
There was a problem hiding this comment.
it was throwing an error when trying to submit a collectible, mentioning it's a required field by the backend. on my MP collectibles
| </> | ||
| ) : null} | ||
| {isEditingSettings ? ( | ||
| {isEditingSettings && !isShowingFeesPane ? ( |
There was a problem hiding this comment.
1 small UX improvement we can make here. I noticed if you edit the fee, then click the inclusion fee i bubble, it resets the fee field. A user would lose any change they've made in this field
Screen.Recording.2026-03-25.at.12.01.33.PM.mov
There was a problem hiding this comment.
nice one!
I adjusted the fee persistence inside the flow, so if user manually edits it, it's kept inside the context (soroban vs classic) and won't change again after explicit user input, unless user exits the transaction flow
Screen.Recording.2026-04-02.at.13.47.14.mov
PR Review: Improve fees display on send (Extension)Cross-reference: This review covers this PR alongside the mobile counterpart at stellar/freighter-mobile#774. A comparison section is included at the bottom. Individual Review of Extension PROverall: Clean, well-structured implementation. The Things I Like
Issues & Suggestions1. Auto-simulation useEffect(() => {
if (simulationState.state === RequestState.LOADING) return;
// ...
if (destChanged || assetChanged) {
fetchSimulationData();
}
}, [destination, asset, isToken, isCollectible, simulationState.state]);Including 2. {simulationState.data?.resourceFee
? t("Fees description soroban")
: t("Fees description classic")}This works for the fee breakdown description, but has a subtle issue: while loading ( 3. 4. Info button always shown on ReviewTransaction fee row 📝 <button
className="ReviewTx__Details__Row__FeesInfoBtn"
data-testid="review-tx-fee-info-btn"
onClick={() => setActivePaneIndex(paneConfig.feesIndex)}
>
<Icon.InfoCircle />
</button>The info circle button is always rendered (both Soroban and classic). This is fine since the 5. body: JSON.stringify({
xdr,
network_passphrase: networkDetails.networkPassphrase,
network_url: networkDetails.sorobanRpcUrl,
}),Small but important change in 6. Fee display shows "Calculating..." only for Soroban ✅ Cross-Platform Comparison: Extension (#2649) vs Mobile (#774)Both PRs implement the same feature (Soroban fee breakdown: Inclusion Fee + Resource Fee + Total Fee) across the two Freighter platforms. Here's how they differ:
Key Architectural Differences Worth Aligning
Generated by Claude Code |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Extract SimulateTxData interface to types/transactions.ts to remove duplicate definitions in send and collectible hooks - Both hooks now re-export the shared type - FeesPane and ReviewTransaction import directly from types/transactions - Fix FeesPane top/bottom padding and reset padding inside multi-pane-slider Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…//github.com/stellar/freighter into feature/improve-resource-fee-display-on-send
|
@CassioMG @piyalbasu I adjusted the last points on the code and checked the Claude comments most of the comments are related to data source and state management, which are inherently different on mobile vs extension, and some of the UI parts that are also different on Mobile (e.g. on mobile we have the info sheet for the transaction fee, on extension we always show the fees breakdown) Funcionality-wise they should be in parity now |







closes #2475
Screen.Recording.2026-03-13.at.11.42.36.mov
Screen.Recording.2026-03-13.at.11.43.27.mov