add MAX_GAS_PRICE
This commit is contained in:
parent
bc0b369095
commit
221dce3d73
@ -129,7 +129,9 @@ class Transaction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this.tx.gasPrice) {
|
if (!this.tx.gasPrice) {
|
||||||
this.tx.gasPrice = await this._getGasPrice('fast')
|
const fastGasPrice = BigNumber.from(await this._getGasPrice('fast'))
|
||||||
|
const maxGasPrice = parseUnits(this.config.MAX_GAS_PRICE.toString(), 'gwei')
|
||||||
|
this.tx.gasPrice = min(fastGasPrice, maxGasPrice).toHexString()
|
||||||
}
|
}
|
||||||
if (!this.manager._nonce) {
|
if (!this.manager._nonce) {
|
||||||
this.manager._nonce = await this._getLastNonce()
|
this.manager._nonce = await this._getLastNonce()
|
||||||
|
Loading…
Reference in New Issue
Block a user