Skip to content

Commit 1ddeeab

Browse files
committed
impl
1 parent 2f2f577 commit 1ddeeab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/agent/common/approveIfNeeded.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type ApproveIfNeeded = (factoryOptions: {
1717
readonly callback: (
1818
receipt?: TransactionReceipt
1919
) => Promise<TransactionResponse>
20-
}) => (options: {
20+
}) => (options?: {
2121
readonly amount?: string
2222
readonly overrides?: FallbackableOverrides
2323
}) => Promise<{
@@ -49,8 +49,8 @@ export const approveIfNeeded: ApproveIfNeeded =
4949
} as const))(
5050
await dev.approve(
5151
to,
52-
options.amount ?? factoryOptions.requiredAmount,
53-
options.overrides
52+
options?.amount ?? factoryOptions.requiredAmount,
53+
options?.overrides
5454
)
5555
)
5656
: callback

0 commit comments

Comments
 (0)