@metamask-previews/transaction-pay-controller 31.0.0-preview-b6e8e7385 → 31.0.0-preview-4dd847ca3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +3 -47
  2. package/dist/TransactionPayController-method-action-types.d.ts +1 -56
  3. package/dist/TransactionPayController-method-action-types.d.ts.map +1 -1
  4. package/dist/TransactionPayController-method-action-types.js.map +1 -1
  5. package/dist/TransactionPayController.d.ts +2 -45
  6. package/dist/TransactionPayController.d.ts.map +1 -1
  7. package/dist/TransactionPayController.js +7 -141
  8. package/dist/TransactionPayController.js.map +1 -1
  9. package/dist/actions/update-payment-token.d.ts.map +1 -1
  10. package/dist/actions/update-payment-token.js +22 -51
  11. package/dist/actions/update-payment-token.js.map +1 -1
  12. package/dist/constants.d.ts +0 -2
  13. package/dist/constants.d.ts.map +1 -1
  14. package/dist/constants.js +0 -2
  15. package/dist/constants.js.map +1 -1
  16. package/dist/helpers/TransactionPayPublishHook.d.ts.map +1 -1
  17. package/dist/helpers/TransactionPayPublishHook.js +0 -13
  18. package/dist/helpers/TransactionPayPublishHook.js.map +1 -1
  19. package/dist/index.d.ts +2 -2
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/strategy/across/AcrossStrategy.d.ts.map +1 -1
  23. package/dist/strategy/across/AcrossStrategy.js +1 -6
  24. package/dist/strategy/across/AcrossStrategy.js.map +1 -1
  25. package/dist/strategy/across/across-quotes.js +4 -7
  26. package/dist/strategy/across/across-quotes.js.map +1 -1
  27. package/dist/strategy/across/across-submit.d.ts.map +1 -1
  28. package/dist/strategy/across/across-submit.js +1 -3
  29. package/dist/strategy/across/across-submit.js.map +1 -1
  30. package/dist/strategy/fiat/FiatStrategy.d.ts +0 -1
  31. package/dist/strategy/fiat/FiatStrategy.d.ts.map +1 -1
  32. package/dist/strategy/fiat/FiatStrategy.js +0 -4
  33. package/dist/strategy/fiat/FiatStrategy.js.map +1 -1
  34. package/dist/strategy/fiat/fiat-direct-musd.d.ts.map +1 -1
  35. package/dist/strategy/fiat/fiat-direct-musd.js +2 -4
  36. package/dist/strategy/fiat/fiat-direct-musd.js.map +1 -1
  37. package/dist/strategy/fiat/fiat-quotes.d.ts.map +1 -1
  38. package/dist/strategy/fiat/fiat-quotes.js +2 -4
  39. package/dist/strategy/fiat/fiat-quotes.js.map +1 -1
  40. package/dist/strategy/fiat/fiat-submit.d.ts.map +1 -1
  41. package/dist/strategy/fiat/fiat-submit.js +2 -5
  42. package/dist/strategy/fiat/fiat-submit.js.map +1 -1
  43. package/dist/strategy/fiat/fiat-test-funding.d.ts.map +1 -1
  44. package/dist/strategy/fiat/fiat-test-funding.js +5 -3
  45. package/dist/strategy/fiat/fiat-test-funding.js.map +1 -1
  46. package/dist/strategy/relay/RelayStrategy.d.ts +5 -11
  47. package/dist/strategy/relay/RelayStrategy.d.ts.map +1 -1
  48. package/dist/strategy/relay/RelayStrategy.js +0 -23
  49. package/dist/strategy/relay/RelayStrategy.js.map +1 -1
  50. package/dist/strategy/relay/constants.d.ts +0 -3
  51. package/dist/strategy/relay/constants.d.ts.map +1 -1
  52. package/dist/strategy/relay/constants.js +0 -3
  53. package/dist/strategy/relay/constants.js.map +1 -1
  54. package/dist/strategy/relay/relay-api.d.ts +1 -35
  55. package/dist/strategy/relay/relay-api.d.ts.map +1 -1
  56. package/dist/strategy/relay/relay-api.js +6 -59
  57. package/dist/strategy/relay/relay-api.js.map +1 -1
  58. package/dist/strategy/relay/relay-max.d.ts.map +1 -1
  59. package/dist/strategy/relay/relay-max.js +6 -12
  60. package/dist/strategy/relay/relay-max.js.map +1 -1
  61. package/dist/strategy/relay/relay-quotes.d.ts +1 -19
  62. package/dist/strategy/relay/relay-quotes.d.ts.map +1 -1
  63. package/dist/strategy/relay/relay-quotes.js +10 -14
  64. package/dist/strategy/relay/relay-quotes.js.map +1 -1
  65. package/dist/strategy/relay/relay-submit-execute.d.ts.map +1 -1
  66. package/dist/strategy/relay/relay-submit-execute.js +1 -3
  67. package/dist/strategy/relay/relay-submit-execute.js.map +1 -1
  68. package/dist/strategy/relay/relay-submit.d.ts +1 -22
  69. package/dist/strategy/relay/relay-submit.d.ts.map +1 -1
  70. package/dist/strategy/relay/relay-submit.js +8 -28
  71. package/dist/strategy/relay/relay-submit.js.map +1 -1
  72. package/dist/strategy/relay/relay-validation.d.ts.map +1 -1
  73. package/dist/strategy/relay/relay-validation.js +2 -5
  74. package/dist/strategy/relay/relay-validation.js.map +1 -1
  75. package/dist/strategy/relay/types.d.ts +1 -92
  76. package/dist/strategy/relay/types.d.ts.map +1 -1
  77. package/dist/strategy/relay/types.js.map +1 -1
  78. package/dist/strategy/server/ServerStrategy.d.ts.map +1 -1
  79. package/dist/strategy/server/ServerStrategy.js +0 -4
  80. package/dist/strategy/server/ServerStrategy.js.map +1 -1
  81. package/dist/strategy/server/server-quotes.js +4 -7
  82. package/dist/strategy/server/server-quotes.js.map +1 -1
  83. package/dist/strategy/server/server-submit.d.ts.map +1 -1
  84. package/dist/strategy/server/server-submit.js +6 -9
  85. package/dist/strategy/server/server-submit.js.map +1 -1
  86. package/dist/strategy/server/server-validation.d.ts.map +1 -1
  87. package/dist/strategy/server/server-validation.js +1 -3
  88. package/dist/strategy/server/server-validation.js.map +1 -1
  89. package/dist/types.d.ts +32 -136
  90. package/dist/types.d.ts.map +1 -1
  91. package/dist/types.js.map +1 -1
  92. package/dist/utils/feature-flags.d.ts +0 -13
  93. package/dist/utils/feature-flags.d.ts.map +1 -1
  94. package/dist/utils/feature-flags.js +0 -14
  95. package/dist/utils/feature-flags.js.map +1 -1
  96. package/dist/utils/gas-payment.d.ts +3 -12
  97. package/dist/utils/gas-payment.d.ts.map +1 -1
  98. package/dist/utils/gas-payment.js +2 -2
  99. package/dist/utils/gas-payment.js.map +1 -1
  100. package/dist/utils/no-op-quote.d.ts +3 -3
  101. package/dist/utils/no-op-quote.d.ts.map +1 -1
  102. package/dist/utils/no-op-quote.js +3 -4
  103. package/dist/utils/no-op-quote.js.map +1 -1
  104. package/dist/utils/perps.d.ts.map +1 -1
  105. package/dist/utils/perps.js +2 -5
  106. package/dist/utils/perps.js.map +1 -1
  107. package/dist/utils/post-quote.js +3 -4
  108. package/dist/utils/post-quote.js.map +1 -1
  109. package/dist/utils/quotes.d.ts.map +1 -1
  110. package/dist/utils/quotes.js +26 -103
  111. package/dist/utils/quotes.js.map +1 -1
  112. package/dist/utils/source-amounts.d.ts.map +1 -1
  113. package/dist/utils/source-amounts.js +4 -25
  114. package/dist/utils/source-amounts.js.map +1 -1
  115. package/dist/utils/token.d.ts +1 -84
  116. package/dist/utils/token.d.ts.map +1 -1
  117. package/dist/utils/token.js +13 -143
  118. package/dist/utils/token.js.map +1 -1
  119. package/dist/utils/validation.d.ts.map +1 -1
  120. package/dist/utils/validation.js +11 -14
  121. package/dist/utils/validation.js.map +1 -1
  122. package/package.json +2 -15
  123. package/dist/strategy/relay/relay-solana-quotes.d.ts +0 -18
  124. package/dist/strategy/relay/relay-solana-quotes.d.ts.map +0 -1
  125. package/dist/strategy/relay/relay-solana-quotes.js +0 -280
  126. package/dist/strategy/relay/relay-solana-quotes.js.map +0 -1
  127. package/dist/strategy/relay/relay-submit-non-evm.d.ts +0 -29
  128. package/dist/strategy/relay/relay-submit-non-evm.d.ts.map +0 -1
  129. package/dist/strategy/relay/relay-submit-non-evm.js +0 -221
  130. package/dist/strategy/relay/relay-submit-non-evm.js.map +0 -1
  131. package/dist/strategy/relay/solana-pay-diagnostics.d.ts +0 -22
  132. package/dist/strategy/relay/solana-pay-diagnostics.d.ts.map +0 -1
  133. package/dist/strategy/relay/solana-pay-diagnostics.js +0 -98
  134. package/dist/strategy/relay/solana-pay-diagnostics.js.map +0 -1
  135. package/dist/strategy/relay/solana-pay.d.ts +0 -190
  136. package/dist/strategy/relay/solana-pay.d.ts.map +0 -1
  137. package/dist/strategy/relay/solana-pay.js +0 -619
  138. package/dist/strategy/relay/solana-pay.js.map +0 -1
  139. package/dist/strategy/relay/solana-transaction.d.ts +0 -134
  140. package/dist/strategy/relay/solana-transaction.d.ts.map +0 -1
  141. package/dist/strategy/relay/solana-transaction.js +0 -271
  142. package/dist/strategy/relay/solana-transaction.js.map +0 -1
  143. package/dist/utils/account.d.ts +0 -56
  144. package/dist/utils/account.d.ts.map +0 -1
  145. package/dist/utils/account.js +0 -125
  146. package/dist/utils/account.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -10,53 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
  ### Added
