Skip to content

Commit

Permalink
fix: replace import
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathansumner committed Apr 16, 2024
1 parent 82ae0d2 commit 11cc45b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cmd/fetchd/cmd/genasiupgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import (
"github.com/cosmos/cosmos-sdk/x/genutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/types"
"regexp"
"strings"
)

const (
Expand Down Expand Up @@ -57,10 +59,10 @@ func ASIGenesisUpgradeCmd(defaultNodeHome string) *cobra.Command {
config.SetRoot(clientCtx.HomeDir)

genFile := config.GenesisFile()

appState, genDoc, err := genutiltypes.GenesisStateFromGenFile(genFile)

if err != nil {
appState, genDoc, err := genutiltypes.GenesisStateFromGenFile(genFile)

if err != nil {
return fmt.Errorf("failed to unmarshal genesis state: %w", err)
}

Expand All @@ -81,10 +83,10 @@ func ASIGenesisUpgradeCmd(defaultNodeHome string) *cobra.Command {
ASIGenesisUpgradeReplaceDenom(&appStateStr)

genDoc.AppState = []byte(appStateStr)

// replace chain-id
ASIGenesisUpgradeReplaceChainID(genDoc)

return genutil.ExportGenesisFile(genDoc, genFile)
},
}
Expand Down

0 comments on commit 11cc45b

Please sign in to comment.