Add visible debug toast showing pubkey returned by Amber after login

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
shakespeare.diy 2026-07-09 13:50:28 +07:00
parent 1c577f7392
commit fc1c8aca26

View file

@ -60,6 +60,12 @@ export const LoginDialog: React.FC<LoginDialogProps> = ({ isOpen, onClose, onLog
try {
// This opens Amber natively, user approves, pubkey comes back as a Promise
const pubkey = await getAmberPublicKeyViaPlugin();
// DEBUG: show pubkey on screen so we can verify it's correct
toast({
title: '🔑 DEBUG: Amber returned',
description: `hex: ${pubkey.slice(0, 16)}... (${pubkey.length} chars)`,
duration: 10000,
});
completeAmberLogin(pubkey);
} catch (e: unknown) {
const msg = (e as Error)?.message ?? 'Amber login failed';