Skip to content

Commit

Permalink
chore: update account keeper and bank keeper call signature
Browse files Browse the repository at this point in the history
  • Loading branch information
JeancarloBarrios committed Jul 1, 2024
1 parent 41e2a6a commit 0a23652
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions x/data/server/testsuite/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

"github.com/stretchr/testify/suite"

"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkmodules "github.com/cosmos/cosmos-sdk/types/module"
Expand Down Expand Up @@ -33,7 +32,6 @@ func setup(t *testing.T) fixture.Factory {
ff := fixture.NewFixtureFactory(t, 8)
baseApp := ff.BaseApp()
cdc := ff.Codec()
amino := codec.NewLegacyAmino()

authtypes.RegisterInterfaces(cdc.InterfaceRegistry())
params.RegisterInterfaces(cdc.InterfaceRegistry())
Expand All @@ -52,20 +50,22 @@ func setup(t *testing.T) fixture.Factory {
baseApp.MountStore(paramsKey, storetypes.StoreTypeIAVL)
baseApp.MountStore(tkey, storetypes.StoreTypeTransient)

authSubspace := paramstypes.NewSubspace(cdc, amino, paramsKey, tkey, authtypes.ModuleName)
bankSubspace := paramstypes.NewSubspace(cdc, amino, paramsKey, tkey, banktypes.ModuleName)

maccPerms := map[string][]string{
minttypes.ModuleName: {authtypes.Minter},
}

authority := authtypes.NewModuleAddress("gov")

accountKeeper := authkeeper.NewAccountKeeper(
cdc, authKey, authSubspace, authtypes.ProtoBaseAccount, maccPerms, "regen",
cdc,
authKey,
authtypes.ProtoBaseAccount,
maccPerms,
"regen",
authority.String(),
)

bankKeeper := bankkeeper.NewBaseKeeper(
cdc, bankKey, accountKeeper, bankSubspace, nil,
)
bankKeeper := bankkeeper.NewBaseKeeper(cdc, bankKey, accountKeeper, nil, authority.String())

dataMod := datamodule.NewModule(dataKey, accountKeeper, bankKeeper)
ff.SetModules([]sdkmodules.AppModule{dataMod})
Expand Down

0 comments on commit 0a23652

Please sign in to comment.