Skip to content

Commit

Permalink
fix: make consumer-democracy read the sovereign genesis from nodeHome
Browse files Browse the repository at this point in the history
  • Loading branch information
fastfadingviolets committed Oct 9, 2024
1 parent c1edaaf commit 54d89fa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/consumer-democracy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 54d89fa

Please sign in to comment.