@@ -165,11 +165,16 @@ const sendSignedTransaction = (web3, stx, doubtNonceError, confirmationCb) => {
165 // that it's because the tank already submitted our transaction.
165 // that it's because the tank already submitted our transaction.
166 // we just wait for first confirmation here.
166 // we just wait for first confirmation here.
167 console.error(err);
167 console.error(err);
168− if (
168+ const isKnownError = (err.message || '').includes(
169− doubtNonceError &&
169+ 'known transaction: '
171+ const isNonceError = (err.message || '').includes(
170− (err.message || '').includes("the tx doesn't have the correct nonce.")
172+ "the tx doesn't have the correct nonce."
174+ if (isKnownError || (doubtNonceError && isNonceError)) {
172− console.log('nonce error, likely from gas tank submission, ignoring');
176+ 'tx send error likely from gas tank submission, ignoring'
173 const txHash = web3.utils.keccak256(rawTx);
178 const txHash = web3.utils.keccak256(rawTx);
174 //TODO can we do does-exists check first?
179 //TODO can we do does-exists check first?
175 //TODO max wait time before assume fail?
180 //TODO max wait time before assume fail?
@@ -182,7 +187,7 @@ const sendSignedTransaction = (web3, stx, doubtNonceError, confirmationCb) => {
185− reject(err.message);
190+ reject(err.message || 'Transaction sending failed!');