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 +8 -6
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +830 -828
- package/dist/client.d.ts +605 -603
- package/dist/client.js +8 -6
- package/dist/client.js.map +1 -1
- package/dist/{index-B7ERmtbv.d.cts → index-BqzCmvHw.d.cts} +483 -483
- package/dist/{index-Dr0df0Cw.d.ts → index-CNYDmu55.d.ts} +483 -483
- package/dist/package.d.cts +1 -1
- package/dist/package.d.ts +1 -1
- package/package.json +1 -1
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,
|
|
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 (!
|
|
135
|
-
return new PerpsOperator(
|
|
136
|
-
}, [
|
|
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
|
-
|
|
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
|
-
|
|
153
|
+
perpsOperatorReadUrl,
|
|
154
|
+
perpsOperatorWriteUrl
|
|
153
155
|
]);
|
|
154
156
|
return /* @__PURE__ */ react.default.createElement(TimelockContext.Provider, { value: contextValue }, children);
|
|
155
157
|
};
|