-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/26946: Reset amount when edit waypoint #33397
Changes from all commits
d2a518f
8dc2e06
b67fd61
ef91894
0bb3412
c762d02
97e2052
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,6 +178,14 @@ 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}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this lead to a regression because it doesn't not take
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tgolen I will raise a quick PR to fix it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe that this may be another regression w/ the same cause |
||
} | ||
|
||
/** | ||
* @param {String} transactionID | ||
* @param {String} created | ||
|
@@ -3434,4 +3442,5 @@ export { | |
detachReceipt, | ||
getIOUReportID, | ||
editMoneyRequest, | ||
resetMoneyRequestAmount_temporaryForRefactor, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description:
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated