mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 12:51:42 +03:00
Added withdraw transfer types
This commit is contained in:
parent
7fbcd3a384
commit
8af94b006a
@ -59,13 +59,13 @@ class WalletView extends PureComponent {
|
|||||||
<ScrollView
|
<ScrollView
|
||||||
refreshControl={
|
refreshControl={
|
||||||
<RefreshControl
|
<RefreshControl
|
||||||
refreshing={isRefreshing}
|
refreshing={isRefreshing}
|
||||||
onRefresh={handleOnWalletRefresh}
|
onRefresh={handleOnWalletRefresh}
|
||||||
progressBackgroundColor="#357CE6"
|
progressBackgroundColor="#357CE6"
|
||||||
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
|
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
|
||||||
titleColor="#fff"
|
titleColor="#fff"
|
||||||
colors={['#fff']}
|
colors={['#fff']}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
style={styles.scrollView}
|
style={styles.scrollView}
|
||||||
>
|
>
|
||||||
|
@ -37,6 +37,12 @@ class WalletContainer extends PureComponent {
|
|||||||
case 'SBD':
|
case 'SBD':
|
||||||
balance = Math.round(walletData.sbdBalance * 1000) / 1000;
|
balance = Math.round(walletData.sbdBalance * 1000) / 1000;
|
||||||
break;
|
break;
|
||||||
|
case 'SAVING_STEEM':
|
||||||
|
balance = Math.round(walletData.savingBalance * 1000) / 1000;
|
||||||
|
break;
|
||||||
|
case 'SAVING_SBD':
|
||||||
|
balance = Math.round(walletData.savingBalanceSbd * 1000) / 1000;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
|
|
||||||
// Constants
|
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import { GrayWrapper, WalletLineItem } from '../../basicUIElements';
|
import { GrayWrapper, WalletLineItem } from '../../basicUIElements';
|
||||||
|
|
||||||
@ -10,20 +8,9 @@ import { GrayWrapper, WalletLineItem } from '../../basicUIElements';
|
|||||||
import { vestsToSp } from '../../../utils/conversions';
|
import { vestsToSp } from '../../../utils/conversions';
|
||||||
|
|
||||||
// Styles
|
// Styles
|
||||||
// eslint-disable-next-line
|
|
||||||
import styles from './walletDetailsStyles';
|
import styles from './walletDetailsStyles';
|
||||||
|
|
||||||
class WalletDetailsView extends PureComponent {
|
class WalletDetailsView extends PureComponent {
|
||||||
/* Props
|
|
||||||
* ------------------------------------------------
|
|
||||||
* @prop { type } name - Description....
|
|
||||||
*/
|
|
||||||
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Component Life Cycles
|
// Component Life Cycles
|
||||||
|
|
||||||
// Component Functions
|
// Component Functions
|
||||||
@ -33,6 +20,8 @@ class WalletDetailsView extends PureComponent {
|
|||||||
|
|
||||||
const steemDropdown = ['transfer_token', 'transfer_to_saving', 'powerUp'];
|
const steemDropdown = ['transfer_token', 'transfer_to_saving', 'powerUp'];
|
||||||
const sbdDropdown = ['transfer_token', 'transfer_to_saving'];
|
const sbdDropdown = ['transfer_token', 'transfer_to_saving'];
|
||||||
|
const savingSteemDropdown = ['withdraw_steem'];
|
||||||
|
const savingSbdDropdown = ['withdraw_sbd'];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
@ -98,7 +87,7 @@ class WalletDetailsView extends PureComponent {
|
|||||||
isBoldText
|
isBoldText
|
||||||
isHasdropdown={isShowDropdowns}
|
isHasdropdown={isShowDropdowns}
|
||||||
dropdownOptions={sbdDropdown.map(item => intl.formatMessage({ id: `transfer.${item}` }))}
|
dropdownOptions={sbdDropdown.map(item => intl.formatMessage({ id: `transfer.${item}` }))}
|
||||||
onDropdownSelect={a => navigate(steemDropdown[a], 'SBD')}
|
onDropdownSelect={a => navigate(sbdDropdown[a], 'SBD')}
|
||||||
/>
|
/>
|
||||||
<GrayWrapper isGray>
|
<GrayWrapper isGray>
|
||||||
<WalletLineItem
|
<WalletLineItem
|
||||||
@ -109,10 +98,20 @@ class WalletDetailsView extends PureComponent {
|
|||||||
iconName="ios-information-circle-outline"
|
iconName="ios-information-circle-outline"
|
||||||
rightText={`${Math.round(walletData.savingBalance * 1000) / 1000} STEEM`}
|
rightText={`${Math.round(walletData.savingBalance * 1000) / 1000} STEEM`}
|
||||||
isBoldText
|
isBoldText
|
||||||
|
isHasdropdown={isShowDropdowns}
|
||||||
|
dropdownOptions={savingSteemDropdown.map(item =>
|
||||||
|
intl.formatMessage({ id: `transfer.${item}` }),
|
||||||
|
)}
|
||||||
|
onDropdownSelect={a => navigate(savingSteemDropdown[a], 'SAVING_STEEM')}
|
||||||
/>
|
/>
|
||||||
<WalletLineItem
|
<WalletLineItem
|
||||||
rightText={`$${Math.round(walletData.savingBalanceSbd * 1000) / 1000}`}
|
rightText={`$${Math.round(walletData.savingBalanceSbd * 1000) / 1000}`}
|
||||||
style={styles.walletLineDetail}
|
style={styles.walletLineDetail}
|
||||||
|
isHasdropdown={isShowDropdowns}
|
||||||
|
dropdownOptions={savingSbdDropdown.map(item =>
|
||||||
|
intl.formatMessage({ id: `transfer.${item}` }),
|
||||||
|
)}
|
||||||
|
onDropdownSelect={a => navigate(savingSbdDropdown[a], 'SAVING_SBD')}
|
||||||
/>
|
/>
|
||||||
</GrayWrapper>
|
</GrayWrapper>
|
||||||
{walletData.showPowerDown && (
|
{walletData.showPowerDown && (
|
||||||
|
@ -288,6 +288,8 @@
|
|||||||
"powerUp": "Power Up",
|
"powerUp": "Power Up",
|
||||||
"withdraw_to_saving": "Withdraw To Saving",
|
"withdraw_to_saving": "Withdraw To Saving",
|
||||||
"steemconnect_title": "Steemconnect Transfer",
|
"steemconnect_title": "Steemconnect Transfer",
|
||||||
"next": "NEXT"
|
"next": "NEXT",
|
||||||
|
"withdraw_steem": "Withdraw Steem",
|
||||||
|
"withdraw_sbd": "Withdraw Steem Dollar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user