From 23516e5a2f2eb9cb2368899515a28314d844343a Mon Sep 17 00:00:00 2001 From: dudong2 Date: Thu, 9 May 2024 18:33:22 +0900 Subject: [PATCH] feat: enable gov module to receive external tokens --- app/app.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/app/app.go b/app/app.go index ead97438..0d622c85 100644 --- a/app/app.go +++ b/app/app.go @@ -1308,16 +1308,6 @@ func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router, swaggerEnabled bool) return nil } -// GetMaccPerms returns a copy of the module account permissions -func GetMaccPerms() map[string][]string { - dupMaccPerms := make(map[string][]string) - for k, v := range maccPerms { - dupMaccPerms[k] = v - } - - return dupMaccPerms -} - // BlockedAddrs returns all the app's module account addresses that are not // allowed to receive external tokens. func (app *Canto) BlockedAddrs() map[string]bool { @@ -1326,6 +1316,9 @@ func (app *Canto) BlockedAddrs() map[string]bool { blockedAddrs[authtypes.NewModuleAddress(acc).String()] = !allowedReceivingModAcc[acc] } + // allow the following addresses to receive funds + delete(blockedAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + return blockedAddrs }