11
11
 
12
12
  - Add quote simulation to `ServerStrategy`, gated by the `confirmations_pay_extended.payStrategies.server.validationEnabled` feature flag ([#11198](https://github.com/MetaMask/core/pull/11198))
13
- - Support non-EVM payment tokens, such as Solana SOL and SPL tokens ([#10272](https://github.com/MetaMask/core/pull/10272))
14
- - `updatePaymentToken` accepts a non-EVM `assetId`, reading its metadata, balance, and price from `AssetsController` state.
15
- - The non-EVM source account defaults to the account in the same account group as the transaction account that supports the asset chain, or is selected explicitly by `accountOverride`.
16
- - Quote and submit Solana payment tokens through `RelayStrategy` ([#10273](https://github.com/MetaMask/core/pull/10273))
17
- - Quote requests are built the same way for every payment token. Post-quote flows with a non-EVM destination token produce no quote requests.
18
- - `AcrossStrategy`, `ServerStrategy` and `FiatStrategy` only support requests with an `eip155` source asset. `RelayStrategy` supports every source, and executes a non-EVM source through the account Snap instead of the `TransactionController`.
19
- - `RelayStrategy` quotes non-EVM requests through the same Relay quote URL as EVM sources (`relayQuoteUrl`, the MetaMask Relay proxy). New quotes require the `payStrategies.relay.solana.enabled` feature flag.
20
- - Core compiles the unsigned Solana transaction from the Relay instructions. It reads the blockhash and lookup tables from the `ConfigRegistryController` Solana RPC URL. Instructions with empty data are supported.
21
- - When Relay rejects a Solana quote with the `SOLANA_TX_TOO_LARGE` error code, Core retries once with `maxRouteLength: 4`. Core makes the same one-time retry when the transaction it compiles from a quote exceeds the Solana size limit. The native SOL Max re-quote keeps the route length of the first quote. Relay API errors now keep the response body `errorCode` as an `errorCode` property on the thrown error.
22
- - The source network fee comes from the account Snap `computeFee` request, summing every returned fee entry (base and priority). Whether the Snap's `base` fee already includes the priority fee still needs to be confirmed; until then the sum is the conservative choice. Affordability includes the fee and the rent reserve, and a shortfall is reported as an `insufficient-source-balance` quote error. Its detail rows show the missing source amount with the source asset decimals and symbol, and leave out missing amounts that are zero. Native SOL max amounts withhold the fee and rent. If the re-quoted Max transaction has a higher fee, Core re-quotes once more with that fee withheld.
23
- - Snap requests use the `InternalAccount` resolved from the CAIP-10 `sourceAccountId` of the quote request.
24
- - Submission persists a `metamaskPay.solanaExecution` checkpoint and then makes exactly one Snap `signAndSendTransaction` request. It then notifies Relay, waits for completion, persists the Relay completion (status, target hash and confirmed source) on the checkpoint, reconciles it and returns an externally handled publish result.
25
- - Submission rejects a quote whose `quotesLastUpdated` is older than the quote refresh interval plus a 10 second grace period, before persisting the checkpoint or calling the Snap.
26
- - While Relay has not indexed the submitted source transaction, Core reads its status once per poll with the Solana RPC `getSignatureStatuses` method, plus `getBlockHeight` when the status is null. A status error, or a null status after the finalized block height passes the `lastValidBlockHeight` persisted on the checkpoint at submit time, records `sourceStatus: 'failed'`. The publish hook then stops waiting for Relay and fails the transaction. `reconcileSolanaPay` performs the same read.
27
- - The publish hook throws `Missing non-EVM quote` when a non-EVM payment token has no executable quote, so it never falls back to EVM publication.
28
- - The publish hook throws `Quote does not match payment token` when the protocol of a quote's `sourceAssetId` does not match the selected payment token, so stale quotes from a previous payment token never reach the wrong execution path.
29
- - Add `PayStrategyExecuteResult`, `SolanaPayOutcome` and `SolanaPayStatus` types.
30
- - Add `reconcileSolanaPay` and `recoverSolanaPayStatus` methods and messenger actions ([#10273](https://github.com/MetaMask/core/pull/10273))
31
- - They observe Relay status for persisted Solana executions and finalize the target transaction, and never sign again.
32
- - Once Relay has delivered the funds and the source is confirmed, `reconcileSolanaPay` runs the non-atomic Money Account second leg once, from the target transaction account (`txParams.from`, where Relay delivers the funds). The `attempting` follow-up checkpoint is persisted before the second leg starts. The publish hook and recovery both use this path, so the second leg still runs after a polling timeout or restart. It never signs the Solana source again.
33
- - A follow-up observed in `attempting` (interrupted by a restart) is reported with the `unknown` outcome instead of `submitted`.
34
- - `recoverSolanaPayStatus` observes each non-terminal execution once and independently, and returns without polling. Clients call it again, for example on foreground or startup.
35
- - Add the `TransactionPayControllerReconcileSolanaPayAction` and `TransactionPayControllerRecoverSolanaPayStatusAction` types.
36
- - Add `infuraProjectId` option to `TransactionPayControllerOptions`, and the `getInfuraProjectId` method and `TransactionPayController:getInfuraProjectId` messenger action ([#10273](https://github.com/MetaMask/core/pull/10273))
37
- - Clients must pass their Infura project ID to quote and submit Solana payment tokens. Core replaces the `{infuraProjectId}` placeholder in the `ConfigRegistryController` Solana RPC URL with it, and throws if the URL has the placeholder and no project ID is configured.
38
- - Add the `TransactionPayControllerGetInfuraProjectIdAction` type.
39
- - Add Solana Pay support diagnostics and lifecycle analytics event ([#10274](https://github.com/MetaMask/core/pull/10274))
40
- - Add the `getSolanaPaySupportDiagnostics(transactionId)` method and `TransactionPayController:getSolanaPaySupportDiagnostics` messenger action. It returns a privacy-safe projection of the persisted `metamaskPay.solanaExecution` checkpoint: categorical phase, source, Relay, notification and follow-up statuses, the derived outcome, the source asset class (`native` or `token`), identifier-presence flags and a stable `errorCode`. It never includes accounts, assets, amounts, request or transaction IDs, provider payloads or failure text.
41
- - Add the `TransactionPayController:solanaPayLifecycle` event. It is published with the same diagnostics plus `isRecovery` whenever a categorical value of a transaction's Solana execution checkpoint changes, including the failed or expired source and interrupted follow-up states. `isRecovery` is `true` for transitions observed by `recoverSolanaPayStatus`.
42
- - Add the `SolanaPayErrorCode`, `SolanaPaySupportDiagnostics`, `SolanaPayLifecyclePayload`, `TransactionPayControllerSolanaPayLifecycleEvent` and `TransactionPayControllerGetSolanaPaySupportDiagnosticsAction` types.
43
- - Relay statuses that Core does not recognize are now recorded as `unknown` instead of `pending`.
44
-
45
- ### Changed
46
-
47
- - **BREAKING:** `TransactionPaymentToken` is identified by its CAIP-19 `assetId` for every chain ([#10272](https://github.com/MetaMask/core/pull/10272))
48
- - Remove `address` and `chainId`; derive them from `assetId` where needed.
49
- - **BREAKING:** `UpdatePaymentTokenRequest` takes `{ transactionId, assetId }` instead of `{ transactionId, tokenAddress, chainId }` ([#10272](https://github.com/MetaMask/core/pull/10272))
50
- - **BREAKING:** `accountOverride` in `TransactionConfig` and `TransactionData` is now the ID of an `InternalAccount` instead of an address ([#10272](https://github.com/MetaMask/core/pull/10272))
51
- - An EVM account overrides the EVM account as before. The account holding a non-EVM payment token is the override account when it supports the payment token chain, otherwise the account in the same account group as the override account, or as the transaction account, that supports that chain.
52
- - Fiat payments throw if the account override is not an EVM account.
53
- - **BREAKING:** `TransactionPayControllerMessenger` requires the `AccountTreeController:getAccountContext` and `AccountTreeController:getAccountGroupObject` actions ([#10272](https://github.com/MetaMask/core/pull/10272))
54
- - **BREAKING:** `TransactionPayControllerMessenger` requires the `SnapController:handleRequest`, `ConfigRegistryController:getNetworkConfigByCaip2ChainId`, `TransactionController:confirmTransaction` and `TransactionController:failTransaction` actions ([#10273](https://github.com/MetaMask/core/pull/10273))
55
- - **BREAKING:** The `request` of a `TransactionPayQuote` identifies its source by CAIP identifiers for every protocol ([#10273](https://github.com/MetaMask/core/pull/10273))
56
- - Remove `sourceChainId` and `sourceTokenAddress`. Add the CAIP-19 `sourceAssetId` and the CAIP-10 `sourceAccountId` of the account holding the source token, and derive an EVM chain ID and token address from `sourceAssetId` where needed.
57
- - `TransactionData.quotes` can contain quotes for a non-EVM source.
58
- - Add dependency on `@metamask/account-tree-controller` `^11.2.0` ([#10272](https://github.com/MetaMask/core/pull/10272))
59
- - Add dependencies on `@metamask/config-registry-controller` `^5.0.0`, `@metamask/rpc-errors` `^7.0.3`, `@metamask/snaps-controllers` `^19.0.1`, `@metamask/snaps-sdk` `^11.0.0`, `@metamask/snaps-utils` `^12.1.2`, `@solana/addresses` `^2.3.0`, `@solana/instructions` `^2.3.0`, `@solana/rpc-types` `^2.3.0`, `@solana/transaction-messages` `^2.3.0`, `@solana/transactions` `^2.3.0` and `uuid` `^14.0.2` ([#10273](https://github.com/MetaMask/core/pull/10273))
13
+
14
+ ### Changed
15
+
60
16
  - Bump `@metamask/assets-controller` from `^20.2.2` to `^20.2.3` ([#11326](https://github.com/MetaMask/core/pull/11326))
61
17
 
62
18
  ## [31.0.0]
@@ -98,16 +98,6 @@ export type TransactionPayControllerGetFiatOptionsAction = {
98
98
  type: `TransactionPayController:getFiatOptions`;
99
99
  handler: TransactionPayController['getFiatOptions'];
100
100
  };
101
- /**
102
- * Returns the Infura project ID used to resolve `{infuraProjectId}`
103
- * placeholders in RPC URLs.
104
- *
105
- * @returns The Infura project ID, if configured.
106
- */
107
- export type TransactionPayControllerGetInfuraProjectIdAction = {
108
- type: `TransactionPayController:getInfuraProjectId`;
109
- handler: TransactionPayController['getInfuraProjectId'];
110
- };
111
101
  export type TransactionPayControllerGetPaymentOverrideDataAction = {
112
102
  type: `TransactionPayController:getPaymentOverrideData`;
113
103
  handler: TransactionPayController['getPaymentOverrideData'];
@@ -148,53 +138,8 @@ export type TransactionPayControllerPolymarketSubmitDepositWalletBatchAction = {
148
138
  type: `TransactionPayController:polymarketSubmitDepositWalletBatch`;
149
139
  handler: TransactionPayController['polymarketSubmitDepositWalletBatch'];
150
140
  };
151
- /**
152
- * Observes a Solana Pay execution through Relay status and finalizes the
153
- * externally published target transaction once the outcome is terminal.
154
- * While Relay has not observed the source transaction, its on-chain status
155
- * is read once from the Solana RPC to detect a failed or expired source.
156
- * Once Relay delivered the funds of a Money Account deposit, the non-atomic
157
- * second leg runs once, guarded by the follow-up checkpoint.
158
- *
159
- * This method never signs or broadcasts the Solana source transaction, and
160
- * never notifies Relay.
161
- *
162
- * @param transactionId - Target transaction ID.
163
- * @returns The latest observed status.
164
- */
165
- export type TransactionPayControllerReconcileSolanaPayAction = {
166
- type: `TransactionPayController:reconcileSolanaPay`;
167
- handler: TransactionPayController['reconcileSolanaPay'];
168
- };
169
- /**
170
- * Observes every persisted Solana Pay execution that is not terminal once,
171
- * independently of each other. Clients call it again on foreground or
172
- * startup to keep observing.
173
- *
174
- * This method never signs, broadcasts, or notifies Relay.
175
- *
176
- * @returns Latest statuses keyed by target transaction ID, omitting
177
- * executions whose observation failed.
178
- */
179
- export type TransactionPayControllerRecoverSolanaPayStatusAction = {
180
- type: `TransactionPayController:recoverSolanaPayStatus`;
181
- handler: TransactionPayController['recoverSolanaPayStatus'];
182
- };
183
- /**
184
- * Returns the privacy-safe support diagnostics of a Solana Pay execution.
185
- *
186
- * The diagnostics only carry categorical values and identifier-presence
187
- * flags, never accounts, assets, amounts, identifiers or failure text.
188
- *
189
- * @param transactionId - Target transaction ID.
190
- * @returns Categorical diagnostics of the persisted execution checkpoint.
191
- */
192
- export type TransactionPayControllerGetSolanaPaySupportDiagnosticsAction = {
193
- type: `TransactionPayController:getSolanaPaySupportDiagnostics`;
194
- handler: TransactionPayController['getSolanaPaySupportDiagnostics'];
195
- };
196
141
  /**
197
142
  * Union of all TransactionPayController action types.
198
143
  */
199
- export type TransactionPayControllerMethodActions = TransactionPayControllerSetTransactionConfigAction | TransactionPayControllerUpdatePaymentTokenAction | TransactionPayControllerUpdateFiatPaymentAction | TransactionPayControllerGetClientIdAction | TransactionPayControllerGetDelegationTransactionAction | TransactionPayControllerGetAmountDataAction | TransactionPayControllerGetFiatOptionsAction | TransactionPayControllerGetInfuraProjectIdAction | TransactionPayControllerGetPaymentOverrideDataAction | TransactionPayControllerGetStrategyAction | TransactionPayControllerPolymarketGetDepositWalletAddressAction | TransactionPayControllerPolymarketSubmitDepositWalletBatchAction | TransactionPayControllerReconcileSolanaPayAction | TransactionPayControllerRecoverSolanaPayStatusAction | TransactionPayControllerGetSolanaPaySupportDiagnosticsAction;
144
+ export type TransactionPayControllerMethodActions = TransactionPayControllerSetTransactionConfigAction | TransactionPayControllerUpdatePaymentTokenAction | TransactionPayControllerUpdateFiatPaymentAction | TransactionPayControllerGetClientIdAction | TransactionPayControllerGetDelegationTransactionAction | TransactionPayControllerGetAmountDataAction | TransactionPayControllerGetFiatOptionsAction | TransactionPayControllerGetPaymentOverrideDataAction | TransactionPayControllerGetStrategyAction | TransactionPayControllerPolymarketGetDepositWalletAddressAction | TransactionPayControllerPolymarketSubmitDepositWalletBatchAction;
200
145
  //# sourceMappingURL=TransactionPayController-method-action-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionPayController-method-action-types.d.ts","sourceRoot":"","sources":["../src/TransactionPayController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;;;;GAQG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,wBAAwB,CAAC,mBAAmB,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,yCAAyC,GAAG;IACtD,IAAI,EAAE,sCAAsC,CAAC;IAC7C,OAAO,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,IAAI,EAAE,mDAAmD,CAAC;IAC1D,OAAO,EAAE,wBAAwB,CAAC,0BAA0B,CAAC,CAAC;CAC/D,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,wBAAwB,CAAC,eAAe,CAAC,CAAC;CACpD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,oDAAoD,GAAG;IACjE,IAAI,EAAE,iDAAiD,CAAC;IACxD,OAAO,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,yCAAyC,GAAG;IACtD,IAAI,EAAE,sCAAsC,CAAC;IAC7C,OAAO,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,+DAA+D,GAAG;IAC5E,IAAI,EAAE,4DAA4D,CAAC;IACnE,OAAO,EAAE,wBAAwB,CAAC,mCAAmC,CAAC,CAAC;CACxE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gEAAgE,GAAG;IAC7E,IAAI,EAAE,6DAA6D,CAAC;IACpE,OAAO,EAAE,wBAAwB,CAAC,oCAAoC,CAAC,CAAC;CACzE,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,oDAAoD,GAAG;IACjE,IAAI,EAAE,iDAAiD,CAAC;IACxD,OAAO,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,4DAA4D,GAAG;IACzE,IAAI,EAAE,yDAAyD,CAAC;IAChE,OAAO,EAAE,wBAAwB,CAAC,gCAAgC,CAAC,CAAC;CACrE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC7C,kDAAkD,GAClD,gDAAgD,GAChD,+CAA+C,GAC/C,yCAAyC,GACzC,sDAAsD,GACtD,2CAA2C,GAC3C,4CAA4C,GAC5C,gDAAgD,GAChD,oDAAoD,GACpD,yCAAyC,GACzC,+DAA+D,GAC/D,gEAAgE,GAChE,gDAAgD,GAChD,oDAAoD,GACpD,4DAA4D,CAAC"}
1
+ {"version":3,"file":"TransactionPayController-method-action-types.d.ts","sourceRoot":"","sources":["../src/TransactionPayController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;;;;GAQG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,wBAAwB,CAAC,sBAAsB,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,wBAAwB,CAAC,mBAAmB,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,yCAAyC,GAAG;IACtD,IAAI,EAAE,sCAAsC,CAAC;IAC7C,OAAO,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,sDAAsD,GAAG;IACnE,IAAI,EAAE,mDAAmD,CAAC;IAC1D,OAAO,EAAE,wBAAwB,CAAC,0BAA0B,CAAC,CAAC;CAC/D,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,wBAAwB,CAAC,eAAe,CAAC,CAAC;CACpD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,oDAAoD,GAAG;IACjE,IAAI,EAAE,iDAAiD,CAAC;IACxD,OAAO,EAAE,wBAAwB,CAAC,wBAAwB,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,yCAAyC,GAAG;IACtD,IAAI,EAAE,sCAAsC,CAAC;IAC7C,OAAO,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,+DAA+D,GAAG;IAC5E,IAAI,EAAE,4DAA4D,CAAC;IACnE,OAAO,EAAE,wBAAwB,CAAC,mCAAmC,CAAC,CAAC;CACxE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gEAAgE,GAAG;IAC7E,IAAI,EAAE,6DAA6D,CAAC;IACpE,OAAO,EAAE,wBAAwB,CAAC,oCAAoC,CAAC,CAAC;CACzE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC7C,kDAAkD,GAClD,gDAAgD,GAChD,+CAA+C,GAC/C,yCAAyC,GACzC,sDAAsD,GACtD,2CAA2C,GAC3C,4CAA4C,GAC5C,oDAAoD,GACpD,yCAAyC,GACzC,+DAA+D,GAC/D,gEAAgE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionPayController-method-action-types.js","sourceRoot":"","sources":["../src/TransactionPayController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TransactionPayController } from './TransactionPayController.js';\n\n/**\n * Sets the transaction configuration.\n *\n * The callback receives the current configuration properties and can mutate\n * them in place. Updated values are written back to the transaction data.\n *\n * @param transactionId - The ID of the transaction to configure.\n * @param callback - A callback that receives a mutable {@link TransactionConfig} object.\n */\nexport type TransactionPayControllerSetTransactionConfigAction = {\n type: `TransactionPayController:setTransactionConfig`;\n handler: TransactionPayController['setTransactionConfig'];\n};\n\n/**\n * Updates the payment token for a transaction.\n *\n * Resolves token metadata and balances, then stores the new payment token\n * in the transaction data. This triggers recalculation of source amounts\n * and quote retrieval.\n *\n * @param request - The payment token update request containing the\n * transaction ID, token address, and chain ID.\n */\nexport type TransactionPayControllerUpdatePaymentTokenAction = {\n type: `TransactionPayController:updatePaymentToken`;\n handler: TransactionPayController['updatePaymentToken'];\n};\n\n/**\n * Updates the fiat payment state for a transaction.\n *\n * The request callback receives the current fiat payment state and can\n * mutate it to update properties such as the selected payment method or\n * fiat amount.\n *\n * @param request - The fiat payment update request containing the\n * transaction ID and a callback to mutate fiat payment state.\n */\nexport type TransactionPayControllerUpdateFiatPaymentAction = {\n type: `TransactionPayController:updateFiatPayment`;\n handler: TransactionPayController['updateFiatPayment'];\n};\n\n/**\n * Returns the configured client identifier.\n *\n * Used to set the `X-Client-Id` header on intents API requests so the\n * server can distinguish Mobile from Extension traffic. This is\n * intentionally not stored in controller state.\n *\n * @returns The client identifier, if configured.\n */\nexport type TransactionPayControllerGetClientIdAction = {\n type: `TransactionPayController:getClientId`;\n handler: TransactionPayController['getClientId'];\n};\n\n/**\n * Gets the delegation transaction for a given transaction.\n *\n * Converts the provided transaction into a redeem delegation by delegating\n * to the configured callback. Returns the delegation transaction data\n * including the encoded call data, target address, value, and an optional\n * authorization list.\n *\n * @param args - The arguments forwarded to the {@link GetDelegationTransactionCallback},\n * containing the transaction metadata.\n * @returns A promise resolving to the delegation transaction data.\n */\nexport type TransactionPayControllerGetDelegationTransactionAction = {\n type: `TransactionPayController:getDelegationTransaction`;\n handler: TransactionPayController['getDelegationTransaction'];\n};\n\n/**\n * Returns additional transactions for the paymentOverride flow.\n *\n * Delegates to the client-supplied {@link GetPaymentOverrideDataCallback}.\n * Called during quote execution when `paymentOverride` is defined on the transaction.\n * Returns an empty array when no callback is configured.\n *\n * @param args - The arguments forwarded to the {@link GetPaymentOverrideDataCallback}.\n * @returns A promise resolving to the additional transactions array.\n */\nexport type TransactionPayControllerGetAmountDataAction = {\n type: `TransactionPayController:getAmountData`;\n handler: TransactionPayController['getAmountData'];\n};\n\n/**\n * Returns optional fiat execution configuration.\n *\n * This is intentionally not stored in controller state.\n *\n * @returns Fiat execution options, if configured.\n */\nexport type TransactionPayControllerGetFiatOptionsAction = {\n type: `TransactionPayController:getFiatOptions`;\n handler: TransactionPayController['getFiatOptions'];\n};\n\n/**\n * Returns the Infura project ID used to resolve `{infuraProjectId}`\n * placeholders in RPC URLs.\n *\n * @returns The Infura project ID, if configured.\n */\nexport type TransactionPayControllerGetInfuraProjectIdAction = {\n type: `TransactionPayController:getInfuraProjectId`;\n handler: TransactionPayController['getInfuraProjectId'];\n};\n\nexport type TransactionPayControllerGetPaymentOverrideDataAction = {\n type: `TransactionPayController:getPaymentOverrideData`;\n handler: TransactionPayController['getPaymentOverrideData'];\n};\n\n/**\n * Gets the preferred strategy for a transaction.\n *\n * Returns the first strategy from the ordered list of strategies applicable\n * to the given transaction. Falls back to the default strategy order derived\n * from feature flags when no custom strategy callback is configured.\n *\n * @param transaction - The transaction metadata to determine the strategy for.\n * @returns The preferred {@link TransactionPayStrategy} for the transaction.\n */\nexport type TransactionPayControllerGetStrategyAction = {\n type: `TransactionPayController:getStrategy`;\n handler: TransactionPayController['getStrategy'];\n};\n\n/**\n * Derives the Polymarket deposit-wallet address for an EOA via the\n * client-supplied callback.\n *\n * @param args - The arguments forwarded to {@link PolymarketCallbacks.getDepositWalletAddress}.\n * @returns A promise resolving to the deposit-wallet address.\n */\nexport type TransactionPayControllerPolymarketGetDepositWalletAddressAction = {\n type: `TransactionPayController:polymarketGetDepositWalletAddress`;\n handler: TransactionPayController['polymarketGetDepositWalletAddress'];\n};\n\n/**\n * Signs and broadcasts a Polymarket deposit-wallet batch via the\n * client-supplied callback.\n *\n * @param args - The arguments forwarded to {@link PolymarketCallbacks.submitDepositWalletBatch}.\n * @returns A promise resolving to the relayer-issued source hash.\n */\nexport type TransactionPayControllerPolymarketSubmitDepositWalletBatchAction = {\n type: `TransactionPayController:polymarketSubmitDepositWalletBatch`;\n handler: TransactionPayController['polymarketSubmitDepositWalletBatch'];\n};\n\n/**\n * Observes a Solana Pay execution through Relay status and finalizes the\n * externally published target transaction once the outcome is terminal.\n * While Relay has not observed the source transaction, its on-chain status\n * is read once from the Solana RPC to detect a failed or expired source.\n * Once Relay delivered the funds of a Money Account deposit, the non-atomic\n * second leg runs once, guarded by the follow-up checkpoint.\n *\n * This method never signs or broadcasts the Solana source transaction, and\n * never notifies Relay.\n *\n * @param transactionId - Target transaction ID.\n * @returns The latest observed status.\n */\nexport type TransactionPayControllerReconcileSolanaPayAction = {\n type: `TransactionPayController:reconcileSolanaPay`;\n handler: TransactionPayController['reconcileSolanaPay'];\n};\n\n/**\n * Observes every persisted Solana Pay execution that is not terminal once,\n * independently of each other. Clients call it again on foreground or\n * startup to keep observing.\n *\n * This method never signs, broadcasts, or notifies Relay.\n *\n * @returns Latest statuses keyed by target transaction ID, omitting\n * executions whose observation failed.\n */\nexport type TransactionPayControllerRecoverSolanaPayStatusAction = {\n type: `TransactionPayController:recoverSolanaPayStatus`;\n handler: TransactionPayController['recoverSolanaPayStatus'];\n};\n\n/**\n * Returns the privacy-safe support diagnostics of a Solana Pay execution.\n *\n * The diagnostics only carry categorical values and identifier-presence\n * flags, never accounts, assets, amounts, identifiers or failure text.\n *\n * @param transactionId - Target transaction ID.\n * @returns Categorical diagnostics of the persisted execution checkpoint.\n */\nexport type TransactionPayControllerGetSolanaPaySupportDiagnosticsAction = {\n type: `TransactionPayController:getSolanaPaySupportDiagnostics`;\n handler: TransactionPayController['getSolanaPaySupportDiagnostics'];\n};\n\n/**\n * Union of all TransactionPayController action types.\n */\nexport type TransactionPayControllerMethodActions =\n | TransactionPayControllerSetTransactionConfigAction\n | TransactionPayControllerUpdatePaymentTokenAction\n | TransactionPayControllerUpdateFiatPaymentAction\n | TransactionPayControllerGetClientIdAction\n | TransactionPayControllerGetDelegationTransactionAction\n | TransactionPayControllerGetAmountDataAction\n | TransactionPayControllerGetFiatOptionsAction\n | TransactionPayControllerGetInfuraProjectIdAction\n | TransactionPayControllerGetPaymentOverrideDataAction\n | TransactionPayControllerGetStrategyAction\n | TransactionPayControllerPolymarketGetDepositWalletAddressAction\n | TransactionPayControllerPolymarketSubmitDepositWalletBatchAction\n | TransactionPayControllerReconcileSolanaPayAction\n | TransactionPayControllerRecoverSolanaPayStatusAction\n | TransactionPayControllerGetSolanaPaySupportDiagnosticsAction;\n"]}
1
+ {"version":3,"file":"TransactionPayController-method-action-types.js","sourceRoot":"","sources":["../src/TransactionPayController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { TransactionPayController } from './TransactionPayController.js';\n\n/**\n * Sets the transaction configuration.\n *\n * The callback receives the current configuration properties and can mutate\n * them in place. Updated values are written back to the transaction data.\n *\n * @param transactionId - The ID of the transaction to configure.\n * @param callback - A callback that receives a mutable {@link TransactionConfig} object.\n */\nexport type TransactionPayControllerSetTransactionConfigAction = {\n type: `TransactionPayController:setTransactionConfig`;\n handler: TransactionPayController['setTransactionConfig'];\n};\n\n/**\n * Updates the payment token for a transaction.\n *\n * Resolves token metadata and balances, then stores the new payment token\n * in the transaction data. This triggers recalculation of source amounts\n * and quote retrieval.\n *\n * @param request - The payment token update request containing the\n * transaction ID, token address, and chain ID.\n */\nexport type TransactionPayControllerUpdatePaymentTokenAction = {\n type: `TransactionPayController:updatePaymentToken`;\n handler: TransactionPayController['updatePaymentToken'];\n};\n\n/**\n * Updates the fiat payment state for a transaction.\n *\n * The request callback receives the current fiat payment state and can\n * mutate it to update properties such as the selected payment method or\n * fiat amount.\n *\n * @param request - The fiat payment update request containing the\n * transaction ID and a callback to mutate fiat payment state.\n */\nexport type TransactionPayControllerUpdateFiatPaymentAction = {\n type: `TransactionPayController:updateFiatPayment`;\n handler: TransactionPayController['updateFiatPayment'];\n};\n\n/**\n * Returns the configured client identifier.\n *\n * Used to set the `X-Client-Id` header on intents API requests so the\n * server can distinguish Mobile from Extension traffic. This is\n * intentionally not stored in controller state.\n *\n * @returns The client identifier, if configured.\n */\nexport type TransactionPayControllerGetClientIdAction = {\n type: `TransactionPayController:getClientId`;\n handler: TransactionPayController['getClientId'];\n};\n\n/**\n * Gets the delegation transaction for a given transaction.\n *\n * Converts the provided transaction into a redeem delegation by delegating\n * to the configured callback. Returns the delegation transaction data\n * including the encoded call data, target address, value, and an optional\n * authorization list.\n *\n * @param args - The arguments forwarded to the {@link GetDelegationTransactionCallback},\n * containing the transaction metadata.\n * @returns A promise resolving to the delegation transaction data.\n */\nexport type TransactionPayControllerGetDelegationTransactionAction = {\n type: `TransactionPayController:getDelegationTransaction`;\n handler: TransactionPayController['getDelegationTransaction'];\n};\n\n/**\n * Returns additional transactions for the paymentOverride flow.\n *\n * Delegates to the client-supplied {@link GetPaymentOverrideDataCallback}.\n * Called during quote execution when `paymentOverride` is defined on the transaction.\n * Returns an empty array when no callback is configured.\n *\n * @param args - The arguments forwarded to the {@link GetPaymentOverrideDataCallback}.\n * @returns A promise resolving to the additional transactions array.\n */\nexport type TransactionPayControllerGetAmountDataAction = {\n type: `TransactionPayController:getAmountData`;\n handler: TransactionPayController['getAmountData'];\n};\n\n/**\n * Returns optional fiat execution configuration.\n *\n * This is intentionally not stored in controller state.\n *\n * @returns Fiat execution options, if configured.\n */\nexport type TransactionPayControllerGetFiatOptionsAction = {\n type: `TransactionPayController:getFiatOptions`;\n handler: TransactionPayController['getFiatOptions'];\n};\n\nexport type TransactionPayControllerGetPaymentOverrideDataAction = {\n type: `TransactionPayController:getPaymentOverrideData`;\n handler: TransactionPayController['getPaymentOverrideData'];\n};\n\n/**\n * Gets the preferred strategy for a transaction.\n *\n * Returns the first strategy from the ordered list of strategies applicable\n * to the given transaction. Falls back to the default strategy order derived\n * from feature flags when no custom strategy callback is configured.\n *\n * @param transaction - The transaction metadata to determine the strategy for.\n * @returns The preferred {@link TransactionPayStrategy} for the transaction.\n */\nexport type TransactionPayControllerGetStrategyAction = {\n type: `TransactionPayController:getStrategy`;\n handler: TransactionPayController['getStrategy'];\n};\n\n/**\n * Derives the Polymarket deposit-wallet address for an EOA via the\n * client-supplied callback.\n *\n * @param args - The arguments forwarded to {@link PolymarketCallbacks.getDepositWalletAddress}.\n * @returns A promise resolving to the deposit-wallet address.\n */\nexport type TransactionPayControllerPolymarketGetDepositWalletAddressAction = {\n type: `TransactionPayController:polymarketGetDepositWalletAddress`;\n handler: TransactionPayController['polymarketGetDepositWalletAddress'];\n};\n\n/**\n * Signs and broadcasts a Polymarket deposit-wallet batch via the\n * client-supplied callback.\n *\n * @param args - The arguments forwarded to {@link PolymarketCallbacks.submitDepositWalletBatch}.\n * @returns A promise resolving to the relayer-issued source hash.\n */\nexport type TransactionPayControllerPolymarketSubmitDepositWalletBatchAction = {\n type: `TransactionPayController:polymarketSubmitDepositWalletBatch`;\n handler: TransactionPayController['polymarketSubmitDepositWalletBatch'];\n};\n\n/**\n * Union of all TransactionPayController action types.\n */\nexport type TransactionPayControllerMethodActions =\n | TransactionPayControllerSetTransactionConfigAction\n | TransactionPayControllerUpdatePaymentTokenAction\n | TransactionPayControllerUpdateFiatPaymentAction\n | TransactionPayControllerGetClientIdAction\n | TransactionPayControllerGetDelegationTransactionAction\n | TransactionPayControllerGetAmountDataAction\n | TransactionPayControllerGetFiatOptionsAction\n | TransactionPayControllerGetPaymentOverrideDataAction\n | TransactionPayControllerGetStrategyAction\n | TransactionPayControllerPolymarketGetDepositWalletAddressAction\n | TransactionPayControllerPolymarketSubmitDepositWalletBatchAction;\n"]}
@@ -2,10 +2,10 @@ import { BaseController } from '@metamask/base-controller';
2
2
  import type { TransactionMeta } from '@metamask/transaction-controller';
3
3
  import { CONTROLLER_NAME, TransactionPayStrategy } from './constants.js';
4
4
  import type { TransactionPayClientId } from './constants.js';
5
- import type { GetAmountDataCallback, GetDelegationTransactionCallback, GetPaymentOverrideDataCallback, PolymarketCallbacks, SolanaPayStatus, SolanaPaySupportDiagnostics, TransactionConfigCallback, TransactionPayControllerMessenger, TransactionPayFiatOptions, TransactionPayControllerOptions, TransactionPayControllerState, UpdateFiatPaymentRequest, UpdatePaymentTokenRequest } from './types.js';
5
+ import type { GetAmountDataCallback, GetDelegationTransactionCallback, GetPaymentOverrideDataCallback, PolymarketCallbacks, TransactionConfigCallback, TransactionPayControllerMessenger, TransactionPayFiatOptions, TransactionPayControllerOptions, TransactionPayControllerState, UpdateFiatPaymentRequest, UpdatePaymentTokenRequest } from './types.js';
6
6
  export declare class TransactionPayController extends BaseController<typeof CONTROLLER_NAME, TransactionPayControllerState, TransactionPayControllerMessenger> {
7
7
  #private;
8
- constructor({ clientId, fiatOptions, getAmountData, getBalance, getDelegationTransaction, getPaymentOverrideData, getStrategy, getStrategies, infuraProjectId, messenger, polymarket, state, }: TransactionPayControllerOptions);
8
+ constructor({ clientId, fiatOptions, getAmountData, getBalance, getDelegationTransaction, getPaymentOverrideData, getStrategy, getStrategies, messenger, polymarket, state, }: TransactionPayControllerOptions);
9
9
  /**
10
10
  * Sets the transaction configuration.
11
11
  *
@@ -80,13 +80,6 @@ export declare class TransactionPayController extends BaseController<typeof CONT
80
80
  * @returns Fiat execution options, if configured.
81
81
  */
82
82
  getFiatOptions(): TransactionPayFiatOptions | undefined;
83
- /**
84
- * Returns the Infura project ID used to resolve `{infuraProjectId}`
85
- * placeholders in RPC URLs.
86
- *
87
- * @returns The Infura project ID, if configured.
88
- */
89
- getInfuraProjectId(): string | undefined;
90
83
  getPaymentOverrideData(...args: Parameters<GetPaymentOverrideDataCallback>): ReturnType<GetPaymentOverrideDataCallback>;
91
84
  /**
92
85
  * Gets the preferred strategy for a transaction.
@@ -115,41 +108,5 @@ export declare class TransactionPayController extends BaseController<typeof CONT
115
108
  * @returns A promise resolving to the relayer-issued source hash.
116
109
  */
117
110
  polymarketSubmitDepositWalletBatch(...args: Parameters<PolymarketCallbacks['submitDepositWalletBatch']>): ReturnType<PolymarketCallbacks['submitDepositWalletBatch']>;
118
- /**
119
- * Observes a Solana Pay execution through Relay status and finalizes the
120
- * externally published target transaction once the outcome is terminal.
121
- * While Relay has not observed the source transaction, its on-chain status
122
- * is read once from the Solana RPC to detect a failed or expired source.
123
- * Once Relay delivered the funds of a Money Account deposit, the non-atomic
124
- * second leg runs once, guarded by the follow-up checkpoint.
125
- *
126
- * This method never signs or broadcasts the Solana source transaction, and
127
- * never notifies Relay.
128
- *
129
- * @param transactionId - Target transaction ID.
130
- * @returns The latest observed status.
131
- */
132
- reconcileSolanaPay(transactionId: string): Promise<SolanaPayStatus>;
133
- /**
134
- * Observes every persisted Solana Pay execution that is not terminal once,
135
- * independently of each other. Clients call it again on foreground or
136
- * startup to keep observing.
137
- *
138
- * This method never signs, broadcasts, or notifies Relay.
139
- *
140
- * @returns Latest statuses keyed by target transaction ID, omitting
141
- * executions whose observation failed.
142
- */
143
- recoverSolanaPayStatus(): Promise<Record<string, SolanaPayStatus>>;
144
- /**
145
- * Returns the privacy-safe support diagnostics of a Solana Pay execution.
146
- *
147
- * The diagnostics only carry categorical values and identifier-presence
148
- * flags, never accounts, assets, amounts, identifiers or failure text.
149
- *
150
- * @param transactionId - Target transaction ID.
151
- * @returns Categorical diagnostics of the persisted execution checkpoint.
152
- */
153
- getSolanaPaySupportDiagnostics(transactionId: string): SolanaPaySupportDiagnostics;
154
111
  }
155
112
  //# sourceMappingURL=TransactionPayController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionPayController.d.ts","sourceRoot":"","sources":["../src/TransactionPayController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EAEV,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAM1C,OAAO,EACL,eAAe,EAEf,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAiB7D,OAAO,KAAK,EACV,qBAAqB,EAErB,gCAAgC,EAChC,8BAA8B,EAC9B,mBAAmB,EACnB,eAAe,EACf,2BAA2B,EAE3B,yBAAyB,EAEzB,iCAAiC,EACjC,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AA2CpB,qBAAa,wBAAyB,SAAQ,cAAc,CAC1D,OAAO,eAAe,EACtB,6BAA6B,EAC7B,iCAAiC,CAClC;;IA2BC,YAAY,EACV,QAAQ,EACR,WAAW,EACX,aAAa,EACb,UAAU,EACV,wBAAwB,EACxB,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,eAAe,EACf,SAAS,EACT,UAAU,EACV,KAAK,GACN,EAAE,+BAA+B,EAiDjC;IAED;;;;;;;;OAQG;IACH,oBAAoB,CAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,yBAAyB,GAClC,IAAI,CA2BN;IAED;;;;;;;;;OASG;IACH,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAK3D;IAED;;;;;;;;;OASG;IACH,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAKzD;IAED;;;;;;;;OAQG;IACH,WAAW,IAAI,sBAAsB,GAAG,SAAS,CAEhD;IAED;;;;;;;;;;;OAWG;IACH,wBAAwB,CACtB,GAAG,IAAI,EAAE,UAAU,CAAC,gCAAgC,CAAC,GACpD,UAAU,CAAC,gCAAgC,CAAC,CAE9C;IAED;;;;;;;;;OASG;IACH,aAAa,CACX,GAAG,IAAI,EAAE,UAAU,CAAC,qBAAqB,CAAC,GACzC,UAAU,CAAC,qBAAqB,CAAC,CAEnC;IAED;;;;;;OAMG;IACH,cAAc,IAAI,yBAAyB,GAAG,SAAS,CAEtD;IAED;;;;;OAKG;IACH,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED,sBAAsB,CACpB,GAAG,IAAI,EAAE,UAAU,CAAC,8BAA8B,CAAC,GAClD,UAAU,CAAC,8BAA8B,CAAC,CAI5C;IAED;;;;;;;;;OASG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,sBAAsB,CAEhE;IAED;;;;;;OAMG;IACH,iCAAiC,CAC/B,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,CAAC,GAClE,UAAU,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,CAAC,CAE5D;IAED;;;;;;OAMG;IACH,kCAAkC,CAChC,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,CAAC,GACnE,UAAU,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,CAAC,CAE7D;IAED;;;;;;;;;;;;;OAaG;IACG,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAqCxE;IAED;;;;;;;;;OASG;IACG,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAmCvE;IAED;;;;;;;;OAQG;IACH,8BAA8B,CAC5B,aAAa,EAAE,MAAM,GACpB,2BAA2B,CAO7B;CAgPF"}
1
+ {"version":3,"file":"TransactionPayController.d.ts","sourceRoot":"","sources":["../src/TransactionPayController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAMxE,OAAO,EACL,eAAe,EAEf,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,KAAK,EACV,qBAAqB,EAErB,gCAAgC,EAChC,8BAA8B,EAC9B,mBAAmB,EAEnB,yBAAyB,EAEzB,iCAAiC,EACjC,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAoCpB,qBAAa,wBAAyB,SAAQ,cAAc,CAC1D,OAAO,eAAe,EACtB,6BAA6B,EAC7B,iCAAiC,CAClC;;IAuBC,YAAY,EACV,QAAQ,EACR,WAAW,EACX,aAAa,EACb,UAAU,EACV,wBAAwB,EACxB,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,EACV,KAAK,GACN,EAAE,+BAA+B,EA0CjC;IAED;;;;;;;;OAQG;IACH,oBAAoB,CAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,yBAAyB,GAClC,IAAI,CA2BN;IAED;;;;;;;;;OASG;IACH,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAK3D;IAED;;;;;;;;;OASG;IACH,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAKzD;IAED;;;;;;;;OAQG;IACH,WAAW,IAAI,sBAAsB,GAAG,SAAS,CAEhD;IAED;;;;;;;;;;;OAWG;IACH,wBAAwB,CACtB,GAAG,IAAI,EAAE,UAAU,CAAC,gCAAgC,CAAC,GACpD,UAAU,CAAC,gCAAgC,CAAC,CAE9C;IAED;;;;;;;;;OASG;IACH,aAAa,CACX,GAAG,IAAI,EAAE,UAAU,CAAC,qBAAqB,CAAC,GACzC,UAAU,CAAC,qBAAqB,CAAC,CAEnC;IAED;;;;;;OAMG;IACH,cAAc,IAAI,yBAAyB,GAAG,SAAS,CAEtD;IAED,sBAAsB,CACpB,GAAG,IAAI,EAAE,UAAU,CAAC,8BAA8B,CAAC,GAClD,UAAU,CAAC,8BAA8B,CAAC,CAI5C;IAED;;;;;;;;;OASG;IACH,WAAW,CAAC,WAAW,EAAE,eAAe,GAAG,sBAAsB,CAEhE;IAED;;;;;;OAMG;IACH,iCAAiC,CAC/B,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,CAAC,GAClE,UAAU,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,CAAC,CAE5D;IAED;;;;;;OAMG;IACH,kCAAkC,CAChC,GAAG,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,CAAC,GACnE,UAAU,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,CAAC,CAE7D;CAiJF"}
@@ -1,31 +1,22 @@
1
1
  import { BaseController } from '@metamask/base-controller';
2
- import { TransactionStatus } from '@metamask/transaction-controller';
3
2
  import { noop } from 'lodash-es';
4
3
  import { updateFiatPayment } from './actions/update-fiat-payment.js';
5
4
  import { updatePaymentToken } from './actions/update-payment-token.js';
6
5
  import { CONTROLLER_NAME, isTransactionPayStrategy, } from './constants.js';
7
6
  import { QuoteRefresher } from './helpers/QuoteRefresher.js';
8
- import { getRelayStatus } from './strategy/relay/relay-api.js';
9
- import { getSolanaPaySupportDiagnostics, isSolanaPayLifecycleTransition, } from './strategy/relay/solana-pay-diagnostics.js';
10
- import { applyRelayStatusObservation, applySolanaSourceFailure, getSolanaPayFailure, getSolanaPayStatus, isTerminalSolanaPayOutcome, persistSolanaExecution, readSolanaSourceFailure, submitSolanaPayFollowUp, } from './strategy/relay/solana-pay.js';
11
7
  import { getStrategyOrder } from './utils/feature-flags.js';
12
8
  import { updateQuotes } from './utils/quotes.js';
13
9
  import { updateSourceAmounts } from './utils/source-amounts.js';
14
- import { getEvmPaymentToken } from './utils/token.js';
15
- import { getTransaction, subscribeAssetChanges, subscribeTransactionChanges, updateTransaction, } from './utils/transaction.js';
10
+ import { subscribeAssetChanges, subscribeTransactionChanges, } from './utils/transaction.js';
16
11
  const MESSENGER_EXPOSED_METHODS = [
17
12
  'getAmountData',
18
13
  'getClientId',
19
14
  'getDelegationTransaction',
20
15
  'getFiatOptions',
21
- 'getInfuraProjectId',
22
16
  'getPaymentOverrideData',
23
- 'getSolanaPaySupportDiagnostics',
24
17
  'getStrategy',
25
18
  'polymarketGetDepositWalletAddress',
26
19
  'polymarketSubmitDepositWalletBatch',
27
- 'reconcileSolanaPay',
28
- 'recoverSolanaPayStatus',
29
20
  'setTransactionConfig',
30
21
  'updateFiatPayment',
31
22
  'updatePaymentToken',
@@ -50,10 +41,8 @@ export class TransactionPayController extends BaseController {
50
41
  #getPaymentOverrideData;
51
42
  #getStrategy;
52
43
  #getStrategies;
53
- #infuraProjectId;
54
44
  #polymarket;
55
- #recoveringSolanaPayTransactionIds = new Set();
56
- constructor({ clientId, fiatOptions, getAmountData, getBalance, getDelegationTransaction, getPaymentOverrideData, getStrategy, getStrategies, infuraProjectId, messenger, polymarket, state, }) {
45
+ constructor({ clientId, fiatOptions, getAmountData, getBalance, getDelegationTransaction, getPaymentOverrideData, getStrategy, getStrategies, messenger, polymarket, state, }) {
57
46
  super({
58
47
  name: CONTROLLER_NAME,
59
48
  metadata: stateMetadata,
@@ -68,11 +57,9 @@ export class TransactionPayController extends BaseController {
68
57
  this.#getPaymentOverrideData = getPaymentOverrideData;
69
58
  this.#getStrategy = getStrategy;
70
59
  this.#getStrategies = getStrategies;
71
- this.#infuraProjectId = infuraProjectId;
72
60
  this.#polymarket = polymarket;
73
61
  this.messenger.registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
74
62
  subscribeTransactionChanges(messenger, this.#updateTransactionData.bind(this), this.#removeTransactionData.bind(this));
75
- messenger.subscribe('TransactionController:stateChange', this.#publishSolanaPayLifecycle.bind(this), (transactionControllerState) => transactionControllerState.transactions);
76
63
  subscribeAssetChanges(messenger, () => this.state, this.#updateTransactionData.bind(this));
77
64
  // eslint-disable-next-line no-new
78
65
  new QuoteRefresher({
@@ -195,15 +182,6 @@ export class TransactionPayController extends BaseController {
195
182
  getFiatOptions() {
196
183
  return this.#fiatOptions;
197
184
  }
198
- /**
199
- * Returns the Infura project ID used to resolve `{infuraProjectId}`
200
- * placeholders in RPC URLs.
201
- *
202
- * @returns The Infura project ID, if configured.
203
- */
204
- getInfuraProjectId() {
205
- return this.#infuraProjectId;
206
- }
207
185
  getPaymentOverrideData(...args) {
208
186
  return (this.#getPaymentOverrideData?.(...args) ?? Promise.resolve({ calls: [] }));
209
187
  }
@@ -240,120 +218,6 @@ export class TransactionPayController extends BaseController {
240
218
  polymarketSubmitDepositWalletBatch(...args) {
241
219
  return this.#requirePolymarket().submitDepositWalletBatch(...args);
242
220
  }
243
- /**
244
- * Observes a Solana Pay execution through Relay status and finalizes the
245
- * externally published target transaction once the outcome is terminal.
246
- * While Relay has not observed the source transaction, its on-chain status
247
- * is read once from the Solana RPC to detect a failed or expired source.
248
- * Once Relay delivered the funds of a Money Account deposit, the non-atomic
249
- * second leg runs once, guarded by the follow-up checkpoint.
250
- *
251
- * This method never signs or broadcasts the Solana source transaction, and
252
- * never notifies Relay.
253
- *
254
- * @param transactionId - Target transaction ID.
255
- * @returns The latest observed status.
256
- */
257
- async reconcileSolanaPay(transactionId) {
258
- const { requestId } = this.#requireSolanaExecution(transactionId);
259
- const relayStatus = await getRelayStatus(this.messenger, requestId).then((status) => status, () => undefined);
260
- const sourceFailureReason = await readSolanaSourceFailure(this.messenger, applyRelayStatusObservation(this.#requireSolanaExecution(transactionId), relayStatus));
261
- persistSolanaExecution(this.messenger, transactionId, applySolanaSourceFailure(applyRelayStatusObservation(this.#requireSolanaExecution(transactionId), relayStatus), sourceFailureReason), 'Observe Relay Solana status');
262
- await submitSolanaPayFollowUp(this.messenger, transactionId);
263
- const status = getSolanaPayStatus(this.#requireSolanaExecution(transactionId));
264
- this.#finalizeSolanaPayTransaction(transactionId, status);
265
- return status;
266
- }
267
- /**
268
- * Observes every persisted Solana Pay execution that is not terminal once,
269
- * independently of each other. Clients call it again on foreground or
270
- * startup to keep observing.
271
- *
272
- * This method never signs, broadcasts, or notifies Relay.
273
- *
274
- * @returns Latest statuses keyed by target transaction ID, omitting
275
- * executions whose observation failed.
276
- */
277
- async recoverSolanaPayStatus() {
278
- const { transactions } = this.messenger.call('TransactionController:getState');
279
- const pending = transactions.filter((transaction) => {
280
- const execution = transaction.metamaskPay?.solanaExecution;
281
- return (execution && !isTerminalSolanaPayOutcome(getSolanaPayStatus(execution)));
282
- });
283
- pending.forEach(({ id }) => this.#recoveringSolanaPayTransactionIds.add(id));
284
- const observations = await Promise.allSettled(pending.map((transaction) => this.reconcileSolanaPay(transaction.id)));
285
- pending.forEach(({ id }) => this.#recoveringSolanaPayTransactionIds.delete(id));
286
- return observations.reduce((results, observation, index) => {
287
- if (observation.status === 'fulfilled') {
288
- results[pending[index].id] = observation.value;
289
- }
290
- return results;
291
- }, {});
292
- }
293
- /**
294
- * Returns the privacy-safe support diagnostics of a Solana Pay execution.
295
- *
296
- * The diagnostics only carry categorical values and identifier-presence
297
- * flags, never accounts, assets, amounts, identifiers or failure text.
298
- *
299
- * @param transactionId - Target transaction ID.
300
- * @returns Categorical diagnostics of the persisted execution checkpoint.
301
- */
302
- getSolanaPaySupportDiagnostics(transactionId) {
303
- const execution = this.#requireSolanaExecution(transactionId);
304
- return getSolanaPaySupportDiagnostics(getSolanaPayStatus(execution), execution);
305
- }
306
- #publishSolanaPayLifecycle(transactions, previousTransactions) {
307
- for (const transaction of transactions) {
308
- const execution = transaction.metamaskPay?.solanaExecution;
309
- if (!execution) {
310
- continue;
311
- }
312
- const previousTransaction = previousTransactions?.find((previous) => previous.id === transaction.id);
313
- const previousExecution = previousTransaction?.metamaskPay?.solanaExecution;
314
- const diagnostics = getSolanaPaySupportDiagnostics(getSolanaPayStatus(execution), execution);
315
- const previousDiagnostics = previousExecution &&
316
- getSolanaPaySupportDiagnostics(getSolanaPayStatus(previousExecution), previousExecution);
317
- if (!isSolanaPayLifecycleTransition(previousDiagnostics, diagnostics)) {
318
- continue;
319
- }
320
- this.messenger.publish('TransactionPayController:solanaPayLifecycle', {
321
- ...diagnostics,
322
- isRecovery: this.#recoveringSolanaPayTransactionIds.has(transaction.id),
323
- });
324
- }
325
- }
326
- #finalizeSolanaPayTransaction(transactionId, status) {
327
- const transaction = getTransaction(transactionId, this.messenger);
328
- if (transaction?.status !== TransactionStatus.submitted ||
329
- !transaction.isExternalPublish) {
330
- return;
331
- }
332
- const failure = getSolanaPayFailure(status);
333
- if (failure) {
334
- this.messenger.call('TransactionController:failTransaction', transactionId, new Error(failure));
335
- return;
336
- }
337
- if (status.outcome !== 'succeeded') {
338
- return;
339
- }
340
- updateTransaction({
341
- transactionId,
342
- messenger: this.messenger,
343
- note: 'Intent complete after Relay Solana completion',
344
- }, (draft) => {
345
- draft.isIntentComplete = true;
346
- });
347
- this.messenger.call('TransactionController:confirmTransaction', transactionId);
348
- }
349
- #requireSolanaExecution(transactionId) {
350
- const execution = getTransaction(transactionId, this.messenger)?.metamaskPay
351
- ?.solanaExecution;
352
- if (!execution) {
353
- throw new Error('TransactionPayController: Solana execution missing');
354
- }
355
- return execution;
356
- }
357
221
  #requirePolymarket() {
358
222
  if (!this.#polymarket) {
359
223
  throw new Error('TransactionPayController: Polymarket callbacks missing');
@@ -386,7 +250,9 @@ export class TransactionPayController extends BaseController {
386
250
  current = transactionData[transactionId];
387
251
  }
388
252
  fn(current);
389
- const isPaymentTokenUpdated = current.paymentToken?.assetId !== originalPaymentToken?.assetId;
253
+ const isPaymentTokenUpdated = current.paymentToken?.address?.toLowerCase() !==
254
+ originalPaymentToken?.address?.toLowerCase() ||
255
+ current.paymentToken?.chainId !== originalPaymentToken?.chainId;
390
256
  const isPaymentTokenBalanceUpdated = current.paymentToken?.balanceRaw !== originalPaymentToken?.balanceRaw;
391
257
  const isTokensUpdated = current.tokens !== originalTokens;
392
258
  const isIsMaxUpdated = current.isMaxAmount !== originalIsMaxAmount;
@@ -443,8 +309,8 @@ export class TransactionPayController extends BaseController {
443
309
  if (validStrategies.length) {
444
310
  return validStrategies;
445
311
  }
446
- const evmPaymentToken = getEvmPaymentToken(transactionData?.paymentToken);
447
- return getStrategyOrder(this.messenger, evmPaymentToken?.chainId, evmPaymentToken?.address, transaction.type, transactionData?.fiatPayment?.selectedPaymentMethodId);
312
+ const paymentToken = transactionData?.paymentToken;
313
+ return getStrategyOrder(this.messenger, paymentToken?.chainId, paymentToken?.address, transaction.type, transactionData?.fiatPayment?.selectedPaymentMethodId);
448
314
  }
449
315
  }
450
316
  //# sourceMappingURL=TransactionPayController.js.map