From 9e255ba38b26ff96cd40070c4387dc6c7606b09e Mon Sep 17 00:00:00 2001 From: MajicGit <95971895+MajicGit@users.noreply.github.com> Date: Thu, 4 Apr 2024 17:26:08 +0200 Subject: [PATCH] Fix for issue 125, unable to reconnect to bridge --- frontend/src/store/modules/accounts.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/store/modules/accounts.ts b/frontend/src/store/modules/accounts.ts index 7093ff63..3ebfa943 100644 --- a/frontend/src/store/modules/accounts.ts +++ b/frontend/src/store/modules/accounts.ts @@ -337,9 +337,10 @@ class AccountsModule extends VuexModule { } const previouslyConnected = localStorage.getItem('onboard.js:last_connected_wallet') - const wallets = previouslyConnected - ? await this.onboard.connectWallet({ autoSelect: previouslyConnected[0] }) - : await this.onboard.connectWallet() + const wallets = + previouslyConnected && typeof previouslyConnected != 'string' + ? await this.onboard.connectWallet({ autoSelect: previouslyConnected[0] }) + : await this.onboard.connectWallet() // check if the user is connected to a supported network const chainId = wallets[0].chains[0].id if (!new Networks().getSupportedNetworks().find((network) => network.chainId === chainId)) {