File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ function toBase58Check (hash, version) {
2525 return bs58check . encode ( payload )
2626}
2727
28- function fromOutputScript ( scriptPubKey , network ) {
28+ function fromOutputScript ( outputScript , network ) {
2929 network = network || networks . bitcoin
3030
31- if ( bscript . pubKeyHash . output . check ( scriptPubKey ) ) return toBase58Check ( bscript . compile ( scriptPubKey ) . slice ( 3 , 23 ) , network . pubKeyHash )
32- if ( bscript . scriptHash . output . check ( scriptPubKey ) ) return toBase58Check ( bscript . compile ( scriptPubKey ) . slice ( 2 , 22 ) , network . scriptHash )
31+ if ( bscript . pubKeyHash . output . check ( outputScript ) ) return toBase58Check ( bscript . compile ( outputScript ) . slice ( 3 , 23 ) , network . pubKeyHash )
32+ if ( bscript . scriptHash . output . check ( outputScript ) ) return toBase58Check ( bscript . compile ( outputScript ) . slice ( 2 , 22 ) , network . scriptHash )
3333
34- throw new Error ( bscript . toASM ( scriptPubKey ) + ' has no matching Address' )
34+ throw new Error ( bscript . toASM ( outputScript ) + ' has no matching Address' )
3535}
3636
3737function toOutputScript ( address , network ) {
You can’t perform that action at this time.
0 commit comments