diff --git a/src/hooks/usePoolLists.ts b/src/hooks/usePoolLists.ts index 787bcc8..11fe053 100644 --- a/src/hooks/usePoolLists.ts +++ b/src/hooks/usePoolLists.ts @@ -62,7 +62,7 @@ current: boolean): BigNumber => { .div(new BigNumber(10).pow(decimals2)) .multipliedBy(tokenPrices[token2]); - return dv1.plus(dv2); + return dv1.plus(dv2).toString()=="NaN"? new BigNumber(0) :dv1.plus(dv2); }; const calculateVolumeChange = (pool: PoolListItem, tokenPrices: TokenPrices): number => { @@ -104,7 +104,7 @@ const calculateUserLiquidity = ( .multipliedBy(tokenPrices[token2]); const res = v1.plus(v2); - return res.gt(0) ? res.toFormat(2) : undefined; + return res.gt(0) ? res.toFormat(2) : "0"; }; const getUserPoolList = (queryType: PoolQueryType, limit: number, offset: number, search: string, signerAddress: string): PoolQueryObject => ({