From d4d989186d88a7942e1cfc38462880856d5ca8c2 Mon Sep 17 00:00:00 2001 From: LautaroPetaccio Date: Sun, 29 Dec 2024 14:07:17 -0300 Subject: [PATCH] fix: Close all modals when cancelling an order successfully --- webapp/src/modules/modal/sagas.spec.ts | 2 ++ webapp/src/modules/modal/sagas.ts | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/src/modules/modal/sagas.spec.ts b/webapp/src/modules/modal/sagas.spec.ts index 2b93b06959..f60309956e 100644 --- a/webapp/src/modules/modal/sagas.spec.ts +++ b/webapp/src/modules/modal/sagas.spec.ts @@ -12,6 +12,7 @@ import { UPDATE_LIST_SUCCESS } from '../favorites/actions' import { NFT } from '../nft/types' +import { CANCEL_ORDER_SUCCESS } from '../order/actions' import { claimAssetSuccess, upsertRentalSuccess, @@ -31,6 +32,7 @@ describe.each([ DELETE_LIST_FAILURE, BULK_PICK_SUCCESS, BULK_PICK_FAILURE, + CANCEL_ORDER_SUCCESS, UPDATE_LIST_SUCCESS ])('when handling the success action of the %s action', actionType => { it('should put the action to close all modals', () => { diff --git a/webapp/src/modules/modal/sagas.ts b/webapp/src/modules/modal/sagas.ts index 9a68ea8766..2086cd8d17 100644 --- a/webapp/src/modules/modal/sagas.ts +++ b/webapp/src/modules/modal/sagas.ts @@ -9,6 +9,7 @@ import { DELETE_LIST_SUCCESS, UPDATE_LIST_SUCCESS } from '../favorites/actions' +import { CANCEL_ORDER_SUCCESS } from '../order/actions' import { CLAIM_ASSET_SUCCESS, UPSERT_RENTAL_SUCCESS, @@ -27,7 +28,8 @@ export function* modalSaga() { DELETE_LIST_FAILURE, BULK_PICK_SUCCESS, BULK_PICK_FAILURE, - UPDATE_LIST_SUCCESS + UPDATE_LIST_SUCCESS, + CANCEL_ORDER_SUCCESS ], handleCloseAllModals )