aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/etherscan_icon.tsx
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-01-09 08:35:12 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-01-09 08:35:12 +0800
commit734cf5819aee5d46719d1ca387666bfda6e475bd (patch)
tree264785cb0666e011b49842b47ac4b2408dddaa28 /packages/website/ts/components/ui/etherscan_icon.tsx
parent9f3acf8e2888b6105062e47664ecd5adaaf3c889 (diff)
parent35e0b6143ab1405259471e1c9c698bfcd869df5a (diff)
downloaddexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.gz
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.bz2
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.lz
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.xz
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.tar.zst
dexon-sol-tools-734cf5819aee5d46719d1ca387666bfda6e475bd.zip
Merge branch 'development' into fix/mutatedInput
* development: Changes to abi-gen after code review Added constructor ABIs to abi-gen Describe #295 in a CHANGELOG Add #302 description to changelog Fix formatting Apply prettier config Install prettier Remove formatting esilnt rules sendTransactionAsync should return txHash string Added Event generation to abi-gen Publish Add dates to CHANGELOG entries Update subproviders CHANGELOG Support both personal_sign and eth_sign Fix Ledger tests given change from `personal_sign` to `eth_sign` Update subprovider to catch correct RPC method Rename guide Update contribution guide Fix broken links in the abi-gen README Fix typing generation for arrays in which types separated by |s
Diffstat (limited to 'packages/website/ts/components/ui/etherscan_icon.tsx')
-rw-r--r--packages/website/ts/components/ui/etherscan_icon.tsx35
1 files changed, 13 insertions, 22 deletions
diff --git a/packages/website/ts/components/ui/etherscan_icon.tsx b/packages/website/ts/components/ui/etherscan_icon.tsx
index 111d5d478..3b17bd0fa 100644
--- a/packages/website/ts/components/ui/etherscan_icon.tsx
+++ b/packages/website/ts/components/ui/etherscan_icon.tsx
@@ -1,9 +1,9 @@
import * as _ from 'lodash';
import * as React from 'react';
import ReactTooltip = require('react-tooltip');
-import {EtherscanLinkSuffixes} from 'ts/types';
-import {colors} from 'ts/utils/colors';
-import {utils} from 'ts/utils/utils';
+import { EtherscanLinkSuffixes } from 'ts/types';
+import { colors } from 'ts/utils/colors';
+import { utils } from 'ts/utils/utils';
interface EtherScanIconProps {
addressOrTxHash: string;
@@ -13,38 +13,29 @@ interface EtherScanIconProps {
export const EtherScanIcon = (props: EtherScanIconProps) => {
const etherscanLinkIfExists = utils.getEtherScanLinkIfExists(
- props.addressOrTxHash, props.networkId, EtherscanLinkSuffixes.Address,
+ props.addressOrTxHash,
+ props.networkId,
+ EtherscanLinkSuffixes.Address,
);
const transactionTooltipId = `${props.addressOrTxHash}-etherscan-icon-tooltip`;
return (
<div className="inline">
- {!_.isUndefined(etherscanLinkIfExists) ?
- <a
- href={etherscanLinkIfExists}
- target="_blank"
- >
+ {!_.isUndefined(etherscanLinkIfExists) ? (
+ <a href={etherscanLinkIfExists} target="_blank">
{renderIcon()}
- </a> :
- <div
- className="inline"
- data-tip={true}
- data-for={transactionTooltipId}
- >
+ </a>
+ ) : (
+ <div className="inline" data-tip={true} data-for={transactionTooltipId}>
{renderIcon()}
<ReactTooltip id={transactionTooltipId}>
Your network (id: {props.networkId}) is not supported by Etherscan
</ReactTooltip>
</div>
- }
+ )}
</div>
);
};
function renderIcon() {
- return (
- <i
- style={{color: colors.amber600}}
- className="zmdi zmdi-open-in-new"
- />
- );
+ return <i style={{ color: colors.amber600 }} className="zmdi zmdi-open-in-new" />;
}