Repository navigation
Make Stocks costs clearer with expandable fee summaries - #1465
Merged
Merged
Conversation
✅ Deploy Preview for vrtx-dashboard canceled.
|
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for vortexfi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
… fee breakdown The API rounds each fee line on its own and totalFeeFiat once, so a fully itemized quote often lands one cent (or one micro-USDC) off its total. providerCostProblem already accepts that gap, but groupedFees demanded an exact match, so those quotes showed "Taxas informadas" with the partial note and left their price effects out of the headline. groupedFees now uses the same one-unit allowance.
With a complete breakdown the cost headline also counts the price effects already inside the payout, but "Valor bruto" stayed brlAmount + fees, so gross minus costs no longer equalled "Você recebe no Pix". sellGross adds the headline to the payout; the Pix sell review and the sell percentage bases (Pix and Base USDC) use it.
… card The estimate's "Valor usado para comprar seus tokens" is the payment minus the fees and the ETH kept for network fees, but the reserve sat below the card, so its rows did not add up. It now sits in the card between the costs and that amount, and the reserve note says it comes out of the payment in both languages.
verify-pilot-ui and verify-usdc-ui still looked for the removed provider cost table. They now check the fee groups, each cost line, the no-surcharge note and the separate reserve inside the open sheet, and the pilot check confirms that a sell's gross minus costs equals its payout. verify-usdc-ui also waited for an English hero heading that an earlier hero change replaced. Both pass at 1440, 390 and 320 px on a local demo.
ebma
marked this pull request as ready for review
November 17, 2026 07:48
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stocks currently leads with provider/chain names in its cost breakdown and mixes retained ETH with spent fees. Replace that presentation with the approved compact summary and a native expandable breakdown directly on the fee-total row, in Portuguese and English.
The executable quote, funding amounts, payment/signature controls and recovery paths are unchanged. No new dependencies or platform configuration are required.
Validation: 440 Stocks tests pass, including fee accounting, the one-cent rounding case, a sell whose costs include price effects, the reserve's place in the estimate card, localized native disclosure interaction and checkout reserve regressions. Repository lint and demo/live builds pass.
scripts/verify-pilot-ui.mjsandscripts/verify-usdc-ui.mjsnow check the new summary, including that a sell's gross minus costs equals its payout, and both pass at 1440, 390 and 320 px on a local demo. Browser checks cover compact/expanded states, keyboard controls, the narrow stock-detail purchase panel, mobile layouts and simulated checkout reviews. Browser checks used no-money demo mode; no real Pix/USDC transfer or wallet signature was performed.Draft against
stagingfor review by @ebma.