From 780df01b43f8471508aa7aa544ccc77dd5d82c1d Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 25 Nov 2020 22:36:51 +0100 Subject: [PATCH] _handleSendError fix --- package.json | 2 +- src/Transaction.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b2dcfa5..7fd0cf9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tx-manager", - "version": "0.2.7", + "version": "0.2.8", "description": "", "main": "index.js", "scripts": { diff --git a/src/Transaction.js b/src/Transaction.js index 77793e7..b955c23 100644 --- a/src/Transaction.js +++ b/src/Transaction.js @@ -268,8 +268,8 @@ class Transaction { } _handleSendError(e) { - if (e.code === 'SERVER_ERROR' && e.error) { - const message = e.error.message + if (e.error && e.error.code === 'SERVER_ERROR') { + const message = e.error.error.message // nonce is too low, trying to increase and resubmit if (this._hasError(message, nonceErrors)) {