From 239370f5b810148cbba82b8fd15cd844a2aab600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 29 Apr 2024 17:42:59 +0200 Subject: [PATCH] fix(ethers): avoid 0x0 prefix on non-zero eth_gasPrice values --- src/lib/ethers/wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ethers/wrapper.ts b/src/lib/ethers/wrapper.ts index 2ca70cd..2761348 100644 --- a/src/lib/ethers/wrapper.ts +++ b/src/lib/ethers/wrapper.ts @@ -385,7 +385,7 @@ class WalletWrapper { _params: TransactionParams ): Promise { if (this.ethGasPriceFactor) { - return (await this.getGasPrice()).toHexString() + return "0x" + (await this.getGasPrice()).toNumber().toString(16) } else { const gp: BigNumber = BigNumber.from(await this.provider.getGasPrice()) console.log(`0x${gp.toNumber().toString(16)}`)