From 342c34b07a8ed077350a184cc94d1193058299d3 Mon Sep 17 00:00:00 2001 From: Theo Date: Mon, 28 Aug 2023 03:44:25 -0700 Subject: [PATCH] Fix gas price estimation for V5 oracle: now, if bumpPercent not specified, using bumpPercent depending on tx type and chain ID & bump package version to 1.4.0 --- package.json | 2 +- src/feeOracle.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6606869..5472b92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tornado/tornado-oracles", - "version": "1.3.2", + "version": "1.4.0", "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 6e04d64..cc41cba 100644 --- a/src/feeOracle.ts +++ b/src/feeOracle.ts @@ -125,7 +125,7 @@ export abstract class TornadoFeeOracle implements ITornadoFeeOracle { async getGasPrice( type: TxType = 'other', speed: LegacyGasPriceKey = 'fast', - bumpPercent: number = 0, + bumpPercent?: number, ): Promise { const gasPriceParams = await this.getGasPriceParams(type, speed, bumpPercent); return calculateGasPriceInWei(gasPriceParams).toHexString();