Skip to content

Commit

Permalink
test: fix leveragelp unit tests (#795)
Browse files Browse the repository at this point in the history
* test: fix leveragelp unit tests

* Correcting the validate basic

---------

Co-authored-by: avkr003 <[email protected]>
  • Loading branch information
cosmic-vagabond and avkr003 authored Sep 12, 2024
1 parent 0d9fc4a commit 0fca9dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x/leveragelp/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (msg *MsgAddPool) ValidateBasic() error {
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err)
}

if msg.Pool.LeverageMax.LT(sdk.OneDec()) {
if msg.Pool.LeverageMax.LTE(sdk.OneDec()) {
return ErrLeverageTooSmall
}
return nil
Expand Down
3 changes: 2 additions & 1 deletion x/leveragelp/types/msgs_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package types_test

import (
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/elys-network/elys/x/leveragelp/types"
"testing"

"github.com/elys-network/elys/testutil/sample"
"github.com/stretchr/testify/require"
Expand Down

0 comments on commit 0fca9dd

Please sign in to comment.