Skip to content

Commit 50fd070

Browse files
Merge branch 'main' into issues/1034/feat/claim_morse_supplier
2 parents a1e0ad4 + db0dc85 commit 50fd070

File tree

6 files changed

+3
-32
lines changed

6 files changed

+3
-32
lines changed

testutil/integration/app.go

-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,6 @@ func NewCompleteIntegrationApp(t *testing.T, opts ...IntegrationAppOptionFn) *Ap
528528
accountKeeper,
529529
bankKeeper,
530530
sharedKeeper,
531-
gatewayKeeper,
532531
applicationKeeper,
533532
supplierKeeper,
534533
)

testutil/keeper/migration.go

+2-18
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131
type MigrationKeeperConfig struct {
3232
bankKeeper migrationtypes.BankKeeper
3333
sharedKeeper migrationtypes.SharedKeeper
34-
gatewayKeeper migrationtypes.GatewayKeeper
3534
appKeeper migrationtypes.ApplicationKeeper
3635
supplierKeeper migrationtypes.SupplierKeeper
3736
}
@@ -74,7 +73,6 @@ func MigrationKeeper(
7473
mockAccountKeeper,
7574
cfg.bankKeeper,
7675
cfg.sharedKeeper,
77-
cfg.gatewayKeeper,
7876
cfg.appKeeper,
7977
cfg.supplierKeeper,
8078
)
@@ -96,13 +94,6 @@ func WithBankKeeper(bankKeeper migrationtypes.BankKeeper) MigrationKeeperOptionF
9694
}
9795
}
9896

