1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-30 19:00:53 +00:00

EthereumAccountSummary: restore after rebase

This commit is contained in:
Szymon Lesisz 2018-11-26 15:57:37 +01:00
parent 45583ac477
commit 9d344920df

View File

@ -16,6 +16,7 @@ import Link from 'components/Link';
import { FONT_WEIGHT, FONT_SIZE } from 'config/variables';
import AccountBalance from '../../components/Balance';
import AddedToken from '../../components/Token';
import AddTokenMessage from '../../components/AddTokenMessage';
import type { Props } from './Container';
@ -74,11 +75,13 @@ const AccountSummary = (props: Props) => {
network,
tokens,
pending,
loader,
shouldRender,
} = props.selectedAccount;
// flow
if (!device || !account || !network || !shouldRender) return null;
const { type, title, message } = loader;
if (!device || !account || !network || !shouldRender) return <Content type={type} title={title} message={message} isLoading />;
const explorerLink: string = `${network.explorer.address}${account.address}`;
const pendingAmount: BigNumber = stateUtils.getPendingAmount(pending, network.symbol);
@ -143,6 +146,7 @@ const AccountSummary = (props: Props) => {
/>
</AsyncSelectWrapper>
<AddedTokensWrapper>
{ tokens.length < 1 && (<AddTokenMessage />) }
{tokens.map(token => (
<AddedToken
key={token.symbol}
@ -157,4 +161,4 @@ const AccountSummary = (props: Props) => {
);
};
export default AccountSummary;
export default AccountSummary;