@t2000/sdk 0.16.13 → 0.16.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/index.cjs +1 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3445,21 +3445,15 @@ To access invested funds: t2000 invest sell ${params.amount} ${asset}`,
|
|
|
3445
3445
|
investmentCostBasis += pos.costBasis;
|
|
3446
3446
|
}
|
|
3447
3447
|
}
|
|
3448
|
-
let strategySuiTotal = 0;
|
|
3449
3448
|
for (const key of this.portfolio.getAllStrategyKeys()) {
|
|
3450
3449
|
for (const sp of this.portfolio.getStrategyPositions(key)) {
|
|
3451
3450
|
if (!(sp.asset in INVESTMENT_ASSETS)) continue;
|
|
3451
|
+
if (sp.asset === "SUI") continue;
|
|
3452
3452
|
const price = assetPrices[sp.asset] ?? 0;
|
|
3453
3453
|
investmentValue += sp.totalAmount * price;
|
|
3454
3454
|
investmentCostBasis += sp.costBasis;
|
|
3455
|
-
if (sp.asset === "SUI") strategySuiTotal += sp.totalAmount;
|
|
3456
3455
|
}
|
|
3457
3456
|
}
|
|
3458
|
-
if (strategySuiTotal > 0) {
|
|
3459
|
-
const suiPrice2 = assetPrices["SUI"] ?? 0;
|
|
3460
|
-
const gasSui = Math.max(0, bal.gasReserve.sui - strategySuiTotal);
|
|
3461
|
-
bal.gasReserve = { sui: gasSui, usdEquiv: gasSui * suiPrice2 };
|
|
3462
|
-
}
|
|
3463
3457
|
bal.investment = investmentValue;
|
|
3464
3458
|
bal.investmentPnL = investmentValue - investmentCostBasis;
|
|
3465
3459
|
} catch {
|