chore(runway): cherry-pick fix: cp-8.0.0 musd fiat deposit amount data error prefixes#32332
Merged
runway-github[bot] merged 1 commit intoJun 24, 2026
Merged
Conversation
…a error prefixes (#32314) ## Summary Applies the two-level error prefix pattern to `getAmountData` in `amount-data-callback.ts`: - **Outer** (entire `getAmountData` function): `Update Amount Data: ` - **Inner** (around `buildMoneyAccountDepositBatch`): `Money Account Deposit: ` A failure during deposit calldata building now surfaces as: ``` Update Amount Data: Money Account Deposit: <original error> ``` This matches the naming convention on the core side (MetaMask/core#9250) and in the `useUpdateTransactionPayAmount` hook, making it immediately clear from the error message that the failure occurred in the amount data callback and specifically in the money account deposit build step. ## Also included - `disableUpgrade: true` added to `useMoneyAccount` deposit and withdrawal `addTransactionBatch` calls (the Money Account is always already upgraded on Monad) - `error-prefix.ts`: `reason` in CALL_EXCEPTION handling made optional to handle ethers errors where `reason` may be `null` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Targeted error-handling and transaction-batch flags for money account flows; no auth or broad architectural changes. > > **Overview** > Improves **mUSD / money account deposit** failures during MM Pay amount updates by wrapping `getAmountData` in a **two-level** `prefixError` pattern (`Update Amount Data:` → `Money Account Deposit:`), so users and support can tell the failure is in the amount-data callback and specifically in deposit calldata building. > > **`prefixError`** now treats ethers **`CALL_EXCEPTION`** `reason` as optional: when `reason` is missing or non-string, messages use `eth_call failed - <method>` instead of falling back to the full verbose ethers string. > > Money account **deposit and withdrawal** `addTransactionBatch` calls set **`disableUpgrade: true`** because the money account is already upgraded on Monad, avoiding unnecessary upgrade logic in the batch pipeline. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 128eb69. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - PR targets a release or stable branch (release/* or stable) All E2E tests pre-selected. |
|
sleepytanya
approved these changes
Jun 24, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Summary
Applies the two-level error prefix pattern to
getAmountDatainamount-data-callback.ts:getAmountDatafunction):Update Amount Data:buildMoneyAccountDepositBatch):Money Account Deposit:A failure during deposit calldata building now surfaces as:
This matches the naming convention on the core side (MetaMask/core#9250)
and in the
useUpdateTransactionPayAmounthook, making it immediatelyclear from the error message that the failure occurred in the amount
data callback and specifically in the money account deposit build step.
Also included
disableUpgrade: trueadded touseMoneyAccountdeposit andwithdrawal
addTransactionBatchcalls (the Money Account is alwaysalready upgraded on Monad)
error-prefix.ts:reasonin CALL_EXCEPTION handling made optionalto handle ethers errors where
reasonmay benullNote
Low Risk
Targeted error-handling and transaction-batch flags for money account
flows; no auth or broad architectural changes.
Overview
Improves mUSD / money account deposit failures during MM Pay
amount updates by wrapping
getAmountDatain a two-levelprefixErrorpattern (Update Amount Data:→Money Account Deposit:), so users and support can tell the failure is in theamount-data callback and specifically in deposit calldata building.
prefixErrornow treats ethersCALL_EXCEPTIONreasonasoptional: when
reasonis missing or non-string, messages useeth_call failed - <method>instead of falling back to the full verbose ethersstring.
Money account deposit and withdrawal
addTransactionBatchcallsset
disableUpgrade: truebecause the money account is alreadyupgraded on Monad, avoiding unnecessary upgrade logic in the batch
pipeline.
Reviewed by Cursor Bugbot for commit
128eb69. Bugbot is set up for automated
code reviews on this repo. Configure
here.