From c29a87b57c668c24e9d42de6b26ac64409cf6e02 Mon Sep 17 00:00:00 2001 From: HiiiiD Date: Tue, 5 Mar 2024 18:48:30 +0100 Subject: [PATCH] fix: support NextJS --- packages/dapp-kit/src/constants/certificates.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/dapp-kit/src/constants/certificates.ts b/packages/dapp-kit/src/constants/certificates.ts index 7df6a26f..dd22ddae 100644 --- a/packages/dapp-kit/src/constants/certificates.ts +++ b/packages/dapp-kit/src/constants/certificates.ts @@ -2,7 +2,9 @@ const DEFAULT_CONNECT_CERT_MESSAGE: Connex.Vendor.CertMessage = { purpose: 'identification', payload: { type: 'text', - content: `The following dApp would like to see your public address: ${window.origin}`, + content: `The following dApp would like to see your public address: ${ + typeof window !== 'undefined' ? window.origin : '' + }`, }, };