Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { account, currency, device, ...props } = this.props
const cur = account ? account.currency : currency
const Icon = cur ? getCryptoCurrencyIcon(cur) : null
return (
{'Connect your'}
{'Ledger device'}
{'to your computer and enter your'}
{'PIN code'}
{' on your device'}
),
render() {
const { account, currency, ...props } = this.props
const cur = account ? account.currency : currency
const Icon = cur ? getCryptoCurrencyIcon(cur) : null
return (
{'Connect and unlock your '}
{'Ledger device'}
),
icon: usbIcon,
run: this.connectInteractionHandler,
},
{
id: 'address',
render() {
const { currency, size, inactive, theme } = this.props
const color = inactive ? theme.colors.palette.text.shade60 : getCurrencyColor(currency)
if (currency.type === 'FiatCurrency') {
return null
}
if (currency.type === 'TokenCurrency') {
return (
{currency.ticker[0]}
)
}
const IconCurrency = getCryptoCurrencyIcon(currency)
return IconCurrency ? : null
}
}
{currencies.map((c, i) => {
const maybeCrypto = inferCrypto(c);
if (maybeCrypto) {
const Icon = getCryptoCurrencyIcon(maybeCrypto);
return (
<menuitem value="{i}">
{Icon ? (
<span style="{{">
</span>
) : null}
{c.name} ({c.ticker})
</menuitem>
);
} else {
return (
<menuitem value="{i}">
{c.name} ({c.ticker})
</menuitem>
);
render() {
const { crypto } = this.props;
const Icon = getCryptoCurrencyIcon(crypto);
const validationErrors = [
Icon ? null : "icon is missing",
crypto.family === "bitcoin" && !crypto.bitcoinLikeInfo
? "bitcoin family coins must provide bitcoinLikeInfo"
: null,
crypto.family === "ethereum" && !crypto.ethereumLikeInfo
? "ethereum family coins must provide ethereumLikeInfo"
: null,
crypto.units.length === 0
? "at least one unit must be provided in units"
: null
].filter(o => o);
return (
{validationErrors.length ? (
KO
{currencies.map(cur => {
const Icon = getCryptoCurrencyIcon(cur)
return (
{cur.id}
{cur.name}
{cur.color ? (
<div style="{{">
<div>{cur.color}</div>
</div>
const CoinPreview = ({ coin }: { coin: CryptoCurrency }) => {
const text = coin.managerAppName;
const Icon = getCryptoCurrencyIcon(coin);
return (
{Icon ? : {coin.ticker}}
{text}
);
};
render() {
const { account, push, isActive } = this.props
const accountURL = `/account/${account.id}`
const item = {
label: account.name,
desc: () => (
),
iconActiveColor: account.currency.color,
icon: getCryptoCurrencyIcon(account.currency),
onClick: () => push(accountURL),
isActive,
}
return
}
}
export function CurrencyCircleIcon({
currency,
size,
showSpinner,
showCheckmark,
...props
}: {
currency: CryptoCurrency | TokenCurrency,
size: number,
showSpinner?: boolean,
showCheckmark?: boolean,
}) {
if (currency.type === 'TokenCurrency') {
return
}
const Icon = getCryptoCurrencyIcon(currency)
return (
{Icon && }
{showCheckmark && (
<div>
</div>
)}
{showSpinner && }
)
render() {
const { currency } = this.props;
const Icon = getCryptoCurrencyIcon(currency);
const info = getCurrencyExplorer(currency);
return (
{Icon ? : {currency.ticker}}
{info.version} {info.id}
{this.state.times.map(({ time, error }, i) => (
))}