1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-13 20:08:56 +00:00

Added loader for all accounts views

This commit is contained in:
Vladimir Volek 2018-10-31 12:55:29 +01:00
parent 8030aa71b1
commit 90c0dd1276
4 changed files with 4 additions and 19 deletions

View File

@ -110,13 +110,6 @@ const getAccountStatus = (state: State, selectedAccount: SelectedAccountState):
shouldRender: false,
};
}
// case 6: discovery is not completed yet
return {
type: 'info',
title: 'Loading accounts...',
shouldRender: false,
};
}
// Additional status: account does exists and it's visible but shouldn't be active
@ -136,15 +129,6 @@ const getAccountStatus = (state: State, selectedAccount: SelectedAccountState):
};
}
// Additional status: account does exists, but waiting for discovery to complete
if (discovery && !discovery.completed) {
return {
type: 'info',
title: 'Loading accounts...',
shouldRender: true,
};
}
return null;
};

View File

@ -111,7 +111,7 @@ const AccountReceive = (props: Props) => {
}
return (
<Content>
<Content isLoading={!discovery.completed}>
<React.Fragment>
<H2>Receive Ethereum or tokens</H2>
<AddressWrapper isShowingQrCode={addressVerified || addressUnverified}>

View File

@ -248,7 +248,7 @@ const AccountSend = (props: Props) => {
const isAdvancedSettingsHidden = !advanced;
return (
<Content>
<Content isLoading={!discovery.completed}>
<React.Fragment>
<H2>Send Ethereum or tokens</H2>
<InputRow>

View File

@ -73,6 +73,7 @@ const AccountSummary = (props: Props) => {
account,
network,
tokens,
discovery,
pending,
shouldRender,
} = props.selectedAccount;
@ -85,7 +86,7 @@ const AccountSummary = (props: Props) => {
const balance: string = new BigNumber(account.balance).minus(pendingAmount).toString(10);
return (
<Content>
<Content isLoading={!discovery.completed}>
<React.Fragment>
<AccountHeading>
<AccountName>