From 95e9ae8f494d949bdaa61b61affc65f1105cd5f6 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 1 Aug 2022 19:05:37 -0700 Subject: [PATCH 1/2] Revert "Revert "Add in bad diff from staging"" From 7e6b62125b626a32865f1c8a3e1a116a8fae9d4c Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 2 Aug 2022 10:13:42 -0700 Subject: [PATCH 2/2] Get staging code to match working version in main --- src/pages/AddPersonalBankAccountPage.js | 37 ++++-- .../Payments/PaymentsPage/BasePaymentsPage.js | 1 + .../settings/Payments/TransferBalancePage.js | 107 ++++++++++-------- 3 files changed, 89 insertions(+), 56 deletions(-) diff --git a/src/pages/AddPersonalBankAccountPage.js b/src/pages/AddPersonalBankAccountPage.js index b7cc498da2f4..dc5245702c88 100644 --- a/src/pages/AddPersonalBankAccountPage.js +++ b/src/pages/AddPersonalBankAccountPage.js @@ -13,7 +13,6 @@ import AddPlaidBankAccount from '../components/AddPlaidBankAccount'; import getPlaidOAuthReceivedRedirectURI from '../libs/getPlaidOAuthReceivedRedirectURI'; import compose from '../libs/compose'; import ONYXKEYS from '../ONYXKEYS'; -import KeyboardAvoidingView from '../components/KeyboardAvoidingView'; import Text from '../components/Text'; import styles from '../styles/styles'; import * as Illustrations from '../components/Icon/Illustrations'; @@ -176,17 +175,33 @@ class AddPersonalBankAccountPage extends React.Component { receivedRedirectURI={getPlaidOAuthReceivedRedirectURI()} /> {!_.isUndefined(this.state.selectedPlaidBankAccount) && ( - + + this.setState({password: text})} + errorText={this.getErrorText('password')} + hasError={this.getErrors().password} + /> + )} - - )} - + + {!_.isUndefined(this.state.selectedPlaidBankAccount) && ( + + )} + + )} ); } diff --git a/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js b/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js index 7b2954f4d2a5..6b49dca8356f 100644 --- a/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js +++ b/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js @@ -33,6 +33,7 @@ import KYCWall from '../../../../components/KYCWall'; import {propTypes, defaultProps} from './paymentsPagePropTypes'; import {withNetwork} from '../../../../components/OnyxProvider'; import * as PaymentUtils from '../../../../libs/PaymentUtils'; +import OfflineIndicator from '../../../../components/OfflineIndicator'; class BasePaymentsPage extends React.Component { constructor(props) { diff --git a/src/pages/settings/Payments/TransferBalancePage.js b/src/pages/settings/Payments/TransferBalancePage.js index 0df6461cc9c2..b1699f367e8f 100644 --- a/src/pages/settings/Payments/TransferBalancePage.js +++ b/src/pages/settings/Payments/TransferBalancePage.js @@ -11,7 +11,6 @@ import styles from '../../../styles/styles'; import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; import {withNetwork} from '../../../components/OnyxProvider'; import compose from '../../../libs/compose'; -import KeyboardAvoidingView from '../../../components/KeyboardAvoidingView'; import * as Expensicons from '../../../components/Icon/Expensicons'; import * as Illustrations from '../../../components/Icon/Illustrations'; import Icon from '../../../components/Icon'; @@ -208,54 +207,72 @@ class TransferBalancePage extends React.Component { return ( - - Navigation.goBack()} - onCloseButtonPress={() => Navigation.dismissModal(true)} - /> - - + Navigation.goBack()} + onCloseButtonPress={() => Navigation.dismissModal(true)} + /> + + + + + + {_.map(this.paymentTypes, paymentType => ( + this.navigateToChooseTransferAccount(paymentType.type)} + /> + ))} - - - {_.map(this.paymentTypes, paymentType => ( - this.navigateToChooseTransferAccount(paymentType.type)} - /> - ))} - + + {this.props.translate('transferAmountPage.whichAccount')} + + {Boolean(selectedAccount) + && ( + this.navigateToChooseTransferAccount(selectedAccount.accountType)} + /> + )} + - {this.props.translate('transferAmountPage.whichAccount')} + {this.props.translate('transferAmountPage.fee')} - {Boolean(selectedAccount) - && ( - this.navigateToChooseTransferAccount(selectedAccount.accountType)} - /> + + {this.props.numberFormat( + calculatedFee / 100, + {style: 'currency', currency: 'USD'}, )}