From 8dc279088b2711f7b6e1e889eab963558c931055 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Thu, 25 Apr 2019 14:12:53 +0300 Subject: [PATCH] update for transfer feature --- .../walletDetails/container/walletDetailsContainer.js | 11 ++--------- .../walletDetails/view/walletDetailsView.js | 11 +++++++++-- src/config/locales/en-US.json | 7 +++++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/components/walletDetails/container/walletDetailsContainer.js b/src/components/walletDetails/container/walletDetailsContainer.js index 6e2b2286f..21f27b8cb 100644 --- a/src/components/walletDetails/container/walletDetailsContainer.js +++ b/src/components/walletDetails/container/walletDetailsContainer.js @@ -26,19 +26,12 @@ class WalletContainer extends PureComponent { // Component Life Cycle Functions // Component Functions - _navigate = (a,b) => { + _navigate = (transferType, fundType) => { const { dispatch, setPinCodeState } = this.props; - // navigation.navigate(ROUTES.SCREENS.TRANSFER, { - // transferType: 'withdrawToSaving', - // fundType: 'STEEM', - // }); - - console.log('a,b :', a,b); - setPinCodeState({ navigateTo: ROUTES.SCREENS.TRANSFER, - navigateParams: { transferType: 'transferToken', fundType: 'STEEM' }, + navigateParams: { transferType, fundType }, }); dispatch(openPinCodeModal()); }; diff --git a/src/components/walletDetails/view/walletDetailsView.js b/src/components/walletDetails/view/walletDetailsView.js index 5419be898..7ffa882fa 100644 --- a/src/components/walletDetails/view/walletDetailsView.js +++ b/src/components/walletDetails/view/walletDetailsView.js @@ -30,6 +30,10 @@ class WalletDetailsView extends PureComponent { render() { const { walletData, intl, navigate } = this.props; + + const steemDropdown = ['transferToken', 'transferToSaving', 'powerUp']; + const sbdDropdown = ['transferToken', 'transferToSaving']; + return ( navigate(a,b)} + dropdownOptions={steemDropdown.map(item => intl.formatMessage({ id: `transfer.${item}` }))} + onDropdownSelect={index => navigate(steemDropdown[index], 'STEEM')} /> intl.formatMessage({ id: `transfer.${item}` }))} + onDropdownSelect={a => navigate(steemDropdown[a], 'SBD')} />