mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
add comment
This commit is contained in:
parent
11b744bb87
commit
9955668409
@ -242,10 +242,16 @@ module.exports = class TransactionController extends EventEmitter {
|
|||||||
this.txProviderUtils.publishTransaction(rawTx, (err, txHash) => {
|
this.txProviderUtils.publishTransaction(rawTx, (err, txHash) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
const errorMessage = err.message.toLowerCase()
|
const errorMessage = err.message.toLowerCase()
|
||||||
if (errorMessage !== 'replacement transaction underpriced'
|
/*
|
||||||
&& errorMessage !== 'gas price too low to replace'
|
Dont marked as failed if the error is because
|
||||||
&& !errorMessage.startsWith('known transaction')
|
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)
|
this.setTxStatusFailed(txId)
|
||||||
}
|
}
|
||||||
return cb(err)
|
return cb(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user