@t2000/cli 0.25.0 → 0.25.1
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-H2UWSH2A.js → chunk-DKZ2SS27.js} +9 -9
- package/dist/{chunk-H2UWSH2A.js.map → chunk-DKZ2SS27.js.map} +1 -1
- package/dist/{dist-PESR7M6Q.js → dist-2YZ3NHTR.js} +2 -2
- package/dist/{dist-FAZJCWL5.js → dist-7EHHFP4Q.js} +2 -2
- package/dist/index.js +3 -3
- package/package.json +3 -3
- /package/dist/{dist-PESR7M6Q.js.map → dist-2YZ3NHTR.js.map} +0 -0
- /package/dist/{dist-FAZJCWL5.js.map → dist-7EHHFP4Q.js.map} +0 -0
|
@@ -64681,7 +64681,7 @@ async function getPositions(client, address) {
|
|
|
64681
64681
|
const amount = parseFloat(data.amount);
|
|
64682
64682
|
const amountUsd = parseFloat(data.valueUSD);
|
|
64683
64683
|
const pool = data.pool;
|
|
64684
|
-
const apy = isBorrow ? parseFloat(pool.borrowIncentiveApyInfo?.apy ?? "0") : parseFloat(pool.supplyIncentiveApyInfo?.apy ?? "0");
|
|
64684
|
+
const apy = (isBorrow ? parseFloat(pool.borrowIncentiveApyInfo?.apy ?? "0") : parseFloat(pool.supplyIncentiveApyInfo?.apy ?? "0")) / 100;
|
|
64685
64685
|
if (amountUsd > 0.01 || amount > 1e-10) {
|
|
64686
64686
|
positions.push({
|
|
64687
64687
|
protocol: "navi",
|
|
@@ -64712,16 +64712,16 @@ async function getRates(client) {
|
|
|
64712
64712
|
return poolSuffix === targetSuffix;
|
|
64713
64713
|
});
|
|
64714
64714
|
if (!pool) continue;
|
|
64715
|
-
const saveApy = parseFloat(pool.supplyIncentiveApyInfo?.apy ?? "0");
|
|
64716
|
-
const borrowApy = parseFloat(pool.borrowIncentiveApyInfo?.apy ?? "0");
|
|
64717
|
-
if (saveApy >= 0 && saveApy <
|
|
64718
|
-
result[asset] = { saveApy, borrowApy: borrowApy >= 0 && borrowApy <
|
|
64715
|
+
const saveApy = parseFloat(pool.supplyIncentiveApyInfo?.apy ?? "0") / 100;
|
|
64716
|
+
const borrowApy = parseFloat(pool.borrowIncentiveApyInfo?.apy ?? "0") / 100;
|
|
64717
|
+
if (saveApy >= 0 && saveApy < 2) {
|
|
64718
|
+
result[asset] = { saveApy, borrowApy: borrowApy >= 0 && borrowApy < 2 ? borrowApy : 0 };
|
|
64719
64719
|
}
|
|
64720
64720
|
}
|
|
64721
|
-
if (!result.USDC) result.USDC = { saveApy:
|
|
64721
|
+
if (!result.USDC) result.USDC = { saveApy: 0.04, borrowApy: 0.06 };
|
|
64722
64722
|
return result;
|
|
64723
64723
|
} catch {
|
|
64724
|
-
return { USDC: { saveApy:
|
|
64724
|
+
return { USDC: { saveApy: 0.04, borrowApy: 0.06 } };
|
|
64725
64725
|
}
|
|
64726
64726
|
}
|
|
64727
64727
|
async function getHealthFactor(client, address) {
|
|
@@ -64992,7 +64992,7 @@ async function getEarnings(client, address) {
|
|
|
64992
64992
|
const hf = await getHealthFactor(client, address);
|
|
64993
64993
|
const rates = await getRates(client);
|
|
64994
64994
|
const supplied = hf.supplied;
|
|
64995
|
-
const apy = rates.USDC.saveApy
|
|
64995
|
+
const apy = rates.USDC.saveApy;
|
|
64996
64996
|
const dailyRate = apy / 365;
|
|
64997
64997
|
const dailyEarning = supplied * dailyRate;
|
|
64998
64998
|
const totalYieldEarned = dailyEarning * 30;
|
|
@@ -67044,4 +67044,4 @@ axios/dist/node/axios.cjs:
|
|
|
67044
67044
|
@scure/bip39/index.js:
|
|
67045
67045
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
67046
67046
|
*/
|
|
67047
|
-
//# sourceMappingURL=chunk-
|
|
67047
|
+
//# sourceMappingURL=chunk-DKZ2SS27.js.map
|