From 185b18b33a273c9ae4b51823b21f56a0016b2a75 Mon Sep 17 00:00:00 2001 From: smart_ex Date: Thu, 7 Jul 2022 17:00:16 +1000 Subject: [PATCH] tornado classic fee estimate compatibility --- src/services/tx.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/services/tx.service.ts b/src/services/tx.service.ts index f28375f..fb92c1f 100644 --- a/src/services/tx.service.ts +++ b/src/services/tx.service.ts @@ -152,7 +152,11 @@ export class TxService { const [fee, refund] = [args[4], args[5]].map(BigNumber.from); const gasPrice = await this.getGasPrice(); // TODO check refund value - let operationCost = gasPrice.mul(this.gasLimit); + let gasLimit = this.gasLimit; + if (!this.config.isLightMode) { + gasLimit = gasLimits[RelayerJobType.TORNADO_WITHDRAW]; + } + let operationCost = gasPrice.mul(gasLimit); if (netId === ChainIds.optimism) { const l1Fee = await this.getL1Fee(data, gasPrice);