style(x/gov): invert & simplify EndBlocker conditions for expedited proposals (#16850)

This commit is contained in:
Emmanuel T Odeke 2023-07-06 04:01:55 -07:00 committed by GitHub
parent 4b557c97e8
commit 101992aa7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) error {
// the deposit at this point since the proposal is converted to regular.
// As a result, the deposits are either deleted or refunded in all cases
// EXCEPT when an expedited proposal fails.
if !(proposal.Expedited && !passes) {
if passes || !proposal.Expedited {
if burnDeposits {
err = keeper.DeleteAndBurnDeposits(ctx, proposal.Id)
} else {