From 2b9704111c63ed68bb65446aa27a19de5cd50701 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 8 Mar 2024 21:07:55 +0100 Subject: [PATCH 1/2] fix(types): check for HasABCIGenesis in CoreAppModuleBasicAdaptor --- CHANGELOG.md | 1 + types/module/core_module.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8de689c8ba6e..0876975bd6ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes +* (types) Fix skip staking genesis export when using `CoreAppModuleAdaptor` / `CoreAppModuleBasicAdaptor` for it. * (x/auth) [#19549](https://github.com/cosmos/cosmos-sdk/pull/19549) Accept custom get signers when injecting `x/auth/tx`. * (x/staking) Fix a possible bypass of delegator slashing: [GHSA-86h5-xcpx-cfqc](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-86h5-xcpx-cfqc) diff --git a/types/module/core_module.go b/types/module/core_module.go index 3b9616de3a75..c02943e99c04 100644 --- a/types/module/core_module.go +++ b/types/module/core_module.go @@ -109,6 +109,10 @@ func (c coreAppModuleBasicAdaptor) ExportGenesis(ctx sdk.Context, cdc codec.JSON return mod.ExportGenesis(ctx, cdc) } + if mod, ok := c.module.(HasABCIGenesis); ok { + return mod.ExportGenesis(ctx, cdc) + } + return nil } From db77d1dde60164d060326b46c05dacacb624ec64 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 8 Mar 2024 21:08:31 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0876975bd6ac..22a5fb116df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes -* (types) Fix skip staking genesis export when using `CoreAppModuleAdaptor` / `CoreAppModuleBasicAdaptor` for it. +* (types) [#19709](https://github.com/cosmos/cosmos-sdk/pull/19709) Fix skip staking genesis export when using `CoreAppModuleAdaptor` / `CoreAppModuleBasicAdaptor` for it. * (x/auth) [#19549](https://github.com/cosmos/cosmos-sdk/pull/19549) Accept custom get signers when injecting `x/auth/tx`. * (x/staking) Fix a possible bypass of delegator slashing: [GHSA-86h5-xcpx-cfqc](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-86h5-xcpx-cfqc)