Skip to content

Commit

Permalink
Fix intermediate multipath bip32 validation
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Feb 23, 2021
1 parent 75a2c30 commit fd84d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const BIP_39_PATH_REGEX = /^bip39:(\w+){1}( \w+){11,23}$/u
* - bip32:44'/bip32:60'/bip32:0'/bip32:0/bip32:0
* - bip39:<SPACE_DELMITED_SEED_PHRASE>/bip32:44'/bip32:60'/bip32:0'/bip32:0/bip32:0
*/
const MULTI_PATH_REGEX = /^(bip39:(\w+){1}( \w+){11,23}\/)?(bip32:\d+'?\/){3,4}(bip32:\d+'?)$/u
const MULTI_PATH_REGEX = /^(bip39:(\w+){1}( \w+){11,23}\/)?(bip32:\d+'?\/){0,4}(bip32:\d+'?)$/u

function validateDeriveKeyParams(pathSegment, parentKey) {
// The path segment must be one of the following:
Expand Down

0 comments on commit fd84d69

Please sign in to comment.