From 3382e8ea8235eea8b27cc86ebc632b82970c05b6 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 8 Mar 2024 21:38:02 +0100 Subject: [PATCH] fix(types): check for HasABCIGenesis in CoreAppModuleBasicAdaptor (#19709) --- CHANGELOG.md | 1 + types/module/core_module.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8de689c8ba6e..22a5fb116df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes +* (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) 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 }