@jup-ag/lend 0.0.37 → 0.0.38
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/borrow/index.mjs +3 -5
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/borrow/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import BN from 'bn.js';
|
|
|
3
3
|
import { Program } from '@coral-xyz/anchor';
|
|
4
4
|
import { g as getTick, a as getTickIdLiquidation, c as getVaultConfig, d as getBranch, e as getTickHasDebt, f as getVaultState, v as vaults, h as getVaultMetadata, i as getPosition, j as getLiquidity, k as getClaimAccount, l as getRateModel, m as getUserBorrowPosition, n as getUserSupplyPosition, o as getLiquidityReserve, p as getPositionTokenAccount, q as getPositionMint, r as getVaultAdmin } from '../shared/lend.CL8vvV0X.mjs';
|
|
5
5
|
import { h as getReserve, e as liquidity } from '../shared/lend.BpBbTaiH.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { getAssociatedTokenAddressSync, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
|
7
7
|
|
|
8
8
|
const address = "jupnw4B6Eqs7ft6rxpzYLJZYSnrpRgPcr589n5Kv4oc";
|
|
9
9
|
const metadata = {
|
|
@@ -1237,10 +1237,8 @@ async function getOperateContext({
|
|
|
1237
1237
|
program.account.vaultConfig.fetch(getVaultConfig(vaultId)),
|
|
1238
1238
|
program.account.vaultMetadata.fetch(getVaultMetadata(vaultId))
|
|
1239
1239
|
]);
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1242
|
-
getMint(connection, vaultConfig.borrowToken)
|
|
1243
|
-
]);
|
|
1240
|
+
const vaultSupplyDecimals = vaultMetadata.supplyMintDecimals;
|
|
1241
|
+
const vaultBorrowDecimals = vaultMetadata.borrowMintDecimals;
|
|
1244
1242
|
if (newCol.gt(MIN_I128)) {
|
|
1245
1243
|
const decimalsDelta = vaultSupplyDecimals < 9 ? 9 - vaultSupplyDecimals : 0;
|
|
1246
1244
|
newCol = newCol.mul(new BN(10).pow(new BN(decimalsDelta)));
|
package/dist/index.mjs
CHANGED