Skip to content

Commit

Permalink
feat: 🎸 eoa contact reset
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-portkey committed Feb 5, 2025
1 parent 70235c9 commit db64410
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/hooks/hooks-eoa/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { EOACommonState } from '../../types/types-eoa/store';
import { useAppCommonDispatch } from '../index';
import { useCallback } from 'react';
import { changeNftSectionUiType } from '@portkey-wallet/store/store-eoa/assets/slice';
import { resetContact } from '@portkey-wallet/store/store-eoa/contact/actions';
import { useCurrentNetwork } from './network';

export const useAppEOASelector: TypedUseSelectorHook<EOACommonState> = useSelector;

Expand All @@ -20,3 +22,19 @@ export function useNFTSection() {
changeNFTSectionMode,
};
}

export function useResetStore() {
const dispatch = useAppCommonDispatch();
const currentNetwork = useCurrentNetwork();

return useCallback(() => {
// dispatch(resetActivity());
// dispatch(resetGuardiansState());
dispatch(
resetContact({
network: currentNetwork,
}),
);
// dispatch(resetReferral());
}, [currentNetwork, dispatch]);
}

0 comments on commit db64410

Please sign in to comment.