feat: adding money account methods to get transaction data array#30532
Conversation
|
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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key findings:
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: |
|




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
Screenshots/Recordings
NA
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
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,
getMoneyAccountDepositTransactionsDataandgetMoneyAccountWithdrawTransactionsData, 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.tswith 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.