@orderly.network/hooks 0.0.57 → 0.0.59
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.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { SimpleDI, Account, EventEmitter, utils } from '@orderly.network/core';
|
|
|
9
9
|
import { AccountStatusEnum, OrderSide, chainsMap, OrderStatus as OrderStatus$1, OrderType } from '@orderly.network/types';
|
|
10
10
|
import useSWRSubscription from 'swr/subscription';
|
|
11
11
|
import { Decimal, zero, getPrecisionByNumber, timeConvertString } from '@orderly.network/utils';
|
|
12
|
-
import { pathOr, propOr, compose, head, prop,
|
|
12
|
+
import { pathOr, propOr, compose, head, prop, pick } from 'ramda';
|
|
13
13
|
import { positions, account, order } from '@orderly.network/futures';
|
|
14
14
|
import useSWRInfinite from 'swr/infinite';
|
|
15
15
|
export * from 'use-debounce';
|
|
@@ -2590,11 +2590,15 @@ var useChains = (networkId, options = {}) => {
|
|
|
2590
2590
|
if (orderlyChainIds.has(chain.network_infos.chain_id)) {
|
|
2591
2591
|
orderlyChainsArr = orderlyChainsArr.map((item2) => {
|
|
2592
2592
|
if (item2.network_infos.chain_id === chain.network_infos.chain_id) {
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2593
|
+
const mergedChain = {
|
|
2594
|
+
...item2,
|
|
2595
|
+
network_infos: {
|
|
2596
|
+
...item2.network_infos,
|
|
2597
|
+
...chain.network_infos
|
|
2598
|
+
},
|
|
2599
|
+
token_infos: chain.token_infos
|
|
2597
2600
|
};
|
|
2601
|
+
map.current.set(chain.network_infos.chain_id, mergedChain);
|
|
2598
2602
|
}
|
|
2599
2603
|
return item2;
|
|
2600
2604
|
});
|