on master help sign in
tx: catch more "tx known" errors
commitf66d5012c282b0960e66611567f9896496db9cc4 authorFang <git@fang.io> dateFri 17 Jul 2020, 20:43 (6 years ago) parent404f794
1 file changed+3−1
src/lib/txn.js+3−1
src/lib/txn.js+3−1
@@ -120,7 +120,9 @@ const sendSignedTransaction = (web3, stx, doubtNonceError) => {
120120 // that it's because the tank already submitted our transaction.
121121 // we just wait for first confirmation here.
122122 const message = typeof err === 'string' ? err : err.message || '';
123− const isKnownError = message.includes('known transaction: ');
123+ const isKnownError =
124+ message.includes('known transaction') ||
125+ message.includes('already known');
124126 const isNonceError =
125127 message.includes("the tx doesn't have the correct nonce.") ||
126128 message.includes('nonce too low');