@xswap-link/sdk 0.11.1 → 0.11.2

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
@@ -25113,6 +25113,7 @@ var ArrowIcon = () => {
25113
25113
  };
25114
25114
 
25115
25115
  // src/config/wagmiConfig.ts
25116
+ import { defineChain } from "viem";
25116
25117
  import * as WagmiChains from "viem/chains";
25117
25118
  import { mainnet } from "viem/chains";
25118
25119
  import { createConfig, createStorage, http } from "@wagmi/core";
@@ -25143,7 +25144,39 @@ var mapChains = (supportedChains) => {
25143
25144
  (chain) => chain.id !== mainnet.id && supportedChains.some(({ chainId }) => chainId === chain.id.toString())
25144
25145
  )
25145
25146
  );
25146
- return result;
25147
+ for (const s of supportedChains) {
25148
+ if (s.ecosystem !== "evm") continue;
25149
+ const id2 = Number(s.chainId);
25150
+ const exists = result.some((c) => c.id === id2);
25151
+ if (!exists) {
25152
+ const custom = defineChain({
25153
+ id: id2,
25154
+ name: s.name,
25155
+ nativeCurrency: {
25156
+ name: s.tokenSymbol,
25157
+ symbol: s.tokenSymbol,
25158
+ decimals: 18
25159
+ },
25160
+ rpcUrls: {
25161
+ default: { http: s.publicRpcUrls }
25162
+ },
25163
+ blockExplorers: {
25164
+ default: {
25165
+ name: s.transactionExplorer.match(/\/\/([^.]*)\./)?.[1] || "",
25166
+ url: s.transactionExplorer
25167
+ }
25168
+ }
25169
+ });
25170
+ result.push(custom);
25171
+ }
25172
+ }
25173
+ const seen = /* @__PURE__ */ new Set();
25174
+ const deduped = result.filter((c) => {
25175
+ if (seen.has(c.id)) return false;
25176
+ seen.add(c.id);
25177
+ return true;
25178
+ });
25179
+ return deduped;
25147
25180
  };
25148
25181
  var mapTransports = (chains) => {
25149
25182
  const transports = {};