Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
import { DivWindowContent } from '../../assets/theme/shared/styledComponents/DivWindowContent.styles';
import TokenBalance from './TokenBalance';
import withTokens from '../../utils/withTokens';
// Show empty token placeholder if tokens have not been loaded yet
const shownArray = tokensArray.length ? tokensArray : [{}];
<DivWindowContent>
<div className='box -scroller'>
<ul className='list -padded'>
{shownArray.map((
token,
index // With empty tokens, the token.address is not defined, so we prefix with index
) => (
<li key={`${index}-${token.address}`}>
<TokenBalance token={token} />
</li>
))}
</ul>
</div>
</DivWindowContent>