@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/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 withdrawShares = getAssetShares(bank, withdrawTokenAmount);
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("6ryqDDCwKFZfSiHQrYRkjTEarbsLjg9TmuFg1RJorBk3");
49132
+ var TITAN_FEE_WALLET = new PublicKey("FEES6XLN7dMz2iBwKab9Hri9Kwc4WJ6TmDAiT4BNhyej");
49130
49133
  var getTitanFeeAccount = (mint) => {
49131
49134
  return getAssociatedTokenAddressSync(mint, TITAN_FEE_WALLET, true);
49132
49135
  };