From 22c0a7c4568e270bdf0190531e0300b7cfe496e5 Mon Sep 17 00:00:00 2001 From: Ben Kremer Date: Wed, 9 Feb 2022 13:53:56 +0100 Subject: [PATCH] fix: adds missing setLoading toggle --- dapps/react-dapp-v2/src/contexts/ClientContext.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dapps/react-dapp-v2/src/contexts/ClientContext.tsx b/dapps/react-dapp-v2/src/contexts/ClientContext.tsx index 3ed4f2e..72c1769 100644 --- a/dapps/react-dapp-v2/src/contexts/ClientContext.tsx +++ b/dapps/react-dapp-v2/src/contexts/ClientContext.tsx @@ -213,11 +213,14 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac const createClient = useCallback(async () => { try { + setLoading(true); + const _client = await Client.init({ logger: DEFAULT_LOGGER, relayUrl: DEFAULT_RELAY_URL, projectId: DEFAULT_PROJECT_ID, }); + setClient(_client); await subscribeToEvents(_client); await checkPersistedState(_client);