From 2d478c51085c91208bd52e7633904a3f247fffda Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 4 Aug 2020 10:41:23 +0300 Subject: [PATCH] fix max gas price --- src/sender.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sender.js b/src/sender.js index 12a24ef..f4dacdc 100644 --- a/src/sender.js +++ b/src/sender.js @@ -19,7 +19,7 @@ class Sender { tx = JSON.parse(tx) if (Date.now() - tx.date > this.pendingTxTimeout) { const newGasPrice = toBN(tx.gasPrice).mul(toBN(this.gasBumpPercentage)).div(toBN(100)) - const maxGasPrice = toBN(toWei(config.maxGasPrice.toString())) + const maxGasPrice = toBN(toWei(config.maxGasPrice.toString(), 'Gwei')) tx.gasPrice = toHex(BN.min(newGasPrice, maxGasPrice)) tx.date = Date.now() await redisClient.set('tx:' + tx.nonce, JSON.stringify(tx))