HDNode: clearer error for bad path type
This commit is contained in:
parent
9f1ebf72a6
commit
5dcf38c0c5
2 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ function UInt31 (value) {
|
|||
function BIP32Path (value) {
|
||||
return typeforce.String(value) && value.match(/^(m\/)?(\d+'?\/)*\d+'?$/)
|
||||
}
|
||||
BIP32Path.toJSON = function () { return 'BIP32 derivation path' }
|
||||
|
||||
var SATOSHI_MAX = 2.1 * 1e15
|
||||
function Satoshi (value) {
|
||||
|
|
|
@ -384,7 +384,7 @@ describe('HDNode', function () {
|
|||
fixtures.invalid.derivePath.forEach(function (fx) {
|
||||
assert.throws(function () {
|
||||
master.derivePath(fx)
|
||||
}, /Expected Bip32Path/)
|
||||
}, /Expected BIP32 derivation path/)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue