Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Mobile-Expensify
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009027304
versionName "9.2.73-4"
versionCode 1009027305
versionName "9.2.73-5"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.2.73.4</string>
<string>9.2.73.5</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
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>9.2.73</string>
<key>CFBundleVersion</key>
<string>9.2.73.4</string>
<string>9.2.73.5</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ShareViewController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.2.73</string>
<key>CFBundleVersion</key>
<string>9.2.73.4</string>
<string>9.2.73.5</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
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": "9.2.73-4",
"version": "9.2.73-5",
"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: 6 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,12 @@ const ROUTES = {
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
getUrlWithBackToParam(`settings/${policyID}/category/${encodeURIComponent(categoryName)}/gl-code` as const, backTo),
},
MONEY_REQUEST_STEP_CURRENCY: {
route: ':action/:iouType/currency/:transactionID/:reportID/:pageIndex?',
getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID: string, pageIndex = '', currency = '', backTo = '') =>
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
getUrlWithBackToParam(`${action as string}/${iouType as string}/currency/${transactionID}/${reportID}/${pageIndex}?currency=${currency}`, backTo),
},
MONEY_REQUEST_STEP_DATE: {
route: ':action/:iouType/date/:transactionID/:reportID/:reportActionID?',
getRoute: (action: IOUAction, iouType: IOUType, transactionID: string | undefined, reportID: string | undefined, backTo = '', reportActionID?: string) => {
Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ const SCREENS = {
STEP_UPGRADE: 'Money_Request_Step_Upgrade',
STEP_AMOUNT: 'Money_Request_Step_Amount',
STEP_CATEGORY: 'Money_Request_Step_Category',
STEP_CURRENCY: 'Money_Request_Step_Currency',
STEP_DATE: 'Money_Request_Step_Date',
STEP_DESCRIPTION: 'Money_Request_Step_Description',
STEP_DISTANCE: 'Money_Request_Step_Distance',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ const MoneyRequestModalStackNavigator = createModalStackNavigator<MoneyRequestNa
[SCREENS.MONEY_REQUEST.STEP_TAX_AMOUNT]: () => require<ReactComponentModule>('../../../../pages/iou/request/step/IOURequestStepTaxAmountPage').default,
[SCREENS.MONEY_REQUEST.STEP_TAX_RATE]: () => require<ReactComponentModule>('../../../../pages/iou/request/step/IOURequestStepTaxRatePage').default,
[SCREENS.MONEY_REQUEST.STEP_CATEGORY]: () => require<ReactComponentModule>('../../../../pages/iou/request/step/IOURequestStepCategory').default,
[SCREENS.MONEY_REQUEST.STEP_CURRENCY]: () => require<ReactComponentModule>('../../../../pages/iou/request/step/IOURequestStepCurrency').default,
[SCREENS.MONEY_REQUEST.STEP_DATE]: () => require<ReactComponentModule>('../../../../pages/iou/request/step/IOURequestStepDate').default,
[SCREENS.MONEY_REQUEST.STEP_DESCRIPTION]: () => require<ReactComponentModule>('../../../../pages/iou/request/step/IOURequestStepDescription').default,
[SCREENS.MONEY_REQUEST.STEP_DISTANCE]: () => require<ReactComponentModule>('../../../../pages/iou/request/step/IOURequestStepDistance').default,
Expand Down
1 change: 1 addition & 0 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,7 @@ const config: LinkingOptions<RootNavigatorParamList>['config'] = {
[SCREENS.MONEY_REQUEST.STEP_CATEGORY]: ROUTES.MONEY_REQUEST_STEP_CATEGORY.route,
[SCREENS.MONEY_REQUEST.STEP_CONFIRMATION]: ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.route,
[SCREENS.MONEY_REQUEST.STEP_CONFIRMATION_VERIFY_ACCOUNT]: ROUTES.MONEY_REQUEST_STEP_CONFIRMATION_VERIFY_ACCOUNT.route,
[SCREENS.MONEY_REQUEST.STEP_CURRENCY]: ROUTES.MONEY_REQUEST_STEP_CURRENCY.route,
[SCREENS.MONEY_REQUEST.STEP_DATE]: ROUTES.MONEY_REQUEST_STEP_DATE.route,
[SCREENS.MONEY_REQUEST.STEP_DESCRIPTION]: ROUTES.MONEY_REQUEST_STEP_DESCRIPTION.route,
[SCREENS.MONEY_REQUEST.STEP_DISTANCE]: ROUTES.MONEY_REQUEST_STEP_DISTANCE.route,
Expand Down
14 changes: 14 additions & 0 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,7 @@ type MoneyRequestNavigatorParamList = {
reportID: string;
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo: Routes;
currency?: string;
};
[SCREENS.MONEY_REQUEST.STEP_TAG]: {
action: IOUAction;
Expand Down Expand Up @@ -1652,6 +1653,7 @@ type MoneyRequestNavigatorParamList = {
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo: never;
action: never;
currency: never;
pageIndex?: string;
backToReport?: string;
reportActionID?: string;
Expand All @@ -1670,6 +1672,7 @@ type MoneyRequestNavigatorParamList = {
backTo: Routes;
action: IOUAction;
pageIndex?: string;
currency?: string;
backToReport?: string;
reportActionID?: string;
};
Expand Down Expand Up @@ -1714,6 +1717,16 @@ type MoneyRequestNavigatorParamList = {
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo: Routes;
};
[SCREENS.MONEY_REQUEST.STEP_CURRENCY]: {
action: IOUAction;
iouType: IOUType;
transactionID: string;
reportID: string;
pageIndex?: string;
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo?: Routes;
currency?: string;
};
[SCREENS.MONEY_REQUEST.HOLD]: {
/** ID of the transaction the page was opened for */
transactionID: string;
Expand Down Expand Up @@ -1825,6 +1838,7 @@ type MoneyRequestNavigatorParamList = {
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo: never;
action: never;
currency: never;
pageIndex?: string;
backToReport?: string;
reportActionID?: string;
Expand Down
20 changes: 20 additions & 0 deletions src/pages/iou/request/DistanceRequestStartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,26 @@ function DistanceRequestStartPage({
Navigation.closeRHPFlow();
};

// This useEffect is used to initialize the money request, so that currency will be reset to default currency on page reload.
useEffect(() => {
if (transaction?.amount !== 0) {
return;
}
initMoneyRequest({
reportID,
policy,
isFromGlobalCreate,
currentIouRequestType: transaction?.iouRequestType,
newIouRequestType: transaction?.iouRequestType,
report,
parentReport,
currentDate,
lastSelectedDistanceRates,
currentUserPersonalDetails,
});
// eslint-disable-next-line
}, []);

const resetIOUTypeIfChanged = useCallback(
(newIOUType: IOURequestType) => {
Keyboard.dismiss();
Expand Down
20 changes: 20 additions & 0 deletions src/pages/iou/request/IOURequestStartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,26 @@ function IOURequestStartPage({
Navigation.closeRHPFlow();
};

// This useEffect is used to initialize the money request, so that currency will be reset to default currency on page reload.
useEffect(() => {
if (transaction?.amount !== 0) {
return;
}
initMoneyRequest({
reportID,
policy,
isFromGlobalCreate,
currentIouRequestType: transaction?.iouRequestType,
newIouRequestType: transaction?.iouRequestType,
report,
parentReport,
currentDate,
lastSelectedDistanceRates,
currentUserPersonalDetails,
});
// eslint-disable-next-line
}, []);

const resetIOUTypeIfChanged = useCallback(
(newIOUType: IOURequestType) => {
Keyboard.dismiss();
Expand Down
Loading
Loading