@@ -146,6 +146,8 @@ export default function LinkExternalWallet() {
146146 }
147147 }
148148
149+ console . log ( 'dataToSign' , dataToSign ) ;
150+
149151 if ( typeof window === 'undefined' || ! window . ethereum ) {
150152 throw new Error ( 'MetaMask not installed' ) ;
151153 }
@@ -156,6 +158,8 @@ export default function LinkExternalWallet() {
156158 params : [ formattedExternalWalletAddress , JSON . stringify ( dataToSign ) ]
157159 } ) ;
158160
161+ console . log ( 'signature' , signature ) ;
162+
159163 // Import and use our signature validation function
160164 const { validateSignatureComprehensive } = await import ( '../utils/validateEIP712Signature' ) ;
161165
@@ -166,13 +170,19 @@ export default function LinkExternalWallet() {
166170 window . ethereum // pass the provider for contract wallet validation if needed
167171 ) ;
168172
173+ console . log ( 'isValid' , isValid ) ;
174+
169175 if ( ! isValid ) {
170176 throw new Error ( 'Invalid signature' ) ;
171177 }
172178
173179 setLinkingStatus ( 'Linking wallet...' ) ;
174-
175180
181+ console . log ( 'linkExternalWallet type:' , "External" ) ;
182+ console . log ( 'linkExternalWallet walletAddress:' , formattedExternalWalletAddress ) ;
183+ console . log ( 'linkExternalWallet signature:' , signature ) ;
184+ console . log ( 'linkExternalWallet nonce:' , nonce ) ;
185+
176186 // Call the linkExternalWallet method to link the wallet
177187 const result = await passportInstance . linkExternalWallet ( {
178188 type : "External" ,
0 commit comments