diff --git a/package.json b/package.json index abd13e5..aac14f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tornado/tornado-oracles", - "version": "0.2.0", + "version": "0.2.1", "description": "Gas oracle for Tornado-specific transactions", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/src/feeOracle.ts b/src/feeOracle.ts index 55fd9f0..8c08fdc 100644 --- a/src/feeOracle.ts +++ b/src/feeOracle.ts @@ -45,9 +45,9 @@ export abstract class TornadoFeeOracle implements ITornadoFeeOracle { type: TxType = 'other', speed: LegacyGasPriceKey = 'fast', ): Promise { - const gasPrice = await this.getGasPrice(type, speed); + const gasPrice = await this.getGasPriceInHex(type, speed); let gas = BigNumber.from(0); - gas = gas.add(calculateGasPriceInWei(gasPrice)); + gas = gas.add(gasPrice); if (tx) tx = Object.assign(tx, { gasPrice }); gas = gas.mul(await this.getGasLimit(tx, type)); if (this.chainId === ChainId.OPTIMISM) gas = gas.add(await this.fetchL1OptimismFee(tx));