@xswap-link/sdk 0.11.1 → 0.11.3

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 CHANGED
@@ -25079,6 +25079,7 @@ var ArrowIcon = () => {
25079
25079
  };
25080
25080
 
25081
25081
  // src/config/wagmiConfig.ts
25082
+ var import_viem = require("viem");
25082
25083
  var WagmiChains = __toESM(require("viem/chains"));
25083
25084
  var import_chains = require("viem/chains");
25084
25085
  var import_core = require("@wagmi/core");
@@ -25109,7 +25110,39 @@ var mapChains = (supportedChains) => {
25109
25110
  (chain) => chain.id !== import_chains.mainnet.id && supportedChains.some(({ chainId }) => chainId === chain.id.toString())
25110
25111
  )
25111
25112
  );
25112
- return result;
25113
+ for (const s of supportedChains) {
25114
+ if (s.ecosystem !== "evm") continue;
25115
+ const id2 = Number(s.chainId);
25116
+ const exists = result.some((c) => c.id === id2);
25117
+ if (!exists) {
25118
+ const custom = (0, import_viem.defineChain)({
25119
+ id: id2,
25120
+ name: s.name,
25121
+ nativeCurrency: {
25122
+ name: s.tokenSymbol,
25123
+ symbol: s.tokenSymbol,
25124
+ decimals: 18
25125
+ },
25126
+ rpcUrls: {
25127
+ default: { http: s.publicRpcUrls }
25128
+ },
25129
+ blockExplorers: {
25130
+ default: {
25131
+ name: s.transactionExplorer.match(/\/\/([^.]*)\./)?.[1] || "",
25132
+ url: s.transactionExplorer
25133
+ }
25134
+ }
25135
+ });
25136
+ result.push(custom);
25137
+ }
25138
+ }
25139
+ const seen = /* @__PURE__ */ new Set();
25140
+ const deduped = result.filter((c) => {
25141
+ if (seen.has(c.id)) return false;
25142
+ seen.add(c.id);
25143
+ return true;
25144
+ });
25145
+ return deduped;
25113
25146
  };
25114
25147
  var mapTransports = (chains) => {
25115
25148
  const transports = {};
@@ -29665,7 +29698,7 @@ var openTransactionModal = async ({
29665
29698
  highlightedDstTokens
29666
29699
  }) => {
29667
29700
  const supportedChains = (await getChains()).filter(
29668
- ({ web3Environment, swapSupported }) => web3Environment === "mainnet" /* MAINNET */ && swapSupported
29701
+ ({ web3Environment, swapSupported, bridgeSupported }) => web3Environment === "mainnet" /* MAINNET */ && (swapSupported || bridgeSupported)
29669
29702
  );
29670
29703
  validateSwapTxData(
29671
29704
  integratorId,