Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into 36515-update-sign-i…
Browse files Browse the repository at this point in the history
…n-page-structure
  • Loading branch information
suneox committed Feb 21, 2024
2 parents a4fab45 + 2fc1d53 commit e469805
Show file tree
Hide file tree
Showing 194 changed files with 2,181 additions and 2,884 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup NodeJS
uses: ./.github/actions/composite/setupNode
Expand All @@ -22,6 +24,22 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "Test"
- name: Get common ancestor commit
run: |
git fetch origin main
common_ancestor=$(git merge-base "${{ github.sha }}" origin/main)
echo "COMMIT_HASH=$common_ancestor" >> "$GITHUB_ENV"
- name: Clean up deleted files
run: |
DELETED_FILES=$(git diff --name-only --diff-filter=D "$COMMIT_HASH" "${{ github.sha }}")
for file in $DELETED_FILES; do
if [ -n "$file" ]; then
rm -f "$file"
echo "Deleted file: $file"
fi
done
- name: Run performance testing script
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ For an M1 Mac, read this [SO](https://stackoverflow.com/questions/64901180/how-t
* To run a on a **Development Simulator**: `npm run ios`
* Changes applied to Javascript will be applied automatically, any changes to native code will require a recompile

If you want to run the app on an actual physical iOS device, please follow the instructions [here](https://github.com/Expensify/App/blob/docs/how-to-build-app-on-physcial-device/contributingGuides/HOW_TO_BUILD_APP_ON_PHYSICAL_IOS_DEVICE.md).
If you want to run the app on an actual physical iOS device, please follow the instructions [here](https://github.com/Expensify/App/blob/main/contributingGuides/HOW_TO_BUILD_APP_ON_PHYSICAL_IOS_DEVICE.md).

## Running the Android app 🤖
* Before installing Android dependencies, you need to obtain a token from Mapbox to download their SDKs. Please run `npm run configure-mapbox` and follow the instructions. If you already did this step for iOS, there is no need to repeat this step.
Expand Down
4 changes: 2 additions & 2 deletions __mocks__/@react-native-community/netinfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {NetInfoCellularGeneration, NetInfoStateType} from '@react-native-communi
import type {addEventListener, configure, fetch, NetInfoState, refresh, useNetInfo} from '@react-native-community/netinfo';

const defaultState: NetInfoState = {
type: NetInfoStateType.cellular,
type: NetInfoStateType?.cellular,
isConnected: true,
isInternetReachable: true,
details: {
isConnectionExpensive: true,
cellularGeneration: NetInfoCellularGeneration['3g'],
cellularGeneration: NetInfoCellularGeneration?.['3g'],
carrier: 'T-Mobile',
},
};
Expand Down
27 changes: 0 additions & 27 deletions __mocks__/react-native-onyx.js

This file was deleted.

43 changes: 43 additions & 0 deletions __mocks__/react-native-onyx.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* We are disabling the lint rule that doesn't allow the usage of Onyx.connect outside libs
* because the intent of this file is to mock the usage of react-native-onyx so we will have to mock the connect function
*/

/* eslint-disable rulesdir/prefer-onyx-connect-in-libs */
import type {ConnectOptions, OnyxKey} from 'react-native-onyx';
import Onyx, {withOnyx} from 'react-native-onyx';

let connectCallbackDelay = 0;
function addDelayToConnectCallback(delay: number) {
connectCallbackDelay = delay;
}

type ReactNativeOnyxMock = {
addDelayToConnectCallback: (delay: number) => void;
} & typeof Onyx;

type ConnectionCallback<TKey extends OnyxKey> = NonNullable<ConnectOptions<TKey>['callback']>;
type ConnectionCallbackParams<TKey extends OnyxKey> = Parameters<ConnectionCallback<TKey>>;

const reactNativeOnyxMock: ReactNativeOnyxMock = {
...Onyx,
connect: <TKey extends OnyxKey>(mapping: ConnectOptions<TKey>) => {
const callback = (...params: ConnectionCallbackParams<TKey>) => {
if (connectCallbackDelay > 0) {
setTimeout(() => {
(mapping.callback as (...args: ConnectionCallbackParams<TKey>) => void)?.(...params);
}, connectCallbackDelay);
} else {
(mapping.callback as (...args: ConnectionCallbackParams<TKey>) => void)?.(...params);
}
};
return Onyx.connect({
...mapping,
callback,
});
},
addDelayToConnectCallback,
};

export default reactNativeOnyxMock;
export {withOnyx};
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001044204
versionName "1.4.42-4"
versionCode 1001044306
versionName "1.4.43-6"
}

flavorDimensions "default"
Expand Down
15 changes: 15 additions & 0 deletions android/app/src/main/java/com/expensify/chat/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.expensify.chat

import android.app.ActivityManager
import android.content.res.Configuration
import android.database.CursorWindow
import android.os.Process
import androidx.multidex.MultiDexApplication
import com.expensify.chat.bootsplash.BootSplashPackage
import com.facebook.react.PackageList
Expand Down Expand Up @@ -40,6 +42,10 @@ class MainApplication : MultiDexApplication(), ReactApplication {
override fun onCreate() {
super.onCreate()

if (isOnfidoProcess()) {
return
}

SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
Expand Down Expand Up @@ -73,4 +79,13 @@ class MainApplication : MultiDexApplication(), ReactApplication {
super.onConfigurationChanged(newConfig)
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}

private fun isOnfidoProcess(): Boolean {
val pid = Process.myPid()
val manager = this.getSystemService(ACTIVITY_SERVICE) as ActivityManager

return manager.runningAppProcesses.any {
it.pid == pid && it.processName.endsWith(":onfido_process")
}
}
}
7 changes: 7 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ allprojects {
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
force "com.facebook.react:hermes-engine:" + REACT_NATIVE_VERSION

eachDependency { dependency ->
if (dependency.requested.group == 'org.bouncycastle') {
println dependency.requested.module
dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.71'
}
}
}
}
repositories {
Expand Down
22 changes: 22 additions & 0 deletions assets/images/avatars/notifications-avatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions desktop/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 desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"electron-context-menu": "^2.3.0",
"electron-log": "^4.4.8",
"electron-serve": "^1.3.0",
"electron-updater": "^6.1.7",
"electron-updater": "^6.1.8",
"node-machine-id": "^1.1.12"
},
"author": "Expensify, Inc.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ The card will only appear in the drop-down list for assignment once it’s activ
# Troubleshooting issues assigning company cards

## Why do bank connections break?
Banks often make changes to safeguard your confidential information, and when they do, we need to update the connection between Expensify and the bank. We have a team of engineers that works closely with banks to monitor this and update our software accordingly when this happens.
Banks often make changes to safeguard your confidential information, and when they do, we need to update the connection between Expensify and the bank. We have a team of engineers who work closely with banks to monitor this and update our software accordingly when this happens.
The first step is to check if there have been any changes to your bank information. Have you recently changed your banking password without updating it in Expensify? Has your banking username or card number been updated? Did you update your security questions for your bank?
If you've answered "yes" to any of these questions, a Domain Admins need to update this information in Expensify and manually reestablish the connection by heading to *Settings* > *Domains* > _Domain Name_ > *Company Cards* > *Fix*. The Domain Admin will be prompted to enter the new credentials/updated information and this should reestablish the connection.
If you've answered "yes" to any of these questions, a Domain Admins need to update this information in Expensify and manually re-establish the connection by heading to *Settings* > *Domains* > _Domain Name_ > *Company Cards* > *Fix*. The Domain Admin will be prompted to enter the new credentials/updated information and this should reestablish the connection.

## How do I resolve errors while I’m trying to import my card?*
Make sure you're importing your card in the correct spot in Expensify and selecting the right bank connection. For company cards, use the master administrative credentials to import your set of cards at *Settings* > *Domains* > _Domain Name_ > *Company Cards* > *Import Card*.
Please note there are some things that cannot be bypassed within Expensify, including two-factor authentication being enabled within your bank account. This will prevent the connection from remaining stable and will need to be turned off on the bank side.

## What are the most reliable bank connections in Expensify?*
The most reliable corporate card to use with Expensify is the Expensify Card. We offer daily settlement, unapproved expense limits, and real-time compliance for secure and efficient spending, as well as 2% cash back. Click here to learn more or apply.
The most reliable corporate card to use with Expensify is the Expensify Visa® Commercial Card. We offer daily settlement, unapproved expense limits, and real-time compliance for secure and efficient spending, as well as 2% cash back (_Applies to USD purchases only._) Click here to learn more or apply.
Additionally, we've teamed up with major banks worldwide to ensure a smooth import of credit card transactions into your accounts. Corporate cards from the following banks also offer the most dependable connections in Expensify:
- American Express
- Bank of America
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ As mentioned above, we’ll be able to pull in transactions as they post (daily)
Expensify provides a corporate card with the following features:

- Up to 2% cash back (_Applies to USD purchases only._)
- [SmartLimits]([https://help.expensify.com/articles/expensify-classic/expensify-card/Card-Settings](https://community.expensify.com/discussion/4851/deep-dive-what-are-smart-limits?utm_source=community-search&utm_medium=organic-search&utm_term=smart+limits)) to control what each individual cardholder can spend
- [SmartLimits](https://help.expensify.com/articles/expensify-classic/expensify-card/Cardholder-Settings-and-Features) to control what each individual cardholder can spend
- A stable, unbreakable real-time connection (third-party bank feeds can run into connectivity issues)
- Receipt compliance - informing notifications (e.g. add a receipt!) for users *as soon as the card is swiped*
- Unlimited Virtual Cards - single-purpose cards with a fixed or monthly limit for specific company purchases
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Manage devices
description: Control which devices can access your Expensify account
---
<div id="expensify-classic" markdown="1">

You can see which devices have been used to access your Expensify account and even remove devices that you no longer want to have access to your account.

{% include info.html %}
This process is currently not available from the mobile app and must be completed from the Expensify website.
{% include end-info.html %}

1. Hover over Settings and click **Account**.
2. Under Account Details, scroll down to the Device Management section.
3. Click **Device Management** to expand the section.
4. Review the devices that have access to your account. To remove access for a specific device, click **Revoke** next to it.

</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Set notifications
description: Select your Expensify notification preferences
---
<div id="expensify-classic" markdown="1">

{% include info.html %}
This process is currently not available from the mobile app and must be completed from the Expensify website.
{% include end-info.html %}

1. Hover over Settings and click **Account**.
2. Click the **Preferences** tab on the left.
3. Scroll down to the Contact Preferences section.
4. Select the checkbox for the types of notifications you wish to receive.
</div>
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.42</string>
<string>1.4.43</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.42.4</string>
<string>1.4.43.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.4.42</string>
<string>1.4.43</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.42.4</string>
<string>1.4.43.6</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>1.4.42</string>
<string>1.4.43</string>
<key>CFBundleVersion</key>
<string>1.4.42.4</string>
<string>1.4.43.6</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ PODS:
- nanopb/encode (= 2.30908.0)
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- Onfido (28.3.1)
- onfido-react-native-sdk (8.3.0):
- Onfido (~> 28.3.0)
- Onfido (29.6.0)
- onfido-react-native-sdk (10.6.0):
- Onfido (~> 29.6.0)
- React
- OpenSSL-Universal (1.1.1100)
- Plaid (4.7.0)
Expand Down Expand Up @@ -1903,8 +1903,8 @@ SPEC CHECKSUMS:
MapboxMaps: cbb38845a9bf49b124f0e937975d560a4e01894e
MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
Onfido: 564f60c39819635ec5b549285a1eec278cc9ba67
onfido-react-native-sdk: b346a620af5669f9fecb6dc3052314a35a94ad9f
Onfido: c52e797b10cc9e6d29ba91996cb62e501000bfdd
onfido-react-native-sdk: 4e7f0a7a986ed93cb906d2e0b67a6aab9202de0b
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Plaid: 431ef9be5314a1345efb451bc5e6b067bfb3b4c6
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
Expand Down
Loading

0 comments on commit e469805

Please sign in to comment.