diff --git a/precompiles/staking/method_get_rewards.go b/precompiles/staking/method_get_rewards.go index 8cbb39865b..2b88d2315d 100644 --- a/precompiles/staking/method_get_rewards.go +++ b/precompiles/staking/method_get_rewards.go @@ -51,11 +51,11 @@ func (c *Contract) getRewards( if errors.Is(err, distrtypes.ErrNoDelegationExists) { rewards := make([]DecCoin, 0) return method.Outputs.Pack(rewards) - } else { - return nil, &precompiletypes.ErrUnexpected{ - When: "DelegationRewards", - Got: err.Error(), - } + } + + return nil, &precompiletypes.ErrUnexpected{ + When: "DelegationRewards", + Got: err.Error(), } }