diff --git a/remix-lib/src/execution/txListener.js b/remix-lib/src/execution/txListener.js index 32f5911efe..b2e5242ca1 100644 --- a/remix-lib/src/execution/txListener.js +++ b/remix-lib/src/execution/txListener.js @@ -292,7 +292,7 @@ class TxListener { } } // receive function - if(!inputData && txHelper.getReceiveInterface(abi)){ + if (!inputData && txHelper.getReceiveInterface(abi)) { this._resolvedTransactions[tx.hash] = { contractName: contractName, to: tx.to, @@ -300,13 +300,13 @@ class TxListener { params: null } } else { - // fallback function - this._resolvedTransactions[tx.hash] = { - contractName: contractName, - to: tx.to, - fn: '(fallback)', - params: null - } + // fallback function + this._resolvedTransactions[tx.hash] = { + contractName: contractName, + to: tx.to, + fn: '(fallback)', + params: null + } } } else { const bytecode = contract.object.evm.bytecode.object diff --git a/remix-lib/test/txFormat.js b/remix-lib/test/txFormat.js index 6edd32e43a..0781eb8901 100644 --- a/remix-lib/test/txFormat.js +++ b/remix-lib/test/txFormat.js @@ -249,9 +249,9 @@ tape('test fallback & receive function', function (t) { let output = compiler.compile(compilerInput(fallbackAndReceiveFunction)) output = JSON.parse(output) const contract = output.contracts['test.sol']['fallbackAndReceiveFunctionContract'] - st.equal(txHelper.encodeFunctionId(contract.abi[2]), '0x') + st.equal(txHelper.encodeFunctionId(contract.abi[2]), '0x') // for receive function st.equal(txHelper.encodeFunctionId(contract.abi[1]), '0x805da4ad') - st.equal(txHelper.encodeFunctionId(contract.abi[0]), '0x') + st.equal(txHelper.encodeFunctionId(contract.abi[0]), '0x') // for fallback function }) })