From a8006c2aa6bc2f345a4a2718bc2de2a3ff24261f Mon Sep 17 00:00:00 2001 From: p2arthur Date: Tue, 13 Jan 2026 14:24:53 -0800 Subject: [PATCH] feat: add unified login ux/ui --- .../src/components/ConnectWallet.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/projects/TokenizeRWATemplate-frontend/src/components/ConnectWallet.tsx b/projects/TokenizeRWATemplate-frontend/src/components/ConnectWallet.tsx index 02ebdc8..c405ccd 100644 --- a/projects/TokenizeRWATemplate-frontend/src/components/ConnectWallet.tsx +++ b/projects/TokenizeRWATemplate-frontend/src/components/ConnectWallet.tsx @@ -9,7 +9,6 @@ interface ConnectWalletInterface { } const ConnectWallet = ({ openModal, closeModal }: ConnectWalletInterface) => { - // Destructure the new clean methods from your unified hook const { isConnected, walletType, userInfo, traditionalWallets, connectGoogle, connectFacebook, connectGithub, disconnect } = useUnifiedWallet() @@ -19,12 +18,10 @@ const ConnectWallet = ({ openModal, closeModal }: ConnectWalletInterface) => { const handleSocialLogin = async (provider: SocialLoginProvider, connectFn: () => Promise) => { try { setConnectingProvider(provider) - await connectFn() // Bypasses the Web3Auth modal + await connectFn() closeModal() } catch (error) { - console.error(`${provider} login failed`, error) - } finally { - setConnectingProvider(null) + throw new Error(`Failed to connect with ${provider}: ${error}`) } }