Skip to content

Commit

Permalink
fix: handle non-valoper val address (for cronos) (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKetmo authored Feb 2, 2024
1 parent e479362 commit 0fd3238
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/watcher/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ func (t TrackedValidator) AccountAddress() string {
return err.Error()
}

newPrefix := strings.TrimSuffix(prefix, "valoper")
conv, err := bech32.ConvertAndEncode(newPrefix, bytes)
for _, v := range []string{"valoper", "cncl"} {
prefix = strings.TrimSuffix(prefix, v)
}
conv, err := bech32.ConvertAndEncode(prefix, bytes)
if err != nil {
return err.Error()
}
Expand Down

0 comments on commit 0fd3238

Please sign in to comment.