Added loader for all accounts views

pull/287/head
Vladimir Volek 6 years ago committed by Szymon Lesisz
parent ff93fc01c8
commit c33cfa52da

@ -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;
};

@ -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}>

@ -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>

@ -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>

Loading…
Cancel
Save