Skip to content

[Split #94595] Batch B - Remove useOnyx deps from transaction/report/policy hooks #95575

Description

@mountiny

Sub-issue of #94595.
Source plan: fabioh8010 comment.

Goal

Remove the deprecated 3rd dependencies argument from transaction/report/policy shared hooks.

Scope (12 files)

  • hooks/useReportTransactions
  • hooks/useTransactionsByID
  • hooks/useTransactionViolation
  • hooks/useTransactionViolationOfWorkspace
  • hooks/useTripTransactions
  • hooks/useResetBankAccountModal
  • hooks/useReportPrimaryAction
  • hooks/useSelectionModeReportActions
  • hooks/useShouldShowEmptyReportConfirmation
  • hooks/useShowNotFoundPageInIOUStep
  • hooks/useParticipantsPolicies (RESTRUCTURE)
  • hooks/useParticipantsPolicyTags (RESTRUCTURE)

Change types

INLINE + 2 RESTRUCTURE files (useParticipantsPolicies, useParticipantsPolicyTags — factory signature participants → policyIDs).

Risk

Medium — review the 2 RESTRUCTURE files closely.

Dependencies

Blocked by PR 1 (ESLint guard) merged.

Tests / QA

Open an expense report with transactions & violations; open a Trip room (trip transactions); reject/submit flows; participant-policy pickers — verify correct policies/tags resolve.

Acceptance criteria

  1. npm run fmt on changed files
  2. npm run lint-changed — seatbelt count for rulesdir/no-useonyx-dependencies-arg must drop (never increase)
  3. npm run typecheck stays green
  4. npm run react-compiler-compliance-check check <files> — USECALLBACK/bailout files must not gain new failures vs main
  5. Relevant npm run test for touched areas
  6. Manual smoke test per batch QA steps — no stale data, infinite re-renders, or JS console errors
Issue OwnerCurrent Issue Owner: @hoangzinh

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
SUBISSUE

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions