diff --git a/src/Address.svelte b/src/Address.svelte index b9f8e31f2..411f9fad9 100644 --- a/src/Address.svelte +++ b/src/Address.svelte @@ -2,8 +2,7 @@ import { onMount } from 'svelte'; import { link } from 'svelte-routing'; import { ethers } from 'ethers'; - import { explorerLink, safeLink } from '@app/utils'; - import Blockies from '@app/Blockies.svelte'; + import { safeLink } from '@app/utils'; import Loading from '@app/Loading.svelte'; import type { Config } from '@app/config'; import { identifyAddress, formatAddress, AddressType } from '@app/utils'; @@ -17,14 +16,16 @@ let checksumAddress = compact ? formatAddress(address) : ethers.utils.getAddress(address); + let loading: boolean = true; let addressType: AddressType | null = null; let addressName: string | null = null; - onMount(() => { - identifyAddress(address, config).then(typ => addressType = typ); + onMount(async () => { if (resolve) { - config.provider.lookupAddress(address).then(name => addressName = name); + addressName = await config.provider.lookupAddress(address); } + addressType = await identifyAddress(address, config); + loading = false; }); $: addressLabel = addressName || checksumAddress; @@ -38,14 +39,6 @@ .address.no-badge .badge { display: none; } - .icon { - display: inline-block; - width: 1rem; - height: 1rem; - margin-right: 0.5rem; - min-width: 1rem; - min-height: 1rem; - } .address a { color: var(--color-foreground-90); } @@ -58,8 +51,10 @@ } -