@liberfi.io/react-predict 0.3.64 → 0.3.66

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/server.mjs CHANGED
@@ -51,11 +51,11 @@ function infiniteEventsQueryKey(params) {
51
51
  async function fetchEventsPage(client, params) {
52
52
  return client.listEvents(params);
53
53
  }
54
- function eventQueryKey(slug, source) {
55
- return ["predict", "event", slug, source];
54
+ function eventQueryKey(slug, source, lang) {
55
+ return ["predict", "event", slug, source, lang];
56
56
  }
57
- async function fetchEvent(client, slug, source) {
58
- return client.getEvent(slug, source);
57
+ async function fetchEvent(client, slug, source, lang) {
58
+ return client.getEvent(slug, source, { lang });
59
59
  }
60
60
 
61
61
  // src/hooks/predict/market.params.ts
@@ -137,8 +137,8 @@ var PredictClient = class {
137
137
  * @returns The matching event.
138
138
  * @throws When the server responds with 404 or any other non-2xx status.
139
139
  */
140
- async getEvent(slug, source) {
141
- const query = source ? buildQuery({ source }) : "";
140
+ async getEvent(slug, source, params) {
141
+ const query = buildQuery({ source, ...params });
142
142
  const url = `${this.endpoint}/api/v1/events/${encodeURIComponent(slug)}${query}`;
143
143
  return await httpGet(url, this.requestOptions());
144
144
  }