timelock-sdk 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -159,11 +159,14 @@ const useCurrentMarket = () => {
159
159
  const useTimelockConfig = () => {
160
160
  const context = useContext(TimelockMarketContext);
161
161
  if (context === void 0) throw new Error("useConfig must be used within a TimelockMarketProvider");
162
+ const graphqlClient = useMemo(() => {
163
+ if (context.envioGraphqlUrl) return getSdk(new GraphQLClient(context.envioGraphqlUrl));
164
+ }, [context.envioGraphqlUrl]);
162
165
  return {
163
166
  lensAddr: context.lensAddr,
164
167
  uniswapMathLensAddr: context.uniswapMathLensAddr,
165
168
  envioGraphqlUrl: context.envioGraphqlUrl,
166
- graphqlClient: context.envioGraphqlUrl ? getSdk(new GraphQLClient(context.envioGraphqlUrl)) : void 0
169
+ graphqlClient
167
170
  };
168
171
  };
169
172