From bc0d7a174ec3b909eac26cf2b70e0a87c49daf5d Mon Sep 17 00:00:00 2001 From: OSBotify Date: Thu, 4 Jan 2024 00:57:26 +0000 Subject: [PATCH 1/3] Update version to 1.4.21-4 (cherry picked from commit 4b9b55e01315ec2d2dd36c7fd0d02256b9a14a37) --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ad64afb89f98..4c6289456041 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -96,8 +96,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001042103 - versionName "1.4.21-3" + versionCode 1001042104 + versionName "1.4.21-4" } flavorDimensions "default" diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 47bacbf36415..ac41382486a5 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 1.4.21.3 + 1.4.21.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 87e0180d859a..ab58f3c293bd 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.4.21.3 + 1.4.21.4 diff --git a/package-lock.json b/package-lock.json index 8a79b89c6203..5761f2ae4d1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.4.21-3", + "version": "1.4.21-4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.4.21-3", + "version": "1.4.21-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 1df15ccd5631..6d136bd5992a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.4.21-3", + "version": "1.4.21-4", "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.", From 707bc4bf9c4a4a5492db4ae3cf9961ff2f3e4595 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Wed, 3 Jan 2024 15:25:41 -0700 Subject: [PATCH 2/3] Merge pull request #33896 from Expensify/revert-33397-fix/26946 Revert "Fix/26946: Reset amount when edit waypoint" (cherry picked from commit 5021a16e772f1e1422d8275ffb413f2f28a6f175) --- src/CONST.ts | 1 - src/libs/actions/IOU.js | 9 --------- src/libs/actions/Transaction.ts | 9 ++++++--- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index db3f479aa466..40483f9f08a7 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1176,7 +1176,6 @@ const CONST = { EXPENSIFY: 'Expensify', VBBA: 'ACH', }, - DEFAULT_AMOUNT: 0, TYPE: { SEND: 'send', SPLIT: 'split', diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index d0b3342d3f63..16a9384e8573 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -181,14 +181,6 @@ function setMoneyRequestAmount_temporaryForRefactor(transactionID, amount, curre Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {amount, currency}); } -/** - * Reset the money request amount, discarding the user-provided value. In the case of distance requests, this will effectively re-enable the default behavior of automatic amount calculation. - * @param {String} transactionID - */ -function resetMoneyRequestAmount_temporaryForRefactor(transactionID) { - Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {amount: CONST.IOU.DEFAULT_AMOUNT}); -} - /** * @param {String} transactionID * @param {String} created @@ -3469,5 +3461,4 @@ export { detachReceipt, getIOUReportID, editMoneyRequest, - resetMoneyRequestAmount_temporaryForRefactor, }; diff --git a/src/libs/actions/Transaction.ts b/src/libs/actions/Transaction.ts index 951851d72eb3..0a3f0e728c64 100644 --- a/src/libs/actions/Transaction.ts +++ b/src/libs/actions/Transaction.ts @@ -7,10 +7,16 @@ import * as CollectionUtils from '@libs/CollectionUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; +<<<<<<< HEAD import {RecentWaypoint, Transaction} from '@src/types/onyx'; import {OnyxData} from '@src/types/onyx/Request'; import {WaypointCollection} from '@src/types/onyx/Transaction'; import * as IOU from './IOU'; +======= +import type {RecentWaypoint, Transaction} from '@src/types/onyx'; +import type {OnyxData} from '@src/types/onyx/Request'; +import type {WaypointCollection} from '@src/types/onyx/Transaction'; +>>>>>>> 5021a16 (Merge pull request #33896 from Expensify/revert-33397-fix/26946) let recentWaypoints: RecentWaypoint[] = []; Onyx.connect({ @@ -59,7 +65,6 @@ function addStop(transactionID: string) { } function saveWaypoint(transactionID: string, index: string, waypoint: RecentWaypoint | null, isDraft = false) { - IOU.resetMoneyRequestAmount_temporaryForRefactor(transactionID); Onyx.merge(`${isDraft ? ONYXKEYS.COLLECTION.TRANSACTION : ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, { comment: { waypoints: { @@ -102,7 +107,6 @@ function saveWaypoint(transactionID: string, index: string, waypoint: RecentWayp } function removeWaypoint(transaction: Transaction, currentIndex: string, isDraft: boolean) { - IOU.resetMoneyRequestAmount_temporaryForRefactor(transaction.transactionID); // Index comes from the route params and is a string const index = Number(currentIndex); const existingWaypoints = transaction?.comment?.waypoints ?? {}; @@ -243,7 +247,6 @@ function getRouteForDraft(transactionID: string, waypoints: WaypointCollection) * which will replace the existing ones. */ function updateWaypoints(transactionID: string, waypoints: WaypointCollection, isDraft = false): Promise { - IOU.resetMoneyRequestAmount_temporaryForRefactor(transactionID); return Onyx.merge(`${isDraft ? ONYXKEYS.COLLECTION.TRANSACTION_DRAFT : ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, { comment: { waypoints, From 3316d5884493de997071210c7310b4bfefa8b98c Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 3 Jan 2024 15:39:20 -1000 Subject: [PATCH 3/3] Fix conflicts --- src/libs/actions/Transaction.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/libs/actions/Transaction.ts b/src/libs/actions/Transaction.ts index 0a3f0e728c64..2132ae1bdc61 100644 --- a/src/libs/actions/Transaction.ts +++ b/src/libs/actions/Transaction.ts @@ -7,16 +7,9 @@ import * as CollectionUtils from '@libs/CollectionUtils'; import * as TransactionUtils from '@libs/TransactionUtils'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -<<<<<<< HEAD import {RecentWaypoint, Transaction} from '@src/types/onyx'; import {OnyxData} from '@src/types/onyx/Request'; import {WaypointCollection} from '@src/types/onyx/Transaction'; -import * as IOU from './IOU'; -======= -import type {RecentWaypoint, Transaction} from '@src/types/onyx'; -import type {OnyxData} from '@src/types/onyx/Request'; -import type {WaypointCollection} from '@src/types/onyx/Transaction'; ->>>>>>> 5021a16 (Merge pull request #33896 from Expensify/revert-33397-fix/26946) let recentWaypoints: RecentWaypoint[] = []; Onyx.connect({