testing/p2wsh: add missing test case coverage
This commit is contained in:
parent
275b872c7e
commit
14d9636b6e
4 changed files with 51 additions and 6 deletions
src/payments
|
@ -119,9 +119,9 @@ function p2wsh (a, opts) {
|
|||
if (opts.validate) {
|
||||
let hash
|
||||
if (a.address) {
|
||||
if (_address().prefix !== network.bech32) throw new TypeError('Network mismatch')
|
||||
if (_address().version !== 0x00) throw new TypeError('Invalid version')
|
||||
if (_address().data.length !== 32) throw new TypeError('Invalid data')
|
||||
if (_address().prefix !== network.bech32) throw new TypeError('Invalid prefix or Network mismatch')
|
||||
if (_address().version !== 0x00) throw new TypeError('Invalid address version')
|
||||
if (_address().data.length !== 32) throw new TypeError('Invalid address data')
|
||||
else hash = _address().data
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue