@orderly.network/hooks 0.0.55 → 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.mjs
CHANGED
|
@@ -2586,18 +2586,22 @@ var useChains = (networkId, options = {}) => {
|
|
|
2586
2586
|
let testnetArr = [];
|
|
2587
2587
|
let mainnetArr = [];
|
|
2588
2588
|
Object.keys(data.data).forEach((key) => {
|
|
2589
|
-
data.data[key];
|
|
2590
|
-
if (orderlyChainIds.has(
|
|
2589
|
+
const chain = data.data[key];
|
|
2590
|
+
if (orderlyChainIds.has(chain.network_infos.chain_id)) {
|
|
2591
2591
|
orderlyChainsArr = orderlyChainsArr.map((item2) => {
|
|
2592
|
-
if (item2.network_infos.chain_id ===
|
|
2593
|
-
return
|
|
2592
|
+
if (item2.network_infos.chain_id === chain.network_infos.chain_id) {
|
|
2593
|
+
return {
|
|
2594
|
+
// ...item,
|
|
2595
|
+
// ...chain,
|
|
2596
|
+
...mergeDeepLeft(chain, item2)
|
|
2597
|
+
};
|
|
2594
2598
|
}
|
|
2595
2599
|
return item2;
|
|
2596
2600
|
});
|
|
2597
2601
|
return;
|
|
2598
2602
|
}
|
|
2599
2603
|
const item = {
|
|
2600
|
-
...
|
|
2604
|
+
...chain,
|
|
2601
2605
|
name: key
|
|
2602
2606
|
};
|
|
2603
2607
|
if (item.token_infos?.length === 0)
|