Skip to content

Commit

Permalink
Merge pull request #37 from Crayon-Shin-chan-1024/fix-p2sh-address-fr…
Browse files Browse the repository at this point in the history
…om-script

fix: p2sh address from script
  • Loading branch information
dr-orlovsky authored Aug 22, 2024
2 parents 82a9b01 + ebb1209 commit 9cd414b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invoice/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl AddressPayload {
AddressPayload::Pkh(PubkeyHash::from(bytes))
} else if script.is_p2sh() {
let mut bytes = [0u8; 20];
bytes.copy_from_slice(&script[2..]);
bytes.copy_from_slice(&script[2..22]);
AddressPayload::Sh(ScriptHash::from(bytes))
} else if script.is_p2wpkh() {
let mut bytes = [0u8; 20];
Expand Down

0 comments on commit 9cd414b

Please sign in to comment.