diff --git a/packages/scaffold/src/client.ts b/packages/scaffold/src/client.ts index 3dd28bdf2f..756bf6180a 100644 --- a/packages/scaffold/src/client.ts +++ b/packages/scaffold/src/client.ts @@ -246,7 +246,7 @@ export class Web3ModalScaffold { ConnectionController.setClient(options.connectionControllerClient) if (options.siweControllerClient) { - const { SIWEController } = await import('@web3modal/siwe') + const { SIWEController } = await import('@web3modal/siwe').catch() SIWEController.setSIWEClient(options.siweControllerClient) } diff --git a/packages/scaffold/src/modal/w3m-modal/index.ts b/packages/scaffold/src/modal/w3m-modal/index.ts index 29f3c63c5c..59c880a9f5 100644 --- a/packages/scaffold/src/modal/w3m-modal/index.ts +++ b/packages/scaffold/src/modal/w3m-modal/index.ts @@ -74,7 +74,7 @@ export class W3mModal extends LitElement { private async handleClose() { if (this.isSiweEnabled) { - const { SIWEController } = await import('@web3modal/siwe') + const { SIWEController } = await import('@web3modal/siwe').catch() if (SIWEController.state.status !== 'success') { await ConnectionController.disconnect() @@ -164,7 +164,7 @@ export class W3mModal extends LitElement { const { isConnected, caipAddress: newCaipAddress } = newState if (this.isSiweEnabled) { - const { SIWEController } = await import('@web3modal/siwe') + const { SIWEController } = await import('@web3modal/siwe').catch() if (isConnected && !this.caipAddress) { this.caipAddress = newCaipAddress diff --git a/packages/scaffold/src/partials/w3m-header/index.ts b/packages/scaffold/src/partials/w3m-header/index.ts index cf87636f74..13f2786dd7 100644 --- a/packages/scaffold/src/partials/w3m-header/index.ts +++ b/packages/scaffold/src/partials/w3m-header/index.ts @@ -114,7 +114,7 @@ export class W3mHeader extends LitElement { private async onClose() { if (OptionsController.state.isSiweEnabled) { - const { SIWEController } = await import('@web3modal/siwe') + const { SIWEController } = await import('@web3modal/siwe').catch() if (SIWEController.state.status !== 'success') { await ConnectionController.disconnect() }