Open IuliiaHerets opened 3 hours ago
Triggered auto assignment to @jliexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Edited by proposal-police: This proposal was edited at 2024-11-07 16:12:46 UTC.
Distance - After tapping split expense with amount button, briefly "split expense" button shown
We reset the draft transaction on creating the expense and we show the split expense
button if the iouAmount is 0
https://github.com/Expensify/App/blob/8a83e2baa1c7ce7ee2c31103574937c0484854be/src/components/MoneyRequestConfirmationList.tsx#L414-L415
so as the draft transaction amount is not available (0) it will show 'split expense'
We can remove the draft transaction clearing code every where we are clearing it now like here https://github.com/Expensify/App/blob/8a83e2baa1c7ce7ee2c31103574937c0484854be/src/libs/actions/IOU.ts#L4134-L4136 here here here Because we are already clearing the draft transaction in startMoneyRequest https://github.com/Expensify/App/blob/8a83e2baa1c7ce7ee2c31103574937c0484854be/src/libs/actions/IOU.ts#L392-L393 We can apply the change for our split case related to the current issue but I think it is better to apply it globally.
Alternatively we can use TransactionEdit.removeDraftTransaction
with runAfterInteraction here
https://github.com/Expensify/App/blob/8a83e2baa1c7ce7ee2c31103574937c0484854be/src/pages/iou/request/step/IOURequestStepConfirmation.tsx#L377
InteractionManager.runAfterInteractions(() => removeDraftTransaction(CONST.IOU.OPTIMISTIC_TRANSACTION_ID));
If we feel unsafe clearing the draft transaction before the create request actions have been called ( as we need the draft transaction value inside the functions) we can call it after the createTransaction
function calls
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 5.0.49-0 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
After tapping split expense with amount button, briefly "split expense" button must not be shown before showing conversation page.
Actual Result:
After tapping split expense with amount button, briefly "split expense" button is shown before showing conversation page.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/374688a8-ad09-4217-bd6c-47f5a95ad8ed
View all open jobs on GitHub