Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Nov 10, 2023
1 parent 779e0cd commit 5b8534e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions x/alliance/keeper/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions x/alliance/keeper/tests/asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion x/alliance/types/tests/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:<seconds:3600 > ",
str: "title:\"Alliance2\" description:\"Alliance with 2\" denom:\"ibc/denom2\" reward_weight:\"2000000000000000000\" take_rate:\"2000000000000000000\" reward_change_rate:\"2000000000000000000\" reward_change_interval:<seconds:3600 > reward_weight_range:<min:\"0\" max:\"5000000000000000000\" > ",
},
"msg_delete_alliance_proposal": {
p: types.NewMsgDeleteAllianceProposal("test", "abcd", "ibc/denom"),
Expand Down

0 comments on commit 5b8534e

Please sign in to comment.