File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,7 +316,6 @@ function deleteWorkspaceCompanyCardFeed(
316316 const optimisticFeedUpdates = { [ bankName ] : { pendingAction : CONST . RED_BRICK_ROAD_PENDING_ACTION . DELETE } } ;
317317 const failureFeedUpdates = { [ bankName ] : { pendingAction : null , errors : ErrorUtils . getMicroSecondOnyxErrorWithTranslationKey ( 'common.genericErrorMessage' ) } } ;
318318 const optimisticCardUpdates = Object . fromEntries ( cardIDs . map ( ( cardID ) => [ cardID , { pendingAction : CONST . RED_BRICK_ROAD_PENDING_ACTION . DELETE } ] ) ) ;
319- const successCardUpdates = Object . fromEntries ( cardIDs . map ( ( cardID ) => [ cardID , null ] ) ) ;
320319 const failureCardUpdates = Object . fromEntries ( cardIDs . map ( ( cardID ) => [ cardID , { pendingAction : null } ] ) ) ;
321320
322321 const optimisticData : Array <
@@ -349,11 +348,12 @@ function deleteWorkspaceCompanyCardFeed(
349348 ] ;
350349
351350 // Card collections only: API onyxData provides SHARED_NVP on success (avoid merge-after-set on that key).
351+ const successCardUpdates = Object . fromEntries ( cardIDs . map ( ( cardID ) => [ cardID , null ] ) ) ;
352352 const successData : Array < OnyxUpdate < typeof ONYXKEYS . COLLECTION . WORKSPACE_CARDS_LIST | typeof ONYXKEYS . CARD_LIST > > = [
353353 {
354- onyxMethod : Onyx . METHOD . MERGE ,
354+ onyxMethod : Onyx . METHOD . SET ,
355355 key : `${ ONYXKEYS . COLLECTION . WORKSPACE_CARDS_LIST } ${ domainOrWorkspaceAccountID } _${ bankName } ` ,
356- value : successCardUpdates ,
356+ value : null ,
357357 } ,
358358 {
359359 onyxMethod : Onyx . METHOD . MERGE ,
You can’t perform that action at this time.
0 commit comments