Skip to content

feat: adding money account methods to get transaction data array#30532

Merged
jpuri merged 6 commits into
mainfrom
money_data_fns
May 22, 2026
Merged

feat: adding money account methods to get transaction data array#30532
jpuri merged 6 commits into
mainfrom
money_data_fns

Conversation

@jpuri

@jpuri jpuri commented May 21, 2026

Copy link
Copy Markdown
Contributor

Description

Adding methods to get money account transaction data array to be added to perps / predict transactions.

Changelog

CHANGELOG entry:

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1428

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

NA

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
Adds new exported helpers that compute and encode on-chain calldata for Money Account deposits/withdrawals, including RPC reads for quotes/rates; incorrect encoding or dependency on store/provider availability could impact transaction construction.

Overview
Adds two new public utilities, getMoneyAccountDepositTransactionsData and getMoneyAccountWithdrawTransactionsData, that return raw calldata arrays for Money Account deposit (approve+deposit) and withdraw (withdraw+ERC-20 transfer) flows, sourcing vault config/money account from Redux and short-circuiting to [] when required state/provider is unavailable.

Extends moneyAccountTransactions.test.ts with coverage for both helpers, including expected hex output shape, correct recipient encoding for withdrawals, and error propagation/early-return behavior when prerequisites are missing.

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

@jpuri jpuri requested a review from a team as a code owner May 21, 2026 14:53
@jpuri jpuri added team-confirmations Push issues to confirmations team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels May 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-M labels May 21, 2026
@jpuri jpuri enabled auto-merge May 21, 2026 15:02

@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 8e27a21. Configure here.

Comment thread app/components/UI/Money/utils/moneyAccountTransactions.ts
@jpuri jpuri removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The PR adds two new utility functions (getMoneyAccountDepositTransactionsData and getMoneyAccountWithdrawTransactionsData) to the Money Account transactions utility file, along with their unit tests. These functions encode calldata for deposit (approve + deposit batch) and withdrawal (withdraw + transfer batch) operations for the MetaMask Card/Money Account feature.

Key findings:

  1. The new functions are not yet imported or consumed anywhere else in the codebase — they are infrastructure additions for future use.
  2. No existing functions were modified, so no regression risk to currently working flows.
  3. The changes are isolated to the Money feature's utility layer (app/components/UI/Money/utils/).
  4. No shared components (navigation, confirmations, browser, etc.) are affected.

SmokeMoney is selected as the directly relevant tag for the MetaMask Card and fiat flows. Since the new functions are not yet wired into any UI flow or confirmation flow, SmokeSwap and SmokeConfirmations are not required at this time. No performance tests are needed as these are pure utility/calldata-encoding functions with no UI rendering or state management impact.

Performance Test Selection:
The changes are pure utility functions for encoding calldata (no UI rendering, no state management changes, no list components, no app startup impact). No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@jpuri jpuri added this pull request to the merge queue May 22, 2026
Merged via the queue into main with commit dcae245 May 22, 2026
185 of 187 checks passed
@jpuri jpuri deleted the money_data_fns branch May 22, 2026 13:37
@github-actions github-actions Bot locked and limited conversation to collaborators May 22, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.80.0 Issue or pull request that will be included in release 7.80.0 label May 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.80.0 Issue or pull request that will be included in release 7.80.0 size-M team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants