diff --git a/packages/nextjs/contexts/AuthContext.tsx b/packages/nextjs/contexts/AuthContext.tsx index 03c44cb..5fdd785 100644 --- a/packages/nextjs/contexts/AuthContext.tsx +++ b/packages/nextjs/contexts/AuthContext.tsx @@ -32,9 +32,13 @@ export default function AuthContextProvider({ children }: { children: React.Reac if (!address) return; (async () => { - const signature = await signMessageAsync(); - const userKeyPair = new Keypair(new PrivKey(signature)); - setKeyPair(userKeyPair); + try { + const signature = await signMessageAsync(); + const userKeyPair = new Keypair(new PrivKey(signature)); + setKeyPair(userKeyPair); + } catch (err) { + console.error(err); + } })(); }, [address, signMessageAsync]);