Skip to content

chore(runway): cherry-pick fix: cp-8.0.0 musd fiat deposit amount data error prefixes#32332

Merged
runway-github[bot] merged 1 commit into
release/8.0.0from
runway-cherry-pick-8.0.0-1782307845
Jun 24, 2026
Merged

chore(runway): cherry-pick fix: cp-8.0.0 musd fiat deposit amount data error prefixes#32332
runway-github[bot] merged 1 commit into
release/8.0.0from
runway-cherry-pick-8.0.0-1782307845

Conversation

@runway-github

@runway-github runway-github Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

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.

Reviewed by Cursor Bugbot for commit
128eb69. Bugbot is set up for automated
code reviews on this repo. Configure
here.

[6bd3605](https://github.com/MetaMask/metamask-mobile/commit/6bd360594951760791c891ff3107b88c813bddbe)

…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 -->
@runway-github runway-github Bot requested review from a team as code owners June 24, 2026 13:30
@mm-token-exchange-service mm-token-exchange-service Bot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - PR targets a release or stable branch (release/* or stable)

All E2E tests pre-selected.

View GitHub Actions results

@github-actions github-actions Bot added size-M risk:low AI analysis: low risk labels Jun 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

@runway-github runway-github Bot merged commit 584474f into release/8.0.0 Jun 24, 2026
117 checks passed
@runway-github runway-github Bot deleted the runway-cherry-pick-8.0.0-1782307845 branch June 24, 2026 14:56
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk:low AI analysis: low risk size-M team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants