Commit 4a9889a9 authored by Grandschtroumpf's avatar Grandschtroumpf

create an intermediary variable

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