Added withdraw transfer types

This commit is contained in:
Mustafa Buyukcelebi 2019-06-24 14:31:32 +03:00
parent 7fbcd3a384
commit 8af94b006a
4 changed files with 29 additions and 22 deletions

View File

@ -65,7 +65,7 @@ class WalletView extends PureComponent {
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
/>
}
style={styles.scrollView}
>

View File

@ -37,6 +37,12 @@ class WalletContainer extends PureComponent {
case 'SBD':
balance = Math.round(walletData.sbdBalance * 1000) / 1000;
break;
case 'SAVING_STEEM':
balance = Math.round(walletData.savingBalance * 1000) / 1000;
break;
case 'SAVING_SBD':
balance = Math.round(walletData.savingBalanceSbd * 1000) / 1000;
break;
default:
break;
}

View File

@ -1,8 +1,6 @@
import React, { PureComponent } from 'react';
import { View } from 'react-native';
// Constants
// Components
import { GrayWrapper, WalletLineItem } from '../../basicUIElements';
@ -10,20 +8,9 @@ import { GrayWrapper, WalletLineItem } from '../../basicUIElements';
import { vestsToSp } from '../../../utils/conversions';
// Styles
// eslint-disable-next-line
import styles from './walletDetailsStyles';
class WalletDetailsView extends PureComponent {
/* Props
* ------------------------------------------------
* @prop { type } name - Description....
*/
constructor(props) {
super(props);
this.state = {};
}
// Component Life Cycles
// Component Functions
@ -33,6 +20,8 @@ class WalletDetailsView extends PureComponent {
const steemDropdown = ['transfer_token', 'transfer_to_saving', 'powerUp'];
const sbdDropdown = ['transfer_token', 'transfer_to_saving'];
const savingSteemDropdown = ['withdraw_steem'];
const savingSbdDropdown = ['withdraw_sbd'];
return (
<View style={styles.container}>
@ -98,7 +87,7 @@ class WalletDetailsView extends PureComponent {
isBoldText
isHasdropdown={isShowDropdowns}
dropdownOptions={sbdDropdown.map(item => intl.formatMessage({ id: `transfer.${item}` }))}
onDropdownSelect={a => navigate(steemDropdown[a], 'SBD')}
onDropdownSelect={a => navigate(sbdDropdown[a], 'SBD')}
/>
<GrayWrapper isGray>
<WalletLineItem
@ -109,10 +98,20 @@ class WalletDetailsView extends PureComponent {
iconName="ios-information-circle-outline"
rightText={`${Math.round(walletData.savingBalance * 1000) / 1000} STEEM`}
isBoldText
isHasdropdown={isShowDropdowns}
dropdownOptions={savingSteemDropdown.map(item =>
intl.formatMessage({ id: `transfer.${item}` }),
)}
onDropdownSelect={a => navigate(savingSteemDropdown[a], 'SAVING_STEEM')}
/>
<WalletLineItem
rightText={`$${Math.round(walletData.savingBalanceSbd * 1000) / 1000}`}
style={styles.walletLineDetail}
isHasdropdown={isShowDropdowns}
dropdownOptions={savingSbdDropdown.map(item =>
intl.formatMessage({ id: `transfer.${item}` }),
)}
onDropdownSelect={a => navigate(savingSbdDropdown[a], 'SAVING_SBD')}
/>
</GrayWrapper>
{walletData.showPowerDown && (

View File

@ -288,6 +288,8 @@
"powerUp": "Power Up",
"withdraw_to_saving": "Withdraw To Saving",
"steemconnect_title": "Steemconnect Transfer",
"next": "NEXT"
"next": "NEXT",
"withdraw_steem": "Withdraw Steem",
"withdraw_sbd": "Withdraw Steem Dollar"
}
}