@defisaver/positions-sdk 1.0.11-fluid-dev8 → 1.0.11-fluid-dev9
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/cjs/fluid/index.js +2 -0
- package/esm/fluid/index.js +2 -0
- package/package.json +1 -1
- package/src/fluid/index.ts +3 -0
package/cjs/fluid/index.js
CHANGED
|
@@ -282,6 +282,7 @@ const parseT2MarketData = (web3, data, network, mainnetWeb3) => __awaiter(void 0
|
|
|
282
282
|
const totalSupplySharesInVault = (0, tokens_1.assetAmountInEth)(data.totalSupplyVault);
|
|
283
283
|
const collSharePrice = new decimal_js_1.default(oraclePrice).mul(prices[debtAsset.address]).toString();
|
|
284
284
|
const totalSupplyVaultUsd = new decimal_js_1.default(totalSupplySharesInVault).mul(collSharePrice).toString();
|
|
285
|
+
const maxSupplySharesUsd = new decimal_js_1.default(maxSupplyShares).mul(collSharePrice).toString();
|
|
285
286
|
const withdrawableUSD = new decimal_js_1.default(withdrawableShares).mul(collSharePrice).toString();
|
|
286
287
|
const marketData = {
|
|
287
288
|
vaultId: +data.vaultId,
|
|
@@ -323,6 +324,7 @@ const parseT2MarketData = (web3, data, network, mainnetWeb3) => __awaiter(void 0
|
|
|
323
324
|
withdrawable: withdrawableShares,
|
|
324
325
|
widthdrawableDex: new decimal_js_1.default(maxSupplyShares).minus(totalSupplyShares).toString(),
|
|
325
326
|
maxSupplyShares,
|
|
327
|
+
maxSupplySharesUsd,
|
|
326
328
|
collDexFee: supplyDexFee,
|
|
327
329
|
oraclePrice,
|
|
328
330
|
};
|
package/esm/fluid/index.js
CHANGED
|
@@ -276,6 +276,7 @@ const parseT2MarketData = (web3, data, network, mainnetWeb3) => __awaiter(void 0
|
|
|
276
276
|
const totalSupplySharesInVault = assetAmountInEth(data.totalSupplyVault);
|
|
277
277
|
const collSharePrice = new Dec(oraclePrice).mul(prices[debtAsset.address]).toString();
|
|
278
278
|
const totalSupplyVaultUsd = new Dec(totalSupplySharesInVault).mul(collSharePrice).toString();
|
|
279
|
+
const maxSupplySharesUsd = new Dec(maxSupplyShares).mul(collSharePrice).toString();
|
|
279
280
|
const withdrawableUSD = new Dec(withdrawableShares).mul(collSharePrice).toString();
|
|
280
281
|
const marketData = {
|
|
281
282
|
vaultId: +data.vaultId,
|
|
@@ -317,6 +318,7 @@ const parseT2MarketData = (web3, data, network, mainnetWeb3) => __awaiter(void 0
|
|
|
317
318
|
withdrawable: withdrawableShares,
|
|
318
319
|
widthdrawableDex: new Dec(maxSupplyShares).minus(totalSupplyShares).toString(),
|
|
319
320
|
maxSupplyShares,
|
|
321
|
+
maxSupplySharesUsd,
|
|
320
322
|
collDexFee: supplyDexFee,
|
|
321
323
|
oraclePrice,
|
|
322
324
|
};
|
package/package.json
CHANGED
package/src/fluid/index.ts
CHANGED
|
@@ -361,6 +361,8 @@ const parseT2MarketData = async (web3: Web3, data: FluidView.VaultDataStructOutp
|
|
|
361
361
|
const totalSupplySharesInVault = assetAmountInEth(data.totalSupplyVault);
|
|
362
362
|
const collSharePrice = new Dec(oraclePrice).mul(prices[debtAsset.address]).toString();
|
|
363
363
|
const totalSupplyVaultUsd = new Dec(totalSupplySharesInVault).mul(collSharePrice).toString();
|
|
364
|
+
const maxSupplySharesUsd = new Dec(maxSupplyShares).mul(collSharePrice).toString();
|
|
365
|
+
|
|
364
366
|
const withdrawableUSD = new Dec(withdrawableShares).mul(collSharePrice).toString();
|
|
365
367
|
|
|
366
368
|
const marketData = {
|
|
@@ -403,6 +405,7 @@ const parseT2MarketData = async (web3: Web3, data: FluidView.VaultDataStructOutp
|
|
|
403
405
|
withdrawable: withdrawableShares,
|
|
404
406
|
widthdrawableDex: new Dec(maxSupplyShares).minus(totalSupplyShares).toString(),
|
|
405
407
|
maxSupplyShares,
|
|
408
|
+
maxSupplySharesUsd,
|
|
406
409
|
collDexFee: supplyDexFee,
|
|
407
410
|
oraclePrice,
|
|
408
411
|
};
|