Repository navigation
fix(routes): simplify demo quote fees #1216
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🟡 (optional) Senders of a subsidized transfer quote no longer see fees they still pay, such as source-network gas in ETH, so the quote understates their cost.
quoteFeereturns undefined wheneversubsidize === true, which drops every listed fee. A 1:1 subsidy only guarantees the recipient amount. Fix: on subsidized quotes, hide only fees the subsidy covers and keep separately charged fees, such as those withside: 'source'. Or show the fee line wheneverfeesis non-empty and drop only the 'None' row.Why this was flagged
A keyed or keyless transfer quote returns
subsidize: truewith a non-emptyfeesarray. The e2e fixturetransferQuote(e2e/routes-demo.test.ts:104-111) shows such a fee: 0.0001006 ETH withside: 'source', commented "Transfers can charge source-network gas in the native asset".quoteFeereturns undefined at src/lib/routes-test.ts:126, soQuoteSummary(src/components/RoutesTester.tsx:1847) shows only "You send 1 USDC / Recipient gets 1 USDC.e". On the base branch every listed fee got its own 'Fee' row. src/pages/docs/routes/quotes.mdx:40 says thefeesarray "lists only separately charged fees", and quotes.mdx:38 tells integrators to show fees. quotes.mdx:46 says the subsidy guarantees delivery: "the recipient receives the amount sent". It says nothing about covering source-side charges. The new e2e test 'shows a subsidized transfer quote at 1:1 with no fee line' locks this in.Verification: The trigger is a subsidized transfer quote that comes back with a non-empty
feesarray, such as a source-side ETH network fee. src/lib/routes-test.ts:126 returns early withif (data.subsidize === true) return undefined, before any fee is read. On the base branch,fees.map(...)rendered a "Fee" row for every listed fee, whateversubsidizewas.