on master help sign in
Merge pull request #428 from urbit/lf/handle-string-errors

handle web3 throwing strings when sending tx

commitea494b6b8d46749bc7cedd8dfa6261912e46ec91 authorFang <git@fang.io> dateWed 25 Mar 2020, 00:54 (7 years ago) parentb7567cffab5bd2
1 file changed+1−1
src/lib/txn.js+1−1
src/lib/txn.js+1−1
@@ -127,7 +127,7 @@ const sendSignedTransaction = (web3, stx, doubtNonceError) => {
127127 // if there's a nonce error, but we used the gas tank, it's likely
128128 // that it's because the tank already submitted our transaction.
129129 // we just wait for first confirmation here.
130− const message = err.message || '';
130+ const message = typeof err === 'string' ? err : err.message || '';
131131 const isKnownError = message.includes('known transaction: ');
132132 const isNonceError =
133133 message.includes("the tx doesn't have the correct nonce.") ||