Skip to content

Commit

Permalink
fix: fetch tiers after contract abi is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
aramalipoor committed Sep 26, 2022
1 parent 50d4b78 commit 7a76e91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react/src/modules/tiered-sales/hooks/useSaleTiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const useSaleTiers = ({
};
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[contract, minterAddress],
[contract, manifest?.artifact?.abi, minterAddress],
);

const refetchTiers = useCallback(async () => {
Expand Down Expand Up @@ -163,7 +163,7 @@ export const useSaleTiers = ({

setIsLoading(false);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [minterAddress]);
}, [contract, manifest?.artifact?.abi, minterAddress]);

useEffect(() => {
if (
Expand All @@ -176,7 +176,7 @@ export const useSaleTiers = ({
refetchTiers();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [enabled, contract]);
}, [enabled, contract, manifest?.artifact?.abi, minterAddress]);

return {
data: tiers,
Expand Down

0 comments on commit 7a76e91

Please sign in to comment.