Skip to content

Commit 970d100

Browse files
committed
fix: skip disconnecting if connector disconnection is in progress
1 parent a0ca4e9 commit 970d100

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/no-modal/src/noModal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ export class Web3AuthNoModal extends SafeEventEmitter<Web3AuthNoModalEvents> imp
437437

438438
async logout(options: { cleanup: boolean } = { cleanup: false }): Promise<void> {
439439
if (!CONNECTED_STATUSES.includes(this.status) || !this.connectedConnector) throw WalletLoginError.notConnectedError(`No wallet is connected`);
440+
if (this.connectedConnector.status === CONNECTOR_STATUS.DISCONNECTING) return;
440441
await this.connectedConnector.disconnect(options);
441442
}
442443

0 commit comments

Comments
 (0)