From ca9bae0ac059c4d45f5976ff30b2fec234b902ab Mon Sep 17 00:00:00 2001 From: Hau Nguyen Van Date: Mon, 5 Feb 2024 17:21:14 +0700 Subject: [PATCH] hotfix sentry error --- src/index.tsx | 2 +- src/pages/Pools/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index de8df6122..299a7622f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -29,7 +29,7 @@ if (process.env.REACT_APP_SENTRY_ENVIRONMENT === 'production') { /^chrome-extension:\/\//i, /^moz-extension:\/\//i ], - ignoreErrors: ['Request rejected', 'Failed to fetch', 'Load failed'], + ignoreErrors: ['Request rejected', 'Failed to fetch', 'Load failed', 'User rejected the request'], // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production diff --git a/src/pages/Pools/index.tsx b/src/pages/Pools/index.tsx index a46142556..e0a3ca7c9 100644 --- a/src/pages/Pools/index.tsx +++ b/src/pages/Pools/index.tsx @@ -70,7 +70,7 @@ const Pools: React.FC<{}> = () => { const poolTableData: PoolTableData[] = filteredPools .map((pool) => { const { liquidityAddr: stakingToken, totalSupply, totalLiquidity, firstAssetInfo, secondAssetInfo } = pool; - const poolReward = cachedReward.find((item) => item.liquidity_token === stakingToken); + const poolReward = cachedReward?.find((item) => item.liquidity_token === stakingToken); // calculate my stake in usdt, we calculate by bond_amount from contract and totalLiquidity from backend. const myStakedLP = stakingToken