Skip to content

Commit f464ef2

Browse files
authored
Merge branch 'Expensify:main' into fix/65612
2 parents 3361403 + e2fe31f commit f464ef2

15 files changed

Lines changed: 124 additions & 36 deletions

File tree

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009020203
118-
versionName "9.2.2-3"
117+
versionCode 1009020204
118+
versionName "9.2.2-4"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

ios/NewExpensify/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.2.2.3</string>
47+
<string>9.2.2.4</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

ios/NotificationServiceExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.2.2</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.2.2.3</string>
16+
<string>9.2.2.4</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

ios/ShareViewController/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.2.2</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.2.2.3</string>
16+
<string>9.2.2.4</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionAttributes</key>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "9.2.2-3",
3+
"version": "9.2.2-4",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",

src/ROUTES.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,16 +1588,20 @@ const ROUTES = {
15881588
},
15891589
WORKSPACE_OWNER_CHANGE_SUCCESS: {
15901590
route: 'workspaces/:policyID/change-owner/:accountID/success',
1591-
getRoute: (policyID: string, accountID: number) => `workspaces/${policyID}/change-owner/${accountID}/success` as const,
1591+
getRoute: (policyID: string, accountID: number, backTo?: string) => getUrlWithBackToParam(`workspaces/${policyID}/change-owner/${accountID}/success` as const, backTo),
15921592
},
15931593
WORKSPACE_OWNER_CHANGE_ERROR: {
15941594
route: 'workspaces/:policyID/change-owner/:accountID/failure',
1595-
getRoute: (policyID: string, accountID: number) => `workspaces/${policyID}/change-owner/${accountID}/failure` as const,
1595+
getRoute: (policyID: string, accountID: number, backTo?: string) => getUrlWithBackToParam(`workspaces/${policyID}/change-owner/${accountID}/failure` as const, backTo),
15961596
},
15971597
WORKSPACE_OWNER_CHANGE_CHECK: {
15981598
route: 'workspaces/:policyID/change-owner/:accountID/:error',
1599-
getRoute: (policyID: string, accountID: number, error: ValueOf<typeof CONST.POLICY.OWNERSHIP_ERRORS>) =>
1600-
`workspaces/${policyID}/change-owner/${accountID}/${error as string}` as const,
1599+
getRoute: (policyID: string | undefined, accountID: number, error: ValueOf<typeof CONST.POLICY.OWNERSHIP_ERRORS>, backTo?: string) => {
1600+
if (!policyID) {
1601+
Log.warn('Invalid policyID is used to build the WORKSPACE_OWNER_CHANGE_CHECK route');
1602+
}
1603+
return getUrlWithBackToParam(`workspaces/${policyID}/change-owner/${accountID}/${error as string}` as const, backTo);
1604+
},
16011605
},
16021606
WORKSPACE_TAX_CREATE: {
16031607
route: 'workspaces/:policyID/taxes/new',

src/libs/Navigation/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,15 +505,18 @@ type SettingsNavigatorParamList = {
505505
[SCREENS.WORKSPACE.OWNER_CHANGE_SUCCESS]: {
506506
policyID: string;
507507
accountID: number;
508+
backTo?: Routes;
508509
};
509510
[SCREENS.WORKSPACE.OWNER_CHANGE_ERROR]: {
510511
policyID: string;
511512
accountID: number;
513+
backTo?: Routes;
512514
};
513515
[SCREENS.WORKSPACE.OWNER_CHANGE_CHECK]: {
514516
policyID: string;
515517
accountID: number;
516518
error: ValueOf<typeof CONST.POLICY.OWNERSHIP_ERRORS>;
519+
backTo?: Routes;
517520
};
518521
[SCREENS.WORKSPACE.CREATE_DISTANCE_RATE]: {
519522
policyID: string;

src/libs/actions/Policy/Member.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,11 @@ function updateWorkspaceMembersRole(policyID: string, accountIDs: number[], newR
796796
API.write(WRITE_COMMANDS.UPDATE_WORKSPACE_MEMBERS_ROLE, params, {optimisticData, successData, failureData});
797797
}
798798

799-
function requestWorkspaceOwnerChange(policyID: string) {
799+
function requestWorkspaceOwnerChange(policyID: string | undefined) {
800+
if (!policyID) {
801+
return;
802+
}
803+
800804
// This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850
801805
// eslint-disable-next-line deprecation/deprecation
802806
const policy = getPolicy(policyID);
@@ -874,7 +878,11 @@ function requestWorkspaceOwnerChange(policyID: string) {
874878
API.write(WRITE_COMMANDS.REQUEST_WORKSPACE_OWNER_CHANGE, params, {optimisticData, successData, failureData});
875879
}
876880

877-
function clearWorkspaceOwnerChangeFlow(policyID: string) {
881+
function clearWorkspaceOwnerChangeFlow(policyID: string | undefined) {
882+
if (!policyID) {
883+
return;
884+
}
885+
878886
Onyx.merge(ONYXKEYS.POLICY_OWNERSHIP_CHANGE_CHECKS, null);
879887
Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {
880888
errorFields: null,

0 commit comments

Comments
 (0)