From 70c0cafd64c10f012fe0e75137bcf0467c584df0 Mon Sep 17 00:00:00 2001 From: Nick DeLuca Date: Mon, 6 Jun 2022 10:04:13 -0700 Subject: [PATCH] Update default account to BaseAccount (#1263) * update default account to use base account, not eth account * fix: use base account in test Co-authored-by: karzak --- app/app.go | 3 +-- x/swap/testutil/suite.go | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/app.go b/app/app.go index df01f6b5..1d642b8a 100644 --- a/app/app.go +++ b/app/app.go @@ -83,7 +83,6 @@ import ( dbm "github.com/tendermint/tm-db" evmante "github.com/tharsis/ethermint/app/ante" ethermintconfig "github.com/tharsis/ethermint/server/config" - ethermint "github.com/tharsis/ethermint/types" "github.com/tharsis/ethermint/x/evm" evmrest "github.com/tharsis/ethermint/x/evm/client/rest" evmkeeper "github.com/tharsis/ethermint/x/evm/keeper" @@ -401,7 +400,7 @@ func NewApp( appCodec, keys[authtypes.StoreKey], authSubspace, - ethermint.ProtoAccount, + authtypes.ProtoBaseAccount, mAccPerms, ) app.bankKeeper = bankkeeper.NewBaseKeeper( diff --git a/x/swap/testutil/suite.go b/x/swap/testutil/suite.go index 43ebc8eb..ba3f6f4f 100644 --- a/x/swap/testutil/suite.go +++ b/x/swap/testutil/suite.go @@ -20,7 +20,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - ethermint "github.com/tharsis/ethermint/types" ) var defaultSwapFee = sdk.MustNewDecFromStr("0.003") @@ -104,7 +103,7 @@ func (suite *Suite) NewAccountFromAddr(addr sdk.AccAddress, balance sdk.Coins) a // CreateVestingAccount creates a new vesting account from the provided balance and vesting balance func (suite *Suite) CreateVestingAccount(initialBalance sdk.Coins, vestingBalance sdk.Coins) authtypes.AccountI { acc := suite.CreateAccount(initialBalance) - bacc := acc.(*ethermint.EthAccount) + bacc := acc.(*authtypes.BaseAccount) periods := vestingtypes.Periods{ vestingtypes.Period{ @@ -112,7 +111,7 @@ func (suite *Suite) CreateVestingAccount(initialBalance sdk.Coins, vestingBalanc Amount: vestingBalance, }, } - vacc := vestingtypes.NewPeriodicVestingAccount(bacc.BaseAccount, initialBalance, time.Now().Unix(), periods) // TODO is initialBalance correct for originalVesting? + vacc := vestingtypes.NewPeriodicVestingAccount(bacc, initialBalance, time.Now().Unix(), periods) // TODO is initialBalance correct for originalVesting? return vacc }