@t2000/cli 0.46.13 → 0.46.14
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/{chunk-PUT73QY7.js → chunk-4W7T24L5.js} +7 -3
- package/dist/{chunk-PUT73QY7.js.map → chunk-4W7T24L5.js.map} +1 -1
- package/dist/{dist-G4HFQNSF.js → dist-QYF5WAPE.js} +8 -4
- package/dist/{dist-G4HFQNSF.js.map → dist-QYF5WAPE.js.map} +1 -1
- package/dist/{dist-7KHAKQT2.js → dist-Y7A6L6BS.js} +2 -2
- package/dist/index.js +3 -3
- package/package.json +3 -3
- /package/dist/{dist-7KHAKQT2.js.map → dist-Y7A6L6BS.js.map} +0 -0
|
@@ -130123,7 +130123,7 @@ async function findSwapRoute(params) {
|
|
|
130123
130123
|
amountIn: routerData.amountIn.toString(),
|
|
130124
130124
|
amountOut: routerData.amountOut.toString(),
|
|
130125
130125
|
byAmountIn: params.byAmountIn,
|
|
130126
|
-
priceImpact: routerData.deviationRatio,
|
|
130126
|
+
priceImpact: normalizePriceImpact(routerData.deviationRatio),
|
|
130127
130127
|
insufficientLiquidity: true
|
|
130128
130128
|
};
|
|
130129
130129
|
}
|
|
@@ -130136,10 +130136,14 @@ async function findSwapRoute(params) {
|
|
|
130136
130136
|
amountIn: routerData.amountIn.toString(),
|
|
130137
130137
|
amountOut: routerData.amountOut.toString(),
|
|
130138
130138
|
byAmountIn: params.byAmountIn,
|
|
130139
|
-
priceImpact: routerData.deviationRatio,
|
|
130139
|
+
priceImpact: normalizePriceImpact(routerData.deviationRatio),
|
|
130140
130140
|
insufficientLiquidity: false
|
|
130141
130141
|
};
|
|
130142
130142
|
}
|
|
130143
|
+
function normalizePriceImpact(value) {
|
|
130144
|
+
const n = typeof value === "number" ? value : Number(value);
|
|
130145
|
+
return Number.isFinite(n) ? n : 0;
|
|
130146
|
+
}
|
|
130143
130147
|
async function buildSwapTx(params) {
|
|
130144
130148
|
const client = getClient3(params.walletAddress);
|
|
130145
130149
|
const clampedSlippage = Math.max(1e-3, Math.min(params.slippage, 0.05));
|
|
@@ -138077,7 +138081,7 @@ ${context}
|
|
|
138077
138081
|
})
|
|
138078
138082
|
);
|
|
138079
138083
|
}
|
|
138080
|
-
var PKG_VERSION = "0.46.
|
|
138084
|
+
var PKG_VERSION = "0.46.14";
|
|
138081
138085
|
console.log = (...args) => console.error("[log]", ...args);
|
|
138082
138086
|
console.warn = (...args) => console.error("[warn]", ...args);
|
|
138083
138087
|
async function startMcpServer(opts) {
|
|
@@ -138167,4 +138171,4 @@ axios/dist/node/axios.cjs:
|
|
|
138167
138171
|
*)
|
|
138168
138172
|
*)
|
|
138169
138173
|
*/
|
|
138170
|
-
//# sourceMappingURL=dist-
|
|
138174
|
+
//# sourceMappingURL=dist-QYF5WAPE.js.map
|