@0dotxyz/p0-ts-sdk 2.2.1 → 2.2.2
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/{dto-rate-model.types-gN82ZYyC.d.cts → dto-rate-model.types-AQ40wS-P.d.cts} +2 -46
- package/dist/{dto-rate-model.types-gN82ZYyC.d.ts → dto-rate-model.types-AQ40wS-P.d.ts} +2 -46
- package/dist/index-BDDVBMdM.d.cts +48 -0
- package/dist/index-BDDVBMdM.d.ts +48 -0
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -15390
- package/dist/index.d.ts +8 -15390
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions.cjs +344 -0
- package/dist/instructions.cjs.map +1 -0
- package/dist/instructions.d.cts +371 -0
- package/dist/instructions.d.ts +371 -0
- package/dist/instructions.js +338 -0
- package/dist/instructions.js.map +1 -0
- package/dist/types-DGWxbPM1.d.ts +15392 -0
- package/dist/types-ZvnTjjh4.d.cts +15392 -0
- package/dist/vendor.d.cts +3 -2
- package/dist/vendor.d.ts +3 -2
- package/package.json +6 -1
package/dist/index.js
CHANGED
|
@@ -21347,7 +21347,10 @@ function computeProjectedActiveBalancesNoCpi(balances, instructions2, program, b
|
|
|
21347
21347
|
if (!bank) {
|
|
21348
21348
|
throw Error(`Bank ${targetBank.toBase58()} not found in bankMap`);
|
|
21349
21349
|
}
|
|
21350
|
-
const
|
|
21350
|
+
const isKaminoWithdraw = decoded.name === "kaminoWithdraw";
|
|
21351
|
+
const assetShareValueMultiplier = isKaminoWithdraw ? new BigNumber3(1) : assetShareValueMultiplierByBank.get(targetBank.toBase58()) ?? new BigNumber3(1);
|
|
21352
|
+
const cTokenAmount = withdrawTokenAmount.div(assetShareValueMultiplier);
|
|
21353
|
+
const withdrawShares = getAssetShares(bank, cTokenAmount);
|
|
21351
21354
|
targetBalance.assetShares = BigNumber3.max(
|
|
21352
21355
|
0,
|
|
21353
21356
|
targetBalance.assetShares.minus(withdrawShares)
|
|
@@ -49126,7 +49129,7 @@ function computeMaxWithdrawForBank(params) {
|
|
|
49126
49129
|
const maxWithdraw = initUntiedCollateralForBank.div(initWeightedPrice);
|
|
49127
49130
|
return maxWithdraw;
|
|
49128
49131
|
}
|
|
49129
|
-
var TITAN_FEE_WALLET = new PublicKey("
|
|
49132
|
+
var TITAN_FEE_WALLET = new PublicKey("FEES6XLN7dMz2iBwKab9Hri9Kwc4WJ6TmDAiT4BNhyej");
|
|
49130
49133
|
var getTitanFeeAccount = (mint) => {
|
|
49131
49134
|
return getAssociatedTokenAddressSync(mint, TITAN_FEE_WALLET, true);
|
|
49132
49135
|
};
|