fix: recreate legacy behaviour for addresscodec (#17870)
This commit is contained in:
parent
76d1918dca
commit
a953f1d338
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user