Skip to content

Commit e2446ec

Browse files
authored
make parameters nullable (#52)
1 parent 9a18557 commit e2446ec

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

packages/permission-types/src/types.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export type Rule = {
102102
* @property justification - is a human-readable explanation of why the permission is being requested.
103103
*/
104104
export type MetaMaskBasePermissionData = {
105-
justification?: string;
105+
justification?: string | null;
106106
};
107107

108108
/**
@@ -115,10 +115,10 @@ export type MetaMaskBasePermissionData = {
115115
export type NativeTokenStreamPermission = BasePermission & {
116116
type: 'native-token-stream';
117117
data: MetaMaskBasePermissionData & {
118-
initialAmount?: Hex;
119-
maxAmount?: Hex;
118+
initialAmount?: Hex | null;
119+
maxAmount?: Hex | null;
120120
amountPerSecond: Hex;
121-
startTime?: number;
121+
startTime?: number | null;
122122
};
123123
};
124124

@@ -133,7 +133,7 @@ export type NativeTokenPeriodicPermission = BasePermission & {
133133
data: MetaMaskBasePermissionData & {
134134
periodAmount: Hex;
135135
periodDuration: number;
136-
startTime?: number;
136+
startTime?: number | null;
137137
};
138138
};
139139

@@ -148,10 +148,10 @@ export type NativeTokenPeriodicPermission = BasePermission & {
148148
export type Erc20TokenStreamPermission = BasePermission & {
149149
type: 'erc20-token-stream';
150150
data: MetaMaskBasePermissionData & {
151-
initialAmount?: Hex;
152-
maxAmount?: Hex;
151+
initialAmount?: Hex | null;
152+
maxAmount?: Hex | null;
153153
amountPerSecond: Hex;
154-
startTime?: number;
154+
startTime?: number | null;
155155
tokenAddress: Hex;
156156
};
157157
};
@@ -168,7 +168,7 @@ export type Erc20TokenPeriodicPermission = BasePermission & {
168168
data: MetaMaskBasePermissionData & {
169169
periodAmount: Hex;
170170
periodDuration: number;
171-
startTime?: number;
171+
startTime?: number | null;
172172
tokenAddress: Hex;
173173
};
174174
};
@@ -212,7 +212,7 @@ export type PermissionRequest<
212212
address?: Hex;
213213
signer: TSigner;
214214
permission: TPermission;
215-
rules?: Rule[];
215+
rules?: Rule[] | null;
216216
};
217217

218218
/**
@@ -236,7 +236,7 @@ export type PermissionResponse<
236236
userOpBuilder?: Hex;
237237
// 7710 delegation
238238
delegationManager?: Hex;
239-
};
239+
};
240240
};
241241

242242
/**

0 commit comments

Comments
 (0)