From 8e081a73010ab605efd43afaca6936ca287725a0 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Thu, 12 Aug 2021 10:18:00 +0200 Subject: [PATCH] Fix metamask re-connection --- src/App.svelte | 2 ++ src/components/Modal/ConnectWallet.svelte | 2 +- src/config.ts | 23 +++++++++++++++++++++-- src/session.ts | 21 ++++++++++++++------- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 19758aeea..fc4dc71e3 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -23,6 +23,8 @@ // from a previous session. if (cfg.walletConnect.client.connected) { await state.connectWalletConnect(cfg); + } else if (cfg.metamask.connected) { + await state.connectMetamask(cfg); } } return cfg; diff --git a/src/components/Modal/ConnectWallet.svelte b/src/components/Modal/ConnectWallet.svelte index 262075360..eab7fd2c7 100644 --- a/src/components/Modal/ConnectWallet.svelte +++ b/src/components/Modal/ConnectWallet.svelte @@ -68,7 +68,7 @@
-