Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/transaction-pay-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `atomic` field on `TransactionConfig` / `TransactionData` for a generic non-atomic post-Relay flow: when `atomic` is `false`, Relay bridges to an internally derived recipient (`getPaymentOverrideData` recipient for post-quote flows, otherwise the transaction's own `from`) and the second leg is submitted separately after completion, replacing the removed `relay-post-ma-vault` module ([#9497](https://github.com/MetaMask/core/pull/9497))

### Changed

- Bump `@metamask/ramps-controller` from `^17.0.0` to `^17.1.0` ([#9646](https://github.com/MetaMask/core/pull/9646))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type {
GetDelegationTransactionCallback,
GetPaymentOverrideDataCallback,
PolymarketCallbacks,
TransactionConfig,
TransactionConfigCallback,
TransactionData,
TransactionPayControllerMessenger,
Expand Down Expand Up @@ -148,30 +149,23 @@ export class TransactionPayController extends BaseController<
callback: TransactionConfigCallback,
): void {
this.#updateTransactionData(transactionId, (transactionData) => {
const config = {
isMaxAmount: transactionData.isMaxAmount,
isPostQuote: transactionData.isPostQuote,
const config: TransactionConfig = {
accountOverride: transactionData.accountOverride,
atomic: transactionData.atomic,
isHyperliquidSource: transactionData.isHyperliquidSource,
isMaxAmount: transactionData.isMaxAmount,
isPolymarketDepositWallet: transactionData.isPolymarketDepositWallet,
isPostQuote: transactionData.isPostQuote,
isQuoteRequired: transactionData.isQuoteRequired,
refundTo: transactionData.refundTo,
accountOverride: transactionData.accountOverride,
paymentOverride: transactionData.paymentOverride,
refundTo: transactionData.refundTo,
};

const previousAccountOverride = config.accountOverride;

callback(config);

transactionData.accountOverride = config.accountOverride;
transactionData.isMaxAmount = config.isMaxAmount;
transactionData.isPostQuote = config.isPostQuote;
transactionData.isHyperliquidSource = config.isHyperliquidSource;
transactionData.isPolymarketDepositWallet =
config.isPolymarketDepositWallet;
transactionData.isQuoteRequired = config.isQuoteRequired;
transactionData.refundTo = config.refundTo;
transactionData.paymentOverride = config.paymentOverride;
Object.assign(transactionData, config);

if (
!config.isPostQuote &&
Expand Down

This file was deleted.

Loading