From 19f35497f162a5ac315c3bd286cddf3747f61bad Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 27 Oct 2023 00:33:27 +0200 Subject: [PATCH] fix callback with error --- libs/remix-lib/src/execution/txRunnerWeb3.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index 78e13f2e2b..bd8aaad0ca 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -69,7 +69,7 @@ export class TxRunnerWeb3 { cb(null, res.transactionHash) } catch (e) { console.log(`Send transaction failed: ${e.message} . if you use an injected provider, please check it is properly unlocked. `) - cb(null, e.receipt.transactionHash) + cb(e, null) } }, () => { @@ -82,7 +82,7 @@ export class TxRunnerWeb3 { cb(null, res.transactionHash) } catch (e) { console.log(`Send transaction failed: ${e.message} . if you use an injected provider, please check it is properly unlocked. `) - cb(null, e.receipt.transactionHash) + cb(e, null) } } } @@ -143,7 +143,7 @@ export class TxRunnerWeb3 { }, (error) => { callback(error) }) - }) + }, callback) }) .catch(err => { if (err && err.message.indexOf('Invalid JSON RPC response') !== -1) { @@ -163,7 +163,7 @@ export class TxRunnerWeb3 { }, (error) => { callback(error) }) - }) + }, callback) }) }) }