From 431f5d00c8fa97ddaf2c0d2afb33fce2c9b80e7e Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 21 Apr 2021 12:06:01 +0200 Subject: [PATCH] linting --- libs/remix-simulator/src/methods/accounts.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libs/remix-simulator/src/methods/accounts.ts b/libs/remix-simulator/src/methods/accounts.ts index 1bda2e9de3..6fd359594b 100644 --- a/libs/remix-simulator/src/methods/accounts.ts +++ b/libs/remix-simulator/src/methods/accounts.ts @@ -48,16 +48,15 @@ export class Accounts { this.accountsKeys[addressStr] = '0x' + privateKey.toString('hex') const stateManager = this.executionContext.vm().stateManager - stateManager.getAccount(Address.fromString(addressStr)).then((account) => { + stateManager.getAccount(Address.fromString(addressStr)).then((account) => { account.balance = new BN(balance.replace('0x', '') || 'f00000000000000001', 16) stateManager.putAccount(Address.fromString(addressStr), account).catch((error) => { reject(error) - }).then(() => { + }).then(() => { resolve({}) }) }).catch((error) => { reject(error) - return }) }) } @@ -84,10 +83,9 @@ export class Accounts { } eth_getBalance (payload, cb) { - let address = payload.params[0] - + const address = payload.params[0] - this.executionContext.vm().stateManager.getAccount(Address.fromString(address)).then((account) => { + this.executionContext.vm().stateManager.getAccount(Address.fromString(address)).then((account) => { cb(null, new BN(account.balance).toString(10)) }).catch((error) => { cb(error)