diff --git a/app/scripts/controllers/blacklist.js b/app/scripts/controllers/blacklist.js index 89c7cc888..88de61a7f 100644 --- a/app/scripts/controllers/blacklist.js +++ b/app/scripts/controllers/blacklist.js @@ -96,7 +96,9 @@ class BlacklistController { * */ scheduleUpdates () { - if (this._phishingUpdateIntervalRef) return + if (this._phishingUpdateIntervalRef) { + clearInterval(this._phishingUpdateIntervalRef) + } this.updatePhishingList().catch(log.warn) this._phishingUpdateIntervalRef = setInterval(() => { this.updatePhishingList().catch(log.warn) diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js index 3bbdfa4bc..a77da7daa 100644 --- a/app/scripts/platforms/extension.js +++ b/app/scripts/platforms/extension.js @@ -109,22 +109,23 @@ class ExtensionPlatform { }) } - _subscribeToNotificationClicked () { - if (!extension.notifications.onClicked.hasListener(this._viewOnEtherScan)) { - extension.notifications.onClicked.addListener(this._viewOnEtherScan) + _subscribeToNotificationClicked = () => { + if (!extension.notifications.onClicked.hasListener(this._viewOnExplorer)) { + extension.notifications.onClicked.addListener((url) => this._viewOnExplorer(url)) } } - _viewOnEtherScan (txId) { - if (txId.startsWith('http://') || txId.startsWith('https://')) { - global.metamaskController.platform.openWindow({ url: txId }) + _viewOnExplorer (url) { + if (url.startsWith('http://') || url.startsWith('https://')) { + extension.notifications.onClicked.removeListener(this._viewOnExplorer) + global.metamaskController.platform.openWindow({ url }) } } _getExplorer (hash, networkId) { let explorerName - if (networkId === 99 || networkId === 77) { - explorerName = 'POA explorer' + if (networkId === 99 || networkId === 100 || networkId === 77) { + explorerName = 'BlockScout' } else { explorerName = 'Etherscan' } diff --git a/old-ui/app/components/menu-droppo.js b/old-ui/app/components/menu-droppo.js index ca07badf3..4efc79281 100644 --- a/old-ui/app/components/menu-droppo.js +++ b/old-ui/app/components/menu-droppo.js @@ -80,24 +80,24 @@ MenuDroppoComponent.prototype.componentDidMount = function () { this.container = container } + this.transitionStarted = this.transitionstartOccured.bind(this) + /* * transitionstart event is not supported in Chrome yet. But it works for Firefox 53+. * We need to handle this event only for FF because for Chrome we've hidden scrolls. */ - this.refs.menuDroppoContainer.addEventListener('transitionstart', () => { - this.refs.menuDroppoContainer.style.overflow = 'hidden' - }) + this.refs.menuDroppoContainer.addEventListener('transitionstart', this.transitionStarted) - this.refs.menuDroppoContainer.addEventListener('transitionend', () => { - if (!this.props.constOverflow) { - this.refs.menuDroppoContainer.style.overflow = 'auto' - } - }) + this.transitionEnded = this.transitionendOccured.bind(this) + + this.refs.menuDroppoContainer.addEventListener('transitionend', this.transitionEnded) } MenuDroppoComponent.prototype.componentWillUnmount = function () { if (this && document.body) { document.body.removeEventListener('click', this.globalClickHandler) + document.body.removeEventListener('transitionstart', this.transitionStarted) + document.body.removeEventListener('transitionend', this.transitionEnded) } } @@ -113,6 +113,16 @@ MenuDroppoComponent.prototype.globalClickOccurred = function (event) { } } +MenuDroppoComponent.prototype.transitionstartOccured = function (event) { + this.refs.menuDroppoContainer.style.overflow = 'hidden' +} + +MenuDroppoComponent.prototype.transitionendOccured = function (event) { + if (!this.props.constOverflow) { + this.refs.menuDroppoContainer.style.overflow = 'auto' + } +} + function isDescendant (parent, child) { var node = child.parentNode while (node !== null) { diff --git a/old-ui/app/components/transaction-list-item.js b/old-ui/app/components/transaction-list-item.js index e6a088763..dd681e072 100644 --- a/old-ui/app/components/transaction-list-item.js +++ b/old-ui/app/components/transaction-list-item.js @@ -65,7 +65,7 @@ TransactionListItem.prototype.render = function () { let isLinkable = false const numericNet = parseInt(network) - isLinkable = numericNet === 1 || numericNet === 3 || numericNet === 4 || numericNet === 42 || numericNet === 77 || numericNet === 99 + isLinkable = numericNet === 1 || numericNet === 3 || numericNet === 4 || numericNet === 42 || numericNet === 77 || numericNet === 99 || numericNet === 100 var isMsg = ('msgParams' in transaction) var isTx = ('txParams' in transaction)