Skip to content

Commit

Permalink
Merge pull request #33917 from Expensify/marcaaron-cherry-pick-stagin…
Browse files Browse the repository at this point in the history
…g-33896-1

🍒 Cherry pick PR #33896 to staging 🍒
  • Loading branch information
roryabraham committed Jan 4, 2024
2 parents 741f3ff + 3316d58 commit 3fcbf0b
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 21 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
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.21.3</string>
<string>1.4.21.4</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.21.3</string>
<string>1.4.21.4</string>
</dict>
</plist>
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": "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.",
Expand Down
1 change: 0 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,6 @@ const CONST = {
EXPENSIFY: 'Expensify',
VBBA: 'ACH',
},
DEFAULT_AMOUNT: 0,
TYPE: {
SEND: 'send',
SPLIT: 'split',
Expand Down
9 changes: 0 additions & 9 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -3469,5 +3461,4 @@ export {
detachReceipt,
getIOUReportID,
editMoneyRequest,
resetMoneyRequestAmount_temporaryForRefactor,
};
4 changes: 0 additions & 4 deletions src/libs/actions/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
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';

let recentWaypoints: RecentWaypoint[] = [];
Onyx.connect({
Expand Down Expand Up @@ -59,7 +58,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: {
Expand Down Expand Up @@ -102,7 +100,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 ?? {};
Expand Down Expand Up @@ -243,7 +240,6 @@ function getRouteForDraft(transactionID: string, waypoints: WaypointCollection)
* which will replace the existing ones.
*/
function updateWaypoints(transactionID: string, waypoints: WaypointCollection, isDraft = false): Promise<void> {
IOU.resetMoneyRequestAmount_temporaryForRefactor(transactionID);
return Onyx.merge(`${isDraft ? ONYXKEYS.COLLECTION.TRANSACTION_DRAFT : ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`, {
comment: {
waypoints,
Expand Down

0 comments on commit 3fcbf0b

Please sign in to comment.