address: throw Invalid address instead of hash/version for fromBase58Check
This commit is contained in:
parent
20a17cc915
commit
1a4000cc98
3 changed files with 13 additions and 10 deletions
test
|
@ -89,7 +89,7 @@ describe('Bitcoin-core', function () {
|
|||
var address = Address.fromBase58Check(string)
|
||||
|
||||
assert.notEqual(allowedNetworks.indexOf(address.version), -1, 'Invalid network')
|
||||
}, /Invalid (checksum|hash length|network)/)
|
||||
}, /Invalid (checksum|address length|network)/)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
4
test/fixtures/address.json
vendored
4
test/fixtures/address.json
vendored
|
@ -34,12 +34,12 @@
|
|||
{
|
||||
"description": "hash too short",
|
||||
"base58check": "7SeEnXWPaCCALbVrTnszCVGfRU8cGfx",
|
||||
"exception": "Invalid hash length"
|
||||
"exception": "Invalid address length"
|
||||
},
|
||||
{
|
||||
"description": "hash too long",
|
||||
"base58check": "j9ywUkWg2fTQrouxxh5rSZhRvrjMkEUfuiKe",
|
||||
"exception": "Invalid hash length"
|
||||
"exception": "Invalid address length"
|
||||
}
|
||||
],
|
||||
"fromOutputScript": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue