From 44909ef1882532bef0bc4b2af4c6e5fb62063e7a Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 25 Dec 2019 22:29:38 +0300 Subject: [PATCH] fix replacement bug --- config.js | 2 +- src/relayController.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 2f1a68d..98c5b7d 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,7 @@ require('dotenv').config() module.exports = { - version: '1.1', + version: '1.2', netId: Number(process.env.NET_ID) || 42, redisUrl: process.env.REDIS_URL, rpcUrl: process.env.RPC_URL || 'https://kovan.infura.io/', diff --git a/src/relayController.js b/src/relayController.js index fe89857..7b10728 100644 --- a/src/relayController.js +++ b/src/relayController.js @@ -153,7 +153,8 @@ async function sendTx(tx, done, retryAttempt = 1) { console.log('error', e.message) if(e.message === 'Returned error: Transaction gas price supplied is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce.' || e.message === 'Returned error: Transaction nonce is too low. Try incrementing the nonce.' - || e.message === 'Returned error: nonce too low') { + || e.message === 'Returned error: nonce too low' + || e.message === 'Returned error: replacement transaction underpriced') { console.log('nonce too low, retrying') if(retryAttempt <= 10) { retryAttempt++