From 34e4bb415956dc4507a4de765848a3fb3399cb68 Mon Sep 17 00:00:00 2001 From: ChefJoJo <94336009+chef-jojo@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:44:22 +0800 Subject: [PATCH] test --- apps/web/src/hooks/useCallWithGasPrice.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/web/src/hooks/useCallWithGasPrice.ts b/apps/web/src/hooks/useCallWithGasPrice.ts index 0ba589a235be1..b867910ece70b 100644 --- a/apps/web/src/hooks/useCallWithGasPrice.ts +++ b/apps/web/src/hooks/useCallWithGasPrice.ts @@ -73,16 +73,16 @@ export function useCallWithGasPrice() { methodArgs?: Args extends never ? undefined : Args, overrides?: Omit, ): Promise => { - const gas = await publicClient({ chainId }).estimateContractGas({ - abi: contract.abi, - address: contract.address, - // account: walletClient.account, - functionName: methodName, - args: methodArgs, - gasPrice, - value: 0n, - ...overrides, - } as unknown as EstimateContractGasParameters) + // const gas = await publicClient({ chainId }).estimateContractGas({ + // abi: contract.abi, + // address: contract.address, + // // account: walletClient.account, + // functionName: methodName, + // args: methodArgs, + // gasPrice, + // value: 0n, + // ...overrides, + // } as unknown as EstimateContractGasParameters) const res = await walletClient.writeContract({ abi: contract.abi, address: contract.address, @@ -90,7 +90,7 @@ export function useCallWithGasPrice() { functionName: methodName, args: methodArgs, gasPrice, - gas: calculateGasMargin(gas), + // gas: calculateGasMargin(gas), value: 0n, ...overrides, } as unknown as WriteContractParameters)