From df3da02bb98a3f5e1b3a6f5cf99269930650fce3 Mon Sep 17 00:00:00 2001 From: yuhonghai Date: Tue, 19 Sep 2023 15:40:19 +0800 Subject: [PATCH] PrefixToShentu function runs without errors using shentu address (#776) --- common/prefix.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/prefix.go b/common/prefix.go index 455a2369f..8a476fa59 100644 --- a/common/prefix.go +++ b/common/prefix.go @@ -50,6 +50,10 @@ func PrefixToShentu(address string) (string, error) { if err != nil { return "", err } + + if strings.HasPrefix(hrp, Bech32MainPrefix) { + return address, nil + } if !strings.HasPrefix(hrp, "certik") { return "", fmt.Errorf("invalid address:%s", address) }