refactor(runtime): define address codec providers in runtime (backport #17037) (#17043)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2023-07-18 16:38:14 +02:00
committed by GitHub
co-authored by Julien Robert
parent 2049c4b82a
commit 6ddf0af2e7
47 changed files with 245 additions and 231 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ import (
"sort"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
"golang.org/x/exp/maps"
@@ -57,7 +57,7 @@ type AppModuleBasic interface {
HasName
RegisterLegacyAminoCodec(*codec.LegacyAmino)
RegisterInterfaces(types.InterfaceRegistry)
RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux)
RegisterGRPCGatewayRoutes(client.Context, *gwruntime.ServeMux)
}
// HasName allows the module to provide its own name for legacy purposes.
@@ -150,7 +150,7 @@ func (bm BasicManager) ValidateGenesis(cdc codec.JSONCodec, txEncCfg client.TxEn
}
// RegisterGRPCGatewayRoutes registers all module rest routes
func (bm BasicManager) RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr *runtime.ServeMux) {
func (bm BasicManager) RegisterGRPCGatewayRoutes(clientCtx client.Context, rtr *gwruntime.ServeMux) {
for _, b := range bm {
b.RegisterGRPCGatewayRoutes(clientCtx, rtr)
}