Skip to content

Commit 4c41213

Browse files
committed
refactor: subscription service test util
1 parent c4a07ce commit 4c41213

File tree

4 files changed

+201
-217
lines changed

4 files changed

+201
-217
lines changed

packages/subscription-controller/src/SubscriptionController.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,7 @@ function createMockSubscriptionService() {
140140
/**
141141
* Helper function to create controller with options.
142142
*/
143-
type WithControllerCallback<ReturnValue> = ({
144-
controller,
145-
initialState,
146-
messenger,
147-
mockService,
148-
}: {
143+
type WithControllerCallback<ReturnValue> = (params: {
149144
controller: SubscriptionController;
150145
initialState: SubscriptionControllerState;
151146
messenger: SubscriptionControllerMessenger;

packages/subscription-controller/src/SubscriptionController.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,10 @@ import {
1111
controllerName,
1212
SubscriptionControllerErrorMessage,
1313
} from './constants';
14-
import type {
15-
ProductType,
16-
ISubscriptionService,
17-
Subscription,
18-
PendingPaymentTransaction,
19-
} from './types';
14+
import type { ProductType, ISubscriptionService, Subscription } from './types';
2015

2116
export type SubscriptionControllerState = {
2217
subscriptions: Subscription[];
23-
pendingPaymentTransactions?: {
24-
[transactionId: string]: PendingPaymentTransaction;
25-
};
2618
};
2719

2820
// Messenger Actions
@@ -106,10 +98,6 @@ const subscriptionControllerMetadata: StateMetadata<SubscriptionControllerState>
10698
persist: true,
10799
anonymous: false,
108100
},
109-
pendingPaymentTransactions: {
110-
persist: true,
111-
anonymous: false,
112-
},
113101
};
114102

115103
export class SubscriptionController extends BaseController<

0 commit comments

Comments
 (0)