From dd7fe9088a3827c6c0764bcf0569bcac45aae026 Mon Sep 17 00:00:00 2001 From: Samuel Hawksby-Robinson Date: Tue, 18 Feb 2020 16:40:38 +0000 Subject: [PATCH] Bug fix. If there is no currentNetwork then links will not work Viewing the application in a browser with no ethereum network causes the application to give erroneous links. --- src/views/Profile/FeedTile.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/Profile/FeedTile.jsx b/src/views/Profile/FeedTile.jsx index 03b868a7a..fe07ba88e 100644 --- a/src/views/Profile/FeedTile.jsx +++ b/src/views/Profile/FeedTile.jsx @@ -121,7 +121,7 @@ export const FeedTileInternal = (props) => { const isMain = currentNetwork && currentNetwork.toLowerCase() === 'main'; let txURL; - if (isMain) { + if (isMain || typeof currentNetwork === 'undefined') { txURL = `https://etherscan.io/tx/${item.hash}`; } else { txURL = `https://${currentNetwork}.etherscan.io/tx/${item.hash}`; @@ -235,7 +235,7 @@ export const FeedTileToken = (props) => { const isMain = currentNetwork && currentNetwork.toLowerCase() === 'main'; let txURL; - if (isMain) { + if (isMain || typeof currentNetwork === 'undefined') { txURL = `https://etherscan.io/tx/${item.hash}`; } else { txURL = `https://${currentNetwork}.etherscan.io/tx/${item.hash}`; @@ -340,7 +340,7 @@ export const FeedTileTXS = (props) => { const isMain = currentNetwork && currentNetwork.toLowerCase() === 'main'; let txURL; - if (isMain) { + if (isMain || typeof currentNetwork === 'undefined') { txURL = `https://etherscan.io/tx/${item.hash}`; } else { txURL = `https://${currentNetwork}.etherscan.io/tx/${item.hash}`;