import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Party } from 'ts/components/ui/party'; import { Token, TokenByAddress } from 'ts/types'; import { utils } from 'ts/utils/utils'; interface TrackTokenConfirmationProps { tokens: Token[]; tokenByAddress: TokenByAddress; networkId: number; isAddingTokenToTracked: boolean; } interface TrackTokenConfirmationState {} export class TrackTokenConfirmation extends React.Component { public render() { const isMultipleTokens = this.props.tokens.length > 1; const allTokens = _.values(this.props.tokenByAddress); return (
{this.props.isAddingTokenToTracked ? (
Adding token{isMultipleTokens && 's'}...
) : (
You do not currently track the following token{isMultipleTokens && 's'}:
{_.map(this.props.tokens, (token: Token) => (
))}
Tracking a token adds it to the balances section of 0x Portal and allows you to generate/fill orders involving the token {isMultipleTokens && 's'}. Would you like to start tracking{' '} {isMultipleTokens ? 'these' : 'this'} token?
)}
); } }