aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-05-27 05:59:05 +0800
committerDan Finlay <dan@danfinlay.com>2016-05-27 05:59:05 +0800
commit5001547386deff98b0b96a3d2a45c0d7ec822362 (patch)
tree5082d9a0580c89d1e21252ec1b61cc7531b84a03
parent4d468d806479ae1a4b50b6cfceecb4df066280c0 (diff)
downloadtangerine-wallet-browser-5001547386deff98b0b96a3d2a45c0d7ec822362.tar
tangerine-wallet-browser-5001547386deff98b0b96a3d2a45c0d7ec822362.tar.gz
tangerine-wallet-browser-5001547386deff98b0b96a3d2a45c0d7ec822362.tar.bz2
tangerine-wallet-browser-5001547386deff98b0b96a3d2a45c0d7ec822362.tar.lz
tangerine-wallet-browser-5001547386deff98b0b96a3d2a45c0d7ec822362.tar.xz
tangerine-wallet-browser-5001547386deff98b0b96a3d2a45c0d7ec822362.tar.zst
tangerine-wallet-browser-5001547386deff98b0b96a3d2a45c0d7ec822362.zip
Remove etherscan links from non standard blockchains
-rw-r--r--ui/app/components/transaction-list-item.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js
index 22f0ce1e3..beff93272 100644
--- a/ui/app/components/transaction-list-item.js
+++ b/ui/app/components/transaction-list-item.js
@@ -23,6 +23,13 @@ TransactionListItem.prototype.render = function() {
var date = formatDate(transaction.time)
+ let isLinkable = false
+ try {
+ const numericNet = parseInt(network)
+ isLinkable = numericNet === 1 || numericNet === 2
+ }
+ catch() {}
+
var isMsg = ('msgParams' in transaction)
var isTx = ('txParams' in transaction)
var isPending = transaction.status === 'unconfirmed'
@@ -34,7 +41,7 @@ TransactionListItem.prototype.render = function() {
txParams = transaction.msgParams
}
- const isClickable = ('hash' in transaction) || isPending
+ const isClickable = ('hash' in transaction && isLinkable) || isPending
return (
h(`.transaction-list-item.flex-row.flex-space-between${isClickable ? '.pointer' : ''}`, {
@@ -44,7 +51,7 @@ TransactionListItem.prototype.render = function() {
this.props.showTx(transaction.id)
}
- if (!transaction.hash) return
+ if (!transaction.hash || !isLinkable) return
var url = explorerLink(transaction.hash, parseInt(network))
chrome.tabs.create({ url })
},