From 42420a52efbc6b5badb6f893aba5688ac5548bb6 Mon Sep 17 00:00:00 2001 From: Enes Date: Thu, 6 Jun 2024 17:16:49 +0300 Subject: [PATCH] refactor: disable disconnected call for siwe if not connected (#2364) --- packages/scaffold/src/modal/w3m-modal/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/scaffold/src/modal/w3m-modal/index.ts b/packages/scaffold/src/modal/w3m-modal/index.ts index 7f2b349a7a..ae164190fa 100644 --- a/packages/scaffold/src/modal/w3m-modal/index.ts +++ b/packages/scaffold/src/modal/w3m-modal/index.ts @@ -88,7 +88,7 @@ export class W3mModal extends LitElement { if (this.isSiweEnabled) { const { SIWEController } = await import('@web3modal/siwe') - if (SIWEController.state.status !== 'success') { + if (SIWEController.state.status !== 'success' && this.connected) { await ConnectionController.disconnect() } }