From d8e048c5e18fd3b35c2d0463d093883abc43e45f Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Fri, 22 Jul 2022 11:23:58 +0100 Subject: [PATCH] chore: fix comment and any type --- libs/web3/src/lib/use-ethereum-transaction.spec.tsx | 2 +- libs/web3/src/lib/use-ethereum-transaction.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/web3/src/lib/use-ethereum-transaction.spec.tsx b/libs/web3/src/lib/use-ethereum-transaction.spec.tsx index e6145e342..1172caf4f 100644 --- a/libs/web3/src/lib/use-ethereum-transaction.spec.tsx +++ b/libs/web3/src/lib/use-ethereum-transaction.spec.tsx @@ -35,7 +35,7 @@ class MockContract { resolve({ from: 'foo', confirmations, - } as any); + } as ethers.ContractReceipt); }, 100); }); }, diff --git a/libs/web3/src/lib/use-ethereum-transaction.ts b/libs/web3/src/lib/use-ethereum-transaction.ts index cd87e1067..af23a958a 100644 --- a/libs/web3/src/lib/use-ethereum-transaction.ts +++ b/libs/web3/src/lib/use-ethereum-transaction.ts @@ -51,7 +51,8 @@ export const useEthereumTransaction = < }, []); const perform = useCallback( - // @ts-ignore TS errors here as TMethod doesn satisifed the constraints on TContract + // @ts-ignore TS errors here as TMethod doesn't satisify the constraints on TContract + // its a tricky one to fix but does enforce the correct types when calling perform async (...args: Parameters) => { try { if (