Skip to content

Commit

Permalink
fix(v1-second-pw): fallback to 5000 pbkdf2 for second pw
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed Feb 25, 2021
1 parent fb3e70e commit 6a2a2a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/blockchain-wallet-v4/src/types/Wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ export const isValidSecondPwd = curry((password, wallet) => {
if (!is(String, password)) {
return false
}
let iter = selectIterations(wallet)
// 5000 is fallback for v1 wallets that are missing
// Pbkdf2 Iterations in the inner wrapper of JSON
let iter = selectIterations(wallet) || 5000
let sk = view(sharedKey, wallet)
let storedHash = view(dpasswordhash, wallet)
let computedHash = crypto
Expand Down

0 comments on commit 6a2a2a1

Please sign in to comment.