@cetusprotocol/aggregator-sdk 0.0.0-experimental-20250625192907 → 0.0.0-experimental-20250625194009
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 +14 -5
- package/dist/index.mjs +14 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7826,13 +7826,22 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7826
7826
|
}
|
|
7827
7827
|
console.log("sdk getRouterResult \u{1F680} ~ response:", response);
|
|
7828
7828
|
const test = yield response.text().then((text) => {
|
|
7829
|
-
const
|
|
7830
|
-
|
|
7831
|
-
|
|
7829
|
+
const bigNumbers = [];
|
|
7830
|
+
const regex = /"([^"]+)"\s*:\s*(\d{16,})/g;
|
|
7831
|
+
const matches = text.matchAll(regex);
|
|
7832
|
+
for (const match of matches) {
|
|
7833
|
+
const key = match[1];
|
|
7834
|
+
const value = match[2];
|
|
7835
|
+
if (value.length > 15) {
|
|
7836
|
+
bigNumbers.push({ key, value });
|
|
7832
7837
|
}
|
|
7833
|
-
|
|
7838
|
+
}
|
|
7839
|
+
let safeText = text;
|
|
7840
|
+
bigNumbers.forEach(({ key, value }) => {
|
|
7841
|
+
safeText = safeText.replace(`"${key}":${value}`, `"${key}":"${value}"`);
|
|
7834
7842
|
});
|
|
7835
|
-
|
|
7843
|
+
const data2 = JSON.parse(safeText);
|
|
7844
|
+
console.log("\u5B89\u5168\u89E3\u6790\u7684\u6570\u636E:", data2);
|
|
7836
7845
|
return data2;
|
|
7837
7846
|
});
|
|
7838
7847
|
console.log("sdk getRouterResult \u{1F680} ~ test:", test);
|
package/dist/index.mjs
CHANGED
|
@@ -7824,13 +7824,22 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7824
7824
|
}
|
|
7825
7825
|
console.log("sdk getRouterResult \u{1F680} ~ response:", response);
|
|
7826
7826
|
const test = yield response.text().then((text) => {
|
|
7827
|
-
const
|
|
7828
|
-
|
|
7829
|
-
|
|
7827
|
+
const bigNumbers = [];
|
|
7828
|
+
const regex = /"([^"]+)"\s*:\s*(\d{16,})/g;
|
|
7829
|
+
const matches = text.matchAll(regex);
|
|
7830
|
+
for (const match of matches) {
|
|
7831
|
+
const key = match[1];
|
|
7832
|
+
const value = match[2];
|
|
7833
|
+
if (value.length > 15) {
|
|
7834
|
+
bigNumbers.push({ key, value });
|
|
7830
7835
|
}
|
|
7831
|
-
|
|
7836
|
+
}
|
|
7837
|
+
let safeText = text;
|
|
7838
|
+
bigNumbers.forEach(({ key, value }) => {
|
|
7839
|
+
safeText = safeText.replace(`"${key}":${value}`, `"${key}":"${value}"`);
|
|
7832
7840
|
});
|
|
7833
|
-
|
|
7841
|
+
const data2 = JSON.parse(safeText);
|
|
7842
|
+
console.log("\u5B89\u5168\u89E3\u6790\u7684\u6570\u636E:", data2);
|
|
7834
7843
|
return data2;
|
|
7835
7844
|
});
|
|
7836
7845
|
console.log("sdk getRouterResult \u{1F680} ~ test:", test);
|