Skip to content

Commit

Permalink
Add rewards to staking module (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
br4e authored May 1, 2024
1 parent dc10cb6 commit 208c8a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x/emissions/module/rewards/rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ func payoutRewards(ctx sdk.Context, k keeper.Keeper, rewards []TaskRewards) erro
rewardInt := reward.Reward.Abs().SdkIntTrim()

if reward.Type == ReputerRewardType {
coins := sdk.NewCoins(sdk.NewCoin(params.DefaultBondDenom, rewardInt))
k.SendCoinsFromAccountToModule(ctx, reward.Address, types.AlloraStakingAccountName, coins)
k.AddStake(ctx, reward.TopicId, reward.Address, cosmosMath.Uint(rewardInt))
} else {
err = k.BankKeeper().SendCoinsFromModuleToAccount(
Expand Down

0 comments on commit 208c8a7

Please sign in to comment.