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 <kjydavis3@gmail.com>
This commit is contained in:
Nick DeLuca 2022-06-06 10:04:13 -07:00 committed by GitHub
parent 21206cc3ee
commit 70c0cafd64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -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(

View File

@ -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
}