Skip to content

Commit

Permalink
Merge branch 'issue/noIssue-state-loading-cleanup' of github.com:dece…
Browse files Browse the repository at this point in the history
…ntdao/decent-interface into issue/2565-network-config-updates
  • Loading branch information
Da-Colon committed Dec 12, 2024
2 parents 5337915 + 17bc618 commit fc918d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 49 deletions.
47 changes: 0 additions & 47 deletions src/components/ui/menus/SafesMenu/SafesList.tsx

This file was deleted.

11 changes: 9 additions & 2 deletions src/hooks/DAO/loaders/useGovernanceContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export const useGovernanceContracts = () => {
const safeAddress = safe?.address;

const loadGovernanceContracts = useCallback(async () => {
const azoriusModule = getAzoriusModuleFromModules(modules ?? []);
if (!modules) {
return;
}
const azoriusModule = getAzoriusModuleFromModules(modules);

const votingStrategies = await getVotingStrategies();

Expand Down Expand Up @@ -131,7 +134,11 @@ export const useGovernanceContracts = () => {
}, [action, modules, getVotingStrategies, publicClient, getAddressContractType]);

useEffect(() => {
if (currentValidAddress.current !== safeAddress && modules !== null) {
if (
safeAddress !== undefined &&
currentValidAddress.current !== safeAddress &&
modules !== null
) {
loadGovernanceContracts();
currentValidAddress.current = safeAddress;
}
Expand Down

0 comments on commit fc918d5

Please sign in to comment.