timelock-sdk 0.0.258 → 0.0.259

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
@@ -121,7 +121,7 @@ var PerpsOperator = class {
121
121
  //#endregion
122
122
  //#region src/providers/TimelockProvider.tsx
123
123
  const TimelockContext = (0, react.createContext)(void 0);
124
- const TimelockProvider = ({ children, marketData, timelockGraphqlUrl, univ4GraphqlUrl, perpsOperatorUrl }) => {
124
+ const TimelockProvider = ({ children, marketData, timelockGraphqlUrl, univ4GraphqlUrl, perpsOperatorReadUrl, perpsOperatorWriteUrl }) => {
125
125
  const timelockGraphqlClient = (0, react.useMemo)(() => {
126
126
  if (!timelockGraphqlUrl) return;
127
127
  return require_graphql.getTimelockGraphqlClient(timelockGraphqlUrl);
@@ -131,9 +131,9 @@ const TimelockProvider = ({ children, marketData, timelockGraphqlUrl, univ4Graph
131
131
  return require_graphql.getUniv4GraphqlClient(univ4GraphqlUrl);
132
132
  }, [univ4GraphqlUrl]);
133
133
  const perpsOperator = (0, react.useMemo)(() => {
134
- if (!perpsOperatorUrl) return;
135
- return new PerpsOperator(perpsOperatorUrl);
136
- }, [perpsOperatorUrl]);
134
+ if (!perpsOperatorReadUrl || !perpsOperatorWriteUrl) return;
135
+ return new PerpsOperator(perpsOperatorReadUrl, perpsOperatorWriteUrl);
136
+ }, [perpsOperatorReadUrl, perpsOperatorWriteUrl]);
137
137
  const contextValue = (0, react.useMemo)(() => ({
138
138
  marketData: marketData || {},
139
139
  timelockGraphqlUrl,
@@ -141,7 +141,8 @@ const TimelockProvider = ({ children, marketData, timelockGraphqlUrl, univ4Graph
141
141
  perpsOperator,
142
142
  univ4GraphqlClient,
143
143
  timelockGraphqlClient,
144
- perpsOperatorUrl
144
+ perpsOperatorReadUrl,
145
+ perpsOperatorWriteUrl
145
146
  }), [
146
147
  marketData,
147
148
  timelockGraphqlUrl,
@@ -149,7 +150,8 @@ const TimelockProvider = ({ children, marketData, timelockGraphqlUrl, univ4Graph
149
150
  perpsOperator,
150
151
  timelockGraphqlClient,
151
152
  univ4GraphqlClient,
152
- perpsOperatorUrl
153
+ perpsOperatorReadUrl,
154
+ perpsOperatorWriteUrl
153
155
  ]);
154
156
  return /* @__PURE__ */ react.default.createElement(TimelockContext.Provider, { value: contextValue }, children);
155
157
  };