@metamask/bridge-status-controller 70.0.0 → 70.0.2
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.
- package/CHANGELOG.md +30 -1
- package/dist/bridge-status-controller.cjs +134 -267
- package/dist/bridge-status-controller.cjs.map +1 -1
- package/dist/bridge-status-controller.d.cts +2 -1
- package/dist/bridge-status-controller.d.cts.map +1 -1
- package/dist/bridge-status-controller.d.mts +2 -1
- package/dist/bridge-status-controller.d.mts.map +1 -1
- package/dist/bridge-status-controller.intent.cjs +7 -19
- package/dist/bridge-status-controller.intent.cjs.map +1 -1
- package/dist/bridge-status-controller.intent.d.cts +2 -10
- package/dist/bridge-status-controller.intent.d.cts.map +1 -1
- package/dist/bridge-status-controller.intent.d.mts +2 -10
- package/dist/bridge-status-controller.intent.d.mts.map +1 -1
- package/dist/bridge-status-controller.intent.mjs +7 -19
- package/dist/bridge-status-controller.intent.mjs.map +1 -1
- package/dist/bridge-status-controller.mjs +137 -270
- package/dist/bridge-status-controller.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +10 -4
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +10 -4
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/bridge-status.cjs +17 -1
- package/dist/utils/bridge-status.cjs.map +1 -1
- package/dist/utils/bridge-status.d.cts +8 -2
- package/dist/utils/bridge-status.d.cts.map +1 -1
- package/dist/utils/bridge-status.d.mts +8 -2
- package/dist/utils/bridge-status.d.mts.map +1 -1
- package/dist/utils/bridge-status.mjs +15 -0
- package/dist/utils/bridge-status.mjs.map +1 -1
- package/dist/utils/gas.cjs +1 -58
- package/dist/utils/gas.cjs.map +1 -1
- package/dist/utils/gas.d.cts +3 -26
- package/dist/utils/gas.d.cts.map +1 -1
- package/dist/utils/gas.d.mts +3 -26
- package/dist/utils/gas.d.mts.map +1 -1
- package/dist/utils/gas.mjs +0 -55
- package/dist/utils/gas.mjs.map +1 -1
- package/dist/utils/history.cjs +9 -8
- package/dist/utils/history.cjs.map +1 -1
- package/dist/utils/history.d.cts +3 -2
- package/dist/utils/history.d.cts.map +1 -1
- package/dist/utils/history.d.mts +3 -2
- package/dist/utils/history.d.mts.map +1 -1
- package/dist/utils/history.mjs +9 -8
- package/dist/utils/history.mjs.map +1 -1
- package/dist/utils/intent-api.cjs +26 -26
- package/dist/utils/intent-api.cjs.map +1 -1
- package/dist/utils/intent-api.d.cts +7 -2
- package/dist/utils/intent-api.d.cts.map +1 -1
- package/dist/utils/intent-api.d.mts +7 -2
- package/dist/utils/intent-api.d.mts.map +1 -1
- package/dist/utils/intent-api.mjs +24 -25
- package/dist/utils/intent-api.mjs.map +1 -1
- package/dist/utils/snaps.cjs +5 -5
- package/dist/utils/snaps.cjs.map +1 -1
- package/dist/utils/snaps.d.cts +3 -17
- package/dist/utils/snaps.d.cts.map +1 -1
- package/dist/utils/snaps.d.mts +3 -17
- package/dist/utils/snaps.d.mts.map +1 -1
- package/dist/utils/snaps.mjs +6 -6
- package/dist/utils/snaps.mjs.map +1 -1
- package/dist/utils/transaction.cjs +250 -24
- package/dist/utils/transaction.cjs.map +1 -1
- package/dist/utils/transaction.d.cts +93 -169
- package/dist/utils/transaction.d.cts.map +1 -1
- package/dist/utils/transaction.d.mts +93 -169
- package/dist/utils/transaction.d.mts.map +1 -1
- package/dist/utils/transaction.mjs +234 -19
- package/dist/utils/transaction.mjs.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [70.0.2]
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Bump `@metamask/accounts-controller` from `^37.0.0` to `^37.1.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
15
|
+
- Bump `@metamask/base-controller` from `^9.0.0` to `^9.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
16
|
+
- Bump `@metamask/bridge-controller` from `^69.2.1` to `^69.2.2` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
17
|
+
- Bump `@metamask/gas-fee-controller` from `^26.1.0` to `^26.1.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
18
|
+
- Bump `@metamask/keyring-controller` from `^25.1.0` to `^25.1.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
19
|
+
- Bump `@metamask/network-controller` from `^30.0.0` to `^30.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
20
|
+
- Bump `@metamask/polling-controller` from `^16.0.3` to `^16.0.4` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
21
|
+
- Bump `@metamask/profile-sync-controller` from `^28.0.0` to `^28.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
|
|
22
|
+
- Bump `@metamask/transaction-controller` from `^63.1.0` to `^63.3.1` ([#8301](https://github.com/MetaMask/core/pull/8301), [#8313](https://github.com/MetaMask/core/pull/8313), [#8317](https://github.com/MetaMask/core/pull/8317))
|
|
23
|
+
|
|
24
|
+
## [70.0.1]
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Bump `@metamask/bridge-controller` from `^69.1.1` to `^69.2.1` ([#8265](https://github.com/MetaMask/core/pull/8265), [#8288](https://github.com/MetaMask/core/pull/8288))
|
|
29
|
+
- Bump `@metamask/transaction-controller` from `^63.0.0` to `^63.1.0` ([#8272](https://github.com/MetaMask/core/pull/8272))
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Publish UnifiedSwapBridge Failed event for any exception thrown during `submitTx`. Previously the Failed event was only getting published for EVM txs after tx submission ([#8277](https://github.com/MetaMask/core/pull/8277))
|
|
34
|
+
- Keep EIP-7702 batching disabled for gasless transactions that use smart transactions / `eth_sendBundle` when the quote is gas-included but not gas-included-7702 even when the account is a smart account ([#8275](https://github.com/MetaMask/core/pull/8275))
|
|
35
|
+
- For hardware wallets on MetaMask Mobile, non-batch EVM flows with ERC-20 approval now run the hardware-wallet delay before waiting for approval confirmation, preserving Ledger second-prompt spacing while gas estimation still runs after allowance is set on-chain ([#8268](https://github.com/MetaMask/core/pull/8268))
|
|
36
|
+
|
|
10
37
|
## [70.0.0]
|
|
11
38
|
|
|
12
39
|
### Changed
|
|
@@ -1047,7 +1074,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1047
1074
|
|
|
1048
1075
|
- Initial release ([#5317](https://github.com/MetaMask/core/pull/5317))
|
|
1049
1076
|
|
|
1050
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.
|
|
1077
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.2...HEAD
|
|
1078
|
+
[70.0.2]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.1...@metamask/bridge-status-controller@70.0.2
|
|
1079
|
+
[70.0.1]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.0...@metamask/bridge-status-controller@70.0.1
|
|
1051
1080
|
[70.0.0]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@69.0.0...@metamask/bridge-status-controller@70.0.0
|
|
1052
1081
|
[69.0.0]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@68.1.0...@metamask/bridge-status-controller@69.0.0
|
|
1053
1082
|
[68.1.0]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@68.0.2...@metamask/bridge-status-controller@68.1.0
|
|
@@ -10,11 +10,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _BridgeStatusController_pollingTokensByTxMetaId, _BridgeStatusController_intentManager, _BridgeStatusController_clientId, _BridgeStatusController_fetchFn, _BridgeStatusController_config, _BridgeStatusController_addTransactionBatchFn, _BridgeStatusController_trace, _BridgeStatusController_markTxAsFailed, _BridgeStatusController_restartPollingForIncompleteHistoryItems, _BridgeStatusController_addTxToHistory, _BridgeStatusController_rekeyHistoryItem, _BridgeStatusController_startPollingForTxId, _BridgeStatusController_handleFetchFailure, _BridgeStatusController_fetchBridgeTxStatus, _BridgeStatusController_getSrcTxHash, _BridgeStatusController_updateSrcTxHash, _BridgeStatusController_wipeBridgeStatusByChainId,
|
|
13
|
+
var _BridgeStatusController_pollingTokensByTxMetaId, _BridgeStatusController_intentManager, _BridgeStatusController_clientId, _BridgeStatusController_fetchFn, _BridgeStatusController_config, _BridgeStatusController_addTransactionBatchFn, _BridgeStatusController_trace, _BridgeStatusController_markTxAsFailed, _BridgeStatusController_restartPollingForIncompleteHistoryItems, _BridgeStatusController_addTxToHistory, _BridgeStatusController_rekeyHistoryItem, _BridgeStatusController_startPollingForTxId, _BridgeStatusController_handleFetchFailure, _BridgeStatusController_fetchBridgeTxStatus, _BridgeStatusController_getSrcTxHash, _BridgeStatusController_updateSrcTxHash, _BridgeStatusController_wipeBridgeStatusByChainId, _BridgeStatusController_handleApprovalTx, _BridgeStatusController_handleEvmTransactionBatch, _BridgeStatusController_trackUnifiedSwapBridgeEvent;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.BridgeStatusController = void 0;
|
|
16
16
|
const bridge_controller_1 = require("@metamask/bridge-controller");
|
|
17
|
-
const controller_utils_1 = require("@metamask/controller-utils");
|
|
18
17
|
const polling_controller_1 = require("@metamask/polling-controller");
|
|
19
18
|
const transaction_controller_1 = require("@metamask/transaction-controller");
|
|
20
19
|
const utils_1 = require("@metamask/utils");
|
|
@@ -25,7 +24,6 @@ const accounts_1 = require("./utils/accounts.cjs");
|
|
|
25
24
|
const authentication_1 = require("./utils/authentication.cjs");
|
|
26
25
|
const bridge_1 = require("./utils/bridge.cjs");
|
|
27
26
|
const bridge_status_1 = require("./utils/bridge-status.cjs");
|
|
28
|
-
const gas_1 = require("./utils/gas.cjs");
|
|
29
27
|
const history_1 = require("./utils/history.cjs");
|
|
30
28
|
const intent_api_1 = require("./utils/intent-api.cjs");
|
|
31
29
|
const keyring_1 = require("./utils/keyring.cjs");
|
|
@@ -417,8 +415,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
417
415
|
return srcTxHash;
|
|
418
416
|
}
|
|
419
417
|
// Look up in TransactionController if txMeta has been updated with the srcTxHash
|
|
420
|
-
const
|
|
421
|
-
const txMeta = txControllerState.transactions.find((tx) => tx.id === bridgeTxMetaId);
|
|
418
|
+
const txMeta = (0, transaction_1.getTransactionMetaById)(this.messenger, bridgeTxMetaId);
|
|
422
419
|
return txMeta?.hash;
|
|
423
420
|
});
|
|
424
421
|
_BridgeStatusController_updateSrcTxHash.set(this, (bridgeTxMetaId, srcTxHash) => {
|
|
@@ -457,29 +454,18 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
457
454
|
* TX SUBMISSION HANDLING
|
|
458
455
|
*******************************************************
|
|
459
456
|
*/
|
|
460
|
-
_BridgeStatusController_waitForHashAndReturnFinalTxMeta.set(this, async (hashPromise) => {
|
|
461
|
-
const transactionHash = await hashPromise;
|
|
462
|
-
const finalTransactionMeta = this.messenger
|
|
463
|
-
.call('TransactionController:getState')
|
|
464
|
-
.transactions.find((tx) => tx.hash === transactionHash);
|
|
465
|
-
if (!finalTransactionMeta) {
|
|
466
|
-
throw new Error('Failed to submit cross-chain swap tx: txMeta for txHash was not found');
|
|
467
|
-
}
|
|
468
|
-
return finalTransactionMeta;
|
|
469
|
-
});
|
|
470
|
-
// Waits until a given transaction (by id) reaches confirmed/finalized status or fails/times out.
|
|
471
|
-
_BridgeStatusController_waitForTxConfirmation.set(this, async (txId, { timeoutMs = 5 * 60000, // 5 minutes default
|
|
472
|
-
pollMs = 3000, } = {}) => {
|
|
473
|
-
return await (0, transaction_1.waitForTxConfirmation)(this.messenger, txId, {
|
|
474
|
-
timeoutMs,
|
|
475
|
-
pollMs,
|
|
476
|
-
});
|
|
477
|
-
});
|
|
478
457
|
_BridgeStatusController_handleApprovalTx.set(this, async (quoteResponse, isBridgeTx, srcChainId, approval, resetApproval, requireApproval) => {
|
|
479
458
|
if (approval && (0, bridge_controller_1.isEvmTxData)(approval)) {
|
|
480
459
|
const approveTx = async () => {
|
|
481
|
-
|
|
482
|
-
|
|
460
|
+
if (resetApproval) {
|
|
461
|
+
await (0, transaction_1.submitEvmTransaction)({
|
|
462
|
+
messenger: this.messenger,
|
|
463
|
+
transactionType: transaction_controller_1.TransactionType.bridgeApproval,
|
|
464
|
+
trade: resetApproval,
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
const approvalTxMeta = await (0, transaction_1.submitEvmTransaction)({
|
|
468
|
+
messenger: this.messenger,
|
|
483
469
|
transactionType: isBridgeTx
|
|
484
470
|
? transaction_controller_1.TransactionType.bridgeApproval
|
|
485
471
|
: transaction_controller_1.TransactionType.swapApproval,
|
|
@@ -493,85 +479,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
493
479
|
}
|
|
494
480
|
return undefined;
|
|
495
481
|
});
|
|
496
|
-
|
|
497
|
-
* Submits an EVM transaction to the TransactionController
|
|
498
|
-
*
|
|
499
|
-
* @param params - The parameters for the transaction
|
|
500
|
-
* @param params.transactionType - The type of transaction to submit
|
|
501
|
-
* @param params.trade - The trade data to confirm
|
|
502
|
-
* @param params.requireApproval - Whether to require approval for the transaction
|
|
503
|
-
* @param params.txFee - Optional gas fee parameters from the quote (used when gasIncluded is true)
|
|
504
|
-
* @param params.txFee.maxFeePerGas - The maximum fee per gas from the quote
|
|
505
|
-
* @param params.txFee.maxPriorityFeePerGas - The maximum priority fee per gas from the quote
|
|
506
|
-
* @param params.actionId - Optional actionId for pre-submission history (if not provided, one is generated)
|
|
507
|
-
* @returns The transaction meta
|
|
508
|
-
*/
|
|
509
|
-
_BridgeStatusController_handleEvmTransaction.set(this, async ({ transactionType, trade, requireApproval = false, txFee, actionId: providedActionId, }) => {
|
|
510
|
-
// Use provided actionId (for pre-submission history) or generate one
|
|
511
|
-
const actionId = providedActionId ?? (0, transaction_1.generateActionId)();
|
|
512
|
-
const selectedAccount = (0, accounts_1.getAccountByAddress)(this.messenger, trade.from);
|
|
513
|
-
if (!selectedAccount) {
|
|
514
|
-
throw new Error('Failed to submit cross-chain swap transaction: unknown account in trade data');
|
|
515
|
-
}
|
|
516
|
-
const hexChainId = (0, bridge_controller_1.formatChainIdToHex)(trade.chainId);
|
|
517
|
-
const networkClientId = (0, network_1.getNetworkClientIdByChainId)(this.messenger, hexChainId);
|
|
518
|
-
const requestOptions = {
|
|
519
|
-
actionId,
|
|
520
|
-
networkClientId,
|
|
521
|
-
requireApproval,
|
|
522
|
-
type: transactionType,
|
|
523
|
-
origin: 'metamask',
|
|
524
|
-
};
|
|
525
|
-
// Exclude gasLimit from trade to avoid type issues (it can be null)
|
|
526
|
-
const { gasLimit: tradeGasLimit, ...tradeWithoutGasLimit } = trade;
|
|
527
|
-
const transactionParams = {
|
|
528
|
-
...tradeWithoutGasLimit,
|
|
529
|
-
chainId: hexChainId,
|
|
530
|
-
// Only add gasLimit and gas if they're valid (not undefined/null/zero)
|
|
531
|
-
...(tradeGasLimit &&
|
|
532
|
-
tradeGasLimit !== 0 && {
|
|
533
|
-
gasLimit: tradeGasLimit.toString(),
|
|
534
|
-
gas: tradeGasLimit.toString(),
|
|
535
|
-
}),
|
|
536
|
-
};
|
|
537
|
-
const transactionParamsWithMaxGas = {
|
|
538
|
-
...transactionParams,
|
|
539
|
-
...(await __classPrivateFieldGet(this, _BridgeStatusController_calculateGasFees, "f").call(this, transactionParams, networkClientId, hexChainId, txFee)),
|
|
540
|
-
};
|
|
541
|
-
const { result } = await this.messenger.call('TransactionController:addTransaction', transactionParamsWithMaxGas, requestOptions);
|
|
542
|
-
return await __classPrivateFieldGet(this, _BridgeStatusController_waitForHashAndReturnFinalTxMeta, "f").call(this, result);
|
|
543
|
-
});
|
|
544
|
-
_BridgeStatusController_handleUSDTAllowanceReset.set(this, async (resetApproval) => {
|
|
545
|
-
if (resetApproval) {
|
|
546
|
-
await __classPrivateFieldGet(this, _BridgeStatusController_handleEvmTransaction, "f").call(this, {
|
|
547
|
-
transactionType: transaction_controller_1.TransactionType.bridgeApproval,
|
|
548
|
-
trade: resetApproval,
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
_BridgeStatusController_calculateGasFees.set(this, async (transactionParams, networkClientId, chainId, txFee) => {
|
|
553
|
-
const { gas } = transactionParams;
|
|
554
|
-
// If txFee is provided (gasIncluded case), use the quote's gas fees
|
|
555
|
-
// Convert to hex since txFee values from the quote are decimal strings
|
|
556
|
-
if (txFee) {
|
|
557
|
-
return {
|
|
558
|
-
maxFeePerGas: (0, controller_utils_1.toHex)(txFee.maxFeePerGas),
|
|
559
|
-
maxPriorityFeePerGas: (0, controller_utils_1.toHex)(txFee.maxPriorityFeePerGas),
|
|
560
|
-
gas: gas ? (0, controller_utils_1.toHex)(gas) : undefined,
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
const { gasFeeEstimates } = this.messenger.call('GasFeeController:getState');
|
|
564
|
-
const { estimates: txGasFeeEstimates } = await this.messenger.call('TransactionController:estimateGasFee', { transactionParams, chainId, networkClientId });
|
|
565
|
-
const { maxFeePerGas, maxPriorityFeePerGas } = (0, gas_1.getTxGasEstimates)({
|
|
566
|
-
networkGasFeeEstimates: gasFeeEstimates,
|
|
567
|
-
txGasFeeEstimates,
|
|
568
|
-
});
|
|
569
|
-
return {
|
|
570
|
-
maxFeePerGas,
|
|
571
|
-
maxPriorityFeePerGas,
|
|
572
|
-
gas: gas ? (0, controller_utils_1.toHex)(gas) : undefined,
|
|
573
|
-
};
|
|
574
|
-
});
|
|
482
|
+
// TODO simplify and make more readable
|
|
575
483
|
/**
|
|
576
484
|
* Submits batched EVM transactions to the TransactionController
|
|
577
485
|
*
|
|
@@ -589,22 +497,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
589
497
|
messenger: this.messenger,
|
|
590
498
|
...args,
|
|
591
499
|
});
|
|
592
|
-
|
|
593
|
-
[transaction_controller_1.TransactionType.bridgeApproval]: transactionParams.transactions.find(({ type }) => type === transaction_controller_1.TransactionType.bridgeApproval)?.params.data,
|
|
594
|
-
[transaction_controller_1.TransactionType.swapApproval]: transactionParams.transactions.find(({ type }) => type === transaction_controller_1.TransactionType.swapApproval)?.params.data,
|
|
595
|
-
[transaction_controller_1.TransactionType.bridge]: transactionParams.transactions.find(({ type }) => type === transaction_controller_1.TransactionType.bridge)?.params.data,
|
|
596
|
-
[transaction_controller_1.TransactionType.swap]: transactionParams.transactions.find(({ type }) => type === transaction_controller_1.TransactionType.swap)?.params.data,
|
|
597
|
-
};
|
|
598
|
-
const { batchId } = await __classPrivateFieldGet(this, _BridgeStatusController_addTransactionBatchFn, "f").call(this, transactionParams);
|
|
599
|
-
const { approvalMeta, tradeMeta } = (0, transaction_1.findAndUpdateTransactionsInBatch)({
|
|
600
|
-
messenger: this.messenger,
|
|
601
|
-
batchId,
|
|
602
|
-
txDataByType,
|
|
603
|
-
});
|
|
604
|
-
if (!tradeMeta) {
|
|
605
|
-
throw new Error('Failed to update cross-chain swap transaction batch: tradeMeta not found');
|
|
606
|
-
}
|
|
607
|
-
return { approvalMeta, tradeMeta };
|
|
500
|
+
return await (0, transaction_1.addTransactionBatch)(this.messenger, __classPrivateFieldGet(this, _BridgeStatusController_addTransactionBatchFn, "f"), transactionParams);
|
|
608
501
|
});
|
|
609
502
|
/**
|
|
610
503
|
* Submits a cross-chain swap transaction
|
|
@@ -626,146 +519,131 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
626
519
|
}
|
|
627
520
|
const isHardwareAccount = (0, bridge_controller_1.isHardwareWallet)(selectedAccount);
|
|
628
521
|
const preConfirmationProperties = (0, metrics_1.getPreConfirmationPropertiesFromQuote)(quoteResponse, isStxEnabledOnClient, isHardwareAccount, location, abTests, activeAbTests);
|
|
629
|
-
// Emit Submitted event after submit button is clicked
|
|
630
|
-
!quoteResponse.featureId &&
|
|
631
|
-
__classPrivateFieldGet(this, _BridgeStatusController_trackUnifiedSwapBridgeEvent, "f").call(this, bridge_controller_1.UnifiedSwapBridgeEventName.Submitted, undefined, preConfirmationProperties);
|
|
632
522
|
let txMeta;
|
|
633
523
|
let approvalTxId;
|
|
634
524
|
let isDelegatedAccount = false;
|
|
635
525
|
const startTime = Date.now();
|
|
636
526
|
const isBridgeTx = (0, bridge_controller_1.isCrossChain)(quoteResponse.quote.srcChainId, quoteResponse.quote.destChainId);
|
|
637
527
|
const isTronTx = (0, bridge_controller_1.isTronChainId)(quoteResponse.quote.srcChainId);
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
528
|
+
try {
|
|
529
|
+
// Emit Submitted event after submit button is clicked
|
|
530
|
+
!quoteResponse.featureId &&
|
|
531
|
+
__classPrivateFieldGet(this, _BridgeStatusController_trackUnifiedSwapBridgeEvent, "f").call(this, bridge_controller_1.UnifiedSwapBridgeEventName.Submitted, undefined, preConfirmationProperties);
|
|
532
|
+
// Submit non-EVM tx (Solana, BTC, Tron)
|
|
533
|
+
if ((0, bridge_controller_1.isNonEvmChainId)(quoteResponse.quote.srcChainId)) {
|
|
534
|
+
// Handle non-EVM approval if present (e.g., Tron token approvals)
|
|
535
|
+
if (quoteResponse.approval && (0, bridge_controller_1.isTronTrade)(quoteResponse.approval)) {
|
|
536
|
+
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, (0, trace_1.getApprovalTraceParams)(quoteResponse, false), async () => {
|
|
644
537
|
return quoteResponse.approval &&
|
|
645
538
|
(0, bridge_controller_1.isTronTrade)(quoteResponse.approval)
|
|
646
539
|
? await (0, snaps_1.handleNonEvmTx)(this.messenger, quoteResponse.approval, quoteResponse, selectedAccount)
|
|
647
540
|
: /* c8 ignore start */
|
|
648
541
|
undefined;
|
|
649
542
|
/* c8 ignore end */
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
});
|
|
657
|
-
throw error;
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
approvalTxId = approvalTxMeta?.id;
|
|
661
|
-
// Add delay after approval similar to EVM flow
|
|
662
|
-
await (0, transaction_1.handleApprovalDelay)(quoteResponse.quote.srcChainId);
|
|
663
|
-
}
|
|
664
|
-
txMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, (0, trace_1.getTraceParams)(quoteResponse, false), async () => {
|
|
665
|
-
try {
|
|
543
|
+
});
|
|
544
|
+
approvalTxId = approvalTxMeta?.id;
|
|
545
|
+
// Add delay after approval similar to EVM flow
|
|
546
|
+
await (0, transaction_1.handleApprovalDelay)(quoteResponse.quote.srcChainId);
|
|
547
|
+
}
|
|
548
|
+
txMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, (0, trace_1.getTraceParams)(quoteResponse, false), async () => {
|
|
666
549
|
if (!((0, bridge_controller_1.isTronTrade)(quoteResponse.trade) ||
|
|
667
550
|
(0, bridge_controller_1.isBitcoinTrade)(quoteResponse.trade) ||
|
|
668
551
|
typeof quoteResponse.trade === 'string')) {
|
|
669
552
|
throw new Error('Failed to submit cross-chain swap transaction: trade is not a non-EVM transaction');
|
|
670
553
|
}
|
|
671
554
|
return await (0, snaps_1.handleNonEvmTx)(this.messenger, quoteResponse.trade, quoteResponse, selectedAccount);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
// Submit EVM tx
|
|
559
|
+
// For hardware wallets on Mobile, this is fixes an issue where the Ledger does not get prompted for the 2nd approval
|
|
560
|
+
// Extension does not have this issue
|
|
561
|
+
const requireApproval = __classPrivateFieldGet(this, _BridgeStatusController_clientId, "f") === types_1.BridgeClientId.MOBILE && isHardwareAccount;
|
|
562
|
+
// Handle smart transactions if enabled
|
|
563
|
+
txMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, (0, trace_1.getTraceParams)(quoteResponse, isStxEnabledOnClient), async () => {
|
|
564
|
+
if (!(0, bridge_controller_1.isEvmTxData)(quoteResponse.trade)) {
|
|
565
|
+
throw new Error('Failed to submit cross-chain swap transaction: trade is not an EVM transaction');
|
|
566
|
+
}
|
|
567
|
+
// Check if the account is an EIP-7702 delegated account
|
|
568
|
+
// Delegated accounts only allow 1 in-flight tx, so approve + swap
|
|
569
|
+
// must be batched into a single transaction
|
|
570
|
+
const hexChainId = (0, bridge_controller_1.formatChainIdToHex)(quoteResponse.quote.srcChainId);
|
|
571
|
+
isDelegatedAccount = await (0, transaction_1.checkIsDelegatedAccount)(this.messenger, quoteResponse.trade.from, [hexChainId]);
|
|
572
|
+
if (isStxEnabledOnClient ||
|
|
573
|
+
quoteResponse.quote.gasIncluded7702 ||
|
|
574
|
+
isDelegatedAccount) {
|
|
575
|
+
const { tradeMeta, approvalMeta } = await __classPrivateFieldGet(this, _BridgeStatusController_handleEvmTransactionBatch, "f").call(this, {
|
|
576
|
+
isBridgeTx,
|
|
577
|
+
resetApproval: quoteResponse.resetApproval,
|
|
578
|
+
approval: quoteResponse.approval &&
|
|
579
|
+
(0, bridge_controller_1.isEvmTxData)(quoteResponse.approval)
|
|
580
|
+
? quoteResponse.approval
|
|
581
|
+
: undefined,
|
|
582
|
+
trade: quoteResponse.trade,
|
|
583
|
+
quoteResponse,
|
|
584
|
+
requireApproval,
|
|
585
|
+
isDelegatedAccount,
|
|
703
586
|
});
|
|
704
|
-
|
|
587
|
+
approvalTxId = approvalMeta?.id;
|
|
588
|
+
return tradeMeta;
|
|
705
589
|
}
|
|
706
|
-
|
|
707
|
-
|
|
590
|
+
// Set approval time and id if an approval tx is needed
|
|
591
|
+
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_handleApprovalTx, "f").call(this, quoteResponse, isBridgeTx, quoteResponse.quote.srcChainId, quoteResponse.approval && (0, bridge_controller_1.isEvmTxData)(quoteResponse.approval)
|
|
592
|
+
? quoteResponse.approval
|
|
593
|
+
: undefined, quoteResponse.resetApproval, requireApproval);
|
|
594
|
+
approvalTxId = approvalTxMeta?.id;
|
|
595
|
+
// Hardware-wallet delay first (Ledger second-prompt spacing), then wait for
|
|
596
|
+
// on-chain approval confirmation so swap gas estimation runs after allowance is set.
|
|
597
|
+
if (requireApproval && approvalTxMeta) {
|
|
598
|
+
await (0, transaction_1.handleMobileHardwareWalletDelay)(requireApproval);
|
|
599
|
+
await (0, transaction_1.waitForTxConfirmation)(this.messenger, approvalTxMeta.id);
|
|
708
600
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
: undefined,
|
|
719
|
-
trade: quoteResponse.trade,
|
|
601
|
+
else {
|
|
602
|
+
await (0, transaction_1.handleMobileHardwareWalletDelay)(requireApproval);
|
|
603
|
+
}
|
|
604
|
+
// Generate actionId for pre-submission history (non-batch EVM only)
|
|
605
|
+
const actionId = (0, transaction_1.generateActionId)().toString();
|
|
606
|
+
// Add pre-submission history keyed by actionId
|
|
607
|
+
// This ensures we have quote data available if transaction fails during submission
|
|
608
|
+
__classPrivateFieldGet(this, _BridgeStatusController_addTxToHistory, "f").call(this, {
|
|
609
|
+
accountAddress: selectedAccount.address,
|
|
720
610
|
quoteResponse,
|
|
611
|
+
slippagePercentage: 0,
|
|
612
|
+
isStxEnabled: isStxEnabledOnClient,
|
|
613
|
+
startTime,
|
|
614
|
+
approvalTxId,
|
|
615
|
+
location,
|
|
616
|
+
abTests,
|
|
617
|
+
activeAbTests,
|
|
618
|
+
actionId,
|
|
619
|
+
});
|
|
620
|
+
// Pass txFee when gasIncluded is true to use the quote's gas fees
|
|
621
|
+
// instead of re-estimating (which would fail for max native token swaps)
|
|
622
|
+
const tradeTxMeta = await (0, transaction_1.submitEvmTransaction)({
|
|
623
|
+
messenger: this.messenger,
|
|
624
|
+
transactionType: isBridgeTx
|
|
625
|
+
? transaction_controller_1.TransactionType.bridge
|
|
626
|
+
: transaction_controller_1.TransactionType.swap,
|
|
627
|
+
trade: quoteResponse.trade,
|
|
721
628
|
requireApproval,
|
|
722
|
-
|
|
629
|
+
txFee: quoteResponse.quote.gasIncluded
|
|
630
|
+
? quoteResponse.quote.feeData.txFee
|
|
631
|
+
: undefined,
|
|
632
|
+
actionId,
|
|
723
633
|
});
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
// Set approval time and id if an approval tx is needed
|
|
728
|
-
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_handleApprovalTx, "f").call(this, quoteResponse, isBridgeTx, quoteResponse.quote.srcChainId, quoteResponse.approval && (0, bridge_controller_1.isEvmTxData)(quoteResponse.approval)
|
|
729
|
-
? quoteResponse.approval
|
|
730
|
-
: undefined, quoteResponse.resetApproval, requireApproval);
|
|
731
|
-
approvalTxId = approvalTxMeta?.id;
|
|
732
|
-
await (0, transaction_1.handleMobileHardwareWalletDelay)(requireApproval);
|
|
733
|
-
// Generate actionId for pre-submission history (non-batch EVM only)
|
|
734
|
-
const actionId = (0, transaction_1.generateActionId)().toString();
|
|
735
|
-
// Add pre-submission history keyed by actionId
|
|
736
|
-
// This ensures we have quote data available if transaction fails during submission
|
|
737
|
-
__classPrivateFieldGet(this, _BridgeStatusController_addTxToHistory, "f").call(this, {
|
|
738
|
-
accountAddress: selectedAccount.address,
|
|
739
|
-
statusRequest: {
|
|
740
|
-
...(0, transaction_1.getStatusRequestParams)(quoteResponse),
|
|
741
|
-
srcTxHash: '', // Not available yet
|
|
742
|
-
},
|
|
743
|
-
quoteResponse,
|
|
744
|
-
slippagePercentage: 0,
|
|
745
|
-
isStxEnabled: isStxEnabledOnClient,
|
|
746
|
-
startTime,
|
|
747
|
-
approvalTxId,
|
|
748
|
-
location,
|
|
749
|
-
abTests,
|
|
750
|
-
activeAbTests,
|
|
751
|
-
}, actionId);
|
|
752
|
-
// Pass txFee when gasIncluded is true to use the quote's gas fees
|
|
753
|
-
// instead of re-estimating (which would fail for max native token swaps)
|
|
754
|
-
const tradeTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_handleEvmTransaction, "f").call(this, {
|
|
755
|
-
transactionType: isBridgeTx
|
|
756
|
-
? transaction_controller_1.TransactionType.bridge
|
|
757
|
-
: transaction_controller_1.TransactionType.swap,
|
|
758
|
-
trade: quoteResponse.trade,
|
|
759
|
-
requireApproval,
|
|
760
|
-
txFee: quoteResponse.quote.gasIncluded
|
|
761
|
-
? quoteResponse.quote.feeData.txFee
|
|
762
|
-
: undefined,
|
|
763
|
-
actionId,
|
|
634
|
+
// On success, rekey from actionId to txMeta.id and update srcTxHash
|
|
635
|
+
__classPrivateFieldGet(this, _BridgeStatusController_rekeyHistoryItem, "f").call(this, actionId, tradeTxMeta);
|
|
636
|
+
return tradeTxMeta;
|
|
764
637
|
});
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
catch (error) {
|
|
641
|
+
!quoteResponse.featureId &&
|
|
642
|
+
__classPrivateFieldGet(this, _BridgeStatusController_trackUnifiedSwapBridgeEvent, "f").call(this, bridge_controller_1.UnifiedSwapBridgeEventName.Failed, undefined, {
|
|
643
|
+
error_message: error?.message,
|
|
644
|
+
...preConfirmationProperties,
|
|
645
|
+
});
|
|
646
|
+
throw error;
|
|
769
647
|
}
|
|
770
648
|
try {
|
|
771
649
|
// For non-batch EVM transactions, history was already added/rekeyed above
|
|
@@ -779,10 +657,6 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
779
657
|
__classPrivateFieldGet(this, _BridgeStatusController_addTxToHistory, "f").call(this, {
|
|
780
658
|
accountAddress: selectedAccount.address,
|
|
781
659
|
bridgeTxMeta: txMeta, // Only the id field is used by the BridgeStatusController
|
|
782
|
-
statusRequest: {
|
|
783
|
-
...(0, transaction_1.getStatusRequestParams)(quoteResponse),
|
|
784
|
-
srcTxHash: txMeta.hash,
|
|
785
|
-
},
|
|
786
660
|
quoteResponse,
|
|
787
661
|
slippagePercentage: 0, // TODO include slippage provided by quote if using dynamic slippage, or slippage from quote request
|
|
788
662
|
isStxEnabled: isStxEnabledOnClient,
|
|
@@ -823,6 +697,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
823
697
|
const { quoteResponse, accountAddress, location, abTests, activeAbTests } = params;
|
|
824
698
|
// TODO add metrics context
|
|
825
699
|
(0, bridge_1.stopPollingForQuotes)(this.messenger);
|
|
700
|
+
const startTime = Date.now();
|
|
826
701
|
// Build pre-confirmation properties for error tracking parity with submitTx
|
|
827
702
|
const account = (0, accounts_1.getAccountByAddress)(this.messenger, accountAddress);
|
|
828
703
|
const isHardwareAccount = Boolean(account) && (0, bridge_controller_1.isHardwareWallet)(account);
|
|
@@ -837,7 +712,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
837
712
|
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_handleApprovalTx, "f").call(this, quoteResponse, isBridgeTx, quoteResponse.quote.srcChainId, quoteResponse.approval, quoteResponse.resetApproval, requireApproval);
|
|
838
713
|
const approvalTxId = approvalTxMeta?.id;
|
|
839
714
|
if (approvalTxId) {
|
|
840
|
-
await
|
|
715
|
+
await (0, transaction_1.waitForTxConfirmation)(this.messenger, approvalTxId);
|
|
841
716
|
}
|
|
842
717
|
const { srcChainId, requestId } = quoteResponse.quote;
|
|
843
718
|
const signature = await (0, keyring_1.signTypedMessage)({
|
|
@@ -853,8 +728,13 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
853
728
|
userAddress: accountAddress,
|
|
854
729
|
aggregatorId: intent.protocol,
|
|
855
730
|
};
|
|
856
|
-
const
|
|
857
|
-
|
|
731
|
+
const { id: orderUid, status } = await (0, intent_api_1.postSubmitOrder)({
|
|
732
|
+
params: submissionParams,
|
|
733
|
+
clientId: __classPrivateFieldGet(this, _BridgeStatusController_clientId, "f"),
|
|
734
|
+
jwt: await (0, authentication_1.getJwt)(this.messenger),
|
|
735
|
+
fetchFn: __classPrivateFieldGet(this, _BridgeStatusController_fetchFn, "f"),
|
|
736
|
+
bridgeApiBaseUrl: __classPrivateFieldGet(this, _BridgeStatusController_config, "f").customBridgeApiBaseUrl,
|
|
737
|
+
});
|
|
858
738
|
// Determine transaction type: swap for same-chain, bridge for cross-chain
|
|
859
739
|
const transactionType = isBridgeTx
|
|
860
740
|
? /* c8 ignore start */
|
|
@@ -875,25 +755,16 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
875
755
|
gas: '0x5208', // Minimal gas for display purposes
|
|
876
756
|
gasPrice: '0x3b9aca00', // 1 Gwei - will be converted to EIP-1559 fees if network supports it
|
|
877
757
|
};
|
|
878
|
-
const
|
|
879
|
-
origin: 'metamask',
|
|
880
|
-
actionId: (0, transaction_1.generateActionId)(),
|
|
758
|
+
const initialTxMeta = await (0, transaction_1.addSyntheticTransaction)(this.messenger, intentTransactionParams, {
|
|
881
759
|
requireApproval: false,
|
|
882
|
-
isStateOnly: true,
|
|
883
760
|
networkClientId,
|
|
884
761
|
type: transactionType,
|
|
885
762
|
});
|
|
886
|
-
|
|
887
|
-
// Map intent order status to TransactionController status
|
|
888
|
-
const initialTransactionStatus = (0, intent_api_1.mapIntentOrderStatusToTransactionStatus)(intentOrder.status);
|
|
889
|
-
// Update transaction with proper initial status based on intent order
|
|
890
|
-
const statusUpdatedTxMeta = {
|
|
891
|
-
...intentTxMeta,
|
|
892
|
-
status: initialTransactionStatus,
|
|
893
|
-
};
|
|
894
|
-
// Update with actual transaction metadata
|
|
763
|
+
// Update txHistory with actual transaction metadata
|
|
895
764
|
const syntheticMeta = {
|
|
896
|
-
...
|
|
765
|
+
...initialTxMeta,
|
|
766
|
+
// Map intent order status to TransactionController status
|
|
767
|
+
status: (0, intent_api_1.mapIntentOrderStatusToTransactionStatus)(status),
|
|
897
768
|
isIntentTx: true,
|
|
898
769
|
orderUid,
|
|
899
770
|
};
|
|
@@ -907,14 +778,9 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
907
778
|
id: bridgeHistoryKey,
|
|
908
779
|
originalTransactionId: syntheticMeta.id, // Keep original txId for TransactionController updates
|
|
909
780
|
};
|
|
910
|
-
const startTime = Date.now();
|
|
911
781
|
__classPrivateFieldGet(this, _BridgeStatusController_addTxToHistory, "f").call(this, {
|
|
912
782
|
accountAddress,
|
|
913
783
|
bridgeTxMeta: bridgeTxMetaForHistory,
|
|
914
|
-
statusRequest: {
|
|
915
|
-
...(0, transaction_1.getStatusRequestParams)(quoteResponse),
|
|
916
|
-
srcTxHash: syntheticMeta.hash ?? '',
|
|
917
|
-
},
|
|
918
784
|
quoteResponse,
|
|
919
785
|
slippagePercentage: 0,
|
|
920
786
|
isStxEnabled: false,
|
|
@@ -991,6 +857,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
991
857
|
});
|
|
992
858
|
return;
|
|
993
859
|
}
|
|
860
|
+
const { featureId, approvalTxId, quote } = historyItem;
|
|
994
861
|
const requestParamProperties = (0, metrics_1.getRequestParamFromHistory)(historyItem);
|
|
995
862
|
// Always publish StatusValidationFailed event, regardless of featureId
|
|
996
863
|
if (eventName === bridge_controller_1.UnifiedSwapBridgeEventName.StatusValidationFailed) {
|
|
@@ -1009,13 +876,13 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
1009
876
|
return;
|
|
1010
877
|
}
|
|
1011
878
|
// Skip tracking all other events when featureId is set (i.e. PERPS)
|
|
1012
|
-
if (
|
|
879
|
+
if (featureId) {
|
|
1013
880
|
return;
|
|
1014
881
|
}
|
|
1015
882
|
const selectedAccount = (0, accounts_1.getAccountByAddress)(this.messenger, historyItem.account);
|
|
1016
|
-
const
|
|
1017
|
-
const txMeta = transactions
|
|
1018
|
-
const approvalTxMeta = transactions
|
|
883
|
+
const transactions = (0, transaction_1.getTransactions)(this.messenger);
|
|
884
|
+
const txMeta = transactions.find((tx) => tx.id === txMetaId);
|
|
885
|
+
const approvalTxMeta = transactions.find((tx) => tx.id === approvalTxId);
|
|
1019
886
|
const requiredEventProperties = {
|
|
1020
887
|
...baseProperties,
|
|
1021
888
|
...requestParamProperties,
|
|
@@ -1023,7 +890,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
1023
890
|
...(0, metrics_1.getTradeDataFromHistory)(historyItem),
|
|
1024
891
|
...(0, metrics_1.getTxStatusesFromHistory)(historyItem),
|
|
1025
892
|
...(0, metrics_1.getFinalizedTxProperties)(historyItem, txMeta, approvalTxMeta),
|
|
1026
|
-
...(0, metrics_1.getPriceImpactFromQuote)(
|
|
893
|
+
...(0, metrics_1.getPriceImpactFromQuote)(quote),
|
|
1027
894
|
};
|
|
1028
895
|
(0, bridge_1.trackMetricsEvent)({
|
|
1029
896
|
messenger: this.messenger,
|
|
@@ -1099,5 +966,5 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
1099
966
|
}
|
|
1100
967
|
}
|
|
1101
968
|
exports.BridgeStatusController = BridgeStatusController;
|
|
1102
|
-
_BridgeStatusController_pollingTokensByTxMetaId = new WeakMap(), _BridgeStatusController_intentManager = new WeakMap(), _BridgeStatusController_clientId = new WeakMap(), _BridgeStatusController_fetchFn = new WeakMap(), _BridgeStatusController_config = new WeakMap(), _BridgeStatusController_addTransactionBatchFn = new WeakMap(), _BridgeStatusController_trace = new WeakMap(), _BridgeStatusController_markTxAsFailed = new WeakMap(), _BridgeStatusController_restartPollingForIncompleteHistoryItems = new WeakMap(), _BridgeStatusController_addTxToHistory = new WeakMap(), _BridgeStatusController_rekeyHistoryItem = new WeakMap(), _BridgeStatusController_startPollingForTxId = new WeakMap(), _BridgeStatusController_handleFetchFailure = new WeakMap(), _BridgeStatusController_fetchBridgeTxStatus = new WeakMap(), _BridgeStatusController_getSrcTxHash = new WeakMap(), _BridgeStatusController_updateSrcTxHash = new WeakMap(), _BridgeStatusController_wipeBridgeStatusByChainId = new WeakMap(),
|
|
969
|
+
_BridgeStatusController_pollingTokensByTxMetaId = new WeakMap(), _BridgeStatusController_intentManager = new WeakMap(), _BridgeStatusController_clientId = new WeakMap(), _BridgeStatusController_fetchFn = new WeakMap(), _BridgeStatusController_config = new WeakMap(), _BridgeStatusController_addTransactionBatchFn = new WeakMap(), _BridgeStatusController_trace = new WeakMap(), _BridgeStatusController_markTxAsFailed = new WeakMap(), _BridgeStatusController_restartPollingForIncompleteHistoryItems = new WeakMap(), _BridgeStatusController_addTxToHistory = new WeakMap(), _BridgeStatusController_rekeyHistoryItem = new WeakMap(), _BridgeStatusController_startPollingForTxId = new WeakMap(), _BridgeStatusController_handleFetchFailure = new WeakMap(), _BridgeStatusController_fetchBridgeTxStatus = new WeakMap(), _BridgeStatusController_getSrcTxHash = new WeakMap(), _BridgeStatusController_updateSrcTxHash = new WeakMap(), _BridgeStatusController_wipeBridgeStatusByChainId = new WeakMap(), _BridgeStatusController_handleApprovalTx = new WeakMap(), _BridgeStatusController_handleEvmTransactionBatch = new WeakMap(), _BridgeStatusController_trackUnifiedSwapBridgeEvent = new WeakMap();
|
|
1103
970
|
//# sourceMappingURL=bridge-status-controller.cjs.map
|