diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-04-20 09:21:28 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-04-20 09:21:28 +0800 |
commit | f79601ee58a07ec6275d4588845578795f550d84 (patch) | |
tree | 5ce3e35ec1cb6b97ae94c2de1d80bd39dbe3fa42 /ui/lib | |
parent | b8c57433ce0f6a50318671912b02082e12a0ecb0 (diff) | |
download | tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.gz tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.bz2 tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.lz tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.xz tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.zst tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.zip |
Generate explorer link to match current blockchain
Diffstat (limited to 'ui/lib')
-rw-r--r-- | ui/lib/explorer-link.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/lib/explorer-link.js b/ui/lib/explorer-link.js new file mode 100644 index 000000000..a2e7872f9 --- /dev/null +++ b/ui/lib/explorer-link.js @@ -0,0 +1,12 @@ +module.exports = function(hash, network) { + let prefix + switch (network) { + case 1: // main net + prefix = '' + case 2: // morden test net + prefix = 'testnet.' + default: + prefix = '' + } + return `http://${prefix}etherscan.io/tx/${hash}` +} |