From 41a826ed9c2d9f6840fef94adc12499229625d88 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 26 Mar 2024 09:42:27 +0100 Subject: [PATCH] fix(ugov amino): don't use proto.MessageName (#2473) * fix(ugov amino): don't use proto.MessageName * comments * changelog --- CHANGELOG.md | 8 +++++++- x/auction/codec.go | 2 +- x/ugov/codec.go | 6 ++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 753733ddaa..e8ae358627 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased +### Features + +### Bug Fixes + +- [2473](https://github.com/umee-network/umee/pull/2462) Correct x/ugov Amino registration for x/ugov messages (they don't have MessageName option). + ## v6.4.0 - 2024-03-21 ### Features @@ -54,7 +60,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes -- [2462](https://github.com/umee-network/umee/pull/2462) (x/leverage) Take `MaxModuleWithdraw` into account when computing user `MaxWithdraw`. +- [2462](https://github.com/umee-network/umee/pull/2462) (x/leverage) Take `MaxModuleWithdraw` into account when computing user `MaxWithdraw`. ## v6.4.0-beta1 - 2024-03-11 diff --git a/x/auction/codec.go b/x/auction/codec.go index 38032406f2..26d8535d7f 100644 --- a/x/auction/codec.go +++ b/x/auction/codec.go @@ -22,7 +22,7 @@ func init() { amino.Seal() } -// RegisterLegacyAminoCodec registers the necessary x/uibc interfaces and +// RegisterLegacyAminoCodec registers the necessary x/auction interfaces and // concrete types on the provided LegacyAmino codec. These types are used for // Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { diff --git a/x/ugov/codec.go b/x/ugov/codec.go index ce6012278b..de71785038 100644 --- a/x/ugov/codec.go +++ b/x/ugov/codec.go @@ -1,8 +1,6 @@ package ugov import ( - "github.com/cosmos/gogoproto/proto" - "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -26,11 +24,11 @@ func init() { amino.Seal() } -// RegisterLegacyAminoCodec registers the necessary x/uibc interfaces and +// RegisterLegacyAminoCodec registers the necessary x/ugov interfaces and // concrete types on the provided LegacyAmino codec. These types are used for // Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgGovUpdateMinGasPrice{}, proto.MessageName(&MsgGovUpdateMinGasPrice{}), nil) + cdc.RegisterConcrete(&MsgGovUpdateMinGasPrice{}, "umee/ugov/MsgGovUpdateMinGasPrice", nil) cdc.RegisterConcrete(&MsgGovSetEmergencyGroup{}, "umee/ugov/MsgGovSetEmergencyGroup", nil) cdc.RegisterConcrete(&MsgGovUpdateInflationParams{}, "umee/ugov/MsgGovUpdateInflationParams", nil) }