mirror of
https://github.com/embarklabs/ethereumjs-wallet.git
synced 2025-01-17 06:01:27 +00:00
Sanity check in importV3
This commit is contained in:
parent
77425013a5
commit
fd8d3bbbc7
4
index.js
4
index.js
@ -132,6 +132,10 @@ Wallet.fromV1 = function (input, password) {
|
||||
Wallet.fromV3 = function (input, password) {
|
||||
var json = (typeof input === 'object') ? input : JSON.parse(input)
|
||||
|
||||
if (json.version !== 3) {
|
||||
throw new Error('Not a V3 wallet')
|
||||
}
|
||||
|
||||
var derivedKey
|
||||
var kdfparams
|
||||
if (json.Crypto.kdf === 'scrypt') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user