Skip to content

feat: add transaction data property useMoneyAccount#8858

Open
jpuri wants to merge 3 commits into
mainfrom
money_account_support
Open

feat: add transaction data property useMoneyAccount#8858
jpuri wants to merge 3 commits into
mainfrom
money_account_support

Conversation

@jpuri
Copy link
Copy Markdown
Contributor

@jpuri jpuri commented May 20, 2026

Explanation

Add transactionData property useMoneyAccount, it will enable to know if source / target of transaction is money account.

References

Related to https://consensyssoftware.atlassian.net/browse/CONF-1409

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Adds a new configuration/state flag to TransactionPayController's public types and config update path, which may require downstream consumers to handle the new field. Runtime behavior change is minimal (state propagation only).

Overview
Adds a new optional useMoneyAccount flag to TransactionConfig and TransactionData so callers can persist whether a transaction should use the Money Account as the payment source.

setTransactionConfig now reads/writes this flag into per-transaction state, with a new unit test covering the state update, and the package changelog is updated accordingly.

Reviewed by Cursor Bugbot for commit 7a23a0e. 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 20, 2026 11:54
@jpuri jpuri temporarily deployed to default-branch May 20, 2026 11:54 — with GitHub Actions Inactive
@jpuri jpuri requested a review from a team as a code owner May 20, 2026 11:55
transactionData.isPolymarketDepositWallet =
config.isPolymarketDepositWallet;
transactionData.refundTo = config.refundTo;
transactionData.useMoneyAccount = config.useMoneyAccount;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Money account will be source or target depending on postQuote value.

@jpuri jpuri enabled auto-merge May 20, 2026 11:57
accountOverride?: Hex;

/** Whether to use the Money Account (Money Keyring) as the payment source. */
useMoneyAccount?: boolean;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we match the other existing configs so isMoneyAccountSource as we'll also likely need isMoneyAccountTarget in future too?

And should we add the callback at the same time so getMoneyAccountWithdrawData to the constructor?

Copy link
Copy Markdown
Contributor Author

@jpuri jpuri May 20, 2026

Choose a reason for hiding this comment

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

May be I change is to isUsingMoneyAccount , We can find source / target depending on postQuote.

I plan to work on separate PR to implement rest of changes, with this PR my intent is to unblock UI work.

On client side we need to know isUsingMoneyAccount value to set pay token and changes on review page also.

@jpuri jpuri requested a review from matthewwalsh0 May 20, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants