Skip to content

Commit

Permalink
Merge pull request #139 from PeggyJV/bolten/4.0.0-rc2
Browse files Browse the repository at this point in the history
Remove cellarfees module account balance check
  • Loading branch information
EricBolten committed Apr 18, 2022
2 parents d4d8948 + 07a37bb commit 38ebef6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions x/cellarfees/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState) {
panic(fmt.Sprintf("%s module account has not been set", types.ModuleName))
}

// TODO(bolten): I added this check since other cosmos-sdk modules were doing this,
// but it seems to me that SetModuleAccount is getting called when GetModuleAccount
// has to create a new module account anyway, which will happen by proxy when we call
// GetFeesAccount, so not sure how necessary this is
balances := k.bankKeeper.GetAllBalances(ctx, feesAccount.GetAddress())
if balances.IsZero() {
k.accountKeeper.SetModuleAccount(ctx, feesAccount)
}
k.accountKeeper.SetModuleAccount(ctx, feesAccount)
}

// ExportGenesis returns the module's exported genesis.
Expand Down

0 comments on commit 38ebef6

Please sign in to comment.