@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/CHANGELOG.md +6 -0
- package/dist/index.global.js +62 -62
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/config/wagmiConfig.ts +34 -2
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
|
-
|
|
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 = {};
|