Skip to content

Commit

Permalink
bond factor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kruspy committed Sep 6, 2023
1 parent 745ce1a commit c00d489
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/liquidstakeibc/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ func (m *MsgUpdateHostChain) ValidateBasic() error {
}

// -1 is the default bond factor value
if !bondFactor.Equal(sdk.NewDec(-1)) || bondFactor.GTE(sdk.ZeroDec()) {
return sdkerrors.ErrInvalidRequest.Wrapf("invalid validator bond factor value should be -1 == bond factor >= 0")
if bondFactor.LT(sdk.ZeroDec()) && !bondFactor.Equal(sdk.NewDec(-1)) {
return sdkerrors.ErrInvalidRequest.Wrapf("invalid validator bond factor value should be bond_factor == -1 || bond_factor >= 0")
}
case KeyMinimumDeposit:
minimumDeposit, ok := sdk.NewIntFromString(update.Value)
Expand Down

0 comments on commit c00d489

Please sign in to comment.