Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
780df01b43 | ||
|
|
c5e4d76dc5 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tx-manager",
|
"name": "tx-manager",
|
||||||
"version": "0.2.6",
|
"version": "0.2.8",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ const BigNumber = ethers.BigNumber
|
|||||||
const PromiEvent = require('web3-core-promievent')
|
const PromiEvent = require('web3-core-promievent')
|
||||||
const { sleep, min, max } = require('./utils')
|
const { sleep, min, max } = require('./utils')
|
||||||
|
|
||||||
// prettier-ignore
|
|
||||||
const nonceErrors = [
|
const nonceErrors = [
|
||||||
'Transaction nonce is too low. Try incrementing the nonce.',
|
'Transaction nonce is too low. Try incrementing the nonce.',
|
||||||
'nonce too low'
|
'nonce too low',
|
||||||
|
'nonce has already been used',
|
||||||
]
|
]
|
||||||
|
|
||||||
const gasPriceErrors = [
|
const gasPriceErrors = [
|
||||||
@@ -268,11 +268,8 @@ class Transaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_handleSendError(e) {
|
_handleSendError(e) {
|
||||||
console.log('Got error', e)
|
if (e.error && e.error.code === 'SERVER_ERROR') {
|
||||||
|
const message = e.error.error.message
|
||||||
if (e.code === 'SERVER_ERROR' && e.error) {
|
|
||||||
const message = e.error.message
|
|
||||||
console.log('Error', e.error.code, e.error.message)
|
|
||||||
|
|
||||||
// nonce is too low, trying to increase and resubmit
|
// nonce is too low, trying to increase and resubmit
|
||||||
if (this._hasError(message, nonceErrors)) {
|
if (this._hasError(message, nonceErrors)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user