Skip to content

Commit 907bbf8

Browse files
authored
Revert "Revert "Add in bad diff from staging""
1 parent cbfc78e commit 907bbf8

File tree

3 files changed

+56
-89
lines changed

3 files changed

+56
-89
lines changed

src/pages/AddPersonalBankAccountPage.js

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import AddPlaidBankAccount from '../components/AddPlaidBankAccount';
1313
import getPlaidOAuthReceivedRedirectURI from '../libs/getPlaidOAuthReceivedRedirectURI';
1414
import compose from '../libs/compose';
1515
import ONYXKEYS from '../ONYXKEYS';
16+
import KeyboardAvoidingView from '../components/KeyboardAvoidingView';
1617
import Text from '../components/Text';
1718
import styles from '../styles/styles';
1819
import * as Illustrations from '../components/Icon/Illustrations';
@@ -175,33 +176,17 @@ class AddPersonalBankAccountPage extends React.Component {
175176
receivedRedirectURI={getPlaidOAuthReceivedRedirectURI()}
176177
/>
177178
{!_.isUndefined(this.state.selectedPlaidBankAccount) && (
178-
<View style={[styles.mb5]}>
179-
<TextInput
180-
label={this.props.translate('addPersonalBankAccountPage.enterPassword')}
181-
secureTextEntry
182-
value={this.state.password}
183-
autoCompleteType="password"
184-
textContentType="password"
185-
autoCapitalize="none"
186-
autoFocus={canFocusInputOnScreenFocus()}
187-
onChangeText={text => this.setState({password: text})}
188-
errorText={this.getErrorText('password')}
189-
hasError={this.getErrors().password}
190-
/>
191-
</View>
179+
<FormAlertWithSubmitButton
180+
isAlertVisible={Boolean(error)}
181+
buttonText={this.props.translate('common.saveAndContinue')}
182+
onSubmit={this.submit}
183+
message={error}
184+
isLoading={loading}
185+
/>
192186
)}
193-
</View>
194-
{!_.isUndefined(this.state.selectedPlaidBankAccount) && (
195-
<FormAlertWithSubmitButton
196-
isAlertVisible={Boolean(error)}
197-
buttonText={this.props.translate('common.saveAndContinue')}
198-
onSubmit={this.submit}
199-
message={error}
200-
isLoading={loading}
201-
/>
202-
)}
203-
</FormScrollView>
204-
)}
187+
</FormScrollView>
188+
)}
189+
</KeyboardAvoidingView>
205190
</ScreenWrapper>
206191
);
207192
}

src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import KYCWall from '../../../../components/KYCWall';
3333
import {propTypes, defaultProps} from './paymentsPagePropTypes';
3434
import {withNetwork} from '../../../../components/OnyxProvider';
3535
import * as PaymentUtils from '../../../../libs/PaymentUtils';
36-
import OfflineIndicator from '../../../../components/OfflineIndicator';
3736

3837
class BasePaymentsPage extends React.Component {
3938
constructor(props) {

src/pages/settings/Payments/TransferBalancePage.js

Lines changed: 45 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import styles from '../../../styles/styles';
1111
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize';
1212
import {withNetwork} from '../../../components/OnyxProvider';
1313
import compose from '../../../libs/compose';
14+
import KeyboardAvoidingView from '../../../components/KeyboardAvoidingView';
1415
import * as Expensicons from '../../../components/Icon/Expensicons';
1516
import * as Illustrations from '../../../components/Icon/Illustrations';
1617
import Icon from '../../../components/Icon';
@@ -207,72 +208,54 @@ class TransferBalancePage extends React.Component {
207208

208209
return (
209210
<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]} />
240220
</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>
259243
<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]}
267245
>
268-
{this.props.translate('transferAmountPage.fee')}
246+
{this.props.translate('transferAmountPage.whichAccount')}
269247
</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+
/>
276259
)}
277260
</Text>
278261
</View>

0 commit comments

Comments
 (0)