fix: add Update Amount Data outer prefix to money account deposit amount callback#32312
fix: add Update Amount Data outer prefix to money account deposit amount callback#32312matthewwalsh0 wants to merge 1 commit into
Conversation
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: This is a low-risk error handling improvement that:
Per tag descriptions: SmokeMoney covers card Add Funds (Deposit/Swap paths), and when selecting SmokeMoney for flows that execute transactions, SmokeConfirmations should also be selected. No performance impact expected — this is purely an error handling change with no effect on rendering, data fetching, or app startup. Performance Test Selection: |
|



Summary
Adds a two-level error prefix to the money account deposit amount-update callback in
useUpdateTransactionPayAmount:updateTransactionPayAmountdeposit block):Update Amount Data:applyMoneyAccountAmountUpdates/syncMoneyAccountDepositRequiredAssets):Money Account Deposit:(pre-existing)A failure during amount data update now surfaces as:
This mirrors the naming convention introduced on the core side (MetaMask/core#9250) and makes it immediately clear from the error message that the failure occurred in the deposit amount-update step.
Changes
useUpdateTransactionPayAmount.ts: AddUPDATE_AMOUNT_DATA_ERROR_PREFIXconstant; wrap themoneyAccountDepositbranch in a try-catch that applies the outer prefixuseUpdateTransactionPayAmount.test.ts: Update three error-propagation assertions to assert the full prefix-chained message