on master help sign in
Merge pull request #498 from urbit/m/know-more

tx: catch more "tx known" errors

commitd93d23e02405017f976ad48559af7501e98d6126 authorFang <git@fang.io> dateTue 21 Jul 2020, 16:55 (6 years ago) parentd48ead3f66d501
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');