Skip to content

Commit

Permalink
fix address parsing for p2wpkh
Browse files Browse the repository at this point in the history
  • Loading branch information
tok-kkk committed Jan 10, 2024
1 parent 07722f6 commit 6bc53f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion btc/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func PublicKeyAddress(pub *btcec.PublicKey, network *chaincfg.Params, addressTyp
case AddressP2PKH:
return btcutil.NewAddressPubKeyHash(btcutil.Hash160(pub.SerializeCompressed()), network)
case AddressP2WPKH:
return btcutil.NewAddressWitnessScriptHash(btcutil.Hash160(pub.SerializeCompressed()), network)
return btcutil.NewAddressWitnessPubKeyHash(btcutil.Hash160(pub.SerializeCompressed()), network)
case AddressTaproot:
// todo: add taproot address
panic("todo")
Expand Down

0 comments on commit 6bc53f0

Please sign in to comment.