From d6f97ec67c838e74034ceb349708cdd1e8f187da Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Mon, 21 Jun 2021 12:08:32 +0200 Subject: [PATCH] Fix error flow of SetName --- src/ens/SetName.svelte | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/ens/SetName.svelte b/src/ens/SetName.svelte index 0a7ebe01d..23c71ff9f 100644 --- a/src/ens/SetName.svelte +++ b/src/ens/SetName.svelte @@ -31,7 +31,7 @@ let domain = `${name}.${config.registrar.domain}`; let resolved = await config.provider.resolveName(domain); - if (isAddressEqual(resolved, org.address)) { + if (resolved && isAddressEqual(resolved, org.address)) { state = State.Signing; try { let tx = await org.setName(domain, config); @@ -66,25 +66,39 @@ +{:else if mismatchError} + +
+ 👻 +
+ +
+
+ The name {name}.{config.registrar.domain} does not + resolve to {formatAddress(org.address)}. Please update + The ENS record for {name}.{config.registrar.domain} to + point to the correct address and try again. +
+
+ +
+ + + +
+
{:else}
- {#if mismatchError} - 👻 - {:else} - 🖊️ - {/if} + 🖊️
- {#if mismatchError} -
- The name {name}.{config.registrar.domain} does not - resolve to {formatAddress(org.address)}. Please update - The ENS record for {name}.{config.registrar.domain} to - point to the correct address. -
- {:else if state == State.Signing} + {#if state == State.Signing} Please confirm the transaction in your wallet. {:else if state == State.Pending} Transaction is being processed by the network...