Skip to content

Commit 415689c

Browse files
author
Arik Sosman
committed
fix scripthash > multisig input classification prioritization
1 parent 6dd641d commit 415689c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bitcoinjs-lib",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"description": "Client-side Bitcoin JavaScript library",
55
"main": "./src/index.js",
66
"engines": {

src/templates/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ function classifyInput (script, allowIncomplete) {
4141
var chunks = decompile(script)
4242

4343
if (pubKeyHash.input.check(chunks)) return types.P2PKH
44-
if (scriptHash.input.check(chunks, allowIncomplete)) return types.P2SH
4544
if (multisig.input.check(chunks, allowIncomplete)) return types.MULTISIG
45+
if (scriptHash.input.check(chunks, allowIncomplete)) return types.P2SH
4646
if (pubKey.input.check(chunks)) return types.P2PK
4747

4848
return types.NONSTANDARD

0 commit comments

Comments
 (0)