Skip to content

Commit

Permalink
feat: build project and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emidev98 committed Aug 16, 2023
1 parent 307b519 commit 9146867
Show file tree
Hide file tree
Showing 6 changed files with 252 additions and 240 deletions.
226 changes: 0 additions & 226 deletions x/auth/vesting/handler_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions x/auth/vesting/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ type VestingInputs struct {

AccountKeeper keeper.AccountKeeper
BankKeeper types.BankKeeper
DistrKeeper types.DistrKeeper
// DistrKeeper types.DistrKeeper
StakingKeeper types.StakingKeeper
}

Expand All @@ -163,7 +163,7 @@ type VestingOutputs struct {
}

func ProvideModule(in VestingInputs) VestingOutputs {
m := NewAppModule(in.AccountKeeper, in.BankKeeper, in.DistrKeeper, in.StakingKeeper)
m := NewAppModule(in.AccountKeeper, in.BankKeeper, nil, in.StakingKeeper)

return VestingOutputs{Module: m}
}
8 changes: 0 additions & 8 deletions x/auth/vesting/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,5 @@ func (s msgServer) DonateAllVestingTokens(goCtx context.Context, msg *types.MsgD
return nil, err
}

ctx.EventManager().EmitEvent(
sdk.NewEvent(
sdk.EventTypeMessage,
sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory),
sdk.NewAttribute(sdk.AttributeKeyAmount, vestingCoins.String()),
),
)

return &types.MsgDonateAllVestingTokensResponse{}, nil
}
6 changes: 5 additions & 1 deletion x/auth/vesting/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ type VestingTestSuite struct {
ctx sdk.Context
accountKeeper authkeeper.AccountKeeper
bankKeeper *vestingtestutil.MockBankKeeper
distrKeeper *vestingtestutil.MockDistrKeeper
stakingKeeper *vestingtestutil.MockStakingKeeper
msgServer vestingtypes.MsgServer
}

Expand All @@ -47,6 +49,8 @@ func (s *VestingTestSuite) SetupTest() {

ctrl := gomock.NewController(s.T())
s.bankKeeper = vestingtestutil.NewMockBankKeeper(ctrl)
s.distrKeeper = vestingtestutil.NewMockDistrKeeper(ctrl)
s.stakingKeeper = vestingtestutil.NewMockStakingKeeper(ctrl)
s.accountKeeper = authkeeper.NewAccountKeeper(
encCfg.Codec,
key,
Expand All @@ -58,7 +62,7 @@ func (s *VestingTestSuite) SetupTest() {

vestingtypes.RegisterInterfaces(encCfg.InterfaceRegistry)
authtypes.RegisterInterfaces(encCfg.InterfaceRegistry)
s.msgServer = vesting.NewMsgServerImpl(s.accountKeeper, s.bankKeeper)
s.msgServer = vesting.NewMsgServerImpl(s.accountKeeper, s.bankKeeper, s.distrKeeper, s.stakingKeeper)
}

func (s *VestingTestSuite) TestCreateVestingAccount() {
Expand Down
Loading

0 comments on commit 9146867

Please sign in to comment.