Use account store key

This commit is contained in:
Christopher Goes 2018-04-27 17:06:55 +02:00 committed by rigelrozanski
parent ad77affb53
commit 5759f6ab60
2 changed files with 10 additions and 4 deletions

View File

@ -58,8 +58,14 @@ func NewGaiaApp(logger log.Logger, db dbm.DB) *GaiaApp {
keyStake: sdk.NewKVStoreKey("stake"),
}
// add accountMapper/handlers
app.accountMapper = auth.NewAccountMapper(app.cdc, app.keyMain, &auth.BaseAccount{})
// define the accountMapper
app.accountMapper = auth.NewAccountMapper(
app.cdc,
app.keyAccount, // target store
&auth.BaseAccount{}, // prototype
)
// add handlers
app.coinKeeper = bank.NewKeeper(app.accountMapper)
app.ibcMapper = ibc.NewMapper(app.cdc, app.keyIBC, app.RegisterCodespace(ibc.DefaultCodespace))
app.stakeKeeper = stake.NewKeeper(app.cdc, app.keyStake, app.coinKeeper, app.RegisterCodespace(stake.DefaultCodespace))

View File

@ -66,8 +66,8 @@ func NewDemocoinApp(logger log.Logger, db dbm.DB) *DemocoinApp {
// Define the accountMapper.
app.accountMapper = auth.NewAccountMapper(
cdc,
app.capKeyMainStore, // target store
&types.AppAccount{}, // prototype
app.capKeyAccountStore, // target store
&types.AppAccount{}, // prototype
)
// Add handlers.