mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-06 06:10:55 +00:00
Added loader for all accounts views
This commit is contained in:
parent
8030aa71b1
commit
90c0dd1276
@ -110,13 +110,6 @@ const getAccountStatus = (state: State, selectedAccount: SelectedAccountState):
|
|||||||
shouldRender: false,
|
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
|
// 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;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ const AccountReceive = (props: Props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Content>
|
<Content isLoading={!discovery.completed}>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<H2>Receive Ethereum or tokens</H2>
|
<H2>Receive Ethereum or tokens</H2>
|
||||||
<AddressWrapper isShowingQrCode={addressVerified || addressUnverified}>
|
<AddressWrapper isShowingQrCode={addressVerified || addressUnverified}>
|
||||||
|
@ -248,7 +248,7 @@ const AccountSend = (props: Props) => {
|
|||||||
const isAdvancedSettingsHidden = !advanced;
|
const isAdvancedSettingsHidden = !advanced;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Content>
|
<Content isLoading={!discovery.completed}>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<H2>Send Ethereum or tokens</H2>
|
<H2>Send Ethereum or tokens</H2>
|
||||||
<InputRow>
|
<InputRow>
|
||||||
|
@ -73,6 +73,7 @@ const AccountSummary = (props: Props) => {
|
|||||||
account,
|
account,
|
||||||
network,
|
network,
|
||||||
tokens,
|
tokens,
|
||||||
|
discovery,
|
||||||
pending,
|
pending,
|
||||||
shouldRender,
|
shouldRender,
|
||||||
} = props.selectedAccount;
|
} = props.selectedAccount;
|
||||||
@ -85,7 +86,7 @@ const AccountSummary = (props: Props) => {
|
|||||||
const balance: string = new BigNumber(account.balance).minus(pendingAmount).toString(10);
|
const balance: string = new BigNumber(account.balance).minus(pendingAmount).toString(10);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Content>
|
<Content isLoading={!discovery.completed}>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<AccountHeading>
|
<AccountHeading>
|
||||||
<AccountName>
|
<AccountName>
|
||||||
|
Loading…
Reference in New Issue
Block a user