@orderly.network/hooks 2.7.1 → 2.7.2-alpha.0
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/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -33,7 +33,7 @@ declare global {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
declare const _default: "2.7.
|
|
36
|
+
declare const _default: "2.7.2-alpha.0";
|
|
37
37
|
|
|
38
38
|
declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
|
|
39
39
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
@@ -385,8 +385,8 @@ declare const useFeeState: () => {
|
|
|
385
385
|
};
|
|
386
386
|
|
|
387
387
|
declare const useTrack: () => {
|
|
388
|
-
track: lodash.DebouncedFunc<(eventName: TrackerEventName, params
|
|
389
|
-
tracking: (eventName: TrackerEventName, params
|
|
388
|
+
track: lodash.DebouncedFunc<(eventName: TrackerEventName, params?: any) => void>;
|
|
389
|
+
tracking: (eventName: TrackerEventName, params?: any) => void;
|
|
390
390
|
setTrackUserId: (userId: string) => void;
|
|
391
391
|
setIdentify: (params: any) => void;
|
|
392
392
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare global {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
declare const _default: "2.7.
|
|
36
|
+
declare const _default: "2.7.2-alpha.0";
|
|
37
37
|
|
|
38
38
|
declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
|
|
39
39
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
@@ -385,8 +385,8 @@ declare const useFeeState: () => {
|
|
|
385
385
|
};
|
|
386
386
|
|
|
387
387
|
declare const useTrack: () => {
|
|
388
|
-
track: lodash.DebouncedFunc<(eventName: TrackerEventName, params
|
|
389
|
-
tracking: (eventName: TrackerEventName, params
|
|
388
|
+
track: lodash.DebouncedFunc<(eventName: TrackerEventName, params?: any) => void>;
|
|
389
|
+
tracking: (eventName: TrackerEventName, params?: any) => void;
|
|
390
390
|
setTrackUserId: (userId: string) => void;
|
|
391
391
|
setIdentify: (params: any) => void;
|
|
392
392
|
};
|
package/dist/index.js
CHANGED
|
@@ -61,9 +61,9 @@ var __export = (target, all) => {
|
|
|
61
61
|
// src/version.ts
|
|
62
62
|
if (typeof window !== "undefined") {
|
|
63
63
|
window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
|
|
64
|
-
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.7.
|
|
64
|
+
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.7.2-alpha.0";
|
|
65
65
|
}
|
|
66
|
-
var version_default = "2.7.
|
|
66
|
+
var version_default = "2.7.2-alpha.0";
|
|
67
67
|
var fetcher = (url, init2 = {}, queryOptions) => net.get(url, init2, queryOptions?.formatter);
|
|
68
68
|
var noCacheConfig = {
|
|
69
69
|
dedupingInterval: 0,
|
|
@@ -261,7 +261,7 @@ var useTrack = () => {
|
|
|
261
261
|
const ee = useEventEmitter();
|
|
262
262
|
const { wallet } = useWalletConnector();
|
|
263
263
|
const tracking = React2.useCallback(
|
|
264
|
-
(eventName, params) => {
|
|
264
|
+
(eventName, params = {}) => {
|
|
265
265
|
utils.windowGuard(() => {
|
|
266
266
|
const location = window.location;
|
|
267
267
|
const origin = location.origin;
|
|
@@ -17417,6 +17417,17 @@ var useOrderEntry2 = (symbol, options = {}) => {
|
|
|
17417
17417
|
tp_sl: hasTPSL(formattedOrder),
|
|
17418
17418
|
symbol: order.symbol
|
|
17419
17419
|
};
|
|
17420
|
+
if ([types.OrderType.ASK, types.OrderType.BID].includes(order.order_type)) {
|
|
17421
|
+
trackParams = {
|
|
17422
|
+
...trackParams,
|
|
17423
|
+
bbo: true,
|
|
17424
|
+
bbo_setting: utils.getBBOType({
|
|
17425
|
+
type: order.order_type,
|
|
17426
|
+
side: order.side,
|
|
17427
|
+
level: order.level
|
|
17428
|
+
})
|
|
17429
|
+
};
|
|
17430
|
+
}
|
|
17420
17431
|
if (isScaledOrder) {
|
|
17421
17432
|
const skew = getScaledOrderSkew({
|
|
17422
17433
|
skew: order.skew,
|