diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-07-07 13:34:54 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-07-07 14:10:04 +0800 |
commit | 99556684096ed788ef01c909ff4cb4b0e61d3a05 (patch) | |
tree | a8831d6a5195e527dbf20b7047a4bd83a3364783 /app/scripts/controllers/transactions.js | |
parent | 11b744bb87b4858dd2ef982c7d27e9751d8a09a1 (diff) | |
download | tangerine-wallet-browser-99556684096ed788ef01c909ff4cb4b0e61d3a05.tar tangerine-wallet-browser-99556684096ed788ef01c909ff4cb4b0e61d3a05.tar.gz tangerine-wallet-browser-99556684096ed788ef01c909ff4cb4b0e61d3a05.tar.bz2 tangerine-wallet-browser-99556684096ed788ef01c909ff4cb4b0e61d3a05.tar.lz tangerine-wallet-browser-99556684096ed788ef01c909ff4cb4b0e61d3a05.tar.xz tangerine-wallet-browser-99556684096ed788ef01c909ff4cb4b0e61d3a05.tar.zst tangerine-wallet-browser-99556684096ed788ef01c909ff4cb4b0e61d3a05.zip |
add comment
Diffstat (limited to 'app/scripts/controllers/transactions.js')
-rw-r--r-- | app/scripts/controllers/transactions.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 8d3445c6f..14de786b7 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -241,11 +241,17 @@ module.exports = class TransactionController extends EventEmitter { this.txProviderUtils.publishTransaction(rawTx, (err, txHash) => { if (err) { - const errorMessage = err.message.toLowerCase() - if (errorMessage !== 'replacement transaction underpriced' - && errorMessage !== 'gas price too low to replace' - && !errorMessage.startsWith('known transaction') - ) { + const errorMessage = err.message.toLowerCase() + /* + Dont marked as failed if the error is because + it's a "known" transaction + "there is already a transaction with the same sender-nonce + but higher/same gas price" + */ + + if (errorMessage !== 'replacement transaction underpriced' // geth + && errorMessage !== 'gas price too low to replace' // parity + && !errorMessage.startsWith('known transaction')) { // geth this.setTxStatusFailed(txId) } return cb(err) |