From 72ced604302bc2c1acb7fa8f40ee2e792328ddcd Mon Sep 17 00:00:00 2001 From: Shahan Khatchadourian Date: Wed, 10 Mar 2021 13:03:55 -0500 Subject: [PATCH] Merge pull request from GHSA-2vxv-63gj-7pmq (#755) Co-authored-by: Jonathan Gimeno --- app/app.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/app/app.go b/app/app.go index 6aeef447c3..83ab22755e 100644 --- a/app/app.go +++ b/app/app.go @@ -131,11 +131,6 @@ var ( govtypes.ModuleName: {authtypes.Burner}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, } - - // module accounts that are allowed to receive tokens - allowedReceivingModAcc = map[string]bool{ - distrtypes.ModuleName: true, - } ) var ( @@ -244,7 +239,7 @@ func NewGaiaApp( appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, ) app.BankKeeper = bankkeeper.NewBaseKeeper( - appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.BlockedAddrs(), + appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.ModuleAccountAddrs(), ) stakingKeeper := stakingkeeper.NewKeeper( appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName), @@ -471,17 +466,6 @@ func (app *GaiaApp) ModuleAccountAddrs() map[string]bool { return modAccAddrs } -// BlockedAddrs returns all the app's module account addresses that are not -// allowed to receive external tokens. -func (app *GaiaApp) BlockedAddrs() map[string]bool { - blockedAddrs := make(map[string]bool) - for acc := range maccPerms { - blockedAddrs[authtypes.NewModuleAddress(acc).String()] = !allowedReceivingModAcc[acc] - } - - return blockedAddrs -} - // LegacyAmino returns GaiaApp's amino codec. // // NOTE: This is solely to be used for testing purposes as it may be desirable