Skip to content

Commit

Permalink
chore: use ModuleBasics as a global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Jan 16, 2025
1 parent 2028f5a commit f0eef85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ const (
var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string
ModuleBasics module.BasicManager

// module account permissions
maccPerms = map[string][]string{
Expand Down Expand Up @@ -246,8 +247,7 @@ type GaiaApp struct { // nolint: golint
ScopedVibcKeeper capabilitykeeper.ScopedKeeper

// the module manager
mm *module.Manager
ModuleBasics module.BasicManager
mm *module.Manager

// simulation manager
sm *module.SimulationManager
Expand Down Expand Up @@ -340,7 +340,7 @@ func NewAgoricApp(
// ModuleBasics defines the module BasicManager is in charge of setting up basic,
// non-dependant module elements, such as codec registration
// and genesis verification.
app.ModuleBasics = module.NewBasicManagerFromManager(
ModuleBasics = module.NewBasicManagerFromManager(
app.mm,
map[string]module.AppModuleBasic{
"gov": gov.NewAppModuleBasic(
Expand Down Expand Up @@ -1417,7 +1417,7 @@ func (app *GaiaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICo
nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)

// Register grpc-gateway routes for all modules.
app.ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)

// register swagger API from root so that other applications can override easily
if apiConfig.Swagger {
Expand Down
2 changes: 1 addition & 1 deletion golang/cosmos/daemon/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func queryCommand() *cobra.Command {
authcmd.QueryTxCmd(),
)

gaia.ModuleBasics.AddQueryCommands(cmd)
gaia.AddQueryCommands(cmd)
cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID")

return cmd
Expand Down

0 comments on commit f0eef85

Please sign in to comment.