Use account store key
This commit is contained in:
parent
ad77affb53
commit
5759f6ab60
|
@ -58,8 +58,14 @@ func NewGaiaApp(logger log.Logger, db dbm.DB) *GaiaApp {
|
||||||
keyStake: sdk.NewKVStoreKey("stake"),
|
keyStake: sdk.NewKVStoreKey("stake"),
|
||||||
}
|
}
|
||||||
|
|
||||||
// add accountMapper/handlers
|
// define the accountMapper
|
||||||
app.accountMapper = auth.NewAccountMapper(app.cdc, app.keyMain, &auth.BaseAccount{})
|
app.accountMapper = auth.NewAccountMapper(
|
||||||
|
app.cdc,
|
||||||
|
app.keyAccount, // target store
|
||||||
|
&auth.BaseAccount{}, // prototype
|
||||||
|
)
|
||||||
|
|
||||||
|
// add handlers
|
||||||
app.coinKeeper = bank.NewKeeper(app.accountMapper)
|
app.coinKeeper = bank.NewKeeper(app.accountMapper)
|
||||||
app.ibcMapper = ibc.NewMapper(app.cdc, app.keyIBC, app.RegisterCodespace(ibc.DefaultCodespace))
|
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))
|
app.stakeKeeper = stake.NewKeeper(app.cdc, app.keyStake, app.coinKeeper, app.RegisterCodespace(stake.DefaultCodespace))
|
||||||
|
|
|
@ -66,8 +66,8 @@ func NewDemocoinApp(logger log.Logger, db dbm.DB) *DemocoinApp {
|
||||||
// Define the accountMapper.
|
// Define the accountMapper.
|
||||||
app.accountMapper = auth.NewAccountMapper(
|
app.accountMapper = auth.NewAccountMapper(
|
||||||
cdc,
|
cdc,
|
||||||
app.capKeyMainStore, // target store
|
app.capKeyAccountStore, // target store
|
||||||
&types.AppAccount{}, // prototype
|
&types.AppAccount{}, // prototype
|
||||||
)
|
)
|
||||||
|
|
||||||
// Add handlers.
|
// Add handlers.
|
||||||
|
|
Loading…
Reference in New Issue