Fix infinite refresh

This commit is contained in:
Willian Mitsuda 2021-09-01 05:53:57 -03:00
parent 47212a1db0
commit 72d66aace9

View File

@ -8,7 +8,8 @@ export const useETHUSDOracle = (
provider: JsonRpcProvider | undefined,
blockTag: BlockTag | undefined
) => {
const priceMap = useMultipleETHUSDOracle(provider, [blockTag]);
const blockTags = useMemo(() => [blockTag], [blockTag]);
const priceMap = useMultipleETHUSDOracle(provider, blockTags);
if (blockTag === undefined) {
return undefined;