@orderly.network/hooks 0.0.56 → 0.0.57
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 +9 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -2595,18 +2595,22 @@ var useChains = (networkId, options = {}) => {
|
|
|
2595
2595
|
let testnetArr = [];
|
|
2596
2596
|
let mainnetArr = [];
|
|
2597
2597
|
Object.keys(data.data).forEach((key) => {
|
|
2598
|
-
data.data[key];
|
|
2599
|
-
if (orderlyChainIds.has(
|
|
2598
|
+
const chain = data.data[key];
|
|
2599
|
+
if (orderlyChainIds.has(chain.network_infos.chain_id)) {
|
|
2600
2600
|
orderlyChainsArr = orderlyChainsArr.map((item2) => {
|
|
2601
|
-
if (item2.network_infos.chain_id ===
|
|
2602
|
-
return
|
|
2601
|
+
if (item2.network_infos.chain_id === chain.network_infos.chain_id) {
|
|
2602
|
+
return {
|
|
2603
|
+
// ...item,
|
|
2604
|
+
// ...chain,
|
|
2605
|
+
...ramda.mergeDeepLeft(chain, item2)
|
|
2606
|
+
};
|
|
2603
2607
|
}
|
|
2604
2608
|
return item2;
|
|
2605
2609
|
});
|
|
2606
2610
|
return;
|
|
2607
2611
|
}
|
|
2608
2612
|
const item = {
|
|
2609
|
-
...
|
|
2613
|
+
...chain,
|
|
2610
2614
|
name: key
|
|
2611
2615
|
};
|
|
2612
2616
|
if (item.token_infos?.length === 0)
|