From a2f48ed447654d10769229e2a850ecdd1297f13a Mon Sep 17 00:00:00 2001 From: aeolian <94939382+aeolianeth@users.noreply.github.com> Date: Fri, 10 May 2024 08:47:33 +1000 Subject: [PATCH] fix datahookcontext --- .../src/contexts/JBDataHookContext/JBDataHookContext.tsx | 2 +- .../src/hooks/jb721Hook/useFind721DataHook.tsx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/juice-sdk-react/src/contexts/JBDataHookContext/JBDataHookContext.tsx b/packages/juice-sdk-react/src/contexts/JBDataHookContext/JBDataHookContext.tsx index 4685b05..55290a2 100644 --- a/packages/juice-sdk-react/src/contexts/JBDataHookContext/JBDataHookContext.tsx +++ b/packages/juice-sdk-react/src/contexts/JBDataHookContext/JBDataHookContext.tsx @@ -48,7 +48,7 @@ export const JBDataHookProvider = ({ dataHookAddress, }, } as JBDataHookContextData; - }, []); + }, [dataHookAddress]); return ( diff --git a/packages/juice-sdk-react/src/hooks/jb721Hook/useFind721DataHook.tsx b/packages/juice-sdk-react/src/hooks/jb721Hook/useFind721DataHook.tsx index 35cc8e5..a67d892 100644 --- a/packages/juice-sdk-react/src/hooks/jb721Hook/useFind721DataHook.tsx +++ b/packages/juice-sdk-react/src/hooks/jb721Hook/useFind721DataHook.tsx @@ -15,6 +15,12 @@ export function useFind721DataHook() { const rulesetId = ruleset.data?.id; const dataHookAddress = data?.dataHookAddress; + // console.log("useFind721DataHook::args", { + // projectId, + // rulesetId, + // dataHookAddress, + // publicClient, + // }); const jb721DataHookQuery = useQuery( ["dataHook", projectId, rulesetId, dataHookAddress], @@ -26,6 +32,7 @@ export function useFind721DataHook() { projectId, rulesetId, }); + // console.log("useFind721DataHook::final jb721DataHook", jb721DataHook); return jb721DataHook; }