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