@orderly.network/hooks 0.0.95 → 0.0.96

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import React2, { createContext, useContext, useState, useEffect, useCallback, useMemo, useRef } from 'react';
1
+ import { createContext, useContext, useState, useEffect, useCallback, useMemo, useRef } from 'react';
2
2
  import useSWR, { useSWRConfig } from 'swr';
3
3
  export { SWRConfig, default as useSWR } from 'swr';
4
4
  import { WS, get, mutate } from '@orderly.network/net';
@@ -7,6 +7,7 @@ import useConstant from 'use-constant';
7
7
  export { default as useConstant } from 'use-constant';
8
8
  import { SimpleDI, Account, EventEmitter, utils } from '@orderly.network/core';
9
9
  import { AccountStatusEnum, OrderStatus, OrderSide, chainsInfoMap, ARBITRUM_TESTNET_CHAINID, ARBITRUM_MAINNET_CHAINID, WS_WalletStatusEnum, OrderType } from '@orderly.network/types';
10
+ import { jsx } from 'react/jsx-runtime';
10
11
  import { Decimal, zero, getPrecisionByNumber, timeConvertString } from '@orderly.network/utils';
11
12
  import useSWRSubscription from 'swr/subscription';
12
13
  import { pathOr, propOr, compose, head, prop, mergeDeepRight, pick, min } from 'ramda';
@@ -434,7 +435,7 @@ var DataSourceProvider = (props) => {
434
435
  useAccountInstance();
435
436
  useConstant(() => {
436
437
  });
437
- return /* @__PURE__ */ React2.createElement(DataSourceContext.Provider, { value: {} }, props.children);
438
+ return /* @__PURE__ */ jsx(DataSourceContext.Provider, { value: {}, children: props.children });
438
439
  };
439
440
  var WS_NAME = "nativeWebsocketClient";
440
441
  var useWS = () => {
@@ -1425,7 +1426,8 @@ var useOrderStream = ({
1425
1426
  const cancelOrder = useCallback((orderId, symbol2) => {
1426
1427
  return doCancelOrder(null, {
1427
1428
  order_id: orderId,
1428
- symbol: symbol2
1429
+ symbol: symbol2,
1430
+ source: "mweb"
1429
1431
  }).then((res) => {
1430
1432
  if (res.success) ; else {
1431
1433
  throw new Error(res.message);