Always show an address while loading

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2021-09-21 18:06:03 +02:00
parent 6725fad90f
commit ff1a2fc87a
+1 -7
View File
@@ -4,7 +4,6 @@
import { ethers } from 'ethers';
import { safeLink, explorerLink, identifyAddress, formatAddress, AddressType, parseEnsLabel } from '@app/utils';
import { Profile, ProfileType } from '@app/profile';
import Loading from '@app/Loading.svelte';
import Avatar from "@app/Avatar.svelte";
import type { Config } from '@app/config';
@@ -46,9 +45,6 @@
.address a:hover {
color: var(--color-foreground);
}
.loading {
height: 1.5rem;
}
</style>
<div class="address" title={address} class:no-badge={noBadge}>
@@ -66,9 +62,7 @@
<span class="badge">contract</span>
{:else if addressType === AddressType.EOA}
<a href={`/users/${address}`}>{addressLabel}</a>
{:else if profile?.name} <!-- While we're waiting to find out what address type it is -->
{:else} <!-- While we're waiting to find out what address type it is -->
<a href={explorerLink(address, config)} target="_blank">{addressLabel}</a>
{:else}
<div class="loading"><Loading small /></div>
{/if}
</div>