@jup-ag/lend 0.0.87 → 0.0.89

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.
@@ -1193,7 +1193,7 @@ async function loadRelevantTicksHasDebtArrays(vaultId, topTick, program) {
1193
1193
  Array.from(
1194
1194
  { length: topTickIndex },
1195
1195
  (_, i) => program.account.tickHasDebtArray.fetch(
1196
- getTickHasDebt(vaultId, 15 - i)
1196
+ getTickHasDebt(vaultId, topTickIndex - i)
1197
1197
  )
1198
1198
  )
1199
1199
  );
@@ -70,10 +70,10 @@ async function getFlashloanIx(params) {
70
70
  connection,
71
71
  publicKey: signer
72
72
  });
73
- const flashloanAdmin = await program.account.flashloanAdmin.fetch(
74
- getFlashloanAdmin()
75
- );
76
- const borrowIx = await getFlashBorrowIx(params);
73
+ const [flashloanAdmin, borrowIx] = await Promise.all([
74
+ program.account.flashloanAdmin.fetch(getFlashloanAdmin()),
75
+ getFlashBorrowIx(params)
76
+ ]);
77
77
  const paybackAmount = params.amount.mul(
78
78
  new BN(1e4 + flashloanAdmin.flashloanFee).div(new BN(1e4))
79
79
  );
package/dist/index.mjs CHANGED
@@ -8,6 +8,6 @@ import './shared/lend.CioR9-te.mjs';
8
8
  import '@solana/spl-token';
9
9
  import 'bn.js';
10
10
 
11
- const version = "0.0.87";
11
+ const version = "0.0.89";
12
12
 
13
13
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",