From 08ee457ae2d96ba94f58ee7f075f07242dcdc84a Mon Sep 17 00:00:00 2001 From: Antoine Codogno Date: Thu, 5 Oct 2023 00:27:52 +0200 Subject: [PATCH] fix: null check data --- libs/oeth/history/src/components/APYContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/oeth/history/src/components/APYContainer.tsx b/libs/oeth/history/src/components/APYContainer.tsx index aa2eb355c..8e8b3655c 100644 --- a/libs/oeth/history/src/components/APYContainer.tsx +++ b/libs/oeth/history/src/components/APYContainer.tsx @@ -58,7 +58,7 @@ export function APYContainer() { defaultMessage: 'Lifetime Earnings (OETH)', })} value={intl.formatNumber( - +formatEther(BigInt(data.earned ?? '0')), + +formatEther(BigInt(data?.earned ?? '0')), balanceFormat, )} isLoading={isConnected && isLoading}