@@ -11,6 +11,7 @@ import styles from '../../../styles/styles';
11
11
import withLocalize , { withLocalizePropTypes } from '../../../components/withLocalize' ;
12
12
import { withNetwork } from '../../../components/OnyxProvider' ;
13
13
import compose from '../../../libs/compose' ;
14
+ import KeyboardAvoidingView from '../../../components/KeyboardAvoidingView' ;
14
15
import * as Expensicons from '../../../components/Icon/Expensicons' ;
15
16
import * as Illustrations from '../../../components/Icon/Illustrations' ;
16
17
import Icon from '../../../components/Icon' ;
@@ -207,72 +208,54 @@ class TransferBalancePage extends React.Component {
207
208
208
209
return (
209
210
< ScreenWrapper >
210
- < HeaderWithCloseButton
211
- title = { this . props . translate ( 'common.transferBalance' ) }
212
- shouldShowBackButton
213
- onBackButtonPress = { ( ) => Navigation . goBack ( ) }
214
- onCloseButtonPress = { ( ) => Navigation . dismissModal ( true ) }
215
- />
216
- < View style = { [ styles . flex1 , styles . flexBasisAuto , styles . justifyContentCenter ] } >
217
- < CurrentWalletBalance balanceStyles = { [ styles . transferBalanceBalance ] } />
218
- </ View >
219
- < ScrollView style = { styles . flexGrow0 } contentContainerStyle = { styles . pv5 } >
220
- < View style = { styles . ph5 } >
221
- { _ . map ( this . paymentTypes , paymentType => (
222
- < MenuItem
223
- key = { paymentType . key }
224
- title = { paymentType . title }
225
- description = { paymentType . description }
226
- iconWidth = { variables . iconSizeXLarge }
227
- iconHeight = { variables . iconSizeXLarge }
228
- icon = { paymentType . icon }
229
- success = { selectedPaymentType === paymentType . key }
230
- wrapperStyle = { {
231
- ...styles . mt3 ,
232
- ...styles . pv4 ,
233
- ...styles . transferBalancePayment ,
234
- ...( selectedPaymentType === paymentType . key
235
- && styles . transferBalanceSelectedPayment ) ,
236
- } }
237
- onPress = { ( ) => this . navigateToChooseTransferAccount ( paymentType . type ) }
238
- />
239
- ) ) }
211
+ < KeyboardAvoidingView >
212
+ < HeaderWithCloseButton
213
+ title = { this . props . translate ( 'common.transferBalance' ) }
214
+ shouldShowBackButton
215
+ onBackButtonPress = { ( ) => Navigation . goBack ( ) }
216
+ onCloseButtonPress = { ( ) => Navigation . dismissModal ( true ) }
217
+ />
218
+ < View style = { [ styles . flex1 , styles . flexBasisAuto , styles . justifyContentCenter ] } >
219
+ < CurrentWalletBalance balanceStyles = { [ styles . transferBalanceBalance ] } />
240
220
</ View >
241
- < Text
242
- style = { [ styles . p5 , styles . textStrong , styles . textLabel , styles . justifyContentStart ] }
243
- >
244
- { this . props . translate ( 'transferAmountPage.whichAccount' ) }
245
- </ Text >
246
- { Boolean ( selectedAccount )
247
- && (
248
- < MenuItem
249
- title = { selectedAccount . title }
250
- description = { selectedAccount . description }
251
- shouldShowRightIcon
252
- iconWidth = { selectedAccount . iconSize }
253
- iconHeight = { selectedAccount . iconSize }
254
- icon = { selectedAccount . icon }
255
- onPress = { ( ) => this . navigateToChooseTransferAccount ( selectedAccount . accountType ) }
256
- />
257
- ) }
258
- < View style = { styles . ph5 } >
221
+ < ScrollView style = { styles . flexGrow0 } contentContainerStyle = { styles . pv5 } >
222
+ < View style = { styles . ph5 } >
223
+ { _ . map ( this . paymentTypes , paymentType => (
224
+ < MenuItem
225
+ key = { paymentType . key }
226
+ title = { paymentType . title }
227
+ description = { paymentType . description }
228
+ iconWidth = { variables . iconSizeXLarge }
229
+ iconHeight = { variables . iconSizeXLarge }
230
+ icon = { paymentType . icon }
231
+ success = { selectedPaymentType === paymentType . key }
232
+ wrapperStyle = { {
233
+ ...styles . mt3 ,
234
+ ...styles . pv4 ,
235
+ ...styles . transferBalancePayment ,
236
+ ...( selectedPaymentType === paymentType . key
237
+ && styles . transferBalanceSelectedPayment ) ,
238
+ } }
239
+ onPress = { ( ) => this . navigateToChooseTransferAccount ( paymentType . type ) }
240
+ />
241
+ ) ) }
242
+ </ View >
259
243
< Text
260
- style = { [
261
- styles . mt5 ,
262
- styles . mb3 ,
263
- styles . textStrong ,
264
- styles . textLabel ,
265
- styles . justifyContentStart ,
266
- ] }
244
+ style = { [ styles . p5 , styles . textStrong , styles . textLabel , styles . justifyContentStart ] }
267
245
>
268
- { this . props . translate ( 'transferAmountPage.fee ' ) }
246
+ { this . props . translate ( 'transferAmountPage.whichAccount ' ) }
269
247
</ Text >
270
- < Text
271
- style = { [ styles . justifyContentStart ] }
272
- >
273
- { this . props . numberFormat (
274
- calculatedFee / 100 ,
275
- { style : 'currency' , currency : 'USD' } ,
248
+ { Boolean ( selectedAccount )
249
+ && (
250
+ < MenuItem
251
+ title = { selectedAccount . title }
252
+ description = { selectedAccount . description }
253
+ shouldShowRightIcon
254
+ iconWidth = { selectedAccount . iconSize }
255
+ iconHeight = { selectedAccount . iconSize }
256
+ icon = { selectedAccount . icon }
257
+ onPress = { ( ) => this . navigateToChooseTransferAccount ( selectedAccount . accountType ) }
258
+ />
276
259
) }
277
260
</ Text >
278
261
</ View >
0 commit comments