Skip to content

Commit

Permalink
fix(staking): fix impossible conditions (#19621)
Browse files Browse the repository at this point in the history
  • Loading branch information
GAtom22 authored Mar 1, 2024
1 parent e7bea5f commit b118a0a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion x/staking/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ func (k Keeper) Unbond(
}

valAddr, err1 := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr())
if err != nil {
if err1 != nil {
return amount, err1
}

Expand Down
4 changes: 0 additions & 4 deletions x/staking/keeper/query_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ func (k Keeper) GetDelegatorValidators(
i++
}

if err != nil {
return types.Validators{}, err
}

return types.Validators{Validators: validators[:i], ValidatorCodec: k.validatorAddressCodec}, nil // trim
}

Expand Down

0 comments on commit b118a0a

Please sign in to comment.