From 6f42efc465dc81d68f239aca705cafe92e5fc005 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 19 Aug 2021 19:18:34 +0530 Subject: [PATCH] hardhat logs formatting improved --- apps/remix-ide/src/blockchain/blockchain.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/blockchain/blockchain.js b/apps/remix-ide/src/blockchain/blockchain.js index ff5494ff55..a5039a4c6b 100644 --- a/apps/remix-ide/src/blockchain/blockchain.js +++ b/apps/remix-ide/src/blockchain/blockchain.js @@ -501,7 +501,7 @@ class Blockchain extends Plugin { if (isVM) { const hhlogs = await this.web3().eth.getHHLogsForTx(txResult.transactionHash) if (hhlogs && hhlogs.length) { - let finalLogs = 'console.log:\n' + let finalLogs = 'console.log:\n' for (const log of hhlogs) { let formattedLog // Hardhat implements the same formatting options that can be found in Node.js' console.log, @@ -513,7 +513,7 @@ class Blockchain extends Plugin { } else { formattedLog = log.join(' ') } - finalLogs = finalLogs + formattedLog + '\n' + finalLogs = finalLogs + ' ' + formattedLog + '\n' } this.call('terminal', 'log', { type: 'info', value: finalLogs }) }