Skip to content

Commit

Permalink
no account before api connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut committed Sep 12, 2023
1 parent e4d1387 commit 7def31e
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions packages/ui/src/pages/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,26 @@ const Home = ({ className }: HomeProps) => {
)
}

if (isExtensionError && watchedAddresses.length === 0 && !isAccountLoading)
return (
<CenterStyled>
<h3 data-cy="text-no-account-found">
No account found. Please connect at least one in a wallet extension. More info at{' '}
<Linkstyled
href="https://wiki.polkadot.network/docs/wallets"
target="_blank"
rel="noreferrer"
>
wiki.polkadot.network
<LaunchIcon
className="launchIcon"
size={20}
/>
</Linkstyled>
</h3>
</CenterStyled>
)

if (!api || isAccountLoading) {
return (
<Box
Expand All @@ -95,26 +115,6 @@ const Home = ({ className }: HomeProps) => {
)
}

if (isExtensionError && watchedAddresses.length === 0)
return (
<CenterStyled>
<h3 data-cy="text-no-account-found">
No account found. Please connect at least one in a wallet extension. More info at{' '}
<Linkstyled
href="https://wiki.polkadot.network/docs/wallets"
target="_blank"
rel="noreferrer"
>
wiki.polkadot.network
<LaunchIcon
className="launchIcon"
size={20}
/>
</Linkstyled>
</h3>
</CenterStyled>
)

if (isLoading) {
return (
<MessageWrapper>
Expand Down

0 comments on commit 7def31e

Please sign in to comment.