From cb579918076708d2af5046db123890664d258f94 Mon Sep 17 00:00:00 2001 From: Anusha Date: Thu, 10 Aug 2023 23:03:24 +0500 Subject: [PATCH] iou console fix --- src/components/ReportActionItem/TaskPreview.js | 2 +- src/libs/actions/IOU.js | 11 ----------- src/pages/NewChatPage.js | 2 +- src/pages/ReportParticipantsPage.js | 2 +- src/pages/SearchPage.js | 2 +- src/pages/tasks/TaskAssigneeSelectorModal.js | 2 +- src/pages/tasks/TaskShareDestinationSelectorModal.js | 2 +- src/pages/workspace/WorkspaceMembersPage.js | 2 +- 8 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/components/ReportActionItem/TaskPreview.js b/src/components/ReportActionItem/TaskPreview.js index d05ebd4bfd09..cd0e699da505 100644 --- a/src/components/ReportActionItem/TaskPreview.js +++ b/src/components/ReportActionItem/TaskPreview.js @@ -25,7 +25,7 @@ import personalDetailsPropType from '../../pages/personalDetailsPropType'; const propTypes = { /** All personal details asssociated with user */ - personalDetailsList: personalDetailsPropType, + personalDetailsList: PropTypes.objectOf(personalDetailsPropType), /** The ID of the associated taskReport */ taskReportID: PropTypes.string.isRequired, diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index bbb313929f39..4a3e51970744 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -1251,12 +1251,6 @@ function getPayMoneyRequestParams(chatReport, iouReport, recipient, paymentMetho iouReport.reportID, true, ); - const optimisticPersonalDetailsListAction = { - accountID: Number(recipient.accountID), - avatar: UserUtils.getDefaultAvatarURL(Number(recipient.accountID)), - displayName: recipient.displayName || recipient.login, - login: recipient.login, - }; const optimisticReportPreviewAction = ReportUtils.updateReportPreview(iouReport, ReportActionsUtils.getReportPreviewAction(chatReport.reportID, iouReport.reportID)); @@ -1312,11 +1306,6 @@ function getPayMoneyRequestParams(chatReport, iouReport, recipient, paymentMetho key: ONYXKEYS.NVP_LAST_PAYMENT_METHOD, value: {[iouReport.policyID]: paymentMethodType}, }, - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.PERSONAL_DETAILS_LIST, - value: optimisticPersonalDetailsListAction, - }, ]; const successData = [ diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 94f84aae6943..4a753c8632bd 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -27,7 +27,7 @@ const propTypes = { betas: PropTypes.arrayOf(PropTypes.string), /** All of the personal details for everyone */ - personalDetails: personalDetailsPropType, + personalDetails: PropTypes.objectOf(personalDetailsPropType), /** All reports shared with the user */ reports: PropTypes.objectOf(reportPropTypes), diff --git a/src/pages/ReportParticipantsPage.js b/src/pages/ReportParticipantsPage.js index 3a5a239f05e5..23ba8c73dc35 100755 --- a/src/pages/ReportParticipantsPage.js +++ b/src/pages/ReportParticipantsPage.js @@ -26,7 +26,7 @@ const propTypes = { /* Onyx Props */ /** The personal details of the person who is logged in */ - personalDetails: personalDetailsPropType, + personalDetails: PropTypes.objectOf(personalDetailsPropType), /** The active report */ report: reportPropTypes.isRequired, diff --git a/src/pages/SearchPage.js b/src/pages/SearchPage.js index 3e32922ebdd5..6505b604b614 100755 --- a/src/pages/SearchPage.js +++ b/src/pages/SearchPage.js @@ -28,7 +28,7 @@ const propTypes = { betas: PropTypes.arrayOf(PropTypes.string), /** All of the personal details for everyone */ - personalDetails: personalDetailsPropType, + personalDetails: PropTypes.objectOf(personalDetailsPropType), /** All reports shared with the user */ reports: PropTypes.objectOf(reportPropTypes), diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.js b/src/pages/tasks/TaskAssigneeSelectorModal.js index 784c4c1a14df..97e1ecd2bc5c 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.js +++ b/src/pages/tasks/TaskAssigneeSelectorModal.js @@ -26,7 +26,7 @@ const propTypes = { betas: PropTypes.arrayOf(PropTypes.string), /** All of the personal details for everyone */ - personalDetails: personalDetailsPropType, + personalDetails: PropTypes.objectOf(personalDetailsPropType), /** All reports shared with the user */ reports: PropTypes.objectOf(reportPropTypes), diff --git a/src/pages/tasks/TaskShareDestinationSelectorModal.js b/src/pages/tasks/TaskShareDestinationSelectorModal.js index 8272406b4cbe..f02b50d3f2eb 100644 --- a/src/pages/tasks/TaskShareDestinationSelectorModal.js +++ b/src/pages/tasks/TaskShareDestinationSelectorModal.js @@ -27,7 +27,7 @@ const propTypes = { betas: PropTypes.arrayOf(PropTypes.string), /** All of the personal details for everyone */ - personalDetails: personalDetailsPropType, + personalDetails: PropTypes.objectOf(personalDetailsPropType), /** All reports shared with the user */ reports: PropTypes.objectOf(reportPropTypes), diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index ebc26360354d..154a337ee5a6 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -41,7 +41,7 @@ import * as PersonalDetailsUtils from '../../libs/PersonalDetailsUtils'; const propTypes = { /** All personal details asssociated with user */ - personalDetails: personalDetailsPropType, + personalDetails: PropTypes.objectOf(personalDetailsPropType), /** URL Route params */ route: PropTypes.shape({