Skip to content

Send optimistic transactionThreadReportID and createdReportActionIDForThread with API commands RequestMoney, CreateDistanceRequest, CompleteSplitBill, SendMoney #31411

Description

@cead22
  • Design Doc
  • 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})

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions