File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ Address.fromOutputScript = function (script, network) {
3737 if ( scripts . isPubKeyHashOutput ( script ) ) return new Address ( script . chunks [ 2 ] , network . pubKeyHash )
3838 if ( scripts . isScriptHashOutput ( script ) ) return new Address ( script . chunks [ 1 ] , network . scriptHash )
3939
40- assert ( false , script . toASM ( ) + ' has no matching Address' )
40+ throw new Error ( script . toASM ( ) + ' has no matching Address' )
4141}
4242
4343Address . prototype . toBase58Check = function ( ) {
@@ -54,7 +54,7 @@ Address.prototype.toOutputScript = function () {
5454 if ( scriptType === 'pubkeyhash' ) return scripts . pubKeyHashOutput ( this . hash )
5555 if ( scriptType === 'scripthash' ) return scripts . scriptHashOutput ( this . hash )
5656
57- assert ( false , this . toString ( ) + ' has no matching Script' )
57+ throw new Error ( this . toString ( ) + ' has no matching Script' )
5858}
5959
6060Address . prototype . toString = Address . prototype . toBase58Check
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function findNetworkByWIFVersion (version) {
1717 if ( network . wif === version ) return network
1818 }
1919
20- assert ( false , 'Unknown network' )
20+ throw new Error ( 'Unknown network' )
2121}
2222
2323function ECPair ( d , Q , options ) {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ function findBIP32NetworkByVersion (version) {
2020 }
2121 }
2222
23- assert ( false , 'Could not find network for ' + version . toString ( 16 ) )
23+ throw new Error ( 'Could not find network for ' + version . toString ( 16 ) )
2424}
2525
2626function HDNode ( keyPair , chainCode ) {
You can’t perform that action at this time.
0 commit comments