Skip to content

Commit

Permalink
feat: enable gov module to receive external tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed May 9, 2024
1 parent 79c99d1 commit 23516e5
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}

Expand Down

0 comments on commit 23516e5

Please sign in to comment.