Skip to content

Commit

Permalink
fix: witness script hash
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa authored Jun 5, 2024
1 parent 7f50ce0 commit ea720de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/library/BtcScript.sol
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ library BtcScript {
if (btcAddress.addressType == AddressType.P2WPKH) {
return scriptP2WPKH(bytes20(btcAddress.implementationHash));
}
if (btcAddress.addressType == AddressType.P2SH) {
if (btcAddress.addressType == AddressType.P2WSH) {
return scriptP2WSH(btcAddress.implementationHash);
}
if (btcAddress.addressType == AddressType.P2TR) {
Expand Down Expand Up @@ -183,4 +183,4 @@ library BtcScript {
function scriptP2TR(bytes32 witnessProgram) internal pure returns(bytes memory) {
return bytes.concat(OP_0, PUSH_32, witnessProgram);
}
}
}

0 comments on commit ea720de

Please sign in to comment.