From 51e0bc3d374b60ce8ca854905879d6787ff69390 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 18 May 2023 13:18:15 +0200 Subject: [PATCH] fix async tx --- libs/remix-lib/src/execution/txRunner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-lib/src/execution/txRunner.ts b/libs/remix-lib/src/execution/txRunner.ts index 47f7458ec9..19f643cc7d 100644 --- a/libs/remix-lib/src/execution/txRunner.ts +++ b/libs/remix-lib/src/execution/txRunner.ts @@ -42,7 +42,7 @@ export class TxRunner { function run (self, tx: Transaction, stamp, confirmationCb, gasEstimationForceSend = null, promptCb = null, callback = null) { if (Object.keys(self.pendingTxs).length) { - return self.queusTxs.push({ tx, stamp, callback }) + return self.queusTxs.push({ tx, stamp, confirmationCb, gasEstimationForceSend, promptCb, callback }) } self.pendingTxs[stamp] = tx self.execute(tx, confirmationCb, gasEstimationForceSend, promptCb, function (error, result) { @@ -50,7 +50,7 @@ function run (self, tx: Transaction, stamp, confirmationCb, gasEstimationForceSe if (callback && typeof callback === 'function') callback(error, result) if (self.queusTxs.length) { const next = self.queusTxs.pop() - run(self, next.tx, next.stamp, next.callback) + run(self, next.tx, next.stamp, next.confirmationCb, next.gasEstimationForceSend, next.promptCb, next.callback) } }) }