Skip to content

Commit

Permalink
Merge branch 'main' into vit-enterOnCurrentPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Dec 30, 2021
2 parents 385fcd6 + e6b4e01 commit 7d95f69
Show file tree
Hide file tree
Showing 41 changed files with 350 additions and 282 deletions.
Binary file modified .github/workflows/OSBotify-private-key.asc.gpg
Binary file not shown.
2 changes: 1 addition & 1 deletion .github/workflows/cherryPick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

- name: Set up git for Botify
run: |
git config user.signingkey DBF63700F60F5530
git config user.signingkey 367811D53E34168C
git config commit.gpgsign true
git config user.name OSBotify
git config user.email infra+osbotify@expensify.com
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/createNewVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
git fetch
git checkout main
git config user.signingkey DBF63700F60F5530
git config user.signingkey 367811D53E34168C
git config commit.gpgsign true
git config user.name OSBotify
git config user.email infra+osbotify@expensify.com
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Set up git for Botify
run: |
git config user.signingkey DBF63700F60F5530
git config user.signingkey 367811D53E34168C
git config commit.gpgsign true
git config user.name OSBotify
git config user.email infra+osbotify@expensify.com
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:

- name: Set up git for Botify
run: |
git config user.signingkey DBF63700F60F5530
git config user.signingkey 367811D53E34168C
git config commit.gpgsign true
git config user.name OSBotify
git config user.email infra+osbotify@expensify.com
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/updateProtectedBranch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- name: Set up git for Botify
run: |
git config user.signingkey DBF63700F60F5530
git config user.signingkey 367811D53E34168C
git config commit.gpgsign true
git config user.name OSBotify
git config user.email infra+osbotify@expensify.com
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ fastlane/screenshots

# Storybook build files
storybook-static

# GitHub GPG Keys
.github/workflows/OSBotify-private-key.asc
*.asc
12 changes: 7 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ It’s possible that you found a bug or enhancement that we haven’t posted to

