mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 21:01:31 +03:00
remove estm auto increment counter
This commit is contained in:
parent
d098027ef7
commit
7099c4b32f
@ -22,7 +22,6 @@ const WalletHeaderView = ({
|
|||||||
navigation,
|
navigation,
|
||||||
unclaimedBalance,
|
unclaimedBalance,
|
||||||
userBalance,
|
userBalance,
|
||||||
counter,
|
|
||||||
type = '',
|
type = '',
|
||||||
componentDidUpdate,
|
componentDidUpdate,
|
||||||
showIconList,
|
showIconList,
|
||||||
@ -58,7 +57,7 @@ const WalletHeaderView = ({
|
|||||||
const _getBalanceItem = (balance, options, _key) =>
|
const _getBalanceItem = (balance, options, _key) =>
|
||||||
balance !== undefined && (
|
balance !== undefined && (
|
||||||
<View style={styles.balanceWrapper} key={balance + _key}>
|
<View style={styles.balanceWrapper} key={balance + _key}>
|
||||||
<Text style={styles.balanceText}>{_key === 'estm' ? counter : balance}</Text>
|
<Text style={styles.balanceText}>{balance}</Text>
|
||||||
<DropdownButton
|
<DropdownButton
|
||||||
dropdownRowWrapper={styles.dropdownRowStyle}
|
dropdownRowWrapper={styles.dropdownRowStyle}
|
||||||
dropdownRef={dropdownRef}
|
dropdownRef={dropdownRef}
|
||||||
|
@ -52,8 +52,6 @@ const PointsContainer = ({
|
|||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
const [counter, setCounter] = useState(0);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isConnected) {
|
if (isConnected) {
|
||||||
_fetchUserPointActivities(username);
|
_fetchUserPointActivities(username);
|
||||||
@ -66,16 +64,6 @@ const PointsContainer = ({
|
|||||||
}
|
}
|
||||||
}, [_fetchUserPointActivities, isConnected, navigation, username]);
|
}, [_fetchUserPointActivities, isConnected, navigation, username]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const interval = setInterval(() => {
|
|
||||||
setCounter(_counter => Math.round((_counter + 0.001) * 1000) / 1000);
|
|
||||||
}, 3600);
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
clearInterval(interval);
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isConnected && activeBottomTab === ROUTES.TABBAR.WALLET && username) {
|
if (isConnected && activeBottomTab === ROUTES.TABBAR.WALLET && username) {
|
||||||
_fetchUserPointActivities(username);
|
_fetchUserPointActivities(username);
|
||||||
@ -147,7 +135,6 @@ const PointsContainer = ({
|
|||||||
const _balance = Math.round(get(userPointsP, 'points') * 1000) / 1000;
|
const _balance = Math.round(get(userPointsP, 'points') * 1000) / 1000;
|
||||||
setUserPoints(userPointsP);
|
setUserPoints(userPointsP);
|
||||||
setBalance(_balance);
|
setBalance(_balance);
|
||||||
setCounter(_balance);
|
|
||||||
setEstimatedEstm(await getPointsEstimate(_balance, currency));
|
setEstimatedEstm(await getPointsEstimate(_balance, currency));
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
@ -248,7 +235,6 @@ const PointsContainer = ({
|
|||||||
refreshing,
|
refreshing,
|
||||||
userActivities,
|
userActivities,
|
||||||
userPoints,
|
userPoints,
|
||||||
counter,
|
|
||||||
estimatedEstm,
|
estimatedEstm,
|
||||||
redeemType: get(navigationParams, 'redeemType'),
|
redeemType: get(navigationParams, 'redeemType'),
|
||||||
user,
|
user,
|
||||||
|
@ -21,7 +21,6 @@ const EstmView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
|||||||
userPoints,
|
userPoints,
|
||||||
estimatedEstm,
|
estimatedEstm,
|
||||||
dropdownOptions,
|
dropdownOptions,
|
||||||
counter,
|
|
||||||
}) => (
|
}) => (
|
||||||
<WalletHeader
|
<WalletHeader
|
||||||
componentDidUpdate={() => handleOnSelected(userActivities, isLoading, fetchUserActivity)}
|
componentDidUpdate={() => handleOnSelected(userActivities, isLoading, fetchUserActivity)}
|
||||||
@ -39,7 +38,6 @@ const EstmView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
|||||||
userBalance={[
|
userBalance={[
|
||||||
{ balance: get(userPoints, 'points'), nameKey: 'estm', options: dropdownOptions },
|
{ balance: get(userPoints, 'points'), nameKey: 'estm', options: dropdownOptions },
|
||||||
]}
|
]}
|
||||||
counter={counter}
|
|
||||||
handleOnDropdownSelected={handleOnDropdownSelected}
|
handleOnDropdownSelected={handleOnDropdownSelected}
|
||||||
type="estm"
|
type="estm"
|
||||||
currentIndex={currentIndex}
|
currentIndex={currentIndex}
|
||||||
|
Loading…
Reference in New Issue
Block a user