Skip to content

Commit

Permalink
Merge branch 'Expensify:main' into krishna2323/issue/36901
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishna2323 authored Feb 22, 2024
2 parents 2f3df12 + 903e1a1 commit 7c77703
Show file tree
Hide file tree
Showing 308 changed files with 4,193 additions and 4,276 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/failureNotifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
repo: context.repo.repo,
title: issueTitle,
body: issueBody,
labels: [failureLabel, 'Daily'],
labels: [failureLabel, 'Hourly'],
assignees: [prMerger]
});
}
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 1001044303
versionName "1.4.43-3"
versionCode 1001044313
versionName "1.4.43-13"
}

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.
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>
18 changes: 12 additions & 6 deletions docs/redirects.csv
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ https://community.expensify.com/discussion/5194/how-to-assign-a-vacation-delegat
https://community.expensify.com/discussion/5190/how-to-individually-assign-a-vacation-delegate-from-account-settings,https://help.expensify.com/articles/expensify-classic/manage-employees-and-report-approvals/Vacation-Delegate
https://community.expensify.com/discussion/5274/how-to-set-up-an-adp-indirect-integration-with-expensify,https://help.expensify.com/articles/expensify-classic/integrations/HR-integrations/ADP
https://community.expensify.com/discussion/5776/how-to-create-mileage-expenses-in-expensify,https://help.expensify.com/articles/expensify-classic/get-paid-back/Distance-Tracking
https://community.expensify.com/discussion/7385/how-to-enable-two-factor-authentication-in-your-account,https://help.expensify.com/articles/expensify-classic/account-settings/Account-Details
https://community.expensify.com/discussion/5124/how-to-add-your-name-and-photo-to-your-account,https://help.expensify.com/articles/expensify-classic/account-settings/Account-Details
https://community.expensify.com/discussion/5149/how-to-manage-your-devices-in-expensify,https://help.expensify.com/articles/expensify-classic/account-settings/Account-Details
https://community.expensify.com/discussion/4432/how-to-add-a-secondary-login,https://help.expensify.com/articles/expensify-classic/account-settings/Account-Details
https://community.expensify.com/discussion/6794/how-to-change-your-email-in-expensify,https://help.expensify.com/articles/expensify-classic/account-settings/Account-Details
https://community.expensify.com/discussion/7385/how-to-enable-two-factor-authentication-in-your-account,https://help.expensify.com/expensify-classic/hubs/settings/account-settings
https://community.expensify.com/discussion/5124/how-to-add-your-name-and-photo-to-your-account,https://help.expensify.com/expensify-classic/hubs/settings/account-settings
https://community.expensify.com/discussion/5149/how-to-manage-your-devices-in-expensify,https://help.expensify.com/expensify-classic/hubs/settings/account-settings
https://community.expensify.com/discussion/4432/how-to-add-a-secondary-login,https://help.expensify.com/expensify-classic/hubs/settings/account-settings
https://community.expensify.com/discussion/6794/how-to-change-your-email-in-expensify,https://help.expensify.com/expensify-classic/hubs/settings/account-settings
https://help.expensify.com/articles/expensify-classic/expensify-card/Expensify-Card-Perks.html,https://use.expensify.com/company-credit-card
https://help.expensify.com/articles/expensify-classic/expensify-partner-program/How-to-Join-the-ExpensifyApproved!-Partner-Program.html,https://use.expensify.com/accountants-program
https://help.expensify.com/articles/expensify-classic/getting-started/approved-accountants/Card-Revenue-Share-For-Expensify-Approved-Partners, https://use.expensify.com/blog/maximizing-rewards-expensifyapproved-accounting-partners-now-earn-0-5-revenue-share
https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/International-Reimbursements,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/Global-Reimbursements
https://community.expensify.com/discussion/4452/how-to-merge-accounts,https://help.expensify.com/articles/expensify-classic/account-settings/Merge-Accounts
https://community.expensify.com/discussion/4452/how-to-merge-accounts,https://help.expensify.com/articles/expensify-classic/settings/account-settings/Merge-accounts
https://community.expensify.com/discussion/4783/how-to-add-or-remove-a-copilot,https://help.expensify.com/articles/expensify-classic/account-settings/Copilot
https://community.expensify.com/discussion/4343/expensify-anz-partnership-announcement,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/company-cards/Connect-ANZ
https://community.expensify.com/discussion/7318/deep-dive-company-credit-card-import-options,https://help.expensify.com/articles/expensify-classic/bank-accounts-and-credit-cards/company-cards
Expand All @@ -54,3 +54,9 @@ https://help.expensify.com/articles/expensify-classic/getting-started/Employees,
https://help.expensify.com/articles/expensify-classic/getting-started/Using-The-App,https://help.expensify.com/articles/expensify-classic/getting-started/Join-your-company's-workspace
https://help.expensify.com/articles/expensify-classic/getting-started/support/Expensify-Support,https://use.expensify.com/support
https://help.expensify.com/articles/expensify-classic/getting-started/Plan-Types,https://use.expensify.com/
https://help.expensify.com/articles/new-expensify/payments/Referral-Program,https://help.expensify.com/articles/expensify-classic/get-paid-back/Referral-Program
https://help.expensify.com/articles/expensify-classic/account-settings/Account-Details,https://help.expensify.com/expensify-classic/hubs/settings/account-settings
https://help.expensify.com/articles/expensify-classic/account-settings/Preferences,https://help.expensify.com/expensify-classic/hubs/settings/account-settings
https://help.expensify.com/articles/expensify-classic/account-settings/Merge-Accounts,https://help.expensify.com/articles/expensify-classic/settings/account-settings/Merge-accounts
https://help.expensify.com/articles/expensify-classic/getting-started/Individual-Users,https://help.expensify.com/articles/expensify-classic/getting-started/Create-a-workspace-for-yourself
https://help.expensify.com/articles/expensify-classic/getting-started/Invite-Members,https://help.expensify.com/articles/expensify-classic/manage-employees-and-report-approvals/Invite-Members
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.4.43.3</string>
<string>1.4.43.13</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.4.43.3</string>
<string>1.4.43.13</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>1.4.43</string>
<key>CFBundleVersion</key>
<string>1.4.43.3</string>
<string>1.4.43.13</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
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
`<rootDir>/?(*.)+(spec|test).${testFileExtension}`,
],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.[jt]sx?$': 'babel-jest',
'^.+\\.svg?$': 'jest-transformer-svg',
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!react-native)/'],
Expand Down
Loading

0 comments on commit 7c77703

Please sign in to comment.