@skip-go/widget 2.4.5 → 2.4.6
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/build/index.es.js +1 -12
- package/build/index.es.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -2219,19 +2219,8 @@ function useSwapWidget(persistSwapWidgetState = true) {
|
|
|
2219
2219
|
const destinationChainIDs = (filter === null || filter === void 0 ? void 0 : filter.destination)
|
|
2220
2220
|
? Object.keys(filter.destination)
|
|
2221
2221
|
: undefined;
|
|
2222
|
-
const allChainIDs = useMemo(() => {
|
|
2223
|
-
return [...(sourceChainIDs !== null && sourceChainIDs !== void 0 ? sourceChainIDs : []), ...(destinationChainIDs !== null && destinationChainIDs !== void 0 ? destinationChainIDs : [])];
|
|
2224
|
-
}, [sourceChainIDs, destinationChainIDs]);
|
|
2225
2222
|
const { assetsByChainID, getFeeAsset, isReady: isAssetsReady, getAsset, } = useAssets();
|
|
2226
|
-
const { data: chains } = useChains(
|
|
2227
|
-
select: (chains) => {
|
|
2228
|
-
if (allChainIDs.length === 0)
|
|
2229
|
-
return chains;
|
|
2230
|
-
return chains === null || chains === void 0 ? void 0 : chains.filter(({ chainID }) => {
|
|
2231
|
-
return allChainIDs.includes(chainID);
|
|
2232
|
-
});
|
|
2233
|
-
},
|
|
2234
|
-
});
|
|
2223
|
+
const { data: chains } = useChains();
|
|
2235
2224
|
const { getWalletRepo } = useManager();
|
|
2236
2225
|
const { connector, chain: evmChain } = useAccount$1();
|
|
2237
2226
|
const { switchChainAsync: switchNetworkAsync } = useSwitchChain({
|