Skip to content

Commit

Permalink
chore: fix comments on bech32 (backport #18114) (#18117)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <[email protected]>
  • Loading branch information
mergify[bot] and tac0turtle authored Oct 13, 2023
1 parent c121fcc commit efa1226
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/bech32/bech32.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/cosmos/btcutil/bech32"
)

// ConvertAndEncode converts from a base64 encoded byte string to base32 encoded byte string and then to bech32.
// ConvertAndEncode converts from a base256 encoded byte string to base32 encoded byte string and then to bech32.
func ConvertAndEncode(hrp string, data []byte) (string, error) {
converted, err := bech32.ConvertBits(data, 8, 5, true)
if err != nil {
Expand All @@ -16,7 +16,7 @@ func ConvertAndEncode(hrp string, data []byte) (string, error) {
return bech32.Encode(hrp, converted)
}

// DecodeAndConvert decodes a bech32 encoded string and converts to base64 encoded bytes.
// DecodeAndConvert decodes a bech32 encoded string and converts to base256 encoded bytes.
func DecodeAndConvert(bech string) (string, []byte, error) {
hrp, data, err := bech32.Decode(bech, 1023)
if err != nil {
Expand Down

0 comments on commit efa1226

Please sign in to comment.