Commit c417f7f9 authored by aniket-engg's avatar aniket-engg Committed by Aniket

handle contract with no console

parent 4ec137e9
...@@ -500,7 +500,7 @@ class Blockchain extends Plugin { ...@@ -500,7 +500,7 @@ class Blockchain extends Plugin {
if (isVM) { if (isVM) {
const hhlogs = await this.web3().eth.getHHLogsForTx(txResult.transactionHash) const hhlogs = await this.web3().eth.getHHLogsForTx(txResult.transactionHash)
if (hhlogs && hhlogs.length) { if (hhlogs && hhlogs.length) {
let finalLogs = 'Console.log:\n' let finalLogs = 'console.log:\n'
for (const log of hhlogs) { for (const log of hhlogs) {
finalLogs = finalLogs + log.join('') + '\n' finalLogs = finalLogs + log.join('') + '\n'
} }
......
...@@ -86,7 +86,7 @@ export class Transactions { ...@@ -86,7 +86,7 @@ export class Transactions {
eth_getHHLogsForTx (payload, cb) { eth_getHHLogsForTx (payload, cb) {
const txHash = payload.params[0] const txHash = payload.params[0]
cb(null, this.vmContext.currentVm.web3vm.hhLogs[txHash]) cb(null, this.vmContext.currentVm.web3vm.hhLogs[txHash] ? this.vmContext.currentVm.web3vm.hhLogs[txHash] : [])
} }
eth_getTransactionReceipt (payload, cb) { eth_getTransactionReceipt (payload, cb) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment