Commit fd0bb4cd authored by yann300's avatar yann300

linting

parent 62e41049
...@@ -48,16 +48,15 @@ export class Accounts { ...@@ -48,16 +48,15 @@ export class Accounts {
this.accountsKeys[addressStr] = '0x' + privateKey.toString('hex') this.accountsKeys[addressStr] = '0x' + privateKey.toString('hex')
const stateManager = this.executionContext.vm().stateManager 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) account.balance = new BN(balance.replace('0x', '') || 'f00000000000000001', 16)
stateManager.putAccount(Address.fromString(addressStr), account).catch((error) => { stateManager.putAccount(Address.fromString(addressStr), account).catch((error) => {
reject(error) reject(error)
}).then(() => { }).then(() => {
resolve({}) resolve({})
}) })
}).catch((error) => { }).catch((error) => {
reject(error) reject(error)
return
}) })
}) })
} }
...@@ -84,10 +83,9 @@ export class Accounts { ...@@ -84,10 +83,9 @@ export class Accounts {
} }
eth_getBalance (payload, cb) { 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)) cb(null, new BN(account.balance).toString(10))
}).catch((error) => { }).catch((error) => {
cb(error) cb(error)
......
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