@metamask/transaction-controller 32.0.0 → 33.0.0
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 +22 -1
- package/dist/TransactionController.js +17 -17
- package/dist/TransactionController.mjs +16 -16
- package/dist/{chunk-Q6Q44V4W.js → chunk-3LWN55E6.js} +6 -6
- package/dist/{chunk-RAOYRJ25.js → chunk-3WTSRETF.js} +1 -1
- package/dist/chunk-3WTSRETF.js.map +1 -0
- package/dist/{chunk-Y7ENNK7L.mjs → chunk-3ZV5YEUV.mjs} +6 -5
- package/dist/chunk-3ZV5YEUV.mjs.map +1 -0
- package/dist/{chunk-3ZRHCVVS.js → chunk-4IBBHNWG.js} +7 -5
- package/dist/chunk-4IBBHNWG.js.map +1 -0
- package/dist/{chunk-AZ4WIRH3.mjs → chunk-4V4XIPCI.mjs} +5 -2
- package/dist/chunk-4V4XIPCI.mjs.map +1 -0
- package/dist/{chunk-NM6OYEPP.mjs → chunk-5ZEJT5SN.mjs} +6 -2
- package/dist/chunk-5ZEJT5SN.mjs.map +1 -0
- package/dist/{chunk-5YES3V2R.mjs → chunk-6B5BEO3R.mjs} +1 -1
- package/dist/chunk-6B5BEO3R.mjs.map +1 -0
- package/dist/{chunk-PUESYN62.js → chunk-6OLJWLKK.js} +6 -3
- package/dist/chunk-6OLJWLKK.js.map +1 -0
- package/dist/{chunk-IT3SYNZ6.js → chunk-74W7X6BE.js} +1 -1
- package/dist/chunk-74W7X6BE.js.map +1 -0
- package/dist/{chunk-7MKQDZKY.js → chunk-7KREIKNY.js} +3 -3
- package/dist/{chunk-EQT25RSP.js → chunk-7NMV2NPM.js} +6 -4
- package/dist/chunk-7NMV2NPM.js.map +1 -0
- package/dist/{chunk-CDF4QNJA.mjs → chunk-D6BF3IZK.mjs} +2 -2
- package/dist/{chunk-QZLPYOGC.mjs → chunk-EGQCE3FK.mjs} +1 -1
- package/dist/chunk-EGQCE3FK.mjs.map +1 -0
- package/dist/{chunk-CPMTUMMZ.mjs → chunk-EKJXGERC.mjs} +4 -2
- package/dist/chunk-EKJXGERC.mjs.map +1 -0
- package/dist/{chunk-AHSDUIMT.mjs → chunk-EVL6KODQ.mjs} +1 -1
- package/dist/chunk-EVL6KODQ.mjs.map +1 -0
- package/dist/{chunk-IJ5GUKRO.mjs → chunk-GNAL5HC2.mjs} +2 -2
- package/dist/{chunk-PQCHA5KF.mjs → chunk-K2JC276W.mjs} +38 -26
- package/dist/chunk-K2JC276W.mjs.map +1 -0
- package/dist/{chunk-G5U6ABRU.mjs → chunk-KLDYR4HR.mjs} +5 -3
- package/dist/{chunk-G5U6ABRU.mjs.map → chunk-KLDYR4HR.mjs.map} +1 -1
- package/dist/{chunk-METHOFMG.mjs → chunk-KPP6SU7S.mjs} +1 -1
- package/dist/chunk-KPP6SU7S.mjs.map +1 -0
- package/dist/{chunk-PBYK4OMK.js → chunk-LLXPT2H5.js} +83 -71
- package/dist/chunk-LLXPT2H5.js.map +1 -0
- package/dist/{chunk-NRQUBP3S.mjs → chunk-MILG772S.mjs} +2 -2
- package/dist/{chunk-YXSCBWTU.js → chunk-N6OMDPDK.js} +9 -9
- package/dist/{chunk-YXSCBWTU.js.map → chunk-N6OMDPDK.js.map} +1 -1
- package/dist/{chunk-V6HVF4EN.mjs → chunk-OGK76ZPK.mjs} +3 -3
- package/dist/chunk-OGK76ZPK.mjs.map +1 -0
- package/dist/{chunk-UGFBA4GV.js → chunk-OZ6UB42C.js} +5 -1
- package/dist/chunk-OZ6UB42C.js.map +1 -0
- package/dist/{chunk-J56A7UCK.mjs → chunk-Q56I5ONX.mjs} +5 -1
- package/dist/chunk-Q56I5ONX.mjs.map +1 -0
- package/dist/{chunk-UT4M4XI3.js → chunk-QH2H4W3N.js} +5 -5
- package/dist/{chunk-DTDTOMTB.js → chunk-RHDPOIS4.js} +6 -5
- package/dist/chunk-RHDPOIS4.js.map +1 -0
- package/dist/{chunk-VH47Q6TS.js → chunk-RXIUMVA5.js} +7 -3
- package/dist/chunk-RXIUMVA5.js.map +1 -0
- package/dist/{chunk-5KMU2IAT.js → chunk-ULD4JC3Q.js} +1 -1
- package/dist/chunk-ULD4JC3Q.js.map +1 -0
- package/dist/{chunk-2TUDWNEI.mjs → chunk-UZFDPHQI.mjs} +3 -3
- package/dist/{chunk-DLOQPH4M.js → chunk-V4FONAI2.js} +4 -4
- package/dist/{chunk-FDUCRHYT.js → chunk-XVYXRCRL.js} +1 -1
- package/dist/chunk-XVYXRCRL.js.map +1 -0
- package/dist/errors.js +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/gas-flows/DefaultGasFeeFlow.js +7 -7
- package/dist/gas-flows/DefaultGasFeeFlow.mjs +6 -6
- package/dist/gas-flows/LineaGasFeeFlow.js +8 -8
- package/dist/gas-flows/LineaGasFeeFlow.mjs +7 -7
- package/dist/gas-flows/TestGasFeeFlow.js +1 -1
- package/dist/gas-flows/TestGasFeeFlow.mjs +1 -1
- package/dist/helpers/EtherscanRemoteTransactionSource.js +4 -4
- package/dist/helpers/EtherscanRemoteTransactionSource.mjs +3 -3
- package/dist/helpers/GasFeePoller.js +4 -4
- package/dist/helpers/GasFeePoller.mjs +3 -3
- package/dist/helpers/IncomingTransactionHelper.js +2 -2
- package/dist/helpers/IncomingTransactionHelper.mjs +1 -1
- package/dist/helpers/MultichainTrackingHelper.js +5 -5
- package/dist/helpers/MultichainTrackingHelper.mjs +4 -4
- package/dist/helpers/PendingTransactionTracker.js +3 -3
- package/dist/helpers/PendingTransactionTracker.mjs +2 -2
- package/dist/index.js +17 -17
- package/dist/index.mjs +16 -16
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/TransactionController.d.ts +3 -5
- package/dist/types/TransactionController.d.ts.map +1 -1
- package/dist/types/gas-flows/DefaultGasFeeFlow.d.ts.map +1 -1
- package/dist/types/helpers/EtherscanRemoteTransactionSource.d.ts.map +1 -1
- package/dist/types/helpers/IncomingTransactionHelper.d.ts +2 -1
- package/dist/types/helpers/IncomingTransactionHelper.d.ts.map +1 -1
- package/dist/types/helpers/MultichainTrackingHelper.d.ts.map +1 -1
- package/dist/types/helpers/PendingTransactionTracker.d.ts.map +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/etherscan.d.ts.map +1 -1
- package/dist/types/utils/simulation.d.ts.map +1 -1
- package/dist/types/utils/utils.d.ts.map +1 -1
- package/dist/types.js +2 -2
- package/dist/types.mjs +1 -1
- package/dist/utils/etherscan.js +2 -2
- package/dist/utils/etherscan.mjs +1 -1
- package/dist/utils/external-transactions.js +1 -1
- package/dist/utils/external-transactions.mjs +1 -1
- package/dist/utils/gas-fees.js +6 -6
- package/dist/utils/gas-fees.mjs +5 -5
- package/dist/utils/gas-flow.js +3 -3
- package/dist/utils/gas-flow.mjs +2 -2
- package/dist/utils/simulation-api.js +1 -1
- package/dist/utils/simulation-api.mjs +1 -1
- package/dist/utils/simulation.js +3 -3
- package/dist/utils/simulation.mjs +2 -2
- package/dist/utils/swaps.js +4 -4
- package/dist/utils/swaps.mjs +3 -3
- package/dist/utils/transaction-type.js +1 -1
- package/dist/utils/transaction-type.mjs +1 -1
- package/dist/utils/utils.js +3 -3
- package/dist/utils/utils.mjs +2 -2
- package/dist/utils/validation.js +4 -4
- package/dist/utils/validation.mjs +3 -3
- package/package.json +5 -1
- package/dist/chunk-3ZRHCVVS.js.map +0 -1
- package/dist/chunk-5KMU2IAT.js.map +0 -1
- package/dist/chunk-5YES3V2R.mjs.map +0 -1
- package/dist/chunk-AHSDUIMT.mjs.map +0 -1
- package/dist/chunk-AZ4WIRH3.mjs.map +0 -1
- package/dist/chunk-CPMTUMMZ.mjs.map +0 -1
- package/dist/chunk-DTDTOMTB.js.map +0 -1
- package/dist/chunk-EQT25RSP.js.map +0 -1
- package/dist/chunk-FDUCRHYT.js.map +0 -1
- package/dist/chunk-IT3SYNZ6.js.map +0 -1
- package/dist/chunk-J56A7UCK.mjs.map +0 -1
- package/dist/chunk-METHOFMG.mjs.map +0 -1
- package/dist/chunk-NM6OYEPP.mjs.map +0 -1
- package/dist/chunk-PBYK4OMK.js.map +0 -1
- package/dist/chunk-PQCHA5KF.mjs.map +0 -1
- package/dist/chunk-PUESYN62.js.map +0 -1
- package/dist/chunk-QZLPYOGC.mjs.map +0 -1
- package/dist/chunk-RAOYRJ25.js.map +0 -1
- package/dist/chunk-UGFBA4GV.js.map +0 -1
- package/dist/chunk-V6HVF4EN.mjs.map +0 -1
- package/dist/chunk-VH47Q6TS.js.map +0 -1
- package/dist/chunk-Y7ENNK7L.mjs.map +0 -1
- /package/dist/{chunk-Q6Q44V4W.js.map → chunk-3LWN55E6.js.map} +0 -0
- /package/dist/{chunk-7MKQDZKY.js.map → chunk-7KREIKNY.js.map} +0 -0
- /package/dist/{chunk-CDF4QNJA.mjs.map → chunk-D6BF3IZK.mjs.map} +0 -0
- /package/dist/{chunk-IJ5GUKRO.mjs.map → chunk-GNAL5HC2.mjs.map} +0 -0
- /package/dist/{chunk-NRQUBP3S.mjs.map → chunk-MILG772S.mjs.map} +0 -0
- /package/dist/{chunk-UT4M4XI3.js.map → chunk-QH2H4W3N.js.map} +0 -0
- /package/dist/{chunk-2TUDWNEI.mjs.map → chunk-UZFDPHQI.mjs.map} +0 -0
- /package/dist/{chunk-DLOQPH4M.js.map → chunk-V4FONAI2.js.map} +0 -0
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
var _chunkPRUNMTRDjs = require('./chunk-PRUNMTRD.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk74W7X6BEjs = require('./chunk-74W7X6BE.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkSD6CWFDFjs = require('./chunk-SD6CWFDF.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkRXIUMVA5js = require('./chunk-RXIUMVA5.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkULD4JC3Qjs = require('./chunk-ULD4JC3Q.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunk7LXE4KHVjs = require('./chunk-7LXE4KHV.js');
|
|
@@ -38,33 +38,33 @@ var _chunkWR5F34OWjs = require('./chunk-WR5F34OW.js');
|
|
|
38
38
|
var _chunkTJMQEH57js = require('./chunk-TJMQEH57.js');
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunk7KREIKNYjs = require('./chunk-7KREIKNY.js');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
var _chunk2XKEAKQGjs = require('./chunk-2XKEAKQG.js');
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunkRHDPOIS4js = require('./chunk-RHDPOIS4.js');
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunk6OLJWLKKjs = require('./chunk-6OLJWLKK.js');
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var
|
|
54
|
+
var _chunk7NMV2NPMjs = require('./chunk-7NMV2NPM.js');
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var
|
|
57
|
+
var _chunk3LWN55E6js = require('./chunk-3LWN55E6.js');
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
var
|
|
60
|
+
var _chunkN6OMDPDKjs = require('./chunk-N6OMDPDK.js');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunk4IBBHNWGjs = require('./chunk-4IBBHNWG.js');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunkQH2H4W3Njs = require('./chunk-QH2H4W3N.js');
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
@@ -76,10 +76,10 @@ var _chunkUT4M4XI3js = require('./chunk-UT4M4XI3.js');
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
var
|
|
79
|
+
var _chunkOZ6UB42Cjs = require('./chunk-OZ6UB42C.js');
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkV4FONAI2js = require('./chunk-V4FONAI2.js');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
var _chunkS6VGOPUYjs = require('./chunk-S6VGOPUY.js');
|
|
@@ -143,7 +143,7 @@ function getDefaultTransactionControllerState() {
|
|
|
143
143
|
lastFetchedBlockNumbers: {}
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
var _internalEvents, _incomingTransactionOptions, _pendingTransactionOptions, _transactionHistoryLimit, _isSimulationEnabled, _testGasFeeFlows, _multichainTrackingHelper, _createNonceTracker, createNonceTracker_fn, _createIncomingTransactionHelper, createIncomingTransactionHelper_fn, _createPendingTransactionTracker, createPendingTransactionTracker_fn, _checkForPendingTransactionAndStartPolling, _stopAllTracking, stopAllTracking_fn, _removeIncomingTransactionHelperListeners, removeIncomingTransactionHelperListeners_fn, _addIncomingTransactionHelperListeners, addIncomingTransactionHelperListeners_fn, _removePendingTransactionTrackerListeners, removePendingTransactionTrackerListeners_fn, _addPendingTransactionTrackerListeners, addPendingTransactionTrackerListeners_fn, _getNonceTrackerPendingTransactions, getNonceTrackerPendingTransactions_fn, _getGasFeeFlows, getGasFeeFlows_fn, _getLayer1GasFeeFlows, getLayer1GasFeeFlows_fn, _updateTransactionInternal, updateTransactionInternal_fn, _checkIfTransactionParamsUpdated, checkIfTransactionParamsUpdated_fn, _onTransactionParamsUpdated, onTransactionParamsUpdated_fn, _updateSimulationData, updateSimulationData_fn, _onGasFeePollerTransactionUpdate, onGasFeePollerTransactionUpdate_fn, _getNetworkClientId, getNetworkClientId_fn, _getGlobalNetworkClientId, getGlobalNetworkClientId_fn, _getGlobalChainId, getGlobalChainId_fn, _isCustomNetwork, isCustomNetwork_fn;
|
|
146
|
+
var _internalEvents, _incomingTransactionOptions, _pendingTransactionOptions, _transactionHistoryLimit, _isSimulationEnabled, _testGasFeeFlows, _multichainTrackingHelper, _createNonceTracker, createNonceTracker_fn, _createIncomingTransactionHelper, createIncomingTransactionHelper_fn, _createPendingTransactionTracker, createPendingTransactionTracker_fn, _checkForPendingTransactionAndStartPolling, _stopAllTracking, stopAllTracking_fn, _removeIncomingTransactionHelperListeners, removeIncomingTransactionHelperListeners_fn, _addIncomingTransactionHelperListeners, addIncomingTransactionHelperListeners_fn, _removePendingTransactionTrackerListeners, removePendingTransactionTrackerListeners_fn, _addPendingTransactionTrackerListeners, addPendingTransactionTrackerListeners_fn, _getNonceTrackerPendingTransactions, getNonceTrackerPendingTransactions_fn, _getGasFeeFlows, getGasFeeFlows_fn, _getLayer1GasFeeFlows, getLayer1GasFeeFlows_fn, _updateTransactionInternal, updateTransactionInternal_fn, _checkIfTransactionParamsUpdated, checkIfTransactionParamsUpdated_fn, _onTransactionParamsUpdated, onTransactionParamsUpdated_fn, _updateSimulationData, updateSimulationData_fn, _onGasFeePollerTransactionUpdate, onGasFeePollerTransactionUpdate_fn, _getNetworkClientId, getNetworkClientId_fn, _getGlobalNetworkClientId, getGlobalNetworkClientId_fn, _getGlobalChainId, getGlobalChainId_fn, _isCustomNetwork, isCustomNetwork_fn, _getSelectedAccount, getSelectedAccount_fn;
|
|
147
147
|
var TransactionController = class extends _basecontroller.BaseController {
|
|
148
148
|
/**
|
|
149
149
|
* Constructs a TransactionController.
|
|
@@ -161,7 +161,6 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
161
161
|
* @param options.getNetworkState - Gets the state of the network controller.
|
|
162
162
|
* @param options.getPermittedAccounts - Get accounts that a given origin has permissions for.
|
|
163
163
|
* @param options.getSavedGasFees - Gets the saved gas fee config.
|
|
164
|
-
* @param options.getSelectedAddress - Gets the address of the currently selected account.
|
|
165
164
|
* @param options.incomingTransactions - Configuration options for incoming transaction support.
|
|
166
165
|
* @param options.isMultichainEnabled - Enable multichain support.
|
|
167
166
|
* @param options.isSimulationEnabled - Whether new transactions will be automatically simulated.
|
|
@@ -189,7 +188,6 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
189
188
|
getNetworkState,
|
|
190
189
|
getPermittedAccounts,
|
|
191
190
|
getSavedGasFees,
|
|
192
|
-
getSelectedAddress,
|
|
193
191
|
incomingTransactions = {},
|
|
194
192
|
isMultichainEnabled = false,
|
|
195
193
|
isSimulationEnabled,
|
|
@@ -233,6 +231,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
233
231
|
_chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _getGlobalNetworkClientId);
|
|
234
232
|
_chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _getGlobalChainId);
|
|
235
233
|
_chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _isCustomNetwork);
|
|
234
|
+
_chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _getSelectedAccount);
|
|
236
235
|
_chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _internalEvents, new (0, _events.EventEmitter)());
|
|
237
236
|
this.approvingTransactionIds = /* @__PURE__ */ new Set();
|
|
238
237
|
this.mutex = new (0, _asyncmutex.Mutex)();
|
|
@@ -259,7 +258,6 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
259
258
|
this.getCurrentNetworkEIP1559Compatibility = getCurrentNetworkEIP1559Compatibility;
|
|
260
259
|
this.getGasFeeEstimates = getGasFeeEstimates || (() => Promise.resolve({}));
|
|
261
260
|
this.getPermittedAccounts = getPermittedAccounts;
|
|
262
|
-
this.getSelectedAddress = getSelectedAddress;
|
|
263
261
|
this.getExternalPendingTransactions = getExternalPendingTransactions ?? (() => []);
|
|
264
262
|
this.securityProviderRequest = securityProviderRequest;
|
|
265
263
|
_chunkZ4BLTVTBjs.__privateSet.call(void 0, this, _incomingTransactionOptions, incomingTransactions);
|
|
@@ -284,7 +282,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
284
282
|
chainId
|
|
285
283
|
);
|
|
286
284
|
};
|
|
287
|
-
_chunkZ4BLTVTBjs.__privateSet.call(void 0, this, _multichainTrackingHelper, new (0,
|
|
285
|
+
_chunkZ4BLTVTBjs.__privateSet.call(void 0, this, _multichainTrackingHelper, new (0, _chunk6OLJWLKKjs.MultichainTrackingHelper)({
|
|
288
286
|
isMultichainEnabled,
|
|
289
287
|
provider,
|
|
290
288
|
nonceTracker: this.nonceTracker,
|
|
@@ -310,7 +308,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
310
308
|
}
|
|
311
309
|
}));
|
|
312
310
|
_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _multichainTrackingHelper).initialize();
|
|
313
|
-
const etherscanRemoteTransactionSource = new (0,
|
|
311
|
+
const etherscanRemoteTransactionSource = new (0, _chunk7NMV2NPMjs.EtherscanRemoteTransactionSource)({
|
|
314
312
|
includeTokenTransfers: incomingTransactions.includeTokenTransfers
|
|
315
313
|
});
|
|
316
314
|
this.incomingTransactionHelper = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _createIncomingTransactionHelper, createIncomingTransactionHelper_fn).call(this, {
|
|
@@ -323,7 +321,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
323
321
|
});
|
|
324
322
|
this.gasFeeFlows = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _getGasFeeFlows, getGasFeeFlows_fn).call(this);
|
|
325
323
|
this.layer1GasFeeFlows = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _getLayer1GasFeeFlows, getLayer1GasFeeFlows_fn).call(this);
|
|
326
|
-
const gasFeePoller = new (0,
|
|
324
|
+
const gasFeePoller = new (0, _chunk7KREIKNYjs.GasFeePoller)({
|
|
327
325
|
findNetworkClientIdByChainId,
|
|
328
326
|
gasFeeFlows: this.gasFeeFlows,
|
|
329
327
|
getGasFeeControllerEstimates: this.getGasFeeEstimates,
|
|
@@ -358,7 +356,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
358
356
|
}
|
|
359
357
|
failTransaction(transactionMeta, error, actionId) {
|
|
360
358
|
const newTransactionMeta = _lodash.merge.call(void 0, {}, transactionMeta, {
|
|
361
|
-
error:
|
|
359
|
+
error: _chunkOZ6UB42Cjs.normalizeTxError.call(void 0, error),
|
|
362
360
|
status: "failed" /* failed */
|
|
363
361
|
});
|
|
364
362
|
this.messagingSystem.publish(`${controllerName}:transactionFailed`, {
|
|
@@ -456,7 +454,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
456
454
|
networkClientId: requestNetworkClientId
|
|
457
455
|
} = {}) {
|
|
458
456
|
_chunkS6VGOPUYjs.projectLogger.call(void 0, "Adding transaction", txParams);
|
|
459
|
-
txParams =
|
|
457
|
+
txParams = _chunkOZ6UB42Cjs.normalizeTransactionParams.call(void 0, txParams);
|
|
460
458
|
if (requestNetworkClientId && !_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _multichainTrackingHelper).has(requestNetworkClientId)) {
|
|
461
459
|
throw new Error(
|
|
462
460
|
"The networkClientId for this transaction could not be found"
|
|
@@ -466,11 +464,11 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
466
464
|
const isEIP1559Compatible = await this.getEIP1559Compatibility(
|
|
467
465
|
networkClientId
|
|
468
466
|
);
|
|
469
|
-
|
|
467
|
+
_chunkRXIUMVA5js.validateTxParams.call(void 0, txParams, isEIP1559Compatible);
|
|
470
468
|
if (origin) {
|
|
471
|
-
await
|
|
469
|
+
await _chunkRXIUMVA5js.validateTransactionOrigin.call(void 0,
|
|
472
470
|
await this.getPermittedAccounts(origin),
|
|
473
|
-
this.
|
|
471
|
+
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _getSelectedAccount, getSelectedAccount_fn).call(this).address,
|
|
474
472
|
txParams.from,
|
|
475
473
|
origin
|
|
476
474
|
);
|
|
@@ -518,7 +516,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
518
516
|
if (!this.isHistoryDisabled) {
|
|
519
517
|
addedTransactionMeta = _chunkQP75SWIQjs.addInitialHistorySnapshot.call(void 0, addedTransactionMeta);
|
|
520
518
|
}
|
|
521
|
-
addedTransactionMeta =
|
|
519
|
+
addedTransactionMeta = _chunkQH2H4W3Njs.updateSwapsTransaction.call(void 0,
|
|
522
520
|
addedTransactionMeta,
|
|
523
521
|
transactionType,
|
|
524
522
|
swaps,
|
|
@@ -597,8 +595,8 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
597
595
|
return;
|
|
598
596
|
}
|
|
599
597
|
if (gasValues) {
|
|
600
|
-
gasValues =
|
|
601
|
-
|
|
598
|
+
gasValues = _chunkOZ6UB42Cjs.normalizeGasFeeValues.call(void 0, gasValues);
|
|
599
|
+
_chunkOZ6UB42Cjs.validateGasValues.call(void 0, gasValues);
|
|
602
600
|
}
|
|
603
601
|
_chunkS6VGOPUYjs.projectLogger.call(void 0, "Creating cancel transaction", transactionId, gasValues);
|
|
604
602
|
const transactionMeta = this.getTransaction(transactionId);
|
|
@@ -608,26 +606,26 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
608
606
|
if (!this.sign) {
|
|
609
607
|
throw new Error("No sign method defined.");
|
|
610
608
|
}
|
|
611
|
-
const minGasPrice =
|
|
609
|
+
const minGasPrice = _chunkOZ6UB42Cjs.getIncreasedPriceFromExisting.call(void 0,
|
|
612
610
|
transactionMeta.txParams.gasPrice,
|
|
613
611
|
CANCEL_RATE
|
|
614
612
|
);
|
|
615
|
-
const gasPriceFromValues =
|
|
616
|
-
const newGasPrice = gasPriceFromValues &&
|
|
613
|
+
const gasPriceFromValues = _chunkOZ6UB42Cjs.isGasPriceValue.call(void 0, gasValues) && gasValues.gasPrice;
|
|
614
|
+
const newGasPrice = gasPriceFromValues && _chunkOZ6UB42Cjs.validateMinimumIncrease.call(void 0, gasPriceFromValues, minGasPrice) || minGasPrice;
|
|
617
615
|
const existingMaxFeePerGas = transactionMeta.txParams?.maxFeePerGas;
|
|
618
|
-
const minMaxFeePerGas =
|
|
616
|
+
const minMaxFeePerGas = _chunkOZ6UB42Cjs.getIncreasedPriceFromExisting.call(void 0,
|
|
619
617
|
existingMaxFeePerGas,
|
|
620
618
|
CANCEL_RATE
|
|
621
619
|
);
|
|
622
|
-
const maxFeePerGasValues =
|
|
623
|
-
const newMaxFeePerGas = maxFeePerGasValues &&
|
|
620
|
+
const maxFeePerGasValues = _chunkOZ6UB42Cjs.isFeeMarketEIP1559Values.call(void 0, gasValues) && gasValues.maxFeePerGas;
|
|
621
|
+
const newMaxFeePerGas = maxFeePerGasValues && _chunkOZ6UB42Cjs.validateMinimumIncrease.call(void 0, maxFeePerGasValues, minMaxFeePerGas) || existingMaxFeePerGas && minMaxFeePerGas;
|
|
624
622
|
const existingMaxPriorityFeePerGas = transactionMeta.txParams?.maxPriorityFeePerGas;
|
|
625
|
-
const minMaxPriorityFeePerGas =
|
|
623
|
+
const minMaxPriorityFeePerGas = _chunkOZ6UB42Cjs.getIncreasedPriceFromExisting.call(void 0,
|
|
626
624
|
existingMaxPriorityFeePerGas,
|
|
627
625
|
CANCEL_RATE
|
|
628
626
|
);
|
|
629
|
-
const maxPriorityFeePerGasValues =
|
|
630
|
-
const newMaxPriorityFeePerGas = maxPriorityFeePerGasValues &&
|
|
627
|
+
const maxPriorityFeePerGasValues = _chunkOZ6UB42Cjs.isFeeMarketEIP1559Values.call(void 0, gasValues) && gasValues.maxPriorityFeePerGas;
|
|
628
|
+
const newMaxPriorityFeePerGas = maxPriorityFeePerGasValues && _chunkOZ6UB42Cjs.validateMinimumIncrease.call(void 0,
|
|
631
629
|
maxPriorityFeePerGasValues,
|
|
632
630
|
minMaxPriorityFeePerGas
|
|
633
631
|
) || existingMaxPriorityFeePerGas && minMaxPriorityFeePerGas;
|
|
@@ -721,8 +719,8 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
721
719
|
return;
|
|
722
720
|
}
|
|
723
721
|
if (gasValues) {
|
|
724
|
-
gasValues =
|
|
725
|
-
|
|
722
|
+
gasValues = _chunkOZ6UB42Cjs.normalizeGasFeeValues.call(void 0, gasValues);
|
|
723
|
+
_chunkOZ6UB42Cjs.validateGasValues.call(void 0, gasValues);
|
|
726
724
|
}
|
|
727
725
|
_chunkS6VGOPUYjs.projectLogger.call(void 0, "Creating speed up transaction", transactionId, gasValues);
|
|
728
726
|
const transactionMeta = this.getTransaction(transactionId);
|
|
@@ -732,26 +730,26 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
732
730
|
if (!this.sign) {
|
|
733
731
|
throw new Error("No sign method defined.");
|
|
734
732
|
}
|
|
735
|
-
const minGasPrice =
|
|
733
|
+
const minGasPrice = _chunkOZ6UB42Cjs.getIncreasedPriceFromExisting.call(void 0,
|
|
736
734
|
transactionMeta.txParams.gasPrice,
|
|
737
735
|
SPEED_UP_RATE
|
|
738
736
|
);
|
|
739
|
-
const gasPriceFromValues =
|
|
740
|
-
const newGasPrice = gasPriceFromValues &&
|
|
737
|
+
const gasPriceFromValues = _chunkOZ6UB42Cjs.isGasPriceValue.call(void 0, gasValues) && gasValues.gasPrice;
|
|
738
|
+
const newGasPrice = gasPriceFromValues && _chunkOZ6UB42Cjs.validateMinimumIncrease.call(void 0, gasPriceFromValues, minGasPrice) || minGasPrice;
|
|
741
739
|
const existingMaxFeePerGas = transactionMeta.txParams?.maxFeePerGas;
|
|
742
|
-
const minMaxFeePerGas =
|
|
740
|
+
const minMaxFeePerGas = _chunkOZ6UB42Cjs.getIncreasedPriceFromExisting.call(void 0,
|
|
743
741
|
existingMaxFeePerGas,
|
|
744
742
|
SPEED_UP_RATE
|
|
745
743
|
);
|
|
746
|
-
const maxFeePerGasValues =
|
|
747
|
-
const newMaxFeePerGas = maxFeePerGasValues &&
|
|
744
|
+
const maxFeePerGasValues = _chunkOZ6UB42Cjs.isFeeMarketEIP1559Values.call(void 0, gasValues) && gasValues.maxFeePerGas;
|
|
745
|
+
const newMaxFeePerGas = maxFeePerGasValues && _chunkOZ6UB42Cjs.validateMinimumIncrease.call(void 0, maxFeePerGasValues, minMaxFeePerGas) || existingMaxFeePerGas && minMaxFeePerGas;
|
|
748
746
|
const existingMaxPriorityFeePerGas = transactionMeta.txParams?.maxPriorityFeePerGas;
|
|
749
|
-
const minMaxPriorityFeePerGas =
|
|
747
|
+
const minMaxPriorityFeePerGas = _chunkOZ6UB42Cjs.getIncreasedPriceFromExisting.call(void 0,
|
|
750
748
|
existingMaxPriorityFeePerGas,
|
|
751
749
|
SPEED_UP_RATE
|
|
752
750
|
);
|
|
753
|
-
const maxPriorityFeePerGasValues =
|
|
754
|
-
const newMaxPriorityFeePerGas = maxPriorityFeePerGasValues &&
|
|
751
|
+
const maxPriorityFeePerGasValues = _chunkOZ6UB42Cjs.isFeeMarketEIP1559Values.call(void 0, gasValues) && gasValues.maxPriorityFeePerGas;
|
|
752
|
+
const newMaxPriorityFeePerGas = maxPriorityFeePerGasValues && _chunkOZ6UB42Cjs.validateMinimumIncrease.call(void 0,
|
|
755
753
|
maxPriorityFeePerGasValues,
|
|
756
754
|
minMaxPriorityFeePerGas
|
|
757
755
|
) || existingMaxPriorityFeePerGas && minMaxPriorityFeePerGas;
|
|
@@ -876,7 +874,9 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
876
874
|
*/
|
|
877
875
|
updateTransaction(transactionMeta, note) {
|
|
878
876
|
const { id: transactionId } = transactionMeta;
|
|
879
|
-
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _updateTransactionInternal, updateTransactionInternal_fn).call(this, { transactionId, note
|
|
877
|
+
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _updateTransactionInternal, updateTransactionInternal_fn).call(this, { transactionId, note }, () => ({
|
|
878
|
+
...transactionMeta
|
|
879
|
+
}));
|
|
880
880
|
}
|
|
881
881
|
/**
|
|
882
882
|
* Update the security alert response for a transaction.
|
|
@@ -989,7 +989,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
989
989
|
`Cannot update send flow history as no transaction metadata found`
|
|
990
990
|
);
|
|
991
991
|
}
|
|
992
|
-
|
|
992
|
+
_chunkOZ6UB42Cjs.validateIfTransactionUnapproved.call(void 0,
|
|
993
993
|
transactionMeta,
|
|
994
994
|
"updateTransactionSendFlowHistory"
|
|
995
995
|
);
|
|
@@ -1043,7 +1043,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1043
1043
|
`Cannot update transaction as no transaction metadata found`
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
|
-
|
|
1046
|
+
_chunkOZ6UB42Cjs.validateIfTransactionUnapproved.call(void 0,
|
|
1047
1047
|
transactionMeta,
|
|
1048
1048
|
"updateTransactionGasFees"
|
|
1049
1049
|
);
|
|
@@ -1094,7 +1094,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1094
1094
|
`Cannot update transaction as no transaction metadata found`
|
|
1095
1095
|
);
|
|
1096
1096
|
}
|
|
1097
|
-
|
|
1097
|
+
_chunkOZ6UB42Cjs.validateIfTransactionUnapproved.call(void 0, transactionMeta, "updatePreviousGasParams");
|
|
1098
1098
|
const transactionPreviousGas = {
|
|
1099
1099
|
previousGas: {
|
|
1100
1100
|
gasLimit,
|
|
@@ -1147,7 +1147,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1147
1147
|
`Cannot update editable params as no transaction metadata found`
|
|
1148
1148
|
);
|
|
1149
1149
|
}
|
|
1150
|
-
|
|
1150
|
+
_chunkOZ6UB42Cjs.validateIfTransactionUnapproved.call(void 0, transactionMeta, "updateEditableParams");
|
|
1151
1151
|
const editableParams = {
|
|
1152
1152
|
txParams: {
|
|
1153
1153
|
data,
|
|
@@ -1282,7 +1282,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1282
1282
|
updatedTransactionMeta.submittedTime = (/* @__PURE__ */ new Date()).getTime();
|
|
1283
1283
|
}
|
|
1284
1284
|
if (updatedTransactionMeta.status === "failed" /* failed */) {
|
|
1285
|
-
updatedTransactionMeta.error =
|
|
1285
|
+
updatedTransactionMeta.error = _chunkOZ6UB42Cjs.normalizeTxError.call(void 0, new Error(errorMessage));
|
|
1286
1286
|
}
|
|
1287
1287
|
this.updateTransaction(
|
|
1288
1288
|
updatedTransactionMeta,
|
|
@@ -1396,7 +1396,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1396
1396
|
chainId,
|
|
1397
1397
|
networkClientId
|
|
1398
1398
|
};
|
|
1399
|
-
const gasFeeFlow =
|
|
1399
|
+
const gasFeeFlow = _chunkV4FONAI2js.getGasFeeFlow.call(void 0,
|
|
1400
1400
|
transactionMeta,
|
|
1401
1401
|
this.gasFeeFlows
|
|
1402
1402
|
);
|
|
@@ -1443,8 +1443,8 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1443
1443
|
if (!this.sign) {
|
|
1444
1444
|
throw new Error("No sign method defined.");
|
|
1445
1445
|
}
|
|
1446
|
-
const normalizedTransactionParams =
|
|
1447
|
-
const type =
|
|
1446
|
+
const normalizedTransactionParams = _chunkOZ6UB42Cjs.normalizeTransactionParams.call(void 0, transactionParams);
|
|
1447
|
+
const type = _chunkOZ6UB42Cjs.isEIP1559Transaction.call(void 0, normalizedTransactionParams) ? "0x2" /* feeMarket */ : "0x0" /* legacy */;
|
|
1448
1448
|
const updatedTransactionParams = {
|
|
1449
1449
|
...normalizedTransactionParams,
|
|
1450
1450
|
type,
|
|
@@ -1517,7 +1517,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1517
1517
|
isCustomNetwork,
|
|
1518
1518
|
txMeta: transactionMeta
|
|
1519
1519
|
});
|
|
1520
|
-
await
|
|
1520
|
+
await _chunk4IBBHNWGjs.updateGasFees.call(void 0, {
|
|
1521
1521
|
eip1559: isEIP1559Compatible,
|
|
1522
1522
|
ethQuery,
|
|
1523
1523
|
gasFeeFlows: this.gasFeeFlows,
|
|
@@ -1678,7 +1678,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1678
1678
|
nonce,
|
|
1679
1679
|
chainId,
|
|
1680
1680
|
gasLimit: txParams.gas,
|
|
1681
|
-
...
|
|
1681
|
+
..._chunkOZ6UB42Cjs.isEIP1559Transaction.call(void 0, txParams) && {
|
|
1682
1682
|
type: "0x2" /* feeMarket */
|
|
1683
1683
|
}
|
|
1684
1684
|
};
|
|
@@ -1781,6 +1781,8 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
1781
1781
|
updatedTransactionMeta
|
|
1782
1782
|
);
|
|
1783
1783
|
_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _internalEvents).emit(
|
|
1784
|
+
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
|
|
1785
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
1784
1786
|
`${transactionMeta.id}:finished`,
|
|
1785
1787
|
updatedTransactionMeta
|
|
1786
1788
|
);
|
|
@@ -2186,7 +2188,7 @@ var TransactionController = class extends _basecontroller.BaseController {
|
|
|
2186
2188
|
networkClientId: transactionMeta.networkClientId,
|
|
2187
2189
|
chainId: transactionMeta.chainId
|
|
2188
2190
|
});
|
|
2189
|
-
const { updatedTransactionMeta, approvalTransactionMeta } = await
|
|
2191
|
+
const { updatedTransactionMeta, approvalTransactionMeta } = await _chunkQH2H4W3Njs.updatePostTransactionBalance.call(void 0, transactionMeta, {
|
|
2190
2192
|
ethQuery,
|
|
2191
2193
|
getTransaction: this.getTransaction.bind(this),
|
|
2192
2194
|
updateTransaction: this.updateTransaction.bind(this)
|
|
@@ -2264,9 +2266,9 @@ createIncomingTransactionHelper_fn = function({
|
|
|
2264
2266
|
etherscanRemoteTransactionSource,
|
|
2265
2267
|
chainId
|
|
2266
2268
|
}) {
|
|
2267
|
-
const incomingTransactionHelper = new (0,
|
|
2269
|
+
const incomingTransactionHelper = new (0, _chunkRHDPOIS4js.IncomingTransactionHelper)({
|
|
2268
2270
|
blockTracker,
|
|
2269
|
-
getCurrentAccount: this.
|
|
2271
|
+
getCurrentAccount: () => _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _getSelectedAccount, getSelectedAccount_fn).call(this),
|
|
2270
2272
|
getLastFetchedBlockNumbers: () => this.state.lastFetchedBlockNumbers,
|
|
2271
2273
|
getChainId: chainId ? () => chainId : this.getChainId.bind(this),
|
|
2272
2274
|
isEnabled: _chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _incomingTransactionOptions).isEnabled,
|
|
@@ -2286,7 +2288,7 @@ createPendingTransactionTracker_fn = function({
|
|
|
2286
2288
|
}) {
|
|
2287
2289
|
const ethQuery = new (0, _ethquery2.default)(provider);
|
|
2288
2290
|
const getChainId = chainId ? () => chainId : this.getChainId.bind(this);
|
|
2289
|
-
const pendingTransactionTracker = new (0,
|
|
2291
|
+
const pendingTransactionTracker = new (0, _chunkULD4JC3Qjs.PendingTransactionTracker)({
|
|
2290
2292
|
approveTransaction: async (transactionId) => {
|
|
2291
2293
|
await this.approveTransaction(transactionId);
|
|
2292
2294
|
},
|
|
@@ -2378,7 +2380,7 @@ getGasFeeFlows_fn = function() {
|
|
|
2378
2380
|
if (_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _testGasFeeFlows)) {
|
|
2379
2381
|
return [new (0, _chunkTJMQEH57js.TestGasFeeFlow)()];
|
|
2380
2382
|
}
|
|
2381
|
-
return [new (0,
|
|
2383
|
+
return [new (0, _chunk3LWN55E6js.LineaGasFeeFlow)(), new (0, _chunkN6OMDPDKjs.DefaultGasFeeFlow)()];
|
|
2382
2384
|
};
|
|
2383
2385
|
_getLayer1GasFeeFlows = new WeakSet();
|
|
2384
2386
|
getLayer1GasFeeFlows_fn = function() {
|
|
@@ -2397,12 +2399,13 @@ updateTransactionInternal_fn = function({
|
|
|
2397
2399
|
);
|
|
2398
2400
|
let transactionMeta2 = state.transactions[index];
|
|
2399
2401
|
transactionMeta2 = callback(transactionMeta2) ?? transactionMeta2;
|
|
2400
|
-
transactionMeta2.txParams =
|
|
2402
|
+
transactionMeta2.txParams = _chunkOZ6UB42Cjs.normalizeTransactionParams.call(void 0,
|
|
2401
2403
|
transactionMeta2.txParams
|
|
2402
2404
|
);
|
|
2403
|
-
|
|
2405
|
+
_chunkRXIUMVA5js.validateTxParams.call(void 0, transactionMeta2.txParams);
|
|
2404
2406
|
updatedTransactionParams = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _checkIfTransactionParamsUpdated, checkIfTransactionParamsUpdated_fn).call(this, transactionMeta2);
|
|
2405
|
-
|
|
2407
|
+
const shouldSkipHistory = this.isHistoryDisabled || skipHistory;
|
|
2408
|
+
if (!shouldSkipHistory) {
|
|
2406
2409
|
transactionMeta2 = _chunkQP75SWIQjs.updateTransactionHistory.call(void 0,
|
|
2407
2410
|
transactionMeta2,
|
|
2408
2411
|
note ?? "Transaction updated"
|
|
@@ -2462,7 +2465,7 @@ updateSimulationData_fn = async function(transactionMeta) {
|
|
|
2462
2465
|
_chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _updateTransactionInternal, updateTransactionInternal_fn).call(this, { transactionId, skipHistory: true }, (txMeta) => {
|
|
2463
2466
|
txMeta.simulationData = void 0;
|
|
2464
2467
|
});
|
|
2465
|
-
simulationData = await
|
|
2468
|
+
simulationData = await _chunk74W7X6BEjs.getSimulationData.call(void 0, {
|
|
2466
2469
|
chainId,
|
|
2467
2470
|
from,
|
|
2468
2471
|
to,
|
|
@@ -2530,19 +2533,28 @@ getGlobalNetworkClientId_fn = function() {
|
|
|
2530
2533
|
};
|
|
2531
2534
|
_getGlobalChainId = new WeakSet();
|
|
2532
2535
|
getGlobalChainId_fn = function() {
|
|
2533
|
-
return this.
|
|
2536
|
+
return this.messagingSystem.call(
|
|
2537
|
+
`NetworkController:getNetworkClientById`,
|
|
2538
|
+
this.getNetworkState().selectedNetworkClientId
|
|
2539
|
+
).configuration.chainId;
|
|
2534
2540
|
};
|
|
2535
2541
|
_isCustomNetwork = new WeakSet();
|
|
2536
2542
|
isCustomNetwork_fn = function(networkClientId) {
|
|
2537
2543
|
const globalNetworkClientId = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _getGlobalNetworkClientId, getGlobalNetworkClientId_fn).call(this);
|
|
2538
2544
|
if (!networkClientId || networkClientId === globalNetworkClientId) {
|
|
2539
|
-
return
|
|
2545
|
+
return !_controllerutils.isInfuraNetworkType.call(void 0,
|
|
2546
|
+
this.getNetworkState().selectedNetworkClientId
|
|
2547
|
+
);
|
|
2540
2548
|
}
|
|
2541
2549
|
return this.messagingSystem.call(
|
|
2542
2550
|
`NetworkController:getNetworkClientById`,
|
|
2543
2551
|
networkClientId
|
|
2544
2552
|
).configuration.type === _networkcontroller.NetworkClientType.Custom;
|
|
2545
2553
|
};
|
|
2554
|
+
_getSelectedAccount = new WeakSet();
|
|
2555
|
+
getSelectedAccount_fn = function() {
|
|
2556
|
+
return this.messagingSystem.call("AccountsController:getSelectedAccount");
|
|
2557
|
+
};
|
|
2546
2558
|
|
|
2547
2559
|
|
|
2548
2560
|
|
|
@@ -2551,4 +2563,4 @@ isCustomNetwork_fn = function(networkClientId) {
|
|
|
2551
2563
|
|
|
2552
2564
|
|
|
2553
2565
|
exports.HARDFORK = HARDFORK; exports.CANCEL_RATE = CANCEL_RATE; exports.SPEED_UP_RATE = SPEED_UP_RATE; exports.ApprovalState = ApprovalState; exports.TransactionController = TransactionController;
|
|
2554
|
-
//# sourceMappingURL=chunk-
|
|
2566
|
+
//# sourceMappingURL=chunk-LLXPT2H5.js.map
|