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.cjs CHANGED
@@ -166,11 +166,14 @@ const useCurrentMarket = () => {
166
166
  const useTimelockConfig = () => {
167
167
  const context = (0, react.useContext)(TimelockMarketContext);
168
168
  if (context === void 0) throw new Error("useConfig must be used within a TimelockMarketProvider");
169
+ const graphqlClient = (0, react.useMemo)(() => {
170
+ if (context.envioGraphqlUrl) return getSdk(new graphql_request.GraphQLClient(context.envioGraphqlUrl));
171
+ }, [context.envioGraphqlUrl]);
169
172
  return {
170
173
  lensAddr: context.lensAddr,
171
174
  uniswapMathLensAddr: context.uniswapMathLensAddr,
172
175
  envioGraphqlUrl: context.envioGraphqlUrl,
173
- graphqlClient: context.envioGraphqlUrl ? getSdk(new graphql_request.GraphQLClient(context.envioGraphqlUrl)) : void 0
176
+ graphqlClient
174
177
  };
175
178
  };
176
179