handle bump gas price error

This commit is contained in:
poma 2021-02-17 08:40:14 +03:00
parent af65d78be9
commit 8d4bab7fc2
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657

@ -300,8 +300,11 @@ class Transaction {
console.log( console.log(
`Gas price ${formatUnits(this.tx.gasPrice, 'gwei')} gwei is too low, increasing and retrying`, `Gas price ${formatUnits(this.tx.gasPrice, 'gwei')} gwei is too low, increasing and retrying`,
) )
this._increaseGasPrice() if (this._increaseGasPrice()) {
return this._send() return this._send()
} else {
throw new Error('Already at max gas price, but still not enough to submit the transaction')
}
} }
if (this._hasError(message, sameTxErrors)) { if (this._hasError(message, sameTxErrors)) {