Skip to content

Commit 4e38582

Browse files
committed
type safety
1 parent e876a8a commit 4e38582

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/common/utils/execute.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ export const execute: ExecuteFunction = async <
144144
: (contract[opts.method] as undefined | BaseContractMethod)
145145
const overloadedMethod = singleMethod
146146
? undefined
147-
: ((name) => (opts.static ? contract[name].staticCall : contract[name]))(
147+
: ((name) =>
148+
opts.static
149+
? (contract[name] as undefined | BaseContractMethod)?.staticCall
150+
: contract[name])(
148151
String(
149152
keys(contract).find(
150153
(fn: string | number | unknown) =>

0 commit comments

Comments
 (0)