refactor(x/mint)!: use KVStoreService and context.Context (#16179)

This commit is contained in:
Facundo Medica
2023-05-22 11:55:10 +00:00
committed by GitHub
parent 2c702e6563
commit cd3abca867
16 changed files with 142 additions and 76 deletions
+6 -2
View File
@@ -53,7 +53,7 @@ func Example() {
// here bankkeeper and staking keeper is nil because we are not testing them
// subspace is nil because we don't test params (which is legacy anyway)
mintKeeper := mintkeeper.NewKeeper(encodingCfg.Codec, keys[minttypes.StoreKey], nil, accountKeeper, nil, authtypes.FeeCollectorName, authority)
mintKeeper := mintkeeper.NewKeeper(encodingCfg.Codec, runtime.NewKVStoreService(keys[minttypes.StoreKey]), nil, accountKeeper, nil, authtypes.FeeCollectorName, authority)
mintModule := mint.NewAppModule(encodingCfg.Codec, mintKeeper, accountKeeper, nil, nil)
// create the application and register all the modules from the previous step
@@ -98,7 +98,11 @@ func Example() {
sdkCtx := sdk.UnwrapSDKContext(integrationApp.Context())
// we should also check the state of the application
got := mintKeeper.GetParams(sdkCtx)
got, err := mintKeeper.GetParams(sdkCtx)
if err != nil {
panic(err)
}
if diff := cmp.Diff(got, params); diff != "" {
panic(diff)
}