Skip to content

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrit committed Jan 29, 2024
1 parent 9d6159c commit bc5ea3a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions x/axelarcork/keeper/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ func (k Keeper) EndBlocker(ctx sdk.Context) {
return false
})

// Sweep all axelarcork of the sender module account balances to the community pool. Because this account is
// the sender for transfers created by RelayCork calls, funds will not be returned to the caller if the IBC
// transfer fails or gas is refunded.
moduleAcct := k.accountKeeper.GetModuleAddress(types.ModuleName)
balances := k.bankKeeper.GetAllBalances(ctx, moduleAcct)
if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, distributionTypes.ModuleName, balances); err != nil {
// Sweep all axelarcork of the sender module account balances to the community pool. Because this account is
// the sender for transfers created by RelayCork calls, funds will not be returned to the caller if the IBC
// transfer fails or gas is refunded.
moduleAcct := k.accountKeeper.GetModuleAddress(types.ModuleName)
balances := k.bankKeeper.GetAllBalances(ctx, moduleAcct)
if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, distributionTypes.ModuleName, balances); err != nil {
panic(err)
}

feePool := k.distributionKeeper.GetFeePool(ctx)
feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(balances...)...)
k.distributionKeeper.SetFeePool(ctx, feePool)
k.distributionKeeper.SetFeePool(ctx, feePool)
}

0 comments on commit bc5ea3a

Please sign in to comment.