From cea24bb623b3f93ee8ded438139a1d35861a01ac Mon Sep 17 00:00:00 2001 From: JoelVR17 Date: Wed, 19 Feb 2025 11:49:00 -0600 Subject: [PATCH] refactor: remove approverFunds and serviceProviderFunds setters from Escrow interface and slice --- src/core/store/data/@types/escrows.entity.ts | 7 ------- src/core/store/data/slices/escrows.slice.ts | 10 +--------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/core/store/data/@types/escrows.entity.ts b/src/core/store/data/@types/escrows.entity.ts index 42f07e5..dfe024b 100644 --- a/src/core/store/data/@types/escrows.entity.ts +++ b/src/core/store/data/@types/escrows.entity.ts @@ -10,12 +10,8 @@ export interface EscrowGlobalStore { escrowsToDelete: string[]; userRolesInEscrow: string[]; recentEscrow: Escrow | undefined; - approverFunds: string; - serviceProviderFunds: string; setEscrows: (escrows: Escrow[]) => void; - setSelectedEscrow: (selectedEscrow?: Escrow) => void; - // setEscrowsToDelete: (escrows: string[]) => void; fetchAllEscrows: (params: { address: string; type: string }) => void; addEscrow: ( payload: EscrowPayload, @@ -28,7 +24,4 @@ export interface EscrowGlobalStore { }) => Promise; setUserRolesInEscrow: (roles: string[]) => void; setRecentEscrow: (escrow: Escrow | undefined) => void; - setApproverFunds: (approverFunds: string) => void; - setServiceProviderFunds: (serviceProviderFunds: string) => void; - // deleteProduct: (escrowId: strin`g) => void; } diff --git a/src/core/store/data/slices/escrows.slice.ts b/src/core/store/data/slices/escrows.slice.ts index 3c2dab2..6c98a66 100644 --- a/src/core/store/data/slices/escrows.slice.ts +++ b/src/core/store/data/slices/escrows.slice.ts @@ -44,7 +44,7 @@ export const useGlobalEscrowsSlice: StateCreator< setEscrows: (escrows: Escrow[]) => set({ escrows }, false, ESCROW_ACTIONS.SET_ESCROWS), - setSelectedEscrow: (escrow) => + setSelectedEscrow: (escrow: Escrow) => set( { selectedEscrow: escrow }, false, @@ -156,13 +156,5 @@ export const useGlobalEscrowsSlice: StateCreator< setRecentEscrow: (escrow: Escrow | undefined) => { set({ recentEscrow: escrow }); }, - - setApproverFunds: (approverFunds: string) => { - set({ approverFunds }); - }, - - setServiceProviderFunds: (serviceProviderFunds: string) => { - set({ serviceProviderFunds }); - }, }; };