From 7727656d34571c72e27dc1e1aed12b6ec1bcb8da Mon Sep 17 00:00:00 2001 From: Yash Goyal Date: Sat, 27 Apr 2024 21:15:29 +0530 Subject: [PATCH] updated the keypair generation mechanism to use user signatures instead of storing the keys in the localstorage --- packages/nextjs/contexts/AuthContext.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/contexts/AuthContext.tsx b/packages/nextjs/contexts/AuthContext.tsx index 354ad44..5a104f0 100644 --- a/packages/nextjs/contexts/AuthContext.tsx +++ b/packages/nextjs/contexts/AuthContext.tsx @@ -29,13 +29,13 @@ export default function AuthContextProvider({ children }: { children: React.Reac }, []); useEffect(() => { - if (!address) { + if (!address || !signMessage) { setKeyPair(null); return; } signMessage(); - }, [address]); + }, [address, signMessage]); useEffect(() => { if (!signature) return;