feat: add prefill skeleton loader for money account deposits - #33707
Conversation
Add PrefillCustomAmount loader that matches the prefilled deposit page layout (no keyboard). Used when deposit prefill feature flag is enabled or for addMusd deposits. - Add ConfirmationLoader.PrefillCustomAmount enum value - Create PrefillCustomAmountInfoSkeleton with account/pay-with/detail row skeletons and button skeleton (no keyboard) - Conditionally select loader in useMoneyAccountDeposit based on prefillConfig.enabled or addMusd intent - Add tests for new loader
|
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. |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
Add PrefillCustomAmount loader that matches the prefilled deposit page layout (no keyboard). Used when deposit prefill feature flag is enabled or for addMusd deposits. - Add ConfirmationLoader.PrefillCustomAmount enum value - Create PrefillCustomAmountInfoSkeleton with account/pay-with/detail row skeletons and button skeleton (no keyboard) - Conditionally select loader in useMoneyAccountDeposit based on prefillConfig.enabled or addMusd intent - Add tests for new loader
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #33707 +/- ##
==========================================
- Coverage 84.76% 84.76% -0.01%
==========================================
Files 6231 6232 +1
Lines 167690 167768 +78
Branches 41044 41058 +14
==========================================
+ Hits 142144 142207 +63
- Misses 15822 15830 +8
- Partials 9724 9731 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
….com/MetaMask/metamask-mobile into feat/prefill-deposit-skeleton-loader
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b84123d. Configure here.
| loader: ConfirmationLoader.AdvancedCustomAmount, | ||
| loader: usePrefillLoader | ||
| ? ConfirmationLoader.PrefillCustomAmount | ||
| : ConfirmationLoader.AdvancedCustomAmount, |
There was a problem hiding this comment.
Fiat deposit wrong loader
Medium Severity
usePrefillLoader treats card deposits specially via intent !== 'card', but it does not treat autoSelectFiatPayment the same way. With deposit prefill enabled, initiateDeposit({ autoSelectFiatPayment: true }) (without intent: 'card') picks PrefillCustomAmount, whose skeleton has no keyboard, while the confirmation amount UI opens with the deposit keyboard visible when fiat is auto-selected.
Reviewed by Cursor Bugbot for commit b84123d. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokeMoney is selected because the changes directly affect the Money Account deposit flow - the loader shown during confirmation is changed based on a feature flag. This could affect the Add Funds flow tested in SmokeMoney. SmokeConfirmations is selected per the SmokeMoney tag description ("When selecting SmokeMoney for Card Add Funds or similar flows that execute swaps, also select SmokeConfirmations") and because the confirmation component itself is modified with a new loader type. SmokeSwap is NOT selected because the changes are specifically to the Money Account deposit loader, not the swap flow itself. Risk is medium because: the changes are feature-flag gated (reducing blast radius), they only affect loading skeleton UI (not core transaction logic), but they do touch the confirmation component which is shared across many flows. Performance Test Selection: |
|





Description
Add PrefillCustomAmount loader that matches the prefilled deposit page layout (no keyboard). Used when deposit prefill feature flag is enabled or for addMusd deposits.
Changelog
CHANGELOG entry:
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1709
Manual testing steps
NA
Screenshots/Recordings
Screen.Recording.2026-07-24.at.9.50.32.PM.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
UI-only loading skeleton and confirmation navigation params behind a feature flag, with card intent explicitly excluded; no payment or transaction logic changes.
Overview
Adds a prefill-specific confirmation loading state for money account deposits so the skeleton matches the prefilled amount screen (account/pay-with/detail rows and CTA, no deposit keyboard).
useMoneyAccountDepositnow readsselectPrefilledAmountConfigformoneyAccountDepositand navigates withConfirmationLoader.PrefillCustomAmountwhen the prefill flag is on or the intent isaddMusd, whilecardintent still usesAdvancedCustomAmount(including when prefill is enabled). The confirm screen maps the new loader toPrefillCustomAmountInfoSkeleton; tests cover loader selection and rendering.Reviewed by Cursor Bugbot for commit 0f5ade3. Bugbot is set up for automated code reviews on this repo. Configure here.