99-
// WithGatewayKeeper assigns the given GatewayKeeper to the MigrationKeeperConfig.
100-
func WithGatewayKeeper(gatewayKeeper migrationtypes.GatewayKeeper) MigrationKeeperOptionFn {
101-
return func(cfg *MigrationKeeperConfig) {
102-
cfg.gatewayKeeper = gatewayKeeper
103-
}
104-
}
105-
10697
// WithApplicationKeeper assigns the given ApplicationKeeper to the MigrationKeeperConfig.
10798
func WithApplicationKeeper(appKeeper migrationtypes.ApplicationKeeper) MigrationKeeperOptionFn {
10899
return func(cfg *MigrationKeeperConfig) {
@@ -124,6 +115,8 @@ func WithSupplierKeeper(supplierKeeper migrationtypes.SupplierKeeper) MigrationK
124115
// - SendCoinsFromModuleToAccount
125116
//
126117
// 2. A Mocked shared keeper which responds to the Params method with the default params.
118+
// 3. A Mocked app keeper.
119+
// 4. A Mocked supplier keeper.
127120
func defaultConfigWithMocks(ctrl *gomock.Controller) *MigrationKeeperConfig {
128121
mockBankKeeper := mocks.NewMockBankKeeper(ctrl)
129122
mockBankKeeper.EXPECT().
@@ -142,14 +135,6 @@ func defaultConfigWithMocks(ctrl *gomock.Controller) *MigrationKeeperConfig {
142135
Return(sharedtypes.DefaultParams()).
143136
AnyTimes()
144137

145-
mockGatewayKeeper := mocks.NewMockGatewayKeeper(ctrl)
146-
mockGatewayKeeper.EXPECT().
147-
GetGateway(gomock.Any(), gomock.Any()).
148-
AnyTimes()
149-
mockGatewayKeeper.EXPECT().
150-
SetGateway(gomock.Any(), gomock.Any()).
151-
AnyTimes()
152-
153138
mockAppKeeper := mocks.NewMockApplicationKeeper(ctrl)
154139
mockAppKeeper.EXPECT().
155140
GetApplication(gomock.Any(), gomock.Any()).
@@ -169,7 +154,6 @@ func defaultConfigWithMocks(ctrl *gomock.Controller) *MigrationKeeperConfig {
169154
return &MigrationKeeperConfig{
170155
bankKeeper: mockBankKeeper,
171156
sharedKeeper: sharedKeeper,
172-
gatewayKeeper: mockGatewayKeeper,
173157
appKeeper: mockAppKeeper,
174158
supplierKeeper: mockSupplierKeeper,
175159
}

testutil/keeper/tokenomics.go

-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ func NewTokenomicsModuleKeepers(
535535
accountKeeper,
536536
bankKeeper,
537537
sharedKeeper,
538-
gatewayKeeper,
539538
appKeeper,
540539
supplierKeeper,
541540
)

x/migration/keeper/keeper.go

-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ type (
2424
accountKeeper types.AccountKeeper
2525
bankKeeper types.BankKeeper
2626
sharedKeeper types.SharedKeeper
27-
gatewayKeeper types.GatewayKeeper
2827
appKeeper types.ApplicationKeeper
2928
supplierKeeper types.SupplierKeeper
3029
}
@@ -38,7 +37,6 @@ func NewKeeper(
3837
accountKeeper types.AccountKeeper,
3938
bankKeeper types.BankKeeper,
4039
sharedKeeper types.SharedKeeper,
41-
gatewayKeeper types.GatewayKeeper,
4240
appKeeper types.ApplicationKeeper,
4341
supplierKeeper types.SupplierKeeper,
4442
) Keeper {
@@ -54,7 +52,6 @@ func NewKeeper(
5452
accountKeeper: accountKeeper,
5553
bankKeeper: bankKeeper,
5654
sharedKeeper: sharedKeeper,
57-
gatewayKeeper: gatewayKeeper,
5855
appKeeper: appKeeper,
5956
supplierKeeper: supplierKeeper,
6057
}

x/migration/module/module.go

-2
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ type ModuleInputs struct {
192192
AccountKeeper types.AccountKeeper
193193
BankKeeper types.BankKeeper
194194
SharedKeeper types.SharedKeeper
195-
GatewayKeeper types.GatewayKeeper
196195
ApplicationKeeper types.ApplicationKeeper
197196
SupplierKeeper types.SupplierKeeper
198197
}
@@ -218,7 +217,6 @@ func ProvideModule(in ModuleInputs) ModuleOutputs {
218217
in.AccountKeeper,
219218
in.BankKeeper,
220219
in.SharedKeeper,
221-
in.GatewayKeeper,
222220
in.ApplicationKeeper,
223221
in.SupplierKeeper,
224222
)

x/migration/types/expected_keepers.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.uber.org/mock/mockgen -destination ../../../testutil/migration/mocks/expected_keepers_mock.go -package mocks . AccountKeeper,BankKeeper,SharedKeeper,GatewayKeeper,ApplicationKeeper,SupplierKeeper
1+
//go:generate go run go.uber.org/mock/mockgen -destination ../../../testutil/migration/mocks/expected_keepers_mock.go -package mocks . AccountKeeper,BankKeeper,SharedKeeper,ApplicationKeeper,SupplierKeeper
22

33
package types
44

@@ -9,7 +9,6 @@ import (
99
sdk "github.com/cosmos/cosmos-sdk/types"
1010

1111
apptypes "github.com/pokt-network/poktroll/x/application/types"
12-
gatewaytypes "github.com/pokt-network/poktroll/x/gateway/types"
1312
sharedtypes "github.com/pokt-network/poktroll/x/shared/types"
1413
suppliertypes "github.com/pokt-network/poktroll/x/supplier/types"
1514
)
@@ -28,11 +27,6 @@ type BankKeeper interface {
2827
// Methods imported from bank should be defined here
2928
}
3029

31-
type GatewayKeeper interface {
32-
GetGateway(ctx context.Context, address string) (gateway gatewaytypes.Gateway, found bool)
33-
SetGateway(ctx context.Context, gateway gatewaytypes.Gateway)
34-
}
35-
3630
type ApplicationKeeper interface {
3731
GetApplication(ctx context.Context, appAddr string) (app apptypes.Application, found bool)
3832
SetApplication(ctx context.Context, application apptypes.Application)

0 commit comments

Comments
 (0)