Tidy accounts loading (#4643)

This commit is contained in:
Jaco Greeff 2021-02-10 12:22:30 +01:00 committed by GitHub
parent 9b2439544a
commit 9b45ee59c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,10 +90,6 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen
}, [allAccounts, favorites]);
useEffect(() => {
if (api.query.democracy?.votingOf && !delegations?.length) {
return;
}
setSortedAccountsWithDelegation(
sortedAccounts?.map((account, index) => {
let delegation: Delegation | undefined;
@ -233,7 +229,7 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen
<BannerExtension />
<BannerClaims />
<Table
empty={(!hasAccounts || (!isLoading && sortedAccountsWithDelegation)) && t<string>("You don't have any accounts. Some features are currently hidden and will only become available once you have accounts.")}
empty={!isLoading && sortedAccountsWithDelegation && t<string>("You don't have any accounts. Some features are currently hidden and will only become available once you have accounts.")}
filter={filter}
footer={footer}
header={headerRef.current}