From 8fb14d6086a625481c985daba8384195046d558a Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 May 2021 13:00:37 +0200 Subject: [PATCH] linting --- libs/remix-lib/src/execution/execution-context.ts | 12 +++++++++--- libs/remix-lib/src/util.ts | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libs/remix-lib/src/execution/execution-context.ts b/libs/remix-lib/src/execution/execution-context.ts index f29b51ab65..31212412ff 100644 --- a/libs/remix-lib/src/execution/execution-context.ts +++ b/libs/remix-lib/src/execution/execution-context.ts @@ -39,10 +39,16 @@ class StateManagerCommonStorageDump extends StateManager { return super.putContractStorage(address, key, value) } - dumpStorage (address) { - return new Promise(async (resolve, reject) => { + async dumpStorage (address) { + let trie + try { + trie = await this._getStorageTrie(address) + } catch (e) { + console.log(e) + throw e + } + return new Promise((resolve, reject) => { try { - const trie = await this._getStorageTrie(address) const storage = {} const stream = trie.createReadStream() stream.on('data', (val) => { diff --git a/libs/remix-lib/src/util.ts b/libs/remix-lib/src/util.ts index 616134dbcd..43e5920133 100644 --- a/libs/remix-lib/src/util.ts +++ b/libs/remix-lib/src/util.ts @@ -14,7 +14,7 @@ import { BN, bufferToHex, keccak, setLengthLeft, toBuffer } from 'ethereumjs-uti ints: IntArray */ - /** +/** * Converts a hex string to an array of integers. */ export function hexToIntArray (hexString) {