From f6cb56b9647a66978a23173d13d7bb3d206cab80 Mon Sep 17 00:00:00 2001 From: jonathansumner Date: Fri, 31 May 2024 09:34:48 +0100 Subject: [PATCH] fix: allow writing to genesis again --- cmd/fetchd/cmd/genesis-asi-upgrade.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/cmd/fetchd/cmd/genesis-asi-upgrade.go b/cmd/fetchd/cmd/genesis-asi-upgrade.go index a1b2f512..e08fb89a 100644 --- a/cmd/fetchd/cmd/genesis-asi-upgrade.go +++ b/cmd/fetchd/cmd/genesis-asi-upgrade.go @@ -17,6 +17,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" ibccore "github.com/cosmos/ibc-go/v3/modules/core/24-host" @@ -241,15 +242,13 @@ func ASIGenesisUpgradeCmd(defaultNodeHome string) *cobra.Command { return err } - return nil + var encodedAppState []byte + if encodedAppState, err = json.Marshal(jsonData); err != nil { + return err + } - //var encodedAppState []byte - //if encodedAppState, err = json.Marshal(jsonData); err != nil { - // return err - //} - // - //genDoc.AppState = encodedAppState - //return genutil.ExportGenesisFile(genDoc, genFile) + genDoc.AppState = encodedAppState + return genutil.ExportGenesisFile(genDoc, genFile) }, }