Skip to content

chore: add monad mUSD#29897

Merged
MoMannn merged 11 commits into
mainfrom
chore--add-monad-mUSD
May 13, 2026
Merged

chore: add monad mUSD#29897
MoMannn merged 11 commits into
mainfrom
chore--add-monad-mUSD

Conversation

@MoMannn

@MoMannn MoMannn commented May 8, 2026

Copy link
Copy Markdown
Member

Description

Changelog

CHANGELOG entry: Add mUSD support on Monad

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Changes the Money Account deposit asset from a hardcoded USDC address to chain-specific mUSD resolution, affecting transaction calldata and failure modes on unsupported networks. Also updates default vault config and constants for Monad, so misconfiguration could cause deposits/withdrawals to target incorrect contracts.

Overview
Adds Monad to mUSD chain mappings (MUSD_TOKEN_ADDRESS_BY_CHAIN and MUSD_TOKEN_ASSET_ID_BY_CHAIN).

Updates Money Account deposit logic to use MUSD_TOKEN_ADDRESS_BY_CHAIN via getMoneyAccountDepositAssetAddress (removing the temporary hardcoded USDC address) and throws when mUSD isn’t deployed for the selected chain.

Switches the Money Account dev vault fallback config and related tests to Monad (0x8f) with updated contract addresses.

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

@metamaskbotv2 metamaskbotv2 Bot added the team-delegation MetaMask Delegation Team label May 8, 2026
@github-actions github-actions Bot added the size-S label May 8, 2026
shane-t
shane-t previously approved these changes May 8, 2026
@MoMannn MoMannn marked this pull request as ready for review May 8, 2026 09:56
@MoMannn MoMannn requested a review from a team as a code owner May 8, 2026 09:56
Jwhiles
Jwhiles previously approved these changes May 11, 2026
Comment thread app/components/UI/Money/utils/moneyAccountTransactions.ts
@MoMannn MoMannn dismissed stale reviews from Jwhiles and shane-t via 73df216 May 11, 2026 14:28
Comment thread app/components/UI/Money/utils/moneyAccountTransactions.test.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 209d97b. Configure here.

Comment thread app/components/UI/Money/utils/moneyAccountTransactions.ts
@MoMannn MoMannn enabled auto-merge May 12, 2026 15:36
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeMoney, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 82%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are focused on the Money Account (MetaMask Card) feature:

  1. DEV_VAULT_CONFIG update (moneyAccount/index.ts): Updates contract addresses and chain ID from Arbitrum One (0xa4b1) to Monad (0x8f). This is a dev/testnet configuration change for the Money Account vault.

  2. mUSD Monad support (musd.ts): Adds Monad chain to MUSD_TOKEN_ADDRESS_BY_CHAIN and MUSD_TOKEN_ASSET_ID_BY_CHAIN mappings.

  3. Functional change in getMoneyAccountDepositAssetAddress (moneyAccountTransactions.ts): Removes the temporary hardcoded USDC address (0xaf88d065e77c8cC2239327C5EDb3A432268e5831) and activates the proper mUSD lookup via MUSD_TOKEN_ADDRESS_BY_CHAIN. This is a meaningful behavioral change - deposits now use mUSD instead of USDC, and will throw an error if the chain isn't supported.

  4. Test update (moneyAccountTransactions.test.ts): Updates mock chain ID to 0x8f (Monad) to match the new configuration.

SmokeMoney is the primary tag since these changes directly affect the Card/Money Account deposit flow - specifically the getMoneyAccountDepositAssetAddress function used in useMoneyAccount.ts for deposit asset selection.

SmokeConfirmations is included per the SmokeMoney tag description: "When selecting SmokeMoney for Card Add Funds or similar flows that execute swaps, also select SmokeConfirmations" - the Add Funds deposit flow involves on-chain transactions that go through confirmations.

SmokeStake is not selected as these changes don't touch staking/lending flows. The Earn/mUSD constants change is additive (adding Monad support) and doesn't break existing chains.

Performance Test Selection:
The changes are configuration updates (contract addresses, chain IDs) and a functional fix to use mUSD instead of hardcoded USDC for deposit asset resolution. These are not UI rendering changes, don't affect list rendering, animations, or app startup. No performance-sensitive code paths are modified.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@MoMannn MoMannn added this pull request to the merge queue May 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 13, 2026
@MoMannn MoMannn added this pull request to the merge queue May 13, 2026
Merged via the queue into main with commit 521dac3 May 13, 2026
96 of 98 checks passed
@MoMannn MoMannn deleted the chore--add-monad-mUSD branch May 13, 2026 09:59
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.78.0 Issue or pull request that will be included in release 7.78.0 label May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.78.0 Issue or pull request that will be included in release 7.78.0 size-S team-delegation MetaMask Delegation Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants