Skip to content

[PAID] [$500] Update getIOUReportActionDisplayMessage() to accept the transaction as a parameter #38355

@tgolen

Description

@tgolen

This is coming from #27262. You can read the issue description there to get context behind the problem being solved and the mess being cleaned up.

Problem

ReportUtils.getIOUReportActionDisplayMessage() is called from a view component. It contains logic which calls const transaction = TransactionUtils.getTransaction(originalMessage.IOUTransactionID ?? ''); (a deprecated method).

Why this is important to fix

It maintains more pure and exact flow of data through the react application. If the view is using transaction data, then it needs to subscribe to the transaction in Onyx so that it's assured that the transaction object will never be stale or out-of-date.

Solution

  • Pass transaction as a parameter to getIOUReportActionDisplayMessage() and get the parameter from withOnyx() in the view component.
  • Remove the deprecated method completely
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cae110240999840b
  • Upwork Job ID: 1768370164615811072
  • Last Price Increase: 2024-03-14
  • Automatic offers:
    • hoangzinh | Reviewer | 0
    • FitseTLT | Contributor | 0
Issue OwnerCurrent Issue Owner: @strepanier03

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions