diff --git a/ignite/cmd/testnet_inplace.go b/ignite/cmd/testnet_inplace.go index d54c524c2d..7e98e51cc9 100644 --- a/ignite/cmd/testnet_inplace.go +++ b/ignite/cmd/testnet_inplace.go @@ -5,6 +5,7 @@ import ( "github.com/ignite/cli/v29/ignite/pkg/cliui" "github.com/ignite/cli/v29/ignite/pkg/cosmosaccount" + "github.com/ignite/cli/v29/ignite/pkg/errors" "github.com/ignite/cli/v29/ignite/services/chain" "github.com/spf13/cobra" ) @@ -75,7 +76,7 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error { return err } ca, err := cosmosaccount.New( - cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringBackend(keyringbankend)), + cosmosaccount.WithKeyringBackend(cosmosaccount.KeyringBackend(keyringBackend)), cosmosaccount.WithHome(home), ) if err != nil { @@ -89,7 +90,7 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error { ) for _, acc := range cfg.Accounts { sdkAcc, err := ca.GetByName(acc.Name) - if !errors.As(err, &accErr) { + if errors.As(err, &accErr) { sdkAcc, _, err = ca.Create(acc.Name) } if err != nil { @@ -118,10 +119,10 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error { return err } - args := chain.InplaceArgs{ + args := chain.InPlaceArgs{ NewChainID: chainID, NewOperatorAddress: operatorAddress.String(), - AcountsToFund: accounts, + AccountsToFund: accounts, } return c.TestnetInPlace(cmd.Context(), args) } diff --git a/ignite/services/chain/runtime.go b/ignite/services/chain/runtime.go index 5c7f94d5ef..a0eb21e1df 100644 --- a/ignite/services/chain/runtime.go +++ b/ignite/services/chain/runtime.go @@ -37,12 +37,12 @@ func (c Chain) Gentx(ctx context.Context, runner chaincmdrunner.Runner, v Valida ) } -func (c Chain) InPlace(ctx context.Context, runner chaincmdrunner.Runner, args InplaceArgs) error { +func (c Chain) InPlace(ctx context.Context, runner chaincmdrunner.Runner, args InPlaceArgs) error { err := runner.InPlace(ctx, args.NewChainID, args.NewOperatorAddress, chaincmd.InPlaceWithPrvKey(args.PrvKeyValidator), - chaincmd.InPlaceWithAccountToFund(args.AcountsToFund), + chaincmd.InPlaceWithAccountToFund(args.AccountsToFund), chaincmd.InPlaceWithSkipConfirmation(), ) return err diff --git a/ignite/services/chain/testnet.go b/ignite/services/chain/testnet.go index 7acf083f06..d759486a4b 100644 --- a/ignite/services/chain/testnet.go +++ b/ignite/services/chain/testnet.go @@ -10,10 +10,10 @@ type InPlaceArgs struct { NewChainID string NewOperatorAddress string PrvKeyValidator string - AccountsToFund string + AccountsToFund string } -func (c Chain) TestnetInPlace(ctx context.Context, args InplaceArgs) error { +func (c Chain) TestnetInPlace(ctx context.Context, args InPlaceArgs) error { commands, err := c.Commands(ctx) if err != nil { return err