@metamask-previews/bridge-status-controller 69.0.0-preview-45f35b773 → 69.0.0-preview-e0f8f1907
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 +4 -0
- package/dist/bridge-status-controller.cjs +73 -175
- package/dist/bridge-status-controller.cjs.map +1 -1
- package/dist/bridge-status-controller.d.cts.map +1 -1
- package/dist/bridge-status-controller.d.mts.map +1 -1
- package/dist/bridge-status-controller.intent.cjs +3 -2
- package/dist/bridge-status-controller.intent.cjs.map +1 -1
- package/dist/bridge-status-controller.intent.d.cts +2 -3
- package/dist/bridge-status-controller.intent.d.cts.map +1 -1
- package/dist/bridge-status-controller.intent.d.mts +2 -3
- package/dist/bridge-status-controller.intent.d.mts.map +1 -1
- package/dist/bridge-status-controller.intent.mjs +3 -2
- package/dist/bridge-status-controller.intent.mjs.map +1 -1
- package/dist/bridge-status-controller.mjs +75 -177
- package/dist/bridge-status-controller.mjs.map +1 -1
- package/dist/index.cjs +1 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +0 -1
- package/dist/index.mjs.map +1 -1
- package/dist/utils/accounts.cjs +8 -0
- package/dist/utils/accounts.cjs.map +1 -0
- package/dist/utils/accounts.d.cts +36 -0
- package/dist/utils/accounts.d.cts.map +1 -0
- package/dist/utils/accounts.d.mts +36 -0
- package/dist/utils/accounts.d.mts.map +1 -0
- package/dist/utils/accounts.mjs +4 -0
- package/dist/utils/accounts.mjs.map +1 -0
- package/dist/utils/authentication.cjs +15 -0
- package/dist/utils/authentication.cjs.map +1 -0
- package/dist/utils/authentication.d.cts +3 -0
- package/dist/utils/authentication.d.cts.map +1 -0
- package/dist/utils/authentication.d.mts +3 -0
- package/dist/utils/authentication.d.mts.map +1 -0
- package/dist/utils/authentication.mjs +11 -0
- package/dist/utils/authentication.mjs.map +1 -0
- package/dist/utils/bridge.cjs +16 -0
- package/dist/utils/bridge.cjs.map +1 -0
- package/dist/utils/bridge.d.cts +10 -0
- package/dist/utils/bridge.d.cts.map +1 -0
- package/dist/utils/bridge.d.mts +10 -0
- package/dist/utils/bridge.d.mts.map +1 -0
- package/dist/utils/bridge.mjs +11 -0
- package/dist/utils/bridge.mjs.map +1 -0
- package/dist/utils/history.cjs +97 -0
- package/dist/utils/history.cjs.map +1 -0
- package/dist/utils/history.d.cts +21 -0
- package/dist/utils/history.d.cts.map +1 -0
- package/dist/utils/history.d.mts +21 -0
- package/dist/utils/history.d.mts.map +1 -0
- package/dist/utils/history.mjs +90 -0
- package/dist/utils/history.mjs.map +1 -0
- package/dist/utils/intent-api.cjs +16 -1
- package/dist/utils/intent-api.cjs.map +1 -1
- package/dist/utils/intent-api.d.cts +9 -1
- package/dist/utils/intent-api.d.cts.map +1 -1
- package/dist/utils/intent-api.d.mts +9 -1
- package/dist/utils/intent-api.d.mts.map +1 -1
- package/dist/utils/intent-api.mjs +14 -0
- package/dist/utils/intent-api.mjs.map +1 -1
- package/dist/utils/keyring.cjs +12 -0
- package/dist/utils/keyring.cjs.map +1 -0
- package/dist/utils/keyring.d.cts +8 -0
- package/dist/utils/keyring.d.cts.map +1 -0
- package/dist/utils/keyring.d.mts +8 -0
- package/dist/utils/keyring.d.mts.map +1 -0
- package/dist/utils/keyring.mjs +8 -0
- package/dist/utils/keyring.mjs.map +1 -0
- package/dist/utils/network.cjs +17 -0
- package/dist/utils/network.cjs.map +1 -0
- package/dist/utils/network.d.cts +5 -0
- package/dist/utils/network.d.cts.map +1 -0
- package/dist/utils/network.d.mts +5 -0
- package/dist/utils/network.d.mts.map +1 -0
- package/dist/utils/network.mjs +12 -0
- package/dist/utils/network.mjs.map +1 -0
- package/dist/utils/snaps.cjs +146 -1
- package/dist/utils/snaps.cjs.map +1 -1
- package/dist/utils/snaps.d.cts +62 -0
- package/dist/utils/snaps.d.cts.map +1 -1
- package/dist/utils/snaps.d.mts +62 -0
- package/dist/utils/snaps.d.mts.map +1 -1
- package/dist/utils/snaps.mjs +141 -0
- package/dist/utils/snaps.mjs.map +1 -1
- package/dist/utils/trace.cjs +31 -0
- package/dist/utils/trace.cjs.map +1 -0
- package/dist/utils/trace.d.cts +17 -0
- package/dist/utils/trace.d.cts.map +1 -0
- package/dist/utils/trace.d.mts +17 -0
- package/dist/utils/trace.d.mts.map +1 -0
- package/dist/utils/trace.mjs +26 -0
- package/dist/utils/trace.mjs.map +1 -0
- package/dist/utils/transaction.cjs +6 -177
- package/dist/utils/transaction.cjs.map +1 -1
- package/dist/utils/transaction.d.cts +2 -73
- package/dist/utils/transaction.d.cts.map +1 -1
- package/dist/utils/transaction.d.mts +2 -73
- package/dist/utils/transaction.d.mts.map +1 -1
- package/dist/utils/transaction.mjs +6 -171
- package/dist/utils/transaction.mjs.map +1 -1
- package/dist/utils/validators.d.cts +2 -2
- package/dist/utils/validators.d.mts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Moved controller calls from bridge-status-controller.ts to their own utils for better readability ([#8226](https://github.com/MetaMask/core/pull/8226))
|
|
13
|
+
|
|
10
14
|
## [69.0.0]
|
|
11
15
|
|
|
12
16
|
### Added
|
|
@@ -10,22 +10,29 @@ 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
|
|
13
|
+
var _BridgeStatusController_pollingTokensByTxMetaId, _BridgeStatusController_intentManager, _BridgeStatusController_clientId, _BridgeStatusController_fetchFn, _BridgeStatusController_config, _BridgeStatusController_addTransactionFn, _BridgeStatusController_addTransactionBatchFn, _BridgeStatusController_updateTransactionFn, _BridgeStatusController_estimateGasFeeFn, _BridgeStatusController_trace, _BridgeStatusController_markTxAsFailed, _BridgeStatusController_restartPollingForIncompleteHistoryItems, _BridgeStatusController_addTxToHistory, _BridgeStatusController_rekeyHistoryItem, _BridgeStatusController_startPollingForTxId, _BridgeStatusController_handleFetchFailure, _BridgeStatusController_fetchBridgeTxStatus, _BridgeStatusController_getSrcTxHash, _BridgeStatusController_updateSrcTxHash, _BridgeStatusController_wipeBridgeStatusByChainId, _BridgeStatusController_waitForHashAndReturnFinalTxMeta, _BridgeStatusController_waitForTxConfirmation, _BridgeStatusController_handleApprovalTx, _BridgeStatusController_handleEvmTransaction, _BridgeStatusController_handleUSDTAllowanceReset, _BridgeStatusController_calculateGasFees, _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
17
|
const controller_utils_1 = require("@metamask/controller-utils");
|
|
18
|
-
const keyring_controller_1 = require("@metamask/keyring-controller");
|
|
19
18
|
const polling_controller_1 = require("@metamask/polling-controller");
|
|
20
19
|
const transaction_controller_1 = require("@metamask/transaction-controller");
|
|
21
20
|
const utils_1 = require("@metamask/utils");
|
|
22
21
|
const bridge_status_controller_intent_1 = require("./bridge-status-controller.intent.cjs");
|
|
23
22
|
const constants_1 = require("./constants.cjs");
|
|
24
23
|
const types_1 = require("./types.cjs");
|
|
24
|
+
const accounts_1 = require("./utils/accounts.cjs");
|
|
25
|
+
const authentication_1 = require("./utils/authentication.cjs");
|
|
26
|
+
const bridge_1 = require("./utils/bridge.cjs");
|
|
25
27
|
const bridge_status_1 = require("./utils/bridge-status.cjs");
|
|
26
28
|
const gas_1 = require("./utils/gas.cjs");
|
|
29
|
+
const history_1 = require("./utils/history.cjs");
|
|
27
30
|
const intent_api_1 = require("./utils/intent-api.cjs");
|
|
31
|
+
const keyring_1 = require("./utils/keyring.cjs");
|
|
28
32
|
const metrics_1 = require("./utils/metrics.cjs");
|
|
33
|
+
const network_1 = require("./utils/network.cjs");
|
|
34
|
+
const snaps_1 = require("./utils/snaps.cjs");
|
|
35
|
+
const trace_1 = require("./utils/trace.cjs");
|
|
29
36
|
const transaction_1 = require("./utils/transaction.cjs");
|
|
30
37
|
const metadata = {
|
|
31
38
|
// We want to persist the bridge status state so that we can show the proper data for the Activity list
|
|
@@ -49,7 +56,6 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
49
56
|
...state,
|
|
50
57
|
},
|
|
51
58
|
});
|
|
52
|
-
_BridgeStatusController_instances.add(this);
|
|
53
59
|
_BridgeStatusController_pollingTokensByTxMetaId.set(this, {});
|
|
54
60
|
_BridgeStatusController_intentManager.set(this, void 0);
|
|
55
61
|
_BridgeStatusController_clientId.set(this, void 0);
|
|
@@ -93,9 +99,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
93
99
|
});
|
|
94
100
|
}
|
|
95
101
|
else {
|
|
96
|
-
const
|
|
97
|
-
const selectedNetworkClient = this.messenger.call('NetworkController:getNetworkClientById', selectedNetworkClientId);
|
|
98
|
-
const selectedChainId = selectedNetworkClient.configuration.chainId;
|
|
102
|
+
const selectedChainId = (0, network_1.getSelectedChainId)(this.messenger);
|
|
99
103
|
__classPrivateFieldGet(this, _BridgeStatusController_wipeBridgeStatusByChainId, "f").call(this, address, selectedChainId);
|
|
100
104
|
}
|
|
101
105
|
};
|
|
@@ -137,7 +141,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
137
141
|
}
|
|
138
142
|
});
|
|
139
143
|
// Restart polling if it was stopped and this tx still needs status updates
|
|
140
|
-
if (
|
|
144
|
+
if ((0, history_1.shouldPollHistoryItem)(historyItem)) {
|
|
141
145
|
// Check if polling was stopped (no active polling token)
|
|
142
146
|
const existingPollingToken = __classPrivateFieldGet(this, _BridgeStatusController_pollingTokensByTxMetaId, "f")[targetTxMetaId];
|
|
143
147
|
if (!existingPollingToken) {
|
|
@@ -145,7 +149,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
145
149
|
__classPrivateFieldGet(this, _BridgeStatusController_startPollingForTxId, "f").call(this, targetTxMetaId);
|
|
146
150
|
// Track polling manually restarted event
|
|
147
151
|
if (!historyItem.featureId) {
|
|
148
|
-
const selectedAccount = this.messenger
|
|
152
|
+
const selectedAccount = (0, accounts_1.getAccountByAddress)(this.messenger, historyItem.account);
|
|
149
153
|
const requestParams = (0, metrics_1.getRequestParamFromHistory)(historyItem);
|
|
150
154
|
const requestMetadata = (0, metrics_1.getRequestMetadataFromHistory)(historyItem, selectedAccount);
|
|
151
155
|
const { security_warnings: _, ...metadataWithoutWarnings } = requestMetadata;
|
|
@@ -194,7 +198,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
194
198
|
})
|
|
195
199
|
// Only restart polling for items that still require status updates
|
|
196
200
|
.filter((historyItem) => {
|
|
197
|
-
return
|
|
201
|
+
return (0, history_1.shouldPollHistoryItem)(historyItem);
|
|
198
202
|
});
|
|
199
203
|
incompleteHistoryItems.forEach((historyItem) => {
|
|
200
204
|
const bridgeTxMetaId = historyItem.txMetaId;
|
|
@@ -207,51 +211,8 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
207
211
|
__classPrivateFieldGet(this, _BridgeStatusController_startPollingForTxId, "f").call(this, bridgeTxMetaId);
|
|
208
212
|
});
|
|
209
213
|
});
|
|
210
|
-
_BridgeStatusController_addTxToHistory.set(this, (
|
|
211
|
-
const {
|
|
212
|
-
// Determine the key for this history item:
|
|
213
|
-
// - For pre-submission (non-batch EVM): use actionId
|
|
214
|
-
// - For post-submission or other cases: use bridgeTxMeta.id
|
|
215
|
-
const historyKey = (0, transaction_1.getHistoryKey)(actionId, bridgeTxMeta?.id);
|
|
216
|
-
// Write all non-status fields to state so we can reference the quote in Activity list without the Bridge API
|
|
217
|
-
// We know it's in progress but not the exact status yet
|
|
218
|
-
const txHistoryItem = {
|
|
219
|
-
txMetaId: bridgeTxMeta?.id,
|
|
220
|
-
actionId,
|
|
221
|
-
originalTransactionId: bridgeTxMeta
|
|
222
|
-
?.originalTransactionId || bridgeTxMeta?.id, // Keep original for intent transactions
|
|
223
|
-
batchId: bridgeTxMeta?.batchId,
|
|
224
|
-
quote: quoteResponse.quote,
|
|
225
|
-
startTime,
|
|
226
|
-
estimatedProcessingTimeInSeconds: quoteResponse.estimatedProcessingTimeInSeconds,
|
|
227
|
-
slippagePercentage,
|
|
228
|
-
pricingData: {
|
|
229
|
-
amountSent: quoteResponse.sentAmount?.amount ?? '0',
|
|
230
|
-
amountSentInUsd: quoteResponse.sentAmount?.usd ?? undefined,
|
|
231
|
-
quotedGasInUsd: quoteResponse.gasFee?.effective?.usd ?? undefined,
|
|
232
|
-
quotedReturnInUsd: quoteResponse.toTokenAmount?.usd ?? undefined,
|
|
233
|
-
quotedGasAmount: quoteResponse.gasFee?.effective?.amount ?? undefined,
|
|
234
|
-
},
|
|
235
|
-
initialDestAssetBalance,
|
|
236
|
-
targetContractAddress,
|
|
237
|
-
account: selectedAddress,
|
|
238
|
-
status: {
|
|
239
|
-
// We always have a PENDING status when we start polling for a tx, don't need the Bridge API for that
|
|
240
|
-
// Also we know the bare minimum fields for status at this point in time
|
|
241
|
-
status: bridge_controller_1.StatusTypes.PENDING,
|
|
242
|
-
srcChain: {
|
|
243
|
-
chainId: statusRequest.srcChainId,
|
|
244
|
-
txHash: statusRequest.srcTxHash,
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
hasApprovalTx: Boolean(quoteResponse.approval),
|
|
248
|
-
approvalTxId,
|
|
249
|
-
isStxEnabled: Boolean(isStxEnabled),
|
|
250
|
-
featureId: quoteResponse.featureId,
|
|
251
|
-
location,
|
|
252
|
-
...(abTests && { abTests }),
|
|
253
|
-
...(activeAbTests && { activeAbTests }),
|
|
254
|
-
};
|
|
214
|
+
_BridgeStatusController_addTxToHistory.set(this, (...args) => {
|
|
215
|
+
const { historyKey, txHistoryItem } = (0, history_1.getInitialHistoryItem)(...args);
|
|
255
216
|
this.update((state) => {
|
|
256
217
|
// Use actionId as key for pre-submission, or txMeta.id for post-submission
|
|
257
218
|
state.txHistory[historyKey] = txHistoryItem;
|
|
@@ -268,7 +229,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
268
229
|
*/
|
|
269
230
|
_BridgeStatusController_rekeyHistoryItem.set(this, (actionId, txMeta) => {
|
|
270
231
|
this.update((state) => {
|
|
271
|
-
(0,
|
|
232
|
+
(0, history_1.rekeyHistoryItemInState)(state, actionId, txMeta);
|
|
272
233
|
});
|
|
273
234
|
});
|
|
274
235
|
_BridgeStatusController_startPollingForTxId.set(this, (txId) => {
|
|
@@ -281,18 +242,12 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
281
242
|
if (!txHistoryItem) {
|
|
282
243
|
return;
|
|
283
244
|
}
|
|
284
|
-
if (
|
|
245
|
+
if ((0, history_1.shouldPollHistoryItem)(txHistoryItem)) {
|
|
285
246
|
__classPrivateFieldGet(this, _BridgeStatusController_pollingTokensByTxMetaId, "f")[txId] = this.startPolling({
|
|
286
247
|
bridgeTxMetaId: txId,
|
|
287
248
|
});
|
|
288
249
|
}
|
|
289
250
|
});
|
|
290
|
-
_BridgeStatusController_shouldPollHistoryItem.set(this, (historyItem) => {
|
|
291
|
-
const isIntent = Boolean(historyItem?.quote?.intent);
|
|
292
|
-
const isBridgeTx = (0, bridge_controller_1.isCrossChain)(historyItem.quote.srcChainId, historyItem.quote.destChainId);
|
|
293
|
-
const isTronTx = (0, bridge_controller_1.isTronChainId)(historyItem.quote.srcChainId);
|
|
294
|
-
return [isBridgeTx, isIntent, isTronTx].some(Boolean);
|
|
295
|
-
});
|
|
296
251
|
/**
|
|
297
252
|
* @deprecated For EVM/Solana swap/bridge txs we add tx to history in submitTx()
|
|
298
253
|
* For Solana swap/bridge we start polling in submitTx()
|
|
@@ -344,7 +299,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
344
299
|
// Track max polling reached event
|
|
345
300
|
const historyItem = this.state.txHistory[bridgeTxMetaId];
|
|
346
301
|
if (historyItem && !historyItem.featureId) {
|
|
347
|
-
const selectedAccount = this.messenger
|
|
302
|
+
const selectedAccount = (0, accounts_1.getAccountByAddress)(this.messenger, historyItem.account);
|
|
348
303
|
const requestParams = (0, metrics_1.getRequestParamFromHistory)(historyItem);
|
|
349
304
|
const requestMetadata = (0, metrics_1.getRequestMetadataFromHistory)(historyItem, selectedAccount);
|
|
350
305
|
const { security_warnings: _, ...metadataWithoutWarnings } = requestMetadata;
|
|
@@ -400,7 +355,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
400
355
|
}
|
|
401
356
|
__classPrivateFieldGet(this, _BridgeStatusController_updateSrcTxHash, "f").call(this, bridgeTxMetaId, srcTxHash);
|
|
402
357
|
const statusRequest = (0, bridge_status_1.getStatusRequestWithSrcTxHash)(historyItem.quote, srcTxHash);
|
|
403
|
-
const response = await (0, bridge_status_1.fetchBridgeTxStatus)(statusRequest, __classPrivateFieldGet(this, _BridgeStatusController_clientId, "f"), await
|
|
358
|
+
const response = await (0, bridge_status_1.fetchBridgeTxStatus)(statusRequest, __classPrivateFieldGet(this, _BridgeStatusController_clientId, "f"), await (0, authentication_1.getJwt)(this.messenger), __classPrivateFieldGet(this, _BridgeStatusController_fetchFn, "f"), __classPrivateFieldGet(this, _BridgeStatusController_config, "f").customBridgeApiBaseUrl);
|
|
404
359
|
status = response.status;
|
|
405
360
|
validationFailures = response.validationFailures;
|
|
406
361
|
}
|
|
@@ -456,16 +411,6 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
456
411
|
__classPrivateFieldGet(this, _BridgeStatusController_handleFetchFailure, "f").call(this, bridgeTxMetaId);
|
|
457
412
|
}
|
|
458
413
|
});
|
|
459
|
-
_BridgeStatusController_getJwt.set(this, async () => {
|
|
460
|
-
try {
|
|
461
|
-
const token = await this.messenger.call('AuthenticationController:getBearerToken');
|
|
462
|
-
return token;
|
|
463
|
-
}
|
|
464
|
-
catch (error) {
|
|
465
|
-
console.error('Error getting JWT token for bridge-api request', error);
|
|
466
|
-
return undefined;
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
414
|
_BridgeStatusController_getSrcTxHash.set(this, (bridgeTxMetaId) => {
|
|
470
415
|
const { txHistory } = this.state;
|
|
471
416
|
// Prefer the srcTxHash from bridgeStatusState so we don't have to l ook up in TransactionController
|
|
@@ -515,34 +460,6 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
515
460
|
* TX SUBMISSION HANDLING
|
|
516
461
|
*******************************************************
|
|
517
462
|
*/
|
|
518
|
-
/**
|
|
519
|
-
* Submits the transaction to the snap using the new unified ClientRequest interface
|
|
520
|
-
* Works for all non-EVM chains (Solana, BTC, Tron)
|
|
521
|
-
* This adds an approval tx to the ApprovalsController in the background
|
|
522
|
-
* The client needs to handle the approval tx by redirecting to the confirmation page with the approvalTxId in the URL
|
|
523
|
-
*
|
|
524
|
-
* @param trade - The trade data (can be approval or main trade)
|
|
525
|
-
* @param quoteResponse - The quote response containing metadata
|
|
526
|
-
* @param selectedAccount - The account to submit the transaction for
|
|
527
|
-
* @returns The transaction meta
|
|
528
|
-
*/
|
|
529
|
-
_BridgeStatusController_handleNonEvmTx.set(this, async (trade, quoteResponse, selectedAccount) => {
|
|
530
|
-
if (!selectedAccount.metadata?.snap?.id) {
|
|
531
|
-
throw new Error('Failed to submit cross-chain swap transaction: undefined snap id');
|
|
532
|
-
}
|
|
533
|
-
const request = (0, transaction_1.getClientRequest)(trade, quoteResponse.quote.srcChainId, selectedAccount);
|
|
534
|
-
const requestResponse = (await this.messenger.call('SnapController:handleRequest', request));
|
|
535
|
-
// Create quote response with the specified trade
|
|
536
|
-
// This allows the same method to handle both approvals and main trades
|
|
537
|
-
const txQuoteResponse = {
|
|
538
|
-
...quoteResponse,
|
|
539
|
-
trade,
|
|
540
|
-
};
|
|
541
|
-
const txMeta = (0, transaction_1.handleNonEvmTxResponse)(requestResponse, txQuoteResponse, selectedAccount);
|
|
542
|
-
// TODO remove this eventually, just returning it now to match extension behavior
|
|
543
|
-
// OR if the snap can propagate the snapRequestId or keyringReqId to the ApprovalsController, this can return the approvalTxId instead and clients won't need to subscribe to the ApprovalsController state to redirect
|
|
544
|
-
return txMeta;
|
|
545
|
-
});
|
|
546
463
|
_BridgeStatusController_waitForHashAndReturnFinalTxMeta.set(this, async (hashPromise) => {
|
|
547
464
|
const transactionHash = await hashPromise;
|
|
548
465
|
const finalTransactionMeta = this.messenger
|
|
@@ -561,7 +478,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
561
478
|
pollMs,
|
|
562
479
|
});
|
|
563
480
|
});
|
|
564
|
-
_BridgeStatusController_handleApprovalTx.set(this, async (isBridgeTx, srcChainId, approval, resetApproval, requireApproval) => {
|
|
481
|
+
_BridgeStatusController_handleApprovalTx.set(this, async (quoteResponse, isBridgeTx, srcChainId, approval, resetApproval, requireApproval) => {
|
|
565
482
|
if (approval && (0, bridge_controller_1.isEvmTxData)(approval)) {
|
|
566
483
|
const approveTx = async () => {
|
|
567
484
|
await __classPrivateFieldGet(this, _BridgeStatusController_handleUSDTAllowanceReset, "f").call(this, resetApproval);
|
|
@@ -575,15 +492,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
575
492
|
await (0, transaction_1.handleApprovalDelay)(srcChainId);
|
|
576
493
|
return approvalTxMeta;
|
|
577
494
|
};
|
|
578
|
-
return await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this,
|
|
579
|
-
name: isBridgeTx
|
|
580
|
-
? constants_1.TraceName.BridgeTransactionApprovalCompleted
|
|
581
|
-
: constants_1.TraceName.SwapTransactionApprovalCompleted,
|
|
582
|
-
data: {
|
|
583
|
-
srcChainId: (0, bridge_controller_1.formatChainIdToCaip)(srcChainId),
|
|
584
|
-
stxEnabled: false,
|
|
585
|
-
},
|
|
586
|
-
}, approveTx);
|
|
495
|
+
return await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, (0, trace_1.getApprovalTraceParams)(quoteResponse, false), approveTx);
|
|
587
496
|
}
|
|
588
497
|
return undefined;
|
|
589
498
|
});
|
|
@@ -602,13 +511,13 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
602
511
|
*/
|
|
603
512
|
_BridgeStatusController_handleEvmTransaction.set(this, async ({ transactionType, trade, requireApproval = false, txFee, actionId: providedActionId, }) => {
|
|
604
513
|
// Use provided actionId (for pre-submission history) or generate one
|
|
605
|
-
const actionId = providedActionId ?? (0, transaction_1.generateActionId)()
|
|
606
|
-
const selectedAccount = this.messenger
|
|
514
|
+
const actionId = providedActionId ?? (0, transaction_1.generateActionId)();
|
|
515
|
+
const selectedAccount = (0, accounts_1.getAccountByAddress)(this.messenger, trade.from);
|
|
607
516
|
if (!selectedAccount) {
|
|
608
517
|
throw new Error('Failed to submit cross-chain swap transaction: unknown account in trade data');
|
|
609
518
|
}
|
|
610
519
|
const hexChainId = (0, bridge_controller_1.formatChainIdToHex)(trade.chainId);
|
|
611
|
-
const networkClientId = this.messenger
|
|
520
|
+
const networkClientId = (0, network_1.getNetworkClientIdByChainId)(this.messenger, hexChainId);
|
|
612
521
|
const requestOptions = {
|
|
613
522
|
actionId,
|
|
614
523
|
networkClientId,
|
|
@@ -719,11 +628,8 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
719
628
|
* @returns The transaction meta
|
|
720
629
|
*/
|
|
721
630
|
this.submitTx = async (accountAddress, quoteResponse, isStxEnabledOnClient, quotesReceivedContext, location = bridge_controller_1.MetaMetricsSwapsEventSource.MainView, abTests, activeAbTests) => {
|
|
722
|
-
this.messenger
|
|
723
|
-
|
|
724
|
-
// If the trade has a featureId, it means it was submitted outside of the Unified Swap and Bridge experience, so no QuotesReceived event is published
|
|
725
|
-
quoteResponse.featureId ? undefined : quotesReceivedContext);
|
|
726
|
-
const selectedAccount = __classPrivateFieldGet(this, _BridgeStatusController_instances, "m", _BridgeStatusController_getMultichainSelectedAccount).call(this, accountAddress);
|
|
631
|
+
(0, bridge_1.stopPollingForQuotes)(this.messenger, quoteResponse.featureId, quotesReceivedContext);
|
|
632
|
+
const selectedAccount = (0, accounts_1.getAccountByAddress)(this.messenger, accountAddress);
|
|
727
633
|
if (!selectedAccount) {
|
|
728
634
|
throw new Error('Failed to submit cross-chain swap transaction: undefined multichain account');
|
|
729
635
|
}
|
|
@@ -742,19 +648,11 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
742
648
|
if ((0, bridge_controller_1.isNonEvmChainId)(quoteResponse.quote.srcChainId)) {
|
|
743
649
|
// Handle non-EVM approval if present (e.g., Tron token approvals)
|
|
744
650
|
if (quoteResponse.approval && (0, bridge_controller_1.isTronTrade)(quoteResponse.approval)) {
|
|
745
|
-
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, {
|
|
746
|
-
name: isBridgeTx
|
|
747
|
-
? constants_1.TraceName.BridgeTransactionApprovalCompleted
|
|
748
|
-
: constants_1.TraceName.SwapTransactionApprovalCompleted,
|
|
749
|
-
data: {
|
|
750
|
-
srcChainId: (0, bridge_controller_1.formatChainIdToCaip)(quoteResponse.quote.srcChainId),
|
|
751
|
-
stxEnabled: false,
|
|
752
|
-
},
|
|
753
|
-
}, async () => {
|
|
651
|
+
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, (0, trace_1.getApprovalTraceParams)(quoteResponse, false), async () => {
|
|
754
652
|
try {
|
|
755
653
|
return quoteResponse.approval &&
|
|
756
654
|
(0, bridge_controller_1.isTronTrade)(quoteResponse.approval)
|
|
757
|
-
? await
|
|
655
|
+
? await (0, snaps_1.handleNonEvmTx)(this.messenger, quoteResponse.approval, quoteResponse, selectedAccount)
|
|
758
656
|
: /* c8 ignore start */
|
|
759
657
|
undefined;
|
|
760
658
|
/* c8 ignore end */
|
|
@@ -772,22 +670,14 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
772
670
|
// Add delay after approval similar to EVM flow
|
|
773
671
|
await (0, transaction_1.handleApprovalDelay)(quoteResponse.quote.srcChainId);
|
|
774
672
|
}
|
|
775
|
-
txMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, {
|
|
776
|
-
name: isBridgeTx
|
|
777
|
-
? constants_1.TraceName.BridgeTransactionCompleted
|
|
778
|
-
: constants_1.TraceName.SwapTransactionCompleted,
|
|
779
|
-
data: {
|
|
780
|
-
srcChainId: (0, bridge_controller_1.formatChainIdToCaip)(quoteResponse.quote.srcChainId),
|
|
781
|
-
stxEnabled: false,
|
|
782
|
-
},
|
|
783
|
-
}, async () => {
|
|
673
|
+
txMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, (0, trace_1.getTraceParams)(quoteResponse, false), async () => {
|
|
784
674
|
try {
|
|
785
675
|
if (!((0, bridge_controller_1.isTronTrade)(quoteResponse.trade) ||
|
|
786
676
|
(0, bridge_controller_1.isBitcoinTrade)(quoteResponse.trade) ||
|
|
787
677
|
typeof quoteResponse.trade === 'string')) {
|
|
788
678
|
throw new Error('Failed to submit cross-chain swap transaction: trade is not a non-EVM transaction');
|
|
789
679
|
}
|
|
790
|
-
return await
|
|
680
|
+
return await (0, snaps_1.handleNonEvmTx)(this.messenger, quoteResponse.trade, quoteResponse, selectedAccount);
|
|
791
681
|
}
|
|
792
682
|
catch (error) {
|
|
793
683
|
!quoteResponse.featureId &&
|
|
@@ -805,15 +695,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
805
695
|
// Extension does not have this issue
|
|
806
696
|
const requireApproval = __classPrivateFieldGet(this, _BridgeStatusController_clientId, "f") === types_1.BridgeClientId.MOBILE && isHardwareAccount;
|
|
807
697
|
// Handle smart transactions if enabled
|
|
808
|
-
txMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, {
|
|
809
|
-
name: isBridgeTx
|
|
810
|
-
? constants_1.TraceName.BridgeTransactionCompleted
|
|
811
|
-
: constants_1.TraceName.SwapTransactionCompleted,
|
|
812
|
-
data: {
|
|
813
|
-
srcChainId: (0, bridge_controller_1.formatChainIdToCaip)(quoteResponse.quote.srcChainId),
|
|
814
|
-
stxEnabled: isStxEnabledOnClient,
|
|
815
|
-
},
|
|
816
|
-
}, async () => {
|
|
698
|
+
txMeta = await __classPrivateFieldGet(this, _BridgeStatusController_trace, "f").call(this, (0, trace_1.getTraceParams)(quoteResponse, isStxEnabledOnClient), async () => {
|
|
817
699
|
if (!(0, bridge_controller_1.isEvmTxData)(quoteResponse.trade)) {
|
|
818
700
|
throw new Error('Failed to submit cross-chain swap transaction: trade is not an EVM transaction');
|
|
819
701
|
}
|
|
@@ -824,7 +706,8 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
824
706
|
isDelegatedAccount = await (async () => {
|
|
825
707
|
try {
|
|
826
708
|
const atomicBatchSupport = await this.messenger.call('TransactionController:isAtomicBatchSupported', {
|
|
827
|
-
address: quoteResponse.trade
|
|
709
|
+
address: quoteResponse.trade
|
|
710
|
+
.from,
|
|
828
711
|
chainIds: [hexChainId],
|
|
829
712
|
});
|
|
830
713
|
return atomicBatchSupport.some((entry) => entry.isSupported && entry.delegationAddress);
|
|
@@ -851,7 +734,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
851
734
|
return tradeMeta;
|
|
852
735
|
}
|
|
853
736
|
// Set approval time and id if an approval tx is needed
|
|
854
|
-
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_handleApprovalTx, "f").call(this, isBridgeTx, quoteResponse.quote.srcChainId, quoteResponse.approval && (0, bridge_controller_1.isEvmTxData)(quoteResponse.approval)
|
|
737
|
+
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_handleApprovalTx, "f").call(this, quoteResponse, isBridgeTx, quoteResponse.quote.srcChainId, quoteResponse.approval && (0, bridge_controller_1.isEvmTxData)(quoteResponse.approval)
|
|
855
738
|
? quoteResponse.approval
|
|
856
739
|
: undefined, quoteResponse.resetApproval, requireApproval);
|
|
857
740
|
approvalTxId = approvalTxMeta?.id;
|
|
@@ -947,28 +830,30 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
947
830
|
*/
|
|
948
831
|
this.submitIntent = async (params) => {
|
|
949
832
|
const { quoteResponse, accountAddress, location, abTests, activeAbTests } = params;
|
|
950
|
-
|
|
833
|
+
// TODO add metrics context
|
|
834
|
+
(0, bridge_1.stopPollingForQuotes)(this.messenger);
|
|
951
835
|
// Build pre-confirmation properties for error tracking parity with submitTx
|
|
952
|
-
const account =
|
|
836
|
+
const account = (0, accounts_1.getAccountByAddress)(this.messenger, accountAddress);
|
|
953
837
|
const isHardwareAccount = Boolean(account) && (0, bridge_controller_1.isHardwareWallet)(account);
|
|
954
838
|
const preConfirmationProperties = (0, metrics_1.getPreConfirmationPropertiesFromQuote)(quoteResponse, false, isHardwareAccount, location, abTests, activeAbTests);
|
|
955
839
|
try {
|
|
956
|
-
const intent = (0,
|
|
840
|
+
const intent = (0, intent_api_1.getIntentFromQuote)(quoteResponse);
|
|
957
841
|
// If backend provided an approval tx for this intent quote, submit it first (on-chain),
|
|
958
842
|
// then proceed with off-chain intent submission.
|
|
959
843
|
const isBridgeTx = (0, bridge_controller_1.isCrossChain)(quoteResponse.quote.srcChainId, quoteResponse.quote.destChainId);
|
|
960
844
|
const requireApproval = isHardwareAccount && __classPrivateFieldGet(this, _BridgeStatusController_clientId, "f") === types_1.BridgeClientId.MOBILE;
|
|
961
845
|
// Handle approval silently for better UX in intent flows
|
|
962
|
-
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_handleApprovalTx, "f").call(this, isBridgeTx, quoteResponse.quote.srcChainId, quoteResponse.approval, quoteResponse.resetApproval, requireApproval);
|
|
846
|
+
const approvalTxMeta = await __classPrivateFieldGet(this, _BridgeStatusController_handleApprovalTx, "f").call(this, quoteResponse, isBridgeTx, quoteResponse.quote.srcChainId, quoteResponse.approval, quoteResponse.resetApproval, requireApproval);
|
|
963
847
|
const approvalTxId = approvalTxMeta?.id;
|
|
964
848
|
if (approvalTxId) {
|
|
965
849
|
await __classPrivateFieldGet(this, _BridgeStatusController_waitForTxConfirmation, "f").call(this, approvalTxId);
|
|
966
850
|
}
|
|
967
851
|
const { srcChainId, requestId } = quoteResponse.quote;
|
|
968
|
-
const signature = await
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
852
|
+
const signature = await (0, keyring_1.signTypedMessage)({
|
|
853
|
+
messenger: this.messenger,
|
|
854
|
+
accountAddress,
|
|
855
|
+
typedData: intent.typedData,
|
|
856
|
+
});
|
|
972
857
|
const submissionParams = {
|
|
973
858
|
srcChainId,
|
|
974
859
|
quoteId: requestId,
|
|
@@ -986,7 +871,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
986
871
|
: /* c8 ignore end */
|
|
987
872
|
transaction_controller_1.TransactionType.swap;
|
|
988
873
|
// Create actual transaction in Transaction Controller first
|
|
989
|
-
const networkClientId =
|
|
874
|
+
const networkClientId = (0, network_1.getNetworkClientIdByChainId)(this.messenger, srcChainId);
|
|
990
875
|
// This is a synthetic transaction whose purpose is to be able
|
|
991
876
|
// to track the order status via the history
|
|
992
877
|
const intentTransactionParams = {
|
|
@@ -1099,24 +984,36 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
1099
984
|
};
|
|
1100
985
|
// This will publish events for PERPS dropped tx failures as well
|
|
1101
986
|
if (!txMetaId) {
|
|
1102
|
-
|
|
987
|
+
(0, bridge_1.trackMetricsEvent)({
|
|
988
|
+
messenger: this.messenger,
|
|
989
|
+
eventName,
|
|
990
|
+
properties: baseProperties,
|
|
991
|
+
});
|
|
1103
992
|
return;
|
|
1104
993
|
}
|
|
1105
994
|
const historyItem = this.state.txHistory[txMetaId];
|
|
1106
995
|
if (!historyItem) {
|
|
1107
|
-
|
|
996
|
+
(0, bridge_1.trackMetricsEvent)({
|
|
997
|
+
messenger: this.messenger,
|
|
998
|
+
eventName,
|
|
999
|
+
properties: baseProperties,
|
|
1000
|
+
});
|
|
1108
1001
|
return;
|
|
1109
1002
|
}
|
|
1110
1003
|
const requestParamProperties = (0, metrics_1.getRequestParamFromHistory)(historyItem);
|
|
1111
1004
|
// Always publish StatusValidationFailed event, regardless of featureId
|
|
1112
1005
|
if (eventName === bridge_controller_1.UnifiedSwapBridgeEventName.StatusValidationFailed) {
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1006
|
+
(0, bridge_1.trackMetricsEvent)({
|
|
1007
|
+
messenger: this.messenger,
|
|
1008
|
+
eventName,
|
|
1009
|
+
properties: {
|
|
1010
|
+
...baseProperties,
|
|
1011
|
+
chain_id_source: requestParamProperties.chain_id_source,
|
|
1012
|
+
chain_id_destination: requestParamProperties.chain_id_destination,
|
|
1013
|
+
token_address_source: requestParamProperties.token_address_source,
|
|
1014
|
+
token_address_destination: requestParamProperties.token_address_destination,
|
|
1015
|
+
refresh_count: historyItem.attempts?.counter ?? 0,
|
|
1016
|
+
},
|
|
1120
1017
|
});
|
|
1121
1018
|
return;
|
|
1122
1019
|
}
|
|
@@ -1124,7 +1021,7 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
1124
1021
|
if (historyItem.featureId) {
|
|
1125
1022
|
return;
|
|
1126
1023
|
}
|
|
1127
|
-
const selectedAccount = this.messenger
|
|
1024
|
+
const selectedAccount = (0, accounts_1.getAccountByAddress)(this.messenger, historyItem.account);
|
|
1128
1025
|
const { transactions } = this.messenger.call('TransactionController:getState');
|
|
1129
1026
|
const txMeta = transactions?.find((tx) => tx.id === txMetaId);
|
|
1130
1027
|
const approvalTxMeta = transactions?.find((tx) => tx.id === historyItem.approvalTxId);
|
|
@@ -1137,7 +1034,11 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
1137
1034
|
...(0, metrics_1.getFinalizedTxProperties)(historyItem, txMeta, approvalTxMeta),
|
|
1138
1035
|
...(0, metrics_1.getPriceImpactFromQuote)(historyItem.quote),
|
|
1139
1036
|
};
|
|
1140
|
-
|
|
1037
|
+
(0, bridge_1.trackMetricsEvent)({
|
|
1038
|
+
messenger: this.messenger,
|
|
1039
|
+
eventName,
|
|
1040
|
+
properties: requiredEventProperties,
|
|
1041
|
+
});
|
|
1141
1042
|
});
|
|
1142
1043
|
__classPrivateFieldSet(this, _BridgeStatusController_clientId, clientId, "f");
|
|
1143
1044
|
__classPrivateFieldSet(this, _BridgeStatusController_fetchFn, fetchFn, "f");
|
|
@@ -1154,7 +1055,6 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
1154
1055
|
updateTransactionFn: __classPrivateFieldGet(this, _BridgeStatusController_updateTransactionFn, "f"),
|
|
1155
1056
|
customBridgeApiBaseUrl: __classPrivateFieldGet(this, _BridgeStatusController_config, "f").customBridgeApiBaseUrl,
|
|
1156
1057
|
fetchFn: __classPrivateFieldGet(this, _BridgeStatusController_fetchFn, "f"),
|
|
1157
|
-
getJwt: __classPrivateFieldGet(this, _BridgeStatusController_getJwt, "f"),
|
|
1158
1058
|
}), "f");
|
|
1159
1059
|
// Register action handlers
|
|
1160
1060
|
this.messenger.registerActionHandler(`${constants_1.BRIDGE_STATUS_CONTROLLER_NAME}:startPollingForBridgeTxStatus`, this.startPollingForBridgeTxStatus.bind(this));
|
|
@@ -1212,7 +1112,5 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
|
|
|
1212
1112
|
}
|
|
1213
1113
|
}
|
|
1214
1114
|
exports.BridgeStatusController = BridgeStatusController;
|
|
1215
|
-
_BridgeStatusController_pollingTokensByTxMetaId = new WeakMap(), _BridgeStatusController_intentManager = new WeakMap(), _BridgeStatusController_clientId = new WeakMap(), _BridgeStatusController_fetchFn = new WeakMap(), _BridgeStatusController_config = new WeakMap(), _BridgeStatusController_addTransactionFn = new WeakMap(), _BridgeStatusController_addTransactionBatchFn = new WeakMap(), _BridgeStatusController_updateTransactionFn = new WeakMap(), _BridgeStatusController_estimateGasFeeFn = 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(),
|
|
1216
|
-
return this.messenger.call('AccountsController:getAccountByAddress', accountAddress);
|
|
1217
|
-
};
|
|
1115
|
+
_BridgeStatusController_pollingTokensByTxMetaId = new WeakMap(), _BridgeStatusController_intentManager = new WeakMap(), _BridgeStatusController_clientId = new WeakMap(), _BridgeStatusController_fetchFn = new WeakMap(), _BridgeStatusController_config = new WeakMap(), _BridgeStatusController_addTransactionFn = new WeakMap(), _BridgeStatusController_addTransactionBatchFn = new WeakMap(), _BridgeStatusController_updateTransactionFn = new WeakMap(), _BridgeStatusController_estimateGasFeeFn = 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_waitForHashAndReturnFinalTxMeta = new WeakMap(), _BridgeStatusController_waitForTxConfirmation = new WeakMap(), _BridgeStatusController_handleApprovalTx = new WeakMap(), _BridgeStatusController_handleEvmTransaction = new WeakMap(), _BridgeStatusController_handleUSDTAllowanceReset = new WeakMap(), _BridgeStatusController_calculateGasFees = new WeakMap(), _BridgeStatusController_handleEvmTransactionBatch = new WeakMap(), _BridgeStatusController_trackUnifiedSwapBridgeEvent = new WeakMap();
|
|
1218
1116
|
//# sourceMappingURL=bridge-status-controller.cjs.map
|