diff --git a/x/alliance/keeper/proposal.go b/x/alliance/keeper/proposal.go index 25f0cdf..c99ab90 100644 --- a/x/alliance/keeper/proposal.go +++ b/x/alliance/keeper/proposal.go @@ -28,6 +28,7 @@ func (k Keeper) UpdateAlliance(ctx context.Context, req *types.MsgUpdateAlliance RewardWeight: req.RewardWeight, TakeRate: req.TakeRate, RewardChangeRate: req.RewardChangeRate, + RewardWeightRange: req.RewardWeightRange, RewardChangeInterval: req.RewardChangeInterval, }) return err diff --git a/x/alliance/keeper/tests/asset_test.go b/x/alliance/keeper/tests/asset_test.go index 1d8130e..4e4269f 100644 --- a/x/alliance/keeper/tests/asset_test.go +++ b/x/alliance/keeper/tests/asset_test.go @@ -741,6 +741,7 @@ func TestRewardWeightDecay(t *testing.T) { Description: "", Denom: AllianceDenom, RewardWeight: sdk.MustNewDecFromStr("0.5"), + RewardWeightRange: types.RewardWeightRange{Min: sdk.NewDec(0), Max: sdk.NewDec(5)}, TakeRate: sdk.ZeroDec(), RewardChangeRate: sdk.ZeroDec(), RewardChangeInterval: 0, @@ -753,6 +754,7 @@ func TestRewardWeightDecay(t *testing.T) { Description: "", Denom: AllianceDenom, RewardWeight: sdk.MustNewDecFromStr("0.5"), + RewardWeightRange: types.RewardWeightRange{Min: sdk.NewDec(0), Max: sdk.NewDec(5)}, TakeRate: sdk.ZeroDec(), RewardChangeRate: sdk.MustNewDecFromStr("0.1"), RewardChangeInterval: decayInterval, @@ -779,6 +781,7 @@ func TestRewardWeightDecay(t *testing.T) { Description: "", Denom: AllianceDenomTwo, RewardWeight: sdk.MustNewDecFromStr("0.5"), + RewardWeightRange: types.RewardWeightRange{Min: sdk.NewDec(0), Max: sdk.NewDec(5)}, TakeRate: sdk.ZeroDec(), RewardChangeRate: sdk.MustNewDecFromStr("0.1"), RewardChangeInterval: decayInterval, @@ -1113,6 +1116,7 @@ func TestRewardWeightRateChange(t *testing.T) { Description: "", Denom: alliance.Denom, RewardWeight: alliance.RewardWeight, + RewardWeightRange: types.RewardWeightRange{Min: sdk.NewDec(0), Max: sdk.NewDec(5)}, TakeRate: alliance.TakeRate, RewardChangeRate: sdk.MustNewDecFromStr("1.001"), RewardChangeInterval: time.Minute * 5, diff --git a/x/alliance/types/tests/types_test.go b/x/alliance/types/tests/types_test.go index e126612..42943b0 100644 --- a/x/alliance/types/tests/types_test.go +++ b/x/alliance/types/tests/types_test.go @@ -66,7 +66,7 @@ func TestProposalsContent(t *testing.T) { title: "Alliance2", desc: "Alliance with 2", typ: "msg_update_alliance_proposal", - str: "title:\"Alliance2\" description:\"Alliance with 2\" denom:\"ibc/denom2\" reward_weight:\"2000000000000000000\" take_rate:\"2000000000000000000\" reward_change_rate:\"2000000000000000000\" reward_change_interval: ", + str: "title:\"Alliance2\" description:\"Alliance with 2\" denom:\"ibc/denom2\" reward_weight:\"2000000000000000000\" take_rate:\"2000000000000000000\" reward_change_rate:\"2000000000000000000\" reward_change_interval: reward_weight_range: ", }, "msg_delete_alliance_proposal": { p: types.NewMsgDeleteAllianceProposal("test", "abcd", "ibc/denom"),