Skip to content

Commit

Permalink
More unnecessary dependency array params
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed Apr 3, 2024
1 parent 8df3b39 commit d1db677
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/hooks/DAO/loaders/governance/useERC721LinearStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { useTimeHelpers } from '../../../utils/useTimeHelpers';
export const useERC721LinearStrategy = () => {
const {
governanceContracts: { erc721LinearVotingContractAddress, azoriusContractAddress },
governance: { type },
action,
} = useFractal();
const provider = useEthersProvider();
Expand Down Expand Up @@ -72,7 +71,7 @@ export const useERC721LinearStrategy = () => {
]);

useEffect(() => {
if (!erc721LinearVotingContractAddress || !baseContracts || !type) {
if (!erc721LinearVotingContractAddress || !baseContracts) {
return;
}
const erc721LinearVotingContract =
Expand All @@ -90,10 +89,10 @@ export const useERC721LinearStrategy = () => {
return () => {
erc721LinearVotingContract.off(votingPeriodfilter, listener);
};
}, [erc721LinearVotingContractAddress, action, baseContracts, type]);
}, [erc721LinearVotingContractAddress, action, baseContracts]);

useEffect(() => {
if (!erc721LinearVotingContractAddress || !baseContracts || !type) {
if (!erc721LinearVotingContractAddress || !baseContracts) {
return;
}
const erc721LinearVotingContract =
Expand All @@ -114,7 +113,7 @@ export const useERC721LinearStrategy = () => {
return () => {
erc721LinearVotingContract.off(quorumThresholdUpdatedFilter, quorumThresholdUpdatedListener);
};
}, [erc721LinearVotingContractAddress, action, baseContracts, type]);
}, [erc721LinearVotingContractAddress, action, baseContracts]);

return loadERC721Strategy;
};

0 comments on commit d1db677

Please sign in to comment.