From 54d89fae9e485009555bee9b981e3ac064a7a573 Mon Sep 17 00:00:00 2001 From: violet Date: Wed, 9 Oct 2024 12:20:11 -0400 Subject: [PATCH] fix: make consumer-democracy read the sovereign genesis from nodeHome --- app/consumer-democracy/app.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/consumer-democracy/app.go b/app/consumer-democracy/app.go index cef5aa8f9c..26522b6692 100644 --- a/app/consumer-democracy/app.go +++ b/app/consumer-democracy/app.go @@ -38,6 +38,7 @@ import ( "cosmossdk.io/x/feegrant" feegrantkeeper "cosmossdk.io/x/feegrant/keeper" feegrantmodule "cosmossdk.io/x/feegrant/module" + // add mint "cosmossdk.io/x/upgrade" upgradekeeper "cosmossdk.io/x/upgrade/keeper" @@ -681,12 +682,7 @@ func New( // upgrade handler code is application specific. However, as an example, standalone to consumer // changeover chains should utilize customized upgrade handler code similar to below. - // TODO: should have a way to read from current node home - userHomeDir, err := os.UserHomeDir() - if err != nil { - stdlog.Println("Failed to get home dir %2", err) - } - nodeHome := userHomeDir + "/.sovereign/config/genesis.json" + nodeHome := homePath + "/.sovereign/config/genesis.json" appState, _, err := genutiltypes.GenesisStateFromGenFile(nodeHome) if err != nil { return fromVM, fmt.Errorf("failed to unmarshal genesis state: %w", err)