From 55572c31dee16d950538b0fdb8c52c234d0e661c Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Tue, 24 Dec 2024 11:18:13 -0800 Subject: [PATCH] Remove accidentally added client only Report key state --- src/libs/DebugUtils.ts | 2 -- src/types/onyx/Report.ts | 5 +---- src/types/utils/whitelistedReportKeys.ts | 1 - tests/data/Invoice.ts | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/libs/DebugUtils.ts b/src/libs/DebugUtils.ts index 9660a95d999d..109dbf2820f3 100644 --- a/src/libs/DebugUtils.ts +++ b/src/libs/DebugUtils.ts @@ -468,7 +468,6 @@ function validateReportDraftProperty(key: keyof Report, value: string) { case 'iouReportID': case 'preexistingReportID': case 'private_isArchived': - case 'state': case 'welcomeMessage': return validateString(value); case 'hasOutstandingChildRequest': @@ -631,7 +630,6 @@ function validateReportDraftProperty(key: keyof Report, value: string) { partial: CONST.RED_BRICK_ROAD_PENDING_ACTION, reimbursed: CONST.RED_BRICK_ROAD_PENDING_ACTION, preview: CONST.RED_BRICK_ROAD_PENDING_ACTION, - state: CONST.RED_BRICK_ROAD_PENDING_ACTION, welcomeMessage: CONST.RED_BRICK_ROAD_PENDING_ACTION, }); } diff --git a/src/types/onyx/Report.ts b/src/types/onyx/Report.ts index a864c369aab9..613f524b8c08 100644 --- a/src/types/onyx/Report.ts +++ b/src/types/onyx/Report.ts @@ -136,10 +136,7 @@ type Report = OnyxCommon.OnyxValueWithOfflineFeedback< /** ID of the chat report */ chatReportID?: string; - /** The state of the report */ - state?: keyof typeof CONST.REPORT.STATE_NUM; - - /** The state number of the report */ + /** The state that the report is currently in */ stateNum?: ValueOf; /** The status of the current report */ diff --git a/src/types/utils/whitelistedReportKeys.ts b/src/types/utils/whitelistedReportKeys.ts index 367da53d3122..7e27d49de1d6 100644 --- a/src/types/utils/whitelistedReportKeys.ts +++ b/src/types/utils/whitelistedReportKeys.ts @@ -63,7 +63,6 @@ type WhitelistedReport = OnyxCommon.OnyxValueWithOfflineFeedback< }; // eslint-disable-next-line @typescript-eslint/naming-convention private_isArchived: unknown; - state: unknown; welcomeMessage: unknown; }, PolicyReportField['fieldID'] diff --git a/tests/data/Invoice.ts b/tests/data/Invoice.ts index 650b9afab832..c94c7ce816be 100644 --- a/tests/data/Invoice.ts +++ b/tests/data/Invoice.ts @@ -269,7 +269,6 @@ const convertedInvoiceChat: OnyxTypes.Report = { private_isArchived: '', reportID: '7605647250932303', reportName: 'Chat Report', - state: 'OPEN', stateNum: 0, statusNum: 0, total: 0,