@cetusprotocol/aggregator-sdk 0.0.0-experimental-20250625180535 → 0.0.0-experimental-20250625190228
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 -2
- package/dist/index.mjs +14 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7708,8 +7708,8 @@ function parseRouterResponse(data, byAmountIn) {
|
|
|
7708
7708
|
from: path.from,
|
|
7709
7709
|
target: path.target,
|
|
7710
7710
|
feeRate: path.fee_rate,
|
|
7711
|
-
amountIn:
|
|
7712
|
-
amountOut:
|
|
7711
|
+
amountIn: path.amount_in,
|
|
7712
|
+
amountOut: path.amount_out,
|
|
7713
7713
|
extendedDetails,
|
|
7714
7714
|
version
|
|
7715
7715
|
};
|
|
@@ -7824,6 +7824,18 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7824
7824
|
}
|
|
7825
7825
|
};
|
|
7826
7826
|
}
|
|
7827
|
+
console.log("sdk getRouterResult \u{1F680} ~ response:", response);
|
|
7828
|
+
const test = yield response.text().then((text) => {
|
|
7829
|
+
const data2 = JSON.parse(text, (key, value) => {
|
|
7830
|
+
if (typeof value === "number" && Math.abs(value) > Number.MAX_SAFE_INTEGER) {
|
|
7831
|
+
return value.toString();
|
|
7832
|
+
}
|
|
7833
|
+
return value;
|
|
7834
|
+
});
|
|
7835
|
+
console.log("sdk getRouterResult \u5904\u7406\u540E\u7684\u6570\u636E:", data2);
|
|
7836
|
+
return data2;
|
|
7837
|
+
});
|
|
7838
|
+
console.log("sdk getRouterResult \u{1F680} ~ test:", test);
|
|
7827
7839
|
const data = yield response.json();
|
|
7828
7840
|
console.log("sdk getRouterResult \u{1F680} ~ data:", data);
|
|
7829
7841
|
const insufficientLiquidity = data.msg === "liquidity is not enough";
|
package/dist/index.mjs
CHANGED
|
@@ -7706,8 +7706,8 @@ function parseRouterResponse(data, byAmountIn) {
|
|
|
7706
7706
|
from: path.from,
|
|
7707
7707
|
target: path.target,
|
|
7708
7708
|
feeRate: path.fee_rate,
|
|
7709
|
-
amountIn:
|
|
7710
|
-
amountOut:
|
|
7709
|
+
amountIn: path.amount_in,
|
|
7710
|
+
amountOut: path.amount_out,
|
|
7711
7711
|
extendedDetails,
|
|
7712
7712
|
version
|
|
7713
7713
|
};
|
|
@@ -7822,6 +7822,18 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7822
7822
|
}
|
|
7823
7823
|
};
|
|
7824
7824
|
}
|
|
7825
|
+
console.log("sdk getRouterResult \u{1F680} ~ response:", response);
|
|
7826
|
+
const test = yield response.text().then((text) => {
|
|
7827
|
+
const data2 = JSON.parse(text, (key, value) => {
|
|
7828
|
+
if (typeof value === "number" && Math.abs(value) > Number.MAX_SAFE_INTEGER) {
|
|
7829
|
+
return value.toString();
|
|
7830
|
+
}
|
|
7831
|
+
return value;
|
|
7832
|
+
});
|
|
7833
|
+
console.log("sdk getRouterResult \u5904\u7406\u540E\u7684\u6570\u636E:", data2);
|
|
7834
|
+
return data2;
|
|
7835
|
+
});
|
|
7836
|
+
console.log("sdk getRouterResult \u{1F680} ~ test:", test);
|
|
7825
7837
|
const data = yield response.json();
|
|
7826
7838
|
console.log("sdk getRouterResult \u{1F680} ~ data:", data);
|
|
7827
7839
|
const insufficientLiquidity = data.msg === "liquidity is not enough";
|