From 5f2a47220347bd43908123809c2d6a6a6e75ddd1 Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 23 Apr 2024 21:26:20 +0800 Subject: [PATCH] Update makeBlobEncodingConfig to include authEncoder --- x/blob/types/builder.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/x/blob/types/builder.go b/x/blob/types/builder.go index f99567a9..e02daeb1 100644 --- a/x/blob/types/builder.go +++ b/x/blob/types/builder.go @@ -29,12 +29,25 @@ func (localEncoder) RegisterInterfaces(r codectypes.InterfaceRegistry) { RegisterInterfaces(r) } +type authEncoder struct{} + +// RegisterLegacyAminoCodec registers the auth module's types for the given codec. +func (authEncoder) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + authtypes.RegisterLegacyAminoCodec(cdc) +} + +// RegisterInterfaces registers interfaces and implementations of the auth module. +func (authEncoder) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + authtypes.RegisterInterfaces(registry) +} + // makeBlobEncodingConfig uses the blob modules RegisterInterfaces // function to create an encoding config for the blob module. This is useful // so that we don't have to import the app package. func makeBlobEncodingConfig() encoding.Config { e := localEncoder{} - return encoding.MakeConfig(e) + a := authEncoder{} + return encoding.MakeConfig(a, e) } // KeyringSigner uses a keyring to sign and build celestia-app transactions