diff --git a/src/types/Actions.ts b/src/types/Actions.ts index 9072c656..0327ffba 100644 --- a/src/types/Actions.ts +++ b/src/types/Actions.ts @@ -1,8 +1,6 @@ import { Address } from 'viem'; import { Prettify } from './utils'; -type RemoveUndefinedArgs = T extends { args?: undefined } ? Omit : T; - /** * Actions require contract address, but as part of decorators, the address might have been passed already to the decorator. * @@ -11,8 +9,8 @@ type RemoveUndefinedArgs = T extends { args?: undefined } ? Omit : */ export type ActionParameters = Prettify< Curried extends false - ? RemoveUndefinedArgs - : Args extends { args?: undefined } + ? Args & { [key in ContractName]: Address } + : Args extends Record ? | { [key in ContractName]: Address;