From bb4c113ade66ba995272ce34ba51dbf56e182bd3 Mon Sep 17 00:00:00 2001 From: Radu Mojic Date: Wed, 11 Aug 2021 19:17:33 +0300 Subject: [PATCH] fixed the address on refresh --- src/dapp/walletConnectProvider.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/dapp/walletConnectProvider.ts b/src/dapp/walletConnectProvider.ts index 516b9fb4..17915194 100644 --- a/src/dapp/walletConnectProvider.ts +++ b/src/dapp/walletConnectProvider.ts @@ -43,8 +43,15 @@ export class WalletConnectProvider implements IDappProvider { this.walletConnector.connected && this.walletConnector.accounts.length ) { - const [account] = this.walletConnector.accounts; - this.loginAccount(account); + const [account] = this.walletConnector.accounts; + if (account.includes(".")) { + const address = account.split("."); + if (address.length > 0) { + this.loginAccount(address[0], address[1]); + } + } else { + this.loginAccount(account); + } } return true;