Skip to content

Commit

Permalink
Move event emit before consolidate
Browse files Browse the repository at this point in the history
  • Loading branch information
drklee3 committed Oct 4, 2023
1 parent a1e32f6 commit 59de2f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x/community/keeper/disable_inflation.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ func (k Keeper) CheckAndDisableMintAndKavaDistInflation(ctx sdk.Context) {
// run disable inflation logic
k.disableInflation(ctx)

ctx.EventManager().EmitEvent(
sdk.NewEvent(
types.EventTypeInflationStop,
),
)

// reset disable inflation time to ensure next call is a no-op
params.UpgradeTimeDisableInflation = time.Time{}
// set staking rewards to provided intial value
Expand All @@ -31,12 +37,6 @@ func (k Keeper) CheckAndDisableMintAndKavaDistInflation(ctx sdk.Context) {
if err := k.StartCommunityFundConsolidation(ctx); err != nil {
panic(err)
}

ctx.EventManager().EmitEvent(
sdk.NewEvent(
types.EventTypeInflationStop,
),
)
}

// TODO: double check this is correct method for disabling inflation in kavadist without
Expand Down

0 comments on commit 59de2f4

Please sign in to comment.