Skip to content

Commit

Permalink
Merge branch 'issue/2565-network-config-updates' of github.com:decent…
Browse files Browse the repository at this point in the history
…dao/decent-interface into issue/2565-network-config-extended
  • Loading branch information
Da-Colon committed Dec 11, 2024
2 parents d11ff98 + 5337915 commit c05f818
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/hooks/DAO/loaders/useHatsTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getValue, setValue } from '../../utils/cache/useLocalStorage';

const hatsSubgraphClient = new HatsSubgraphClient({});

const useHatsTree = () => {
const useHatsTree = ({ safeAddress }: { safeAddress: Address | undefined }) => {
const { t } = useTranslation('roles');
const {
governanceContracts: {
Expand Down Expand Up @@ -293,10 +293,10 @@ const useHatsTree = () => {
}, [hatsTree, updateRolesWithStreams, getPaymentStreams, streamsFetched]);

useEffect(() => {
if (!hatsTreeId && !!hatsTree) {
if (safeAddress === undefined) {
resetHatsStore();
}
}, [resetHatsStore, hatsTree, hatsTreeId]);
}, [resetHatsStore, safeAddress]);
};

export { useHatsTree };
2 changes: 1 addition & 1 deletion src/pages/dao/SafeController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function SafeController() {
useAzoriusListeners();

useKeyValuePairs();
useHatsTree();
useHatsTree({ safeAddress });

// the order of the if blocks of these next three error states matters
if (invalidQuery) {
Expand Down

0 comments on commit c05f818

Please sign in to comment.