Skip to content

Commit

Permalink
fix bug in claims manager if local chain id has multiple hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Bowman committed Nov 7, 2024
1 parent 06126c1 commit 72f15b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/claimsmanager/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger {
func (k Keeper) StoreSelfConsensusState(ctx sdk.Context, key string) error {
var height ibcclienttypes.Height
if strings.Contains(ctx.ChainID(), "-") {
revisionNum, err := strconv.ParseUint(strings.Split(ctx.ChainID(), "-")[1], 10, 64)
chainParts := strings.Split(ctx.ChainID(), "-")
revisionNum, err := strconv.ParseUint(chainParts[len(chainParts)-1], 10, 64)
if err != nil {
k.Logger(ctx).Error("Error getting revision number for client ")
k.Logger(ctx).Error("Error getting revision number for client ", "chainID", ctx.ChainID())
return err
}

Expand Down

0 comments on commit 72f15b7

Please sign in to comment.