From 9072fe95bbd58a82176ce5ef02ecfa71423b2639 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Fri, 13 May 2022 13:10:32 +0200 Subject: [PATCH] Revert sign-in state when error Signed-off-by: Alexis Sellier --- src/SiweConnect.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SiweConnect.svelte b/src/SiweConnect.svelte index 300f488e4..ec88be002 100644 --- a/src/SiweConnect.svelte +++ b/src/SiweConnect.svelte @@ -23,7 +23,11 @@ disabled={connection === Connection.Connecting} on:click={async () => { connection = Connection.Connecting; - await signInWithEthereum(seed, config); + try { + await signInWithEthereum(seed, config); + } catch { + connection = Connection.Disconnected; + } }} > {#if connection === Connection.Connecting}