Skip to content

Commit

Permalink
Merge pull request #33959 from DylanDylann/fix/26946-regression
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisl authored Jan 8, 2024
2 parents 906d840 + 5520db6 commit c8d9b3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ const CONST = {
EXPENSIFY: 'Expensify',
VBBA: 'ACH',
},
DEFAULT_AMOUNT: 0,
TYPE: {
SEND: 'send',
SPLIT: 'split',
Expand Down
4 changes: 3 additions & 1 deletion src/libs/actions/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function saveWaypoint(transactionID: string, index: string, waypoint: RecentWayp
[`waypoint${index}`]: waypoint,
},
},
amount: CONST.IOU.DEFAULT_AMOUNT,
// Empty out errors when we're saving a new waypoint as this indicates the user is updating their input
errorFields: {
route: null,
Expand Down Expand Up @@ -132,6 +133,7 @@ function removeWaypoint(transaction: Transaction, currentIndex: string, isDraft:
...transaction.comment,
waypoints: reIndexedWaypoints,
},
amount: CONST.IOU.DEFAULT_AMOUNT,
};

if (!isRemovedWaypointEmpty) {
Expand Down Expand Up @@ -244,7 +246,7 @@ function updateWaypoints(transactionID: string, waypoints: WaypointCollection, i
comment: {
waypoints,
},

amount: CONST.IOU.DEFAULT_AMOUNT,
// Empty out errors when we're saving new waypoints as this indicates the user is updating their input
errorFields: {
route: null,
Expand Down

0 comments on commit c8d9b3f

Please sign in to comment.