mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 10:52:16 +03:00
wallet improvements
This commit is contained in:
parent
8b1d77ddfb
commit
1f13e0b6d8
@ -9,7 +9,7 @@ import { MainButton } from '../../mainButton';
|
||||
import { CollapsibleCard } from '../../collapsibleCard';
|
||||
import { WalletDetails } from '../../walletDetails';
|
||||
import { WalletDetailsPlaceHolder } from '../../basicUIElements';
|
||||
import { ThemeContainer, SteemWalletContainer } from '../../../containers';
|
||||
import { ThemeContainer, WalletContainer } from '../../../containers';
|
||||
|
||||
// Styles
|
||||
import styles from './walletStyles';
|
||||
@ -32,7 +32,7 @@ const WalletView = ({ setEstimatedWalletValue, selectedUser, handleOnScroll }) =
|
||||
);
|
||||
|
||||
return (
|
||||
<SteemWalletContainer
|
||||
<WalletContainer
|
||||
setEstimatedWalletValue={setEstimatedWalletValue}
|
||||
selectedUser={selectedUser}
|
||||
handleOnScroll={handleOnScroll}
|
||||
@ -115,7 +115,7 @@ const WalletView = ({ setEstimatedWalletValue, selectedUser, handleOnScroll }) =
|
||||
)}
|
||||
</ThemeContainer>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@ export default {
|
||||
nameKey: 'wallet.delegation',
|
||||
descriptionKey: 'wallet.delegation_desc',
|
||||
iconType: 'MaterialCommunityIcons',
|
||||
point: 5,
|
||||
point: 10,
|
||||
},
|
||||
100: {
|
||||
icon: 'pencil-outline',
|
||||
@ -77,7 +77,7 @@ export default {
|
||||
nameKey: 'wallet.login',
|
||||
descriptionKey: 'wallet.login_desc',
|
||||
iconType: 'MaterialIcons',
|
||||
point: 100,
|
||||
point: 10,
|
||||
},
|
||||
30: {
|
||||
icon: 'check-all',
|
||||
|
@ -6,7 +6,7 @@ import ProfileContainer from './profileContainer';
|
||||
import ProfileEditContainer from './profileEditContainer';
|
||||
import RedeemContainer from './redeemContainer';
|
||||
import SpinGameContainer from './spinGameContainer';
|
||||
import SteemWalletContainer from './steemWalletContainer';
|
||||
import WalletContainer from './walletContainer';
|
||||
import ThemeContainer from './themeContainer';
|
||||
import TransferContainer from './transferContainer';
|
||||
|
||||
@ -19,7 +19,7 @@ export {
|
||||
ProfileEditContainer,
|
||||
RedeemContainer,
|
||||
SpinGameContainer,
|
||||
SteemWalletContainer,
|
||||
WalletContainer,
|
||||
ThemeContainer,
|
||||
TransferContainer,
|
||||
};
|
||||
|
@ -23,6 +23,7 @@ import { getUser } from '../providers/ecency/ePoint';
|
||||
|
||||
// Utils
|
||||
import { countDecimals } from '../utils/number';
|
||||
import bugsnag from '../config/bugsnag';
|
||||
|
||||
/*
|
||||
* Props Name Description Value
|
||||
@ -195,7 +196,8 @@ class TransferContainer extends Component {
|
||||
})
|
||||
.catch((err) => {
|
||||
navigation.goBack();
|
||||
dispatch(toastNotification(err.message));
|
||||
bugsnag.notify(err);
|
||||
dispatch(toastNotification(intl.formatMessage({ id: 'alert.key_warning' })));
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -21,12 +21,12 @@ import { getEstimatedAmount } from '../utils/vote';
|
||||
// Constants
|
||||
import ROUTES from '../constants/routeNames';
|
||||
|
||||
const STEEM_DROPDOWN = ['purchase_estm', 'transfer_token', 'transfer_to_saving', 'powerUp'];
|
||||
const HIVE_DROPDOWN = ['purchase_estm', 'transfer_token', 'transfer_to_saving', 'powerUp'];
|
||||
const BTC_DROPDOWN = ['transfer_token'];
|
||||
const SBD_DROPDOWN = ['purchase_estm', 'transfer_token', 'transfer_to_saving', 'convert'];
|
||||
const SAVING_STEEM_DROPDOWN = ['withdraw_steem'];
|
||||
const SAVING_SBD_DROPDOWN = ['withdraw_sbd'];
|
||||
const STEEM_POWER_DROPDOWN = ['delegate', 'power_down'];
|
||||
const HBD_DROPDOWN = ['purchase_estm', 'transfer_token', 'transfer_to_saving', 'convert'];
|
||||
const SAVING_HIVE_DROPDOWN = ['withdraw_steem'];
|
||||
const SAVING_HBD_DROPDOWN = ['withdraw_sbd'];
|
||||
const HIVE_POWER_DROPDOWN = ['delegate', 'power_down'];
|
||||
|
||||
const WalletContainer = ({
|
||||
children,
|
||||
@ -302,12 +302,12 @@ const WalletContainer = ({
|
||||
estimatedSpValue,
|
||||
delegationsAmount,
|
||||
navigate: _navigate,
|
||||
steemDropdown: STEEM_DROPDOWN,
|
||||
sbdDropdown: SBD_DROPDOWN,
|
||||
steemDropdown: HIVE_DROPDOWN,
|
||||
sbdDropdown: HBD_DROPDOWN,
|
||||
btcDropdown: BTC_DROPDOWN,
|
||||
savingSteemDropdown: SAVING_STEEM_DROPDOWN,
|
||||
savingSbdDropdown: SAVING_SBD_DROPDOWN,
|
||||
steemPowerDropdown: STEEM_POWER_DROPDOWN,
|
||||
savingSteemDropdown: SAVING_HIVE_DROPDOWN,
|
||||
savingSbdDropdown: SAVING_HBD_DROPDOWN,
|
||||
steemPowerDropdown: HIVE_POWER_DROPDOWN,
|
||||
unclaimedBalance: unclaimedBalance && unclaimedBalance.trim(),
|
||||
estimatedAmount,
|
||||
})
|
@ -150,7 +150,7 @@ class ApplicationScreen extends Component {
|
||||
{isShowToastNotification && (
|
||||
<ToastNotification
|
||||
text={toastNotification}
|
||||
duration={3000}
|
||||
duration={4000}
|
||||
onHide={this._handleOnHideToastNotification}
|
||||
/>
|
||||
)}
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import { WalletHeader, FormattedCurrency } from '../../../components';
|
||||
import { SteemWalletContainer, AccountContainer } from '../../../containers';
|
||||
import { WalletContainer, AccountContainer } from '../../../containers';
|
||||
|
||||
import globalStyles from '../../../globalStyles';
|
||||
|
||||
@ -10,7 +10,7 @@ const BtcView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
<View style={globalStyles.swipeItemWrapper}>
|
||||
<AccountContainer>
|
||||
{({ currentAccount }) => (
|
||||
<SteemWalletContainer selectedUser={currentAccount}>
|
||||
<WalletContainer selectedUser={currentAccount}>
|
||||
{({
|
||||
isClaiming,
|
||||
claimRewardBalance,
|
||||
@ -50,7 +50,7 @@ const BtcView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
)}
|
||||
</AccountContainer>
|
||||
</View>
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import { WalletHeader, FormattedCurrency } from '../../../components';
|
||||
import { SteemWalletContainer, AccountContainer } from '../../../containers';
|
||||
import { WalletContainer, AccountContainer } from '../../../containers';
|
||||
|
||||
import globalStyles from '../../../globalStyles';
|
||||
|
||||
@ -10,7 +10,7 @@ const SbdView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
<View style={globalStyles.swipeItemWrapper}>
|
||||
<AccountContainer>
|
||||
{({ currentAccount }) => (
|
||||
<SteemWalletContainer selectedUser={currentAccount}>
|
||||
<WalletContainer selectedUser={currentAccount}>
|
||||
{({
|
||||
isClaiming,
|
||||
claimRewardBalance,
|
||||
@ -52,7 +52,7 @@ const SbdView = ({ handleOnSelected, index, currentIndex, refreshing: reload })
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
)}
|
||||
</AccountContainer>
|
||||
</View>
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { View, Text } from 'react-native';
|
||||
|
||||
import { WalletHeader, FormattedCurrency } from '../../../components';
|
||||
import { SteemWalletContainer, AccountContainer } from '../../../containers';
|
||||
import { WalletContainer, AccountContainer } from '../../../containers';
|
||||
|
||||
import globalStyles from '../../../globalStyles';
|
||||
|
||||
@ -10,7 +10,7 @@ const SpView = ({ handleOnSelected, index, currentIndex, refreshing: reload }) =
|
||||
<View style={globalStyles.swipeItemWrapper}>
|
||||
<AccountContainer>
|
||||
{({ currentAccount }) => (
|
||||
<SteemWalletContainer selectedUser={currentAccount}>
|
||||
<WalletContainer selectedUser={currentAccount}>
|
||||
{({
|
||||
isClaiming,
|
||||
claimRewardBalance,
|
||||
@ -66,7 +66,7 @@ const SpView = ({ handleOnSelected, index, currentIndex, refreshing: reload }) =
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
)}
|
||||
</AccountContainer>
|
||||
</View>
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import { WalletHeader, FormattedCurrency } from '../../../components';
|
||||
import { SteemWalletContainer, AccountContainer } from '../../../containers';
|
||||
import { WalletContainer, AccountContainer } from '../../../containers';
|
||||
|
||||
import globalStyles from '../../../globalStyles';
|
||||
|
||||
@ -10,7 +10,7 @@ const SteemView = ({ handleOnSelected, index, currentIndex, refreshing: reload }
|
||||
<View style={globalStyles.swipeItemWrapper}>
|
||||
<AccountContainer>
|
||||
{({ currentAccount }) => (
|
||||
<SteemWalletContainer selectedUser={currentAccount}>
|
||||
<WalletContainer selectedUser={currentAccount}>
|
||||
{({
|
||||
isClaiming,
|
||||
claimRewardBalance,
|
||||
@ -56,7 +56,7 @@ const SteemView = ({ handleOnSelected, index, currentIndex, refreshing: reload }
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</SteemWalletContainer>
|
||||
</WalletContainer>
|
||||
)}
|
||||
</AccountContainer>
|
||||
</View>
|
||||
|
@ -50,9 +50,10 @@ const WalletScreen = () => {
|
||||
<>
|
||||
<Animated.View style={[styles.header, { height: headerHeight }]}>
|
||||
<Swiper
|
||||
loop={false}
|
||||
loop={true}
|
||||
showsPagination={true}
|
||||
index={0}
|
||||
dotStyle={styles.dotStyle}
|
||||
onIndexChanged={(index) => setCurrentIndex(index)}
|
||||
>
|
||||
<EstmView
|
||||
|
@ -7,4 +7,7 @@ export default EStyleSheet.create({
|
||||
header: {
|
||||
backgroundColor: '$primaryBackgroundColor',
|
||||
},
|
||||
dotStyle: {
|
||||
backgroundColor: '$primaryDarkText',
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user