Skip to content

Commit

Permalink
Merge pull request Expensify#5547 from Expensify/OSBotify-cherry-pick…
Browse files Browse the repository at this point in the history
…-staging-5524
  • Loading branch information
OSBotify authored Sep 27, 2021
2 parents 9cf4527 + 8b9a9e9 commit 42f559d
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 9 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001010206
versionName "1.1.2-6"
versionCode 1001010207
versionName "1.1.2-7"
}
splits {
abi {
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.2.6</string>
<string>1.1.2.7</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.2.6</string>
<string>1.1.2.7</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.1.2-6",
"version": "1.1.2-7",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
1 change: 1 addition & 0 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ const MenuItem = ({
getButtonBackgroundColorStyle(getButtonState(focused || hovered, pressed, success, disabled)),
wrapperStyle,
])}
disabled={disabled}
>
{({hovered, pressed}) => (
<>
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ export default {
toGetStarted: 'To get started with the Expensify Card, you first need to add a bank account.',
plaidBodyCopy: 'Give your employees an easier way to pay - and get paid back - for company expenses.',
checkHelpLine: 'Your routing number and account number can be found on a check for the account.',
validateAccountError: 'In order to finish setting up your bank account, you must validate your account. Please check your email to validate your account, and return here to finish up!',
hasPhoneLoginError: 'To add a verified bank account please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.',
hasBeenThrottledError: ({fromNow}) => `For security reasons, we're taking a break from bank account setup so you can double-check your company information. Please try again ${fromNow}. Sorry!`,
buttonConfirm: 'Got it',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ export default {
toGetStarted: 'Para comenzar con la tarjeta Expensify, primero debe agregar una cuenta bancaria.',
plaidBodyCopy: 'Ofrezca a sus empleados una forma más sencilla de pagar - y recuperar - los gastos de la empresa.',
checkHelpLine: 'Su número de ruta y número de cuenta se pueden encontrar en un cheque de la cuenta bancaria.',
validateAccountError: 'Para terminar de configurar tu cuenta bancaria, debes validar tu cuenta de Expensify. Por favor revisa tu correo electrónico para validar tu cuenta y regresa aquí para continuar.',
hasPhoneLoginError: 'Para agregar una cuenta bancaria verificada, asegúrate de que tu nombre de usuario principal sea un correo electrónico válido y vuelve a intentarlo. Puedes agregar tu número de teléfono como nombre de usuario secundario.',
hasBeenThrottledError: ({fromNow}) => `Por razones de seguridad, nos tomamos un descanso en la configuración de la cuenta bancaria para que pueda verificar la información de su empresa. Inténtalo de nuevo ${fromNow}. ¡Lo siento!`,
buttonConfirm: 'OK',
Expand Down
3 changes: 2 additions & 1 deletion src/libs/actions/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ function getUserDetails() {
// Update the User onyx key
const loginList = _.where(response.loginList, {partnerName: 'expensify.com'});
const expensifyNewsStatus = lodashGet(response, 'account.subscribed', true);
Onyx.merge(ONYXKEYS.USER, {loginList, expensifyNewsStatus: !!expensifyNewsStatus});
const validatedStatus = lodashGet(response, 'account.validated', false);
Onyx.merge(ONYXKEYS.USER, {loginList, expensifyNewsStatus: !!expensifyNewsStatus, validated: !!validatedStatus});

// Update the nvp_payPalMeAddress NVP
const payPalMeAddress = lodashGet(response, `nameValuePairs.${CONST.NVP.PAYPAL_ME_ADDRESS}`, '');
Expand Down
18 changes: 16 additions & 2 deletions src/pages/ReimbursementAccount/BankAccountStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {withOnyx} from 'react-native-onyx';
import HeaderWithCloseButton from '../../components/HeaderWithCloseButton';
import MenuItem from '../../components/MenuItem';
import {
Paycheck, Bank, Lock,
Paycheck, Bank, Lock, Exclamation,
} from '../../components/Icon/Expensicons';
import styles from '../../styles/styles';
import TextLink from '../../components/TextLink';
Expand Down Expand Up @@ -182,7 +182,7 @@ class BankAccountStep extends React.Component {
icon={Bank}
title={this.props.translate('bankAccount.logIntoYourBank')}
onPress={() => setBankAccountSubStep(CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID)}
disabled={this.props.isPlaidDisabled}
disabled={this.props.isPlaidDisabled || !this.props.user.validated}
shouldShowRightIcon
/>
{this.props.isPlaidDisabled && (
Expand All @@ -193,9 +193,20 @@ class BankAccountStep extends React.Component {
<MenuItem
icon={Paycheck}
title={this.props.translate('bankAccount.connectManually')}
disabled={!this.props.user.validated}
onPress={() => setBankAccountSubStep(CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL)}
shouldShowRightIcon
/>
{!this.props.user.validated && (
<View style={[styles.flexRow, styles.alignItemsCenter, styles.m4]}>
<Text style={[styles.mutedTextLabel, styles.mr4]}>
<Icon src={Exclamation} fill={colors.red} />
</Text>
<Text style={styles.mutedTextLabel}>
{this.props.translate('bankAccount.validateAccountError')}
</Text>
</View>
)}
<View style={[styles.m5, styles.flexRow, styles.justifyContentBetween]}>
<TextLink href="https://use.expensify.com/privacy">
{this.props.translate('common.privacy')}
Expand Down Expand Up @@ -285,5 +296,8 @@ export default compose(
reimbursementAccountDraft: {
key: ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT,
},
user: {
key: ONYXKEYS.USER,
},
}),
)(BankAccountStep);

0 comments on commit 42f559d

Please sign in to comment.