From 90220b8b3f1f058494d9212db20c710e7e770bb7 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 9 Jan 2020 16:45:05 +0530 Subject: [PATCH] receive function transaction --- remix-lib/src/execution/txListener.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/remix-lib/src/execution/txListener.js b/remix-lib/src/execution/txListener.js index 60ccaa633c..32f5911efe 100644 --- a/remix-lib/src/execution/txListener.js +++ b/remix-lib/src/execution/txListener.js @@ -291,12 +291,22 @@ class TxListener { return this._resolvedTransactions[tx.hash] } } - // fallback function - this._resolvedTransactions[tx.hash] = { - contractName: contractName, - to: tx.to, - fn: '(fallback)', - params: null + // receive function + if(!inputData && txHelper.getReceiveInterface(abi)){ + this._resolvedTransactions[tx.hash] = { + contractName: contractName, + to: tx.to, + fn: '(receive)', + params: null + } + } else { + // fallback function + this._resolvedTransactions[tx.hash] = { + contractName: contractName, + to: tx.to, + fn: '(fallback)', + params: null + } } } else { const bytecode = contract.object.evm.bytecode.object