Skip to content

Commit

Permalink
Merge pull request #28447 from Expensify/thienlnam-cherry-pick-stagin…
Browse files Browse the repository at this point in the history
…g-28433-1

🍒 Cherry pick PR #28433 to staging 🍒
  • Loading branch information
techievivek authored Sep 29, 2023
2 parents 3b2dc32 + 333baad commit 02f3d66
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 21 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001037500
versionName "1.3.75-0"
versionCode 1001037501
versionName "1.3.75-1"
}

flavorDimensions "default"
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.3.75.0</string>
<string>1.3.75.1</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.3.75.0</string>
<string>1.3.75.1</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions 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.3.75-0",
"version": "1.3.75-1",
"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
5 changes: 5 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,11 @@ const CONST = {
STATEMENT: 'STATEMENT_NAVIGATE',
CONCIERGE: 'CONCIERGE_NAVIGATE',
},
MTL_WALLET_PROGRAM_ID: '760',
PROGRAM_ISSUERS: {
EXPENSIFY_PAYMENTS: 'Expensify Payments LLC',
BANCORP_BANK: 'The Bancorp Bank',
},
},

PLAID: {
Expand Down
11 changes: 6 additions & 5 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import type {
RequestedAmountMessageParams,
TagSelectionParams,
TranslationBase,
WalletProgramParams,
} from './types';
import * as ReportActionsUtils from '../libs/ReportActionsUtils';

Expand Down Expand Up @@ -909,7 +910,7 @@ export default {
phrase2: 'Terms of Service',
phrase3: 'and',
phrase4: 'Privacy',
phrase5: 'Money transmission is provided by Expensify Payments LLC (NMLS ID:2017010) pursuant to its',
phrase5: `Money transmission is provided by ${CONST.WALLET.PROGRAM_ISSUERS.EXPENSIFY_PAYMENTS} (NMLS ID:2017010) pursuant to its`,
phrase6: 'licenses',
},
validateCodeForm: {
Expand Down Expand Up @@ -1170,7 +1171,7 @@ export default {
electronicFundsWithdrawal: 'Electronic funds withdrawal',
standard: 'Standard',
shortTermsForm: {
expensifyPaymentsAccount: 'The Expensify Wallet is issued by The Bancorp Bank.',
expensifyPaymentsAccount: ({walletProgram}: WalletProgramParams) => `The Expensify Wallet is issued by ${walletProgram}.`,
perPurchase: 'Per purchase',
atmWithdrawal: 'ATM withdrawal',
cashReload: 'Cash reload',
Expand Down Expand Up @@ -1212,10 +1213,10 @@ export default {
'several minutes. The fee is 1.5% of the transfer amount (with a minimum fee of $0.25).',
fdicInsuranceBancorp:
'Your funds are eligible for FDIC insurance. Your funds will be held at or ' +
'transferred to The Bancorp Bank, an FDIC-insured institution. Once there, your funds are insured up ' +
'to $250,000 by the FDIC in the event The Bancorp Bank fails. See',
`transferred to ${CONST.WALLET.PROGRAM_ISSUERS.BANCORP_BANK}, an FDIC-insured institution. Once there, your funds are insured up ` +
`to $250,000 by the FDIC in the event ${CONST.WALLET.PROGRAM_ISSUERS.BANCORP_BANK} fails. See`,
fdicInsuranceBancorp2: 'for details.',
contactExpensifyPayments: 'Contact Expensify Payments by calling +1 833-400-0904, by email at',
contactExpensifyPayments: `Contact ${CONST.WALLET.PROGRAM_ISSUERS.EXPENSIFY_PAYMENTS} by calling +1 833-400-0904, by email at`,
contactExpensifyPayments2: 'or sign in at',
generalInformation: 'For general information about prepaid accounts, visit',
generalInformation2: 'If you have a complaint about a prepaid account, call the Consumer Financial Protection Bureau at 1-855-411-2372 or visit',
Expand Down
11 changes: 6 additions & 5 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import type {
RequestedAmountMessageParams,
TagSelectionParams,
EnglishTranslation,
WalletProgramParams,
} from './types';

/* eslint-disable max-len */
Expand Down Expand Up @@ -905,7 +906,7 @@ export default {
phrase2: 'Términos de Servicio',
phrase3: 'y',
phrase4: 'Privacidad',
phrase5: 'El envío de dinero es brindado por Expensify Payments LLC (NMLS ID:2017010) de conformidad con sus',
phrase5: `El envío de dinero es brindado por ${CONST.WALLET.PROGRAM_ISSUERS.EXPENSIFY_PAYMENTS} (NMLS ID:2017010) de conformidad con sus`,
phrase6: 'licencias',
},
validateCodeForm: {
Expand Down Expand Up @@ -1187,7 +1188,7 @@ export default {
electronicFundsWithdrawal: 'Retiro electrónico de fondos',
standard: 'Estándar',
shortTermsForm: {
expensifyPaymentsAccount: 'La billetera Expensify es emitida por The Bancorp Bank.',
expensifyPaymentsAccount: ({walletProgram}: WalletProgramParams) => `La billetera Expensify es emitida por ${walletProgram}.`,
perPurchase: 'Por compra',
atmWithdrawal: 'Retiro de cajero automático',
cashReload: 'Recarga de efectivo',
Expand Down Expand Up @@ -1230,10 +1231,10 @@ export default {
'transferencia (con una tarifa mínima de $ 0.25). ',
fdicInsuranceBancorp:
'Sus fondos son elegibles para el seguro de la FDIC. Sus fondos se mantendrán en o ' +
'transferido a The Bancorp Bank, una institución asegurada por la FDIC. Una vez allí, sus fondos ' +
'están asegurados a $ 250,000 por la FDIC en caso de que The Bancorp Bank quiebre. Ver',
`transferido a ${CONST.WALLET.PROGRAM_ISSUERS.BANCORP_BANK}, una institución asegurada por la FDIC. Una vez allí, sus fondos ` +
`están asegurados a $ 250,000 por la FDIC en caso de que ${CONST.WALLET.PROGRAM_ISSUERS.BANCORP_BANK} quiebre. Ver`,
fdicInsuranceBancorp2: 'para detalles.',
contactExpensifyPayments: 'Comuníquese con Expensify Payments llamando al + 1833-400-0904, por correoelectrónico a',
contactExpensifyPayments: `Comuníquese con ${CONST.WALLET.PROGRAM_ISSUERS.EXPENSIFY_PAYMENTS} llamando al + 1833-400-0904, por correoelectrónico a`,
contactExpensifyPayments2: 'o inicie sesión en',
generalInformation: 'Para obtener información general sobre cuentas prepagas, visite',
generalInformation2: 'Si tiene una queja sobre una cuenta prepaga, llame al Consumer Financial Oficina de Protección al 1-855-411-2372 o visite',
Expand Down
3 changes: 3 additions & 0 deletions src/languages/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ type FormattedMaxLengthParams = {formattedMaxLength: string};

type TagSelectionParams = {tagName: string};

type WalletProgramParams = {walletProgram: string};

/* Translation Object types */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type TranslationBaseValue = string | string[] | ((...args: any[]) => string);
Expand Down Expand Up @@ -307,4 +309,5 @@ export type {
RemovedTheRequestParams,
FormattedMaxLengthParams,
TagSelectionParams,
WalletProgramParams,
};
2 changes: 1 addition & 1 deletion src/pages/EnablePayments/EnablePaymentsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class EnablePaymentsPage extends React.Component {
<>
{(currentStep === CONST.WALLET.STEP.ADDITIONAL_DETAILS || currentStep === CONST.WALLET.STEP.ADDITIONAL_DETAILS_KBA) && <AdditionalDetailsStep />}
{currentStep === CONST.WALLET.STEP.ONFIDO && <OnfidoStep />}
{currentStep === CONST.WALLET.STEP.TERMS && <TermsStep />}
{currentStep === CONST.WALLET.STEP.TERMS && <TermsStep userWallet={this.props.userWallet} />}
{currentStep === CONST.WALLET.STEP.ACTIVATE && <ActivateStep userWallet={this.props.userWallet} />}
</>
);
Expand Down
21 changes: 19 additions & 2 deletions src/pages/EnablePayments/TermsPage/ShortTermsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@ import Text from '../../../components/Text';
import * as Localize from '../../../libs/Localize';
import CONST from '../../../CONST';
import TextLink from '../../../components/TextLink';
import userWalletPropTypes from '../userWalletPropTypes';

function ShortTermsForm() {
const propTypes = {
/** The user's wallet */
userWallet: userWalletPropTypes,
};

const defaultProps = {
userWallet: {},
};

function ShortTermsForm(props) {
return (
<>
<Text style={styles.mb5}>{Localize.translateLocal('termsStep.shortTermsForm.expensifyPaymentsAccount')}</Text>
<Text style={styles.mb5}>
{Localize.translateLocal('termsStep.shortTermsForm.expensifyPaymentsAccount', {
walletProgram:
props.userWallet.walletProgramID === CONST.WALLET.MTL_WALLET_PROGRAM_ID ? CONST.WALLET.PROGRAM_ISSUERS.EXPENSIFY_PAYMENTS : CONST.WALLET.PROGRAM_ISSUERS.BANCORP_BANK,
})}
</Text>

<View style={[styles.shortTermsBorder, styles.p2, styles.mb6]}>
<View style={[styles.shortTermsRow, styles.mb4]}>
Expand Down Expand Up @@ -132,6 +147,8 @@ function ShortTermsForm() {
);
}

ShortTermsForm.propTypes = propTypes;
ShortTermsForm.defaultProps = defaultProps;
ShortTermsForm.displayName = 'ShortTermsForm';

export default ShortTermsForm;
7 changes: 6 additions & 1 deletion src/pages/EnablePayments/TermsStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ import LongTermsForm from './TermsPage/LongTermsForm';
import FormAlertWithSubmitButton from '../../components/FormAlertWithSubmitButton';
import walletTermsPropTypes from './walletTermsPropTypes';
import * as ErrorUtils from '../../libs/ErrorUtils';
import userWalletPropTypes from './userWalletPropTypes';

const propTypes = {
/** The user's wallet */
userWallet: userWalletPropTypes,

/** Comes from Onyx. Information about the terms for the wallet */
walletTerms: walletTermsPropTypes,

...withLocalizePropTypes,
};

const defaultProps = {
userWallet: {},
walletTerms: {},
};

Expand Down Expand Up @@ -59,7 +64,7 @@ function TermsStep(props) {
style={styles.flex1}
contentContainerStyle={styles.ph5}
>
<ShortTermsForm />
<ShortTermsForm userWallet={props.userWallet} />
<LongTermsForm />
<CheckboxWithLabel
accessibilityLabel={props.translate('termsStep.haveReadAndAgree')}
Expand Down
3 changes: 3 additions & 0 deletions src/pages/EnablePayments/userWalletPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ export default PropTypes.shape({

/** Whether we should show the ActivateStep success view after the user finished the KYC flow */
shouldShowWalletActivationSuccess: PropTypes.bool,

/** The wallet's programID, used to show the correct terms. */
walletProgramID: PropTypes.string,
});
3 changes: 3 additions & 0 deletions src/types/onyx/UserWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ type UserWallet = {
/** The type of the linked account (debitCard or bankAccount) */
walletLinkedAccountType: WalletLinkedAccountType;

/** The wallet's programID, used to show the correct terms. */
walletProgramID?: string;

/** The user's bank account ID */
bankAccountID?: number;

Expand Down

0 comments on commit 02f3d66

Please sign in to comment.