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.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/scripts/keyrings/simple.js b/app/scripts/keyrings/simple.js
index 8f339cf80..6b4f9e710 100644
--- a/app/scripts/keyrings/simple.js
+++ b/app/scripts/keyrings/simple.js
@@ -19,9 +19,10 @@ 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')
+ deserialize (privateKeys = []) {
+ this.wallets = privateKeys.map((w) => {
+ const stripped = ethUtil.stripHexPrefix(w)
+ const b = new Buffer(stripped, 'hex')
const wallet = Wallet.fromPrivateKey(b)
return wallet
})