Skip to content

Commit a4fc76d

Browse files
logging
1 parent 35965f6 commit a4fc76d

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

examples/passport/logged-in-user-with-nextjs/src/app/link-external-wallet/page.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)