fix: this context for calling tx

This commit is contained in:
Matthew Russell
2022-07-22 11:14:53 +01:00
parent b53c21aa08
commit ed310c2894
@@ -62,7 +62,7 @@ export const useEthereumTransaction = <
) {
throw new Error('method not found on contract');
}
await contract.contract.callStatic[methodName as string](args);
await contract.contract.callStatic[methodName as string](...args);
} catch (err) {
setTransaction({
status: EthTxStatus.Error,
@@ -84,7 +84,7 @@ export const useEthereumTransaction = <
throw new Error('method not found on contract');
}
const tx = await method(...args);
const tx = await method.call(contract, ...args);
let receipt: ethers.ContractReceipt | null = null;