From 7099c4b32fd35452018909cc1c53e9ce2e5783ed Mon Sep 17 00:00:00 2001 From: feruz Date: Thu, 13 Feb 2020 08:43:12 +0200 Subject: [PATCH] remove estm auto increment counter --- .../walletHeader/view/walletHeaderView.js | 3 +-- src/containers/pointsContainer.js | 14 -------------- src/screens/wallet/screen/estmView.js | 2 -- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/components/walletHeader/view/walletHeaderView.js b/src/components/walletHeader/view/walletHeaderView.js index 064378706..8e110a7f3 100644 --- a/src/components/walletHeader/view/walletHeaderView.js +++ b/src/components/walletHeader/view/walletHeaderView.js @@ -22,7 +22,6 @@ const WalletHeaderView = ({ navigation, unclaimedBalance, userBalance, - counter, type = '', componentDidUpdate, showIconList, @@ -58,7 +57,7 @@ const WalletHeaderView = ({ const _getBalanceItem = (balance, options, _key) => balance !== undefined && ( - {_key === 'estm' ? counter : balance} + {balance} { if (isConnected) { _fetchUserPointActivities(username); @@ -66,16 +64,6 @@ const PointsContainer = ({ } }, [_fetchUserPointActivities, isConnected, navigation, username]); - useEffect(() => { - const interval = setInterval(() => { - setCounter(_counter => Math.round((_counter + 0.001) * 1000) / 1000); - }, 3600); - - return () => { - clearInterval(interval); - }; - }, []); - useEffect(() => { if (isConnected && activeBottomTab === ROUTES.TABBAR.WALLET && username) { _fetchUserPointActivities(username); @@ -147,7 +135,6 @@ const PointsContainer = ({ const _balance = Math.round(get(userPointsP, 'points') * 1000) / 1000; setUserPoints(userPointsP); setBalance(_balance); - setCounter(_balance); setEstimatedEstm(await getPointsEstimate(_balance, currency)); }) .catch(err => { @@ -248,7 +235,6 @@ const PointsContainer = ({ refreshing, userActivities, userPoints, - counter, estimatedEstm, redeemType: get(navigationParams, 'redeemType'), user, diff --git a/src/screens/wallet/screen/estmView.js b/src/screens/wallet/screen/estmView.js index dd6b98861..9407549eb 100644 --- a/src/screens/wallet/screen/estmView.js +++ b/src/screens/wallet/screen/estmView.js @@ -21,7 +21,6 @@ const EstmView = ({ handleOnSelected, index, currentIndex, refreshing: reload }) userPoints, estimatedEstm, dropdownOptions, - counter, }) => ( handleOnSelected(userActivities, isLoading, fetchUserActivity)} @@ -39,7 +38,6 @@ const EstmView = ({ handleOnSelected, index, currentIndex, refreshing: reload }) userBalance={[ { balance: get(userPoints, 'points'), nameKey: 'estm', options: dropdownOptions }, ]} - counter={counter} handleOnDropdownSelected={handleOnDropdownSelected} type="estm" currentIndex={currentIndex}