aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/keyrings/simple.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/keyrings/simple.js')
-rw-r--r--app/scripts/keyrings/simple.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/scripts/keyrings/simple.js b/app/scripts/keyrings/simple.js
index 8f339cf80..9717f1c45 100644
--- a/app/scripts/keyrings/simple.js
+++ b/app/scripts/keyrings/simple.js
@@ -19,10 +19,11 @@ class SimpleKeyring extends EventEmitter {
return Promise.resolve(this.wallets.map(w => w.getPrivateKey().toString('hex')))
}
- deserialize (wallets = []) {
- this.wallets = wallets.map((w) => {
- var b = new Buffer(w, 'hex')
- const wallet = Wallet.fromPrivateKey(b)
+ deserialize (privateKeys = []) {
+ this.wallets = privateKeys.map((privateKey) => {
+ const stripped = ethUtil.stripHexPrefix(privateKey)
+ const buffer = new Buffer(stripped, 'hex')
+ const wallet = Wallet.fromPrivateKey(buffer)
return wallet
})
return Promise.resolve()