From 14a00a3f6ccc50151a9330189e642b4d5d765399 Mon Sep 17 00:00:00 2001 From: Isacco Date: Tue, 3 Oct 2023 12:06:54 +0200 Subject: [PATCH] fix: broken state internal hang --- packages/beacon-dapp/src/dapp-client/DAppClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/beacon-dapp/src/dapp-client/DAppClient.ts b/packages/beacon-dapp/src/dapp-client/DAppClient.ts index 1bdcc62c5..8da5492be 100644 --- a/packages/beacon-dapp/src/dapp-client/DAppClient.ts +++ b/packages/beacon-dapp/src/dapp-client/DAppClient.ts @@ -610,7 +610,7 @@ export class DAppClient extends Client { * @param account The account that will be set as the active account */ public async setActiveAccount(account?: AccountInfo): Promise { - if (account && (await this.isInvalidState(account))) { + if (account && this._activeAccount.isSettled() && (await this.isInvalidState(account))) { setTimeout(() => this.events.emit(BeaconEvent.HIDE_UI), 1000) this.destroy() this.setActiveAccount(undefined)