chore: sync dev with main#1891
Merged
Merged
Conversation
Users were promised more than Bridge actually delivered because the UI computed amount * rawExchangeRate without deducting the fee. Example: €500 deposit showed $583.50 but user received $580.58. Fixes onramp (AddMoneyBankDetails) and offramp (ExchangeRate, WithdrawBankPage, ConfirmBankClaimView) quote displays. USD↔USDC unaffected (0% fee). Manteca flow unaffected (already correct).
Landing-page calculator showed raw-rate amount, promising more than Bridge would actually deliver. Same class of bug as PR #1889.
CodeRabbit caught that the fee was short-circuiting because callers passed 'USD' as a display stand-in. Helper mirrors backend which uses 'usd' for fiat and 'usdc' for the stablecoin — pass the real Bridge currency code. Adds test coverage for the EUR/MXN/GBP <-> USDC paths that exercises the real call pattern.
…nt test Frankfurter fallback simulates Bridge's FX spread; Peanut dev fee is applied separately by callers. Two fees that legitimately stack — the comment prevents future audit confusion (this caused two false "double counting" alarms during PR #1889 review). Adds invariant test for reverse fee helper to lock in the algebra.
…uote fix: bake 0.5% Bridge fee into displayed "you'll receive" amount
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
kushagrasarathe
approved these changes
Apr 21, 2026
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.
Branch Sync
main is 5 commits ahead of dev.
Commits to sync:
• fix: bake 0.5% Bridge fee into displayed "you'll receive" amount
• fix: apply Peanut dev fee to ExchangeRateWidget destination amount
• fix: pass USDC (not USD) to fee helper so fee actually applies
• docs+test: clarify Frankfurter spread vs dev fee, add reverse invariant test
• Merge pull request #1889 from peanutprotocol/fix/bridge-fee-display-quote
Auto-generated by Chip 🐿️