fix(money): show "Earn up to X% APY" on input empty state (MUSD-891)#31064
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Impact analysis:
Tags NOT selected:
Performance Test Selection: |
Description
The Money account deposit input screen ("Convert crypto" / "Add funds") was missing the "Earn up to 4% APY" value prop on its empty state. Previously, when the amount was empty/zero, the subtitle slot rendered the balance projection ("Projected 1-year balance: $0.00"), which is meaningless at $0.
This makes the subtitle state-dependent: while the amount is empty/zero it shows "Earn up to {APY}% APY" (matching the Figma empty-state design), and once the user enters an amount it switches to the existing projected-balance line. When the APY is unknown/loading, nothing is rendered, as before.
The change is contained to
BalanceProjection, which already owns the subtitle slot and consumes the APY hook — no parent rewiring.Changelog
CHANGELOG entry: Added an "Earn up to X% APY" prompt on the Money account input screen empty state.
Related issues
Fixes: MUSD-891
Manual testing steps
Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.17.-.2026-06-04.at.11.57.31.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Localized subtitle copy and conditional rendering in BalanceProjection only; no auth, payments, or data-path changes.
Overview
BalanceProjectionnow treats an empty or $0 fiat amount as an empty state: it shows "Earn up to {{percentage}}% APY" (via newconfirm.custom_amount.earn_up_to_apycopy) usingapyPercentfromuseMoneyAccountBalance, instead of a meaningless projected $0.00 line. When the user enters a positive amount, behavior is unchanged—the projected balance still compounds withapyDecimal.If APY is loading/invalid, or
apyPercentis missing on a zero amount, the component still renders nothing. Non-numeric amounts still return null. Tests were updated to cover the earn prompt, the missing-apyPercentzero case, and to split invalid input from the empty-state path.Reviewed by Cursor Bugbot for commit 5503981. Bugbot is set up for automated code reviews on this repo. Configure here.