Skip to content

Commit

Permalink
Merge pull request #32959 from dukenv0307/fix/31836
Browse files Browse the repository at this point in the history
Use set method when creating policy for payment
  • Loading branch information
mountiny authored Jan 29, 2024
2 parents ef151c3 + d122676 commit b9b0d4d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/libs/actions/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1607,12 +1607,12 @@ function createWorkspaceFromIOUPayment(iouReport: Report): string | undefined {

const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: newWorkspace,
},
{
onyxMethod: Onyx.METHOD.MERGE,
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`,
value: {
[sessionAccountID]: {
Expand All @@ -1626,7 +1626,7 @@ function createWorkspaceFromIOUPayment(iouReport: Report): string | undefined {
},
},
{
onyxMethod: Onyx.METHOD.MERGE,
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT}${announceChatReportID}`,
value: {
pendingFields: {
Expand All @@ -1636,12 +1636,12 @@ function createWorkspaceFromIOUPayment(iouReport: Report): string | undefined {
},
},
{
onyxMethod: Onyx.METHOD.MERGE,
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${announceChatReportID}`,
value: announceReportActionData,
},
{
onyxMethod: Onyx.METHOD.MERGE,
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT}${adminsChatReportID}`,
value: {
pendingFields: {
Expand All @@ -1651,12 +1651,12 @@ function createWorkspaceFromIOUPayment(iouReport: Report): string | undefined {
},
},
{
onyxMethod: Onyx.METHOD.MERGE,
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${adminsChatReportID}`,
value: adminsReportActionData,
},
{
onyxMethod: Onyx.METHOD.MERGE,
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT}${workspaceChatReportID}`,
value: {
pendingFields: {
Expand All @@ -1666,7 +1666,7 @@ function createWorkspaceFromIOUPayment(iouReport: Report): string | undefined {
},
},
{
onyxMethod: Onyx.METHOD.MERGE,
onyxMethod: Onyx.METHOD.SET,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${workspaceChatReportID}`,
value: workspaceChatReportActionData,
},
Expand Down

0 comments on commit b9b0d4d

Please sign in to comment.