create an intermediary variable

pull/1/head
Grandschtroumpf 6 years ago
parent 2181a12e0d
commit 4a9889a9dd
  1. 4
      src/universal-dapp.js

@ -92,8 +92,8 @@ module.exports = class UniversalDApp extends UdappApi {
throw new Error('plugin API does not allow creating a new account through web3 connection. Only vm mode is allowed')
}
this._addAccount(privateKey, balance)
privateKey = Buffer.from(privateKey, 'hex')
return '0x' + ethJSUtil.privateToAddress(privateKey).toString('hex')
const privKey = Buffer.from(privateKey, 'hex')
return '0x' + ethJSUtil.privateToAddress(privKey).toString('hex')
}
newAccount (password, passwordPromptCb, cb) {

Loading…
Cancel
Save