From fd3600f68e33638c963dab0430acce095a0f2136 Mon Sep 17 00:00:00 2001 From: Henry Han Date: Fri, 29 Nov 2024 08:36:19 +0800 Subject: [PATCH] Default to 0 if user has nothing bridged --- apps/rewards-dashboard/src/layouts/DashboardLayout.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/rewards-dashboard/src/layouts/DashboardLayout.tsx b/apps/rewards-dashboard/src/layouts/DashboardLayout.tsx index a701656d1..c9b356504 100644 --- a/apps/rewards-dashboard/src/layouts/DashboardLayout.tsx +++ b/apps/rewards-dashboard/src/layouts/DashboardLayout.tsx @@ -84,10 +84,11 @@ const ConnectedDashboard = () => { if (!userInfo) { return; } - setTotalUSDSBridged(userInfo.bridged_usds); // TODO: Change to effective_bridged_usds after going live - setUSDSBalance(userInfo.effective_usds_balance); - setKaminoHeld(userInfo.net_usds_supply_in_kamino); - setAccruedRewards(userInfo.accrued_rewards); + console.log(userInfo); + setTotalUSDSBridged(userInfo.bridged_usds || 0); // TODO: Change to effective_bridged_usds after going live + setUSDSBalance(userInfo.effective_usds_balance || 0); + setKaminoHeld(userInfo.net_usds_supply_in_kamino || 0); + setAccruedRewards(userInfo.accrued_rewards || 0); }, [userInfo]); useEffect(() => { if (!overview) {