mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
remove dropped handler
This commit is contained in:
parent
a3822b4680
commit
72591d4f41
@ -165,7 +165,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
this.txController.on('newUnapprovedTx', opts.showUnapprovedTx.bind(opts))
|
this.txController.on('newUnapprovedTx', opts.showUnapprovedTx.bind(opts))
|
||||||
|
|
||||||
this.txController.on(`tx:status-update`, (txId, status) => {
|
this.txController.on(`tx:status-update`, (txId, status) => {
|
||||||
if (status === 'confirmed' || status === 'failed' || status === 'dropped') {
|
if (status === 'confirmed' || status === 'failed') {
|
||||||
const txMeta = this.txController.txStateManager.getTx(txId)
|
const txMeta = this.txController.txStateManager.getTx(txId)
|
||||||
this.platform.showTransactionNotification(txMeta)
|
this.platform.showTransactionNotification(txMeta)
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,6 @@ class ExtensionPlatform {
|
|||||||
this._showConfirmedTransaction(txMeta)
|
this._showConfirmedTransaction(txMeta)
|
||||||
} else if (status === 'failed') {
|
} else if (status === 'failed') {
|
||||||
this._showFailedTransaction(txMeta)
|
this._showFailedTransaction(txMeta)
|
||||||
} else if (status === 'dropped') {
|
|
||||||
this._showDroppedTransaction(txMeta)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,14 +63,6 @@ class ExtensionPlatform {
|
|||||||
this._showNotification(title, message)
|
this._showNotification(title, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
_showDroppedTransaction (txMeta) {
|
|
||||||
|
|
||||||
const nonce = parseInt(txMeta.txParams.nonce, 16)
|
|
||||||
const title = 'Dropped transaction'
|
|
||||||
const message = `Transaction ${nonce} was dropped, because another transaction with that number was successfully processed.`
|
|
||||||
this._showNotification(title, message)
|
|
||||||
}
|
|
||||||
|
|
||||||
_showNotification (title, message, url) {
|
_showNotification (title, message, url) {
|
||||||
extension.notifications.create(
|
extension.notifications.create(
|
||||||
url,
|
url,
|
||||||
|
Loading…
Reference in New Issue
Block a user