mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-28 01:52:56 +03:00
remove estm auto increment counter
This commit is contained in:
parent
8d3bc5f9c5
commit
59cbe2341b
@ -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 && (
|
||||
<View style={styles.balanceWrapper} key={balance + _key}>
|
||||
<Text style={styles.balanceText}>{_key === 'estm' ? counter : balance}</Text>
|
||||
<Text style={styles.balanceText}>{balance}</Text>
|
||||
<DropdownButton
|
||||
dropdownRowWrapper={styles.dropdownRowStyle}
|
||||
dropdownRef={dropdownRef}
|
||||
|
@ -52,8 +52,6 @@ const PointsContainer = ({
|
||||
const intl = useIntl();
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const [counter, setCounter] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
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,
|
||||
|
@ -21,7 +21,6 @@ const EstmView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
userPoints,
|
||||
estimatedEstm,
|
||||
dropdownOptions,
|
||||
counter,
|
||||
}) => (
|
||||
<WalletHeader
|
||||
componentDidUpdate={() => 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}
|
||||
|
Loading…
Reference in New Issue
Block a user