Skip to content

Commit b8d57fc

Browse files
committed
Cleanup
1 parent f932d22 commit b8d57fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/types/Actions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ type isEmptyObject<Args> = Args extends Record<string, never> ? true : false;
1212
export type ActionParameters<Args, ContractName extends string, Curried extends boolean> = Prettify<
1313
Curried extends false
1414
? isEmptyObject<Args> extends true
15-
? { [key in ContractName]: Address } | { sequencerInbox: Address } // Contract wasn't curried. Args is an empty object. Only requires the contract name
16-
: { params: Args } & ({ [key in ContractName]: Address } | { sequencerInbox: Address }) // Contract wasn't curried. Args is not empty. Requires both params and contract name
15+
? { [key in ContractName]: Address } // Contract wasn't curried. Args is an empty object. Only requires the contract name
16+
: { params: Args } & { [key in ContractName]: Address } // Contract wasn't curried. Args is not empty. Requires both params and contract name
1717
: isEmptyObject<Args> extends true
18-
? { [key in ContractName]: Address } | { sequencerInbox: Address } | void // Contract was curried. Args is empty. Only requires the contract name. Allows no parameters
19-
: { params: Args } & ({ [key in ContractName]?: Address } | { sequencerInbox?: Address }) // Contract was curried. Args is not empty. Requires params, contract name is optional
18+
? { [key in ContractName]: Address } | void // Contract was curried. Args is empty. Only requires the contract name. Allows no parameters
19+
: { params: Args } & { [key in ContractName]?: Address } // Contract was curried. Args is not empty. Requires params, contract name is optional
2020
>;
2121

2222
export type WithAccount<Args> = Args & {

0 commit comments

Comments
 (0)