You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Send optimistic transactionThreadReportID and createdReportActionIDForThread with API commands RequestMoney, CreateDistanceRequest, CompleteSplitBill, SendMoney #31411
The back end changes will be done in a separate issue
Update getMoneyRequestInformation to generate an optimistic transactionThreadReportID and createdReportActionIDForThread using ReportUtils.buildTransactionThread
Here's a commit with a proof-of-concept for these changes
We should make sure we're updating optimisticData with both values correctly
Ignore the comment // TODO add logic to create transaction thread for each DM between split participants
Update getSendMoneyParams like getMoneyRequestInformation, send transactionThreadReportID and createdReportActionIDForThread, and add this to the request's optimisticData
For the case of CompleteSplitBill where the user enters details manually before SmartScan finishes, we’ll generate random reportIDs in the client
Create a transactionThread and a created report action optimistically before the call to buildOnyxDataForMoneyRequest inside completeSplitBill like we do in getMoneyRequestInformation
Pass optimisticCreatedAction.reportID as the last param to the buildOnyxDataForMoneyRequest call
Add transactionThreadReportID: transactionThread.reportID and createdReportActionIDForThread: optimisticCreatedAction.reportActionID to the params object we pass to API.write(‘CompleteSplitBill’, {params})
ReportUtils.buildTransactionThread// TODO add logic to create transaction thread for each DM between split participantsbuildOnyxDataForMoneyRequestinsidecompleteSplitBilllike we do ingetMoneyRequestInformationoptimisticCreatedAction.reportIDas the last param to thebuildOnyxDataForMoneyRequestcalltransactionThreadReportID: transactionThread.reportIDandcreatedReportActionIDForThread: optimisticCreatedAction.reportActionIDto the params object we pass toAPI.write(‘CompleteSplitBill’, {params})