@t2000/cli 0.46.8 → 0.46.10
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-EGIY4JBI.js → chunk-PUT73QY7.js} +27 -10
- package/dist/{chunk-EGIY4JBI.js.map → chunk-PUT73QY7.js.map} +1 -1
- package/dist/{dist-MFJH54HH.js → dist-7KHAKQT2.js} +2 -2
- package/dist/{dist-7MV3I2I7.js → dist-C2DPFH2K.js} +28 -11
- package/dist/{dist-7MV3I2I7.js.map → dist-C2DPFH2K.js.map} +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
- /package/dist/{dist-MFJH54HH.js.map → dist-7KHAKQT2.js.map} +0 -0
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
usdcToRaw,
|
|
110
110
|
validateAddress,
|
|
111
111
|
walletExists
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-PUT73QY7.js";
|
|
113
113
|
import "./chunk-V7PXDEKG.js";
|
|
114
114
|
import "./chunk-Q2LY5BHK.js";
|
|
115
115
|
import "./chunk-3XUF7GM3.js";
|
|
@@ -225,4 +225,4 @@ export {
|
|
|
225
225
|
validateAddress,
|
|
226
226
|
walletExists
|
|
227
227
|
};
|
|
228
|
-
//# sourceMappingURL=dist-
|
|
228
|
+
//# sourceMappingURL=dist-7KHAKQT2.js.map
|
|
@@ -134756,22 +134756,39 @@ async function addClaimRewardsToTx(tx, client, address2) {
|
|
|
134756
134756
|
(r) => Number(r.userClaimableReward) > 0
|
|
134757
134757
|
);
|
|
134758
134758
|
if (claimable.length === 0) return [];
|
|
134759
|
-
|
|
134759
|
+
await Ct(tx, claimable, {
|
|
134760
134760
|
env: "prod",
|
|
134761
134761
|
customCoinReceive: { type: "transfer", transfer: address2 }
|
|
134762
134762
|
});
|
|
134763
|
-
return
|
|
134764
|
-
protocol: "navi",
|
|
134765
|
-
asset: "",
|
|
134766
|
-
coinType: "",
|
|
134767
|
-
symbol: "REWARD",
|
|
134768
|
-
amount: 0,
|
|
134769
|
-
estimatedValueUsd: 0
|
|
134770
|
-
}));
|
|
134763
|
+
return aggregateClaimableRewards(claimable);
|
|
134771
134764
|
} catch {
|
|
134772
134765
|
return [];
|
|
134773
134766
|
}
|
|
134774
134767
|
}
|
|
134768
|
+
function aggregateClaimableRewards(claimable) {
|
|
134769
|
+
const aggregated = /* @__PURE__ */ new Map();
|
|
134770
|
+
for (const c of claimable) {
|
|
134771
|
+
const coinType = c.rewardCoinType;
|
|
134772
|
+
if (!coinType) continue;
|
|
134773
|
+
const symbol2 = coinType.split("::").pop() ?? "REWARD";
|
|
134774
|
+
const amount2 = Number(c.userClaimableReward);
|
|
134775
|
+
if (!Number.isFinite(amount2) || amount2 <= 0) continue;
|
|
134776
|
+
const existing = aggregated.get(coinType);
|
|
134777
|
+
if (existing) {
|
|
134778
|
+
existing.amount += amount2;
|
|
134779
|
+
} else {
|
|
134780
|
+
aggregated.set(coinType, {
|
|
134781
|
+
protocol: "navi",
|
|
134782
|
+
asset: String(c.assetId ?? ""),
|
|
134783
|
+
coinType,
|
|
134784
|
+
symbol: symbol2,
|
|
134785
|
+
amount: amount2,
|
|
134786
|
+
estimatedValueUsd: 0
|
|
134787
|
+
});
|
|
134788
|
+
}
|
|
134789
|
+
}
|
|
134790
|
+
return Array.from(aggregated.values());
|
|
134791
|
+
}
|
|
134775
134792
|
async function getEarnings(client, address2) {
|
|
134776
134793
|
const hf = await getHealthFactor(client, address2);
|
|
134777
134794
|
const rates = await getRates(client);
|
|
@@ -138060,7 +138077,7 @@ ${context}
|
|
|
138060
138077
|
})
|
|
138061
138078
|
);
|
|
138062
138079
|
}
|
|
138063
|
-
var PKG_VERSION = "0.46.
|
|
138080
|
+
var PKG_VERSION = "0.46.10";
|
|
138064
138081
|
console.log = (...args) => console.error("[log]", ...args);
|
|
138065
138082
|
console.warn = (...args) => console.error("[warn]", ...args);
|
|
138066
138083
|
async function startMcpServer(opts) {
|
|
@@ -138150,4 +138167,4 @@ axios/dist/node/axios.cjs:
|
|
|
138150
138167
|
*)
|
|
138151
138168
|
*)
|
|
138152
138169
|
*/
|
|
138153
|
-
//# sourceMappingURL=dist-
|
|
138170
|
+
//# sourceMappingURL=dist-C2DPFH2K.js.map
|