(goCtx context.Context, msg *types.MsgUpdateStakingRewardParams)
| 77 | } |
| 78 | |
| 79 | func (k msgServer) UpdateStakingRewardParams(goCtx context.Context, msg *types.MsgUpdateStakingRewardParams) (*types.MsgUpdateStakingRewardParamsResponse, error) { |
| 80 | ctx := sdk.UnwrapSDKContext(goCtx) |
| 81 | signer, err := sdk.AccAddressFromBech32(msg.Signer) |
| 82 | if err != nil { |
| 83 | return nil, err |
| 84 | } |
| 85 | if !k.adminKeeper.IsAdminAccount(ctx, admintypes.AdminType_PMTPREWARDS, signer) { |
| 86 | return nil, errors.Wrap(types.ErrNotEnoughPermissions, fmt.Sprintf("Sending Account : %s", msg.Signer)) |
| 87 | } |
| 88 | if !(msg.Minter.AnnualProvisions.IsZero() && msg.Minter.Inflation.IsZero()) { |
| 89 | k.mintKeeper.SetMinter(ctx, msg.Minter) |
| 90 | } |
| 91 | k.mintKeeper.SetParams(ctx, msg.Params) |
| 92 | |
| 93 | return &types.MsgUpdateStakingRewardParamsResponse{}, err |
| 94 | |
| 95 | } |
| 96 | |
| 97 | func (k msgServer) UpdateRewardsParams(goCtx context.Context, msg *types.MsgUpdateRewardsParamsRequest) (*types.MsgUpdateRewardsParamsResponse, error) { |
| 98 | response := &types.MsgUpdateRewardsParamsResponse{} |
nothing calls this directly
no test coverage detected