diff --git a/package.json b/package.json index 9fad691..862c6ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qapp-core", - "version": "1.0.24", + "version": "1.0.25", "description": "Qortal's core React library with global state, UI components, and utilities", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/hooks/usePublish.tsx b/src/hooks/usePublish.tsx index 0714078..3ff4d3b 100644 --- a/src/hooks/usePublish.tsx +++ b/src/hooks/usePublish.tsx @@ -174,13 +174,13 @@ export const usePublish = ( [metadata] ); + useEffect(() => { - if (hasFetched.current) return; + if (metadata?.identifier && metadata?.name && metadata?.service) { - hasFetched.current = true; fetchPublish(metadata); } - }, [metadata, returnType]); + }, [metadata?.identifier, metadata?.service, metadata?.identifier, returnType]); const refetchData = useCallback(async ()=> { if(!metadata) throw new Error('usePublish is missing metadata')