From cafd321d871826072315901eb612b67bd27a0db6 Mon Sep 17 00:00:00 2001 From: Matthew Walsh Date: Wed, 13 Nov 2024 23:36:55 +0000 Subject: [PATCH] Fix nonce lock call --- app/scripts/metamask-controller.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index beba4942f35d..8f38e412a800 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -2155,7 +2155,11 @@ export default class MetamaskController extends EventEmitter { }); this.smartTransactionsController = new SmartTransactionsController({ supportedChainIds: getAllowedSmartTransactionsChainIds(), - getNonceLock: this.txController.getNonceLock.bind(this.txController), + getNonceLock: (address) => + this.txController.getNonceLock( + address, + this.#getGlobalNetworkClientId(), + ), confirmExternalTransaction: this.txController.confirmExternalTransaction.bind(this.txController), trackMetaMetricsEvent: this.metaMetricsController.trackEvent.bind( @@ -5062,8 +5066,7 @@ export default class MetamaskController extends EventEmitter { internalAccounts: this.accountsController.listAccounts(), dappRequest, networkClientId: - dappRequest?.networkClientId ?? - this.networkController.state.selectedNetworkClientId, + dappRequest?.networkClientId ?? this.#getGlobalNetworkClientId(), selectedAccount: this.accountsController.getAccountByAddress( transactionParams.from, ),