Skip to content

Commit

Permalink
fix max gas price
Browse files Browse the repository at this point in the history
  • Loading branch information
pertsev committed Aug 4, 2020
1 parent 850cfb3 commit 2d478c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2d478c5

Please sign in to comment.