Skip to content

Commit

Permalink
fix: recreate legacy behaviour for addresscodec (backport #17870) (#1…
Browse files Browse the repository at this point in the history
…7871)

Co-authored-by: Marko <[email protected]>
  • Loading branch information
mergify[bot] and tac0turtle authored Sep 25, 2023
1 parent 5ccb005 commit 1963229
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions codec/address/bech32_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ func (bc Bech32Codec) StringToBytes(text string) ([]byte, error) {

// BytesToString decodes bytes to text
func (bc Bech32Codec) BytesToString(bz []byte) (string, error) {
if len(bz) == 0 {
return "", nil
}

text, err := bech32.ConvertAndEncode(bc.Bech32Prefix, bz)
if err != nil {
return "", err
Expand Down

0 comments on commit 1963229

Please sign in to comment.