diff --git a/CHANGELOG.md b/CHANGELOG.md index 318c71625cf3..4a73a548071e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -225,6 +225,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (types/coin) [#14739](https://github.com/cosmos/cosmos-sdk/pull/14739) Deprecate the method `Coin.IsEqual` in favour of `Coin.Equal`. The difference between the two methods is that the first one results in a panic when denoms are not equal. This panic lead to unexpected behavior * (x/crypto) [#15258](https://github.com/cosmos/cosmos-sdk/pull/15258) Write keyhash file with permissions 0600 instead of 0555. * (cli) [#16138](https://github.com/cosmos/cosmos-sdk/pull/16138) Fix snapshot commands panic if snapshot don't exists. +* (types) [#16145](https://github.com/cosmos/cosmos-sdk/pull/16145) Rename interface `ExtensionOptionI` back to `TxExtensionOptionI` to avoid breaking change. ### Deprecated diff --git a/testutil/testdata/codec.go b/testutil/testdata/codec.go index eb2424c40fb5..6e4dcc253b58 100644 --- a/testutil/testdata/codec.go +++ b/testutil/testdata/codec.go @@ -33,7 +33,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &HasHasAnimal{}, ) registry.RegisterImplementations( - (*tx.ExtensionOptionI)(nil), + (*tx.TxExtensionOptionI)(nil), &Cat{}, ) diff --git a/types/tx/ext.go b/types/tx/ext.go index f532513daa9b..f0cd824d7eae 100644 --- a/types/tx/ext.go +++ b/types/tx/ext.go @@ -5,12 +5,12 @@ import ( ) // TxExtensionOptionI defines the interface for tx extension options -type ExtensionOptionI interface{} +type TxExtensionOptionI interface{} //nolint:revive // to avoid breaking change // unpackTxExtensionOptionsI unpacks Any's to TxExtensionOptionI's. func unpackTxExtensionOptionsI(unpacker types.AnyUnpacker, anys []*types.Any) error { for _, any := range anys { - var opt ExtensionOptionI + var opt TxExtensionOptionI err := unpacker.UnpackAny(any, &opt) if err != nil { return err diff --git a/types/tx/types.go b/types/tx/types.go index 8ef5b915f0de..24de0e570b99 100644 --- a/types/tx/types.go +++ b/types/tx/types.go @@ -208,5 +208,5 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterInterface("cosmos.tx.v1beta1.Tx", (*sdk.Tx)(nil)) registry.RegisterImplementations((*sdk.Tx)(nil), &Tx{}) - registry.RegisterInterface("cosmos.tx.v1beta1.TxExtensionOptionI", (*ExtensionOptionI)(nil)) + registry.RegisterInterface("cosmos.tx.v1beta1.TxExtensionOptionI", (*TxExtensionOptionI)(nil)) }