Skip to content

Commit

Permalink
chore: fix unit test with update incentive param test
Browse files Browse the repository at this point in the history
  • Loading branch information
kenta-elys committed Nov 27, 2023
1 parent 4846328 commit 7b6953e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions x/incentive/types/message_update_incentive_params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package types
import (
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/elys-network/elys/testutil/sample"
"github.com/stretchr/testify/require"
Expand All @@ -17,13 +18,25 @@ func TestMsgUpdateIncentiveParams_ValidateBasic(t *testing.T) {
{
name: "invalid address",
msg: MsgUpdateIncentiveParams{
Authority: "invalid_address",
Authority: "invalid_address",
RewardPortionForLps: sdk.NewDecWithPrec(65, 2),
MaxEdenRewardAprStakers: sdk.NewDecWithPrec(3, 1),
MaxEdenRewardAprLps: sdk.NewDecWithPrec(3, 1),
DistributionEpochForStakers: 10,
DistributionEpochForLps: 10,
ElysStakeTrackingRate: 10,
},
err: sdkerrors.ErrInvalidAddress,
}, {
name: "valid address",
msg: MsgUpdateIncentiveParams{
Authority: sample.AccAddress(),
Authority: sample.AccAddress(),
RewardPortionForLps: sdk.NewDecWithPrec(65, 2),
MaxEdenRewardAprStakers: sdk.NewDecWithPrec(3, 1),
MaxEdenRewardAprLps: sdk.NewDecWithPrec(3, 1),
DistributionEpochForStakers: 10,
DistributionEpochForLps: 10,
ElysStakeTrackingRate: 10,
},
},
}
Expand Down

0 comments on commit 7b6953e

Please sign in to comment.