1. Check to ensure an issue does not already exist for this topic in the [New Expensify Issue list](https://github.com/Expensify/App/issues). Please use your best judgement by searching for similar titles and issue descriptions.
2. If your bug or enhancement matches an existing issue, please feel free to comment on that GitHub issue with your findings if you think it will help solve the issue.
3. If there is no existing GitHub issue or Upwork job, report the issue(s) in the [#expensify-open-source](https://github.com/Expensify/App/blob/main/CONTRIBUTING.md#asking-questions) Slack channel, prefixed with `BUG:` or `Feature Request:`. Include all relevant data, screenshots and examples in the post or thread.
4. After review in #expensify-open-source, if you've provided a quality proposal that we choose to implement, a GitHub issue will be created and your Slack handle will be included in the original post after `Issue reported by:`
5. If an external contributor other than yourself is hired to work on the issue, you will also be hired for the same job in Upwork. No additional work is needed. If the issue is fixed internally, a dedicated job will be created to hire and pay you after the issue is fixed.
6. Payment will be made 7 days after code is deployed to production if there are no regressions. If a regression is discovered, payment will be issued 7 days after all regressions are fixed.
4. If there is no existing GitHub issue or Upwork job, check if the issue is happening on prod (as opposed to only happening on dev)
5. If the issue is just in dev then it means it's a new issue and has not been deployed to production. In this case, you should try to find the offending PR and comment in the issue tied to the PR and ask the assigned users to add the `DeployBlockerCash` label. If you can't find it, follow the reporting instructions in the next item, but note that the issue is a regression only found in dev and not in prod.
6. If the issue happens in production then report the issue(s) in the [#expensify-open-source](https://github.com/Expensify/App/blob/main/CONTRIBUTING.md#asking-questions) Slack channel, prefixed with `BUG:` or `Feature Request:`. Include all relevant data, screenshots and examples in the post or thread.
7. After review in #expensify-open-source, if you've provided a quality proposal that we choose to implement, a GitHub issue will be created and your Slack handle will be included in the original post after `Issue reported by:`
8. If an external contributor other than yourself is hired to work on the issue, you will also be hired for the same job in Upwork. No additional work is needed. If the issue is fixed internally, a dedicated job will be created to hire and pay you after the issue is fixed.
9. Payment will be made 7 days after code is deployed to production if there are no regressions. If a regression is discovered, payment will be issued 7 days after all regressions are fixed.

>**Note:** Our problem solving approach at Expensify is to focus on high value problems and avoid small optimizations with results that are difficult to measure. We also prefer to identify and solve problems at their root. Given that, please ensure all proposed jobs fix a specific problem in a measurable way with evidence so they are easy to evaluate. Here's an example of a good problem/solution:
>
Expand Down Expand Up @@ -89,7 +91,7 @@ It’s possible that you found a bug or enhancement that we haven’t posted to
```
9. [Open a pull request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork), and make sure to fill in the required fields.
10. An Expensify engineer and a member from the Contributor-Plus team will be assigned to your pull request automatically to review.
11. Provide daily updates until reaching completion of your PR.
11. Daily updates on weekdays are highly recommended. If you know you won’t be able to provide updates for > 1 week, please comment on the PR or issue how long you plan to be out so that we may plan accordingly. We understand everyone needs a little vacation here and there. Any issue that doesn't receive an update for 1 full week may be considered abandoned and the original contract terminated.

#### Submit your pull request for final review
12. When you are ready to submit your pull request for final review, make sure the following checks pass:
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001012301
versionName "1.1.23-1"
versionCode 1001012406
versionName "1.1.24-6"
}
splits {
abi {
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.23</string>
<string>1.1.24</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.23.1</string>
<string>1.1.24.6</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.23</string>
<string>1.1.24</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.23.1</string>
<string>1.1.24.6</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.23-1",
"version": "1.1.24-6",
"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
6 changes: 4 additions & 2 deletions src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class Expensify extends PureComponent {
ActiveClientManager.init();
this.setNavigationReady = this.setNavigationReady.bind(this);
this.initializeClient = this.initializeClient.bind(true);
this.appStateChangeListener = null;
this.state = {
isNavigationReady: false,
isOnyxMigrated: false,
Expand All @@ -110,7 +111,7 @@ class Expensify extends PureComponent {
this.setState({isOnyxMigrated: true});
});

AppState.addEventListener('change', this.initializeClient);
this.appStateChangeListener = AppState.addEventListener('change', this.initializeClient);
}

componentDidUpdate(prevProps) {
Expand All @@ -134,7 +135,8 @@ class Expensify extends PureComponent {
}

componentWillUnmount() {
AppState.removeEventListener('change', this.initializeClient);
if (!this.appStateChangeListener) { return; }
this.appStateChangeListener.remove();
}

setNavigationReady() {
Expand Down
5 changes: 4 additions & 1 deletion src/components/AddPlaidBankAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ const propTypes = {

/** Routing number for the account */
routingNumber: PropTypes.string,

/** last 4 digits of the account number */
mask: PropTypes.string,
})),
}),

Expand Down Expand Up @@ -192,7 +195,7 @@ class AddPlaidBankAccount extends React.Component {
const accounts = this.getAccounts();
const token = this.getPlaidLinkToken();
const options = _.map(accounts, (account, index) => ({
value: index, label: `${account.addressName} ${account.accountNumber}`,
value: index, label: `${account.addressName} ${account.mask}`,
}));
const {icon, iconSize} = getBankIcon(this.state.institution.name);

Expand Down
7 changes: 5 additions & 2 deletions src/components/IOUConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const propTypes = {
/** Callback to inform parent modal of success */
onConfirm: PropTypes.func.isRequired,

/** Callback to to parent modal to send money */
onSendMoney: PropTypes.func.isRequired,

// Callback to update comment from IOUModal
onUpdateComment: PropTypes.func,

Expand Down Expand Up @@ -149,7 +152,7 @@ class IOUConfirmationList extends Component {
onPress(value) {
if (this.props.iouType === CONST.IOU.IOU_TYPE.SEND) {
Log.info(`[IOU] Sending money via: ${value}`);
this.props.onConfirm();
this.props.onSendMoney(value);
} else {
Log.info(`[IOU] Requesting money via: ${value}`);
this.props.onConfirm(this.getSplits());
Expand Down Expand Up @@ -387,7 +390,7 @@ class IOUConfirmationList extends Component {
onPress={this.onPress}
shouldShowPaypal={Boolean(recipient.payPalMeAddress)}
recipientPhoneNumber={recipient.phoneNumber}
currency={this.props.localCurrencyCode}
currency={this.props.iou.selectedCurrencyCode}
/>
) : (
<ButtonWithMenu
Expand Down
2 changes: 2 additions & 0 deletions src/components/ReportActionItem/IOUAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes
import IOUPreview from './IOUPreview';
import Navigation from '../../libs/Navigation/Navigation';
import ROUTES from '../../ROUTES';
import styles from '../../styles/styles';

const propTypes = {
/** All the data of the action */
Expand Down Expand Up @@ -50,6 +51,7 @@ const IOUAction = (props) => {
chatReportID={props.chatReportID}
onPayButtonPressed={launchDetailsModal}
onPreviewPressed={launchDetailsModal}
containerStyles={[styles.cursorPointer]}
/>
)}
</>
Expand Down
10 changes: 9 additions & 1 deletion src/components/ReportActionItem/IOUPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ const propTypes = {
/** The associated chatReport */
chatReportID: PropTypes.number.isRequired,

/** Callback for the preview pressed */
onPreviewPressed: PropTypes.func,

/** Extra styles to pass to View wrapper */
containerStyles: PropTypes.arrayOf(PropTypes.object),

/* Onyx Props */

/** Active IOU Report for current report */
Expand Down Expand Up @@ -72,6 +78,8 @@ const defaultProps = {
iouReport: {},
shouldHidePayButton: false,
onPayButtonPressed: null,
onPreviewPressed: () => {},
containerStyles: [],
};

const IOUPreview = (props) => {
Expand Down Expand Up @@ -103,7 +111,7 @@ const IOUPreview = (props) => {
const cachedTotal = props.iouReport.cachedTotal ? props.iouReport.cachedTotal.replace(/[()]/g, '') : '';
return (
<TouchableWithoutFeedback onPress={props.onPreviewPressed}>
<View style={styles.iouPreviewBox}>
<View style={[styles.iouPreviewBox, ...props.containerStyles]}>
{reportIsLoading
? <ActivityIndicator style={styles.iouPreviewBoxLoading} color={themeColors.text} />
: (
Expand Down
8 changes: 4 additions & 4 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,14 @@ export default {
},
passwordPage: {
changePassword: 'Change password',
changingYourPasswordPrompt: 'Changing your password will update your password for both your Expensify.com\nand New Expensify accounts.',
changingYourPasswordPrompt: 'Changing your password will update your password for both your Expensify.com and New Expensify accounts.',
currentPassword: 'Current password',
newPassword: 'New password',
newPasswordPrompt: 'New password must be different than your old password, have at least 8 characters,\n1 capital letter, 1 lowercase letter, and 1 number.',
newPasswordPrompt: 'New password must be different than your old password, have at least 8 characters, 1 capital letter, 1 lowercase letter, and 1 number.',
errors: {
currentPassword: 'Current password is required',
newPasswordSameAsOld: 'New password must be different than your old password',
newPassword: 'Your password must have at least 8 characters,\n1 capital letter, 1 lowercase letter, and 1 number.',
newPassword: 'Your password must have at least 8 characters, 1 capital letter, 1 lowercase letter, and 1 number.',
},
},
addPayPalMePage: {
Expand Down Expand Up @@ -445,7 +445,7 @@ export default {
setPasswordPage: {
enterPassword: 'Enter a password',
setPassword: 'Set password',
newPasswordPrompt: 'Your password must have at least 8 characters,\n1 capital letter, 1 lowercase letter, and 1 number.',
newPasswordPrompt: 'Your password must have at least 8 characters, 1 capital letter, 1 lowercase letter, and 1 number.',
passwordFormTitle: 'Welcome back to the New Expensify! Please set your password.',
passwordNotSet: 'We were unable to set your new password correctly.',
accountNotValidated: 'We were unable to validate your account. The validation code may have expired.',
Expand Down
8 changes: 4 additions & 4 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,14 @@ export default {
},
passwordPage: {
changePassword: 'Cambiar contraseña',
changingYourPasswordPrompt: 'El cambio de contraseña va a afectar tanto a la cuenta de Expensify.com\ncomo la de Nuevo Expensify.',
changingYourPasswordPrompt: 'El cambio de contraseña va a afectar tanto a la cuenta de Expensify.com como la de Nuevo Expensify.',
currentPassword: 'Contraseña actual',
newPassword: 'Nueva contraseña',
newPasswordPrompt: 'La nueva contraseña debe ser diferente de la antigua, tener al menos 8 caracteres,\n1 letra mayúscula, 1 letra minúscula y 1 número.',
newPasswordPrompt: 'La nueva contraseña debe ser diferente de la antigua, tener al menos 8 caracteres, 1 letra mayúscula, 1 letra minúscula y 1 número.',
errors: {
currentPassword: 'Contraseña actual es requerido',
newPasswordSameAsOld: 'La nueva contraseña tiene que ser diferente de la antigua',
newPassword: 'Su contraseña debe tener al menos 8 caracteres, \n1 letra mayúscula, 1 letra minúscula y 1 número.',
newPassword: 'Su contraseña debe tener al menos 8 caracteres, 1 letra mayúscula, 1 letra minúscula y 1 número.',
},
},
addPayPalMePage: {
Expand Down Expand Up @@ -445,7 +445,7 @@ export default {
setPasswordPage: {
enterPassword: 'Escribe una contraseña',
setPassword: 'Configura tu contraseña',
newPasswordPrompt: 'La contraseña debe tener al menos 8 caracteres, \n1 letra mayúscula, 1 letra minúscula y 1 número.',
newPasswordPrompt: 'La contraseña debe tener al menos 8 caracteres, 1 letra mayúscula, 1 letra minúscula y 1 número.',
passwordFormTitle: '¡Bienvenido de vuelta al Nuevo Expensify! Por favor, elige una contraseña.',
passwordNotSet: 'No pudimos establecer to contaseña correctamente.',
accountNotValidated: 'No pudimos validar tu cuenta. Es posible que el enlace de validación haya caducado.',
Expand Down
4 changes: 3 additions & 1 deletion src/libs/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ function Graphite_Timer(parameters) {
* @param {Object} parameters
* @param {Number} parameters.reportID
* @param {String} parameters.paymentMethodType
* @param {Object} [parameters.newIOUReportDetails]
* @returns {Promise}
*/
function PayIOU(parameters) {
Expand All @@ -541,6 +542,7 @@ function PayIOU(parameters) {
/**
* @param {Object} parameters
* @param {Number} parameters.reportID
* @param {Object} [parameters.newIOUReportDetails]
* @returns {Promise}
*/
function PayWithWallet(parameters) {
Expand Down Expand Up @@ -955,7 +957,7 @@ function BankAccount_SetupWithdrawal(parameters) {
'currentStep', 'policyID', 'bankAccountID', 'useOnfido', 'errorAttemptsCount', 'enableCardAfterVerified',

// data from bankAccount step:
'setupType', 'routingNumber', 'accountNumber', 'addressName', 'plaidAccountID', 'ownershipType', 'isSavings',
'setupType', 'routingNumber', 'accountNumber', 'addressName', 'plaidAccountID', 'mask', 'ownershipType', 'isSavings',
'acceptTerms', 'bankName', 'plaidAccessToken', 'alternateRoutingNumber',

// data from company step:
Expand Down
7 changes: 5 additions & 2 deletions src/libs/AppStateMonitor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ function addBecameActiveListener(callback) {
}
appState = state;
}
AppState.addEventListener('change', appStateChangeCallback);
const appStateChangeSubscription = AppState.addEventListener('change', appStateChangeCallback);
return () => {
AppState.removeEventListener('change', appStateChangeCallback);
if (!appStateChangeSubscription) {
return;
}
appStateChangeSubscription.remove();
};
}

Expand Down
Loading

0 comments on commit 7d95f69

Please sign in to comment.