Skip to content

Commit

Permalink
PrefixToShentu function runs without errors using shentu address (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-yuhh authored Sep 19, 2023
1 parent fee4b7e commit df3da02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit df3da02

Please sign in to comment.