Skip to content

Commit

Permalink
fix: recreate legacy behaviour for addresscodec (#17870)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Sep 25, 2023
1 parent 76d1918 commit a953f1d
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 a953f1d

Please sign in to comment.