Repository navigation
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 4 potential issues.
❌ 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 c19f2ef. Configure here.
| messenger, | ||
| quoteRequest: matchingQuoteRequest, | ||
| }), | ||
| }), |
There was a problem hiding this comment.
Quote deposit field name mismatch
High Severity
Quote stream attach uses depositSetup, but QuoteResponse and all consumers read depositConfig. Money-account deposit metadata is dropped on every quote, so later deposit logic never sees a config.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c19f2ef. Configure here.
| inputPrimaryDenomination, | ||
| customSlippage: quotesReceivedContext?.custom_slippage, | ||
| slippagePercentage: quotesReceivedContext?.slippage_limit, | ||
| isMoneyAccountDeposit, |
There was a problem hiding this comment.
Deposit config never reaches history
High Severity
submitTx copies depositConfig onto the quote and accepts isMoneyAccountDeposit, but #executeSubmitStrategy is only given isMoneyAccountDeposit. History is written from sharedHistoryItemProperties.depositConfig, which stays unset, so completed swaps never trigger a deposit.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c19f2ef. Configure here.
| }, | ||
| ], | ||
| skipInitialGasEstimate: true, | ||
| transactions: Object.values(txs), |
There was a problem hiding this comment.
Deposit batch builder not awaited
High Severity
buildMoneyAccountDepositBatch is async, but handleMoneyAccountDeposit does not await it. Object.values then runs on the Promise, so addTransactionBatchFn receives invalid transactions instead of the approve and deposit calls.
Reviewed by Cursor Bugbot for commit c19f2ef. Configure here.
| txHash: txMeta.hash, | ||
| addTransactionBatchFn: this.#addTransactionBatchFn, | ||
| }); | ||
| } |
There was a problem hiding this comment.
Deposit errors left unhandled
Medium Severity
Both completion paths call handleMoneyAccountDeposit without awaiting or catching. That helper throws when the provider or received amount is missing, producing an unhandled rejection and a silent failed deposit.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c19f2ef. Configure here.


Explanation
References
Checklist
Note
High Risk
Automatically submits follow-on vault deposit transactions after swaps, using on-chain receipts and new controller dependencies—errors could mis-deposit funds or leave tokens stuck in the wallet.
Overview
Adds an end-to-end money account deposit path on top of unified swap/bridge: clients can mark quote requests with
isMoneyAccount, which is sent to bridge-api and forcesrelayas the aggregator for those quotes.During quote streaming, the bridge controller resolves vault/account details via MoneyAccountController and feature flags, attaches that setup to quotes, and extends types/history with
depositConfig. Shared messenger helpers for accounts, networks, and remote flags replace duplicated private methods and are re-exported for bridge-status-controller.After the swap or bridge leg finishes (same-chain source completion or destination completion with the expected token), bridge-status-controller reads the received ERC-20 amount from the receipt, builds a deposit batch with money-account-utils, and submits an internal sponsored transaction batch into the vault.
Reviewed by Cursor Bugbot for commit c19f2ef. Bugbot is set up for automated code reviews on this repo. Configure here.