From b6dc52c0ab83c2f20c402cb5ee103261f4ae3299 Mon Sep 17 00:00:00 2001 From: EnzoVezzaro Date: Mon, 14 Feb 2022 16:22:50 +0100 Subject: [PATCH] change undefined with 0 as value to fix new Decimal error (#1089) * change undefined with 0 as value to fix new Decimal error * correction for fix changed undefined value with 0 as value to fix new Decimal error --- src/@context/Pool/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@context/Pool/index.tsx b/src/@context/Pool/index.tsx index 4557730f2..db1c9adf0 100644 --- a/src/@context/Pool/index.tsx +++ b/src/@context/Pool/index.tsx @@ -197,7 +197,7 @@ function PoolProvider({ children }: { children: ReactNode }): ReactElement { // Staking bot receives half the pool shares so for display purposes // we can multiply by 2 as we have a hardcoded 50/50 pool weight. - const userPoolShares = new Decimal(poolInfoUser.poolShares) + const userPoolShares = new Decimal(poolInfoUser.poolShares || 0) .mul(2) .toString()