diff options
Merge branch 'master' into SignTypedData
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/lib/pending-tx-tracker.js | 12 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/app/scripts/lib/pending-tx-tracker.js b/app/scripts/lib/pending-tx-tracker.js index 3d358b00e..6f1601586 100644 --- a/app/scripts/lib/pending-tx-tracker.js +++ b/app/scripts/lib/pending-tx-tracker.js @@ -86,12 +86,15 @@ module.exports = class PendingTransactionTracker extends EventEmitter { // other || errorMessage.includes('gateway timeout') || errorMessage.includes('nonce too low') - || txMeta.retryCount > 1 ) // ignore resubmit warnings, return early if (isKnownTx) return // encountered real error - transition to error state - this.emit('tx:failed', txMeta.id, err) + txMeta.warning = { + error: errorMessage, + message: 'There was an error when resubmitting this transaction.', + } + this.emit('tx:warning', txMeta, err) })) } @@ -133,11 +136,10 @@ module.exports = class PendingTransactionTracker extends EventEmitter { } } catch (err) { txMeta.warning = { - error: err, + error: err.message, message: 'There was a problem loading this transaction.', } - this.emit('tx:warning', txMeta) - throw err + this.emit('tx:warning', txMeta, err) } } diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index fcd74e499..8f773a72b 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -224,7 +224,6 @@ module.exports = class MetamaskController extends EventEmitter { eth_syncing: false, web3_clientVersion: `MetaMask/v${version}`, }, - originHttpHeaderKey: 'X-Metamask-Origin', // account mgmt getAccounts: (cb) => { const isUnlocked = this.keyringController.memStore.getState().isUnlocked |