diff --git a/x/accounts/module.go b/x/accounts/module.go index 978d6b9cb7d..22c353d9ed8 100644 --- a/x/accounts/module.go +++ b/x/accounts/module.go @@ -9,12 +9,12 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/codec" "cosmossdk.io/core/registry" "cosmossdk.io/schema" "cosmossdk.io/x/accounts/cli" v1 "cosmossdk.io/x/accounts/v1" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/types/msgservice" ) @@ -66,7 +66,11 @@ func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { // App module genesis func (am AppModule) DefaultGenesis() json.RawMessage { - return am.cdc.MustMarshalJSON(&v1.GenesisState{}) + data, err := am.cdc.MarshalJSON(&v1.GenesisState{}) + if err != nil { + panic(err) + } + return data } func (am AppModule) ValidateGenesis(message json.RawMessage) error {