File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,9 @@ public function isPayToWitnessPubKeyHash(): bool
8484 {
8585 $ operations = $ this ->parse ();
8686
87- return (count ($ operations ) == 2 ) &&
88- ord ($ operations [0 ]->data ) == 0 &&
87+ return count ($ operations ) == 2 &&
88+ $ operations [0 ]->code >= Opcodes::OP_0 &&
89+ $ operations [0 ]->code <= Opcodes::OP_16 &&
8990 $ operations [1 ]->size == 20 ;
9091 }
9192
@@ -96,8 +97,9 @@ public function isPayToWitnessScriptHash(): bool
9697 {
9798 $ operations = $ this ->parse ();
9899
99- return (count ($ operations ) == 2 ) &&
100- ord ($ operations [0 ]->data ) == 0 &&
100+ return count ($ operations ) == 2 &&
101+ $ operations [0 ]->code >= Opcodes::OP_0 &&
102+ $ operations [0 ]->code <= Opcodes::OP_16 &&
101103 $ operations [1 ]->size == 32 ;
102104 }
103105
You can’t perform that action at this time.
0 commit comments