diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index bd8aaad0ca..0ddd2fdc3d 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -69,7 +69,10 @@ 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(e, null) + // in case the receipt is available, we consider that only the execution failed but the transaction went through. + // So we don't consider this to be an error. + if (e.receipt) cb(null, e.receipt.transactionHash) + else cb(e, null) } }, () => { @@ -82,7 +85,10 @@ 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(e, null) + // in case the receipt is available, we consider that only the execution failed but the transaction went through. + // So we don't consider this to be an error. + if (e.receipt) cb(null, e.receipt.transactionHash) + else cb(e, null) } } }