Skip to content

chore: sync dev with main#1891

Merged
kushagrasarathe merged 5 commits into
devfrom
main
Apr 21, 2026
Merged

chore: sync dev with main#1891
kushagrasarathe merged 5 commits into
devfrom
main

Conversation

@chip-peanut-bot

Copy link
Copy Markdown
Contributor

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 🐿️

Hugo0 and others added 5 commits April 15, 2026 12:04
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
@vercel

vercel Bot commented Apr 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview, Comment Apr 16, 2026 8:00am

Request Review

@kushagrasarathe kushagrasarathe merged commit 17e1f5f into dev Apr 21, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants