@jup-ag/lend 0.0.21 → 0.0.23
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 +14 -16
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/borrow/index.mjs
CHANGED
|
@@ -1127,7 +1127,7 @@ async function getOtherInstructionsOperate(vaultId, vaultState, currentPosition,
|
|
|
1127
1127
|
finalTickIdDataPda
|
|
1128
1128
|
};
|
|
1129
1129
|
}
|
|
1130
|
-
async function getRemainingAccountsOperate(vaultId,
|
|
1130
|
+
async function getRemainingAccountsOperate(vaultId, vaultState, vaultConfig, program) {
|
|
1131
1131
|
const remainingAccounts = [];
|
|
1132
1132
|
const oracleProgram = new Program(oracle, program.provider);
|
|
1133
1133
|
const oracleData = await oracleProgram.account.oracle.fetch(
|
|
@@ -1150,18 +1150,19 @@ async function getRemainingAccountsOperate(vaultId, positionId, vaultState, vaul
|
|
|
1150
1150
|
isSigner: false
|
|
1151
1151
|
});
|
|
1152
1152
|
}
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1153
|
+
const tickHasDebt = await loadRelevantTicksHasDebtArrays(vaultId, program);
|
|
1154
|
+
let tickHasDebtLength = tickHasDebt.length;
|
|
1155
|
+
for (const tickHasDebtArray of tickHasDebt)
|
|
1156
|
+
remainingAccounts.push({
|
|
1157
|
+
pubkey: getTickHasDebt(vaultId, tickHasDebtArray.index),
|
|
1158
|
+
isWritable: true,
|
|
1159
|
+
isSigner: false
|
|
1160
|
+
});
|
|
1161
|
+
const remainingAccountsIndices = [
|
|
1162
|
+
sourceLength,
|
|
1163
|
+
branchLength,
|
|
1164
|
+
tickHasDebtLength
|
|
1165
|
+
];
|
|
1165
1166
|
return {
|
|
1166
1167
|
remainingAccounts,
|
|
1167
1168
|
remainingAccountsIndices
|
|
@@ -1239,13 +1240,10 @@ async function getOperateContext({
|
|
|
1239
1240
|
program,
|
|
1240
1241
|
signer
|
|
1241
1242
|
);
|
|
1242
|
-
const hasDebt = !newDebt.eq(new BN(0));
|
|
1243
1243
|
const { remainingAccounts, remainingAccountsIndices } = await getRemainingAccountsOperate(
|
|
1244
1244
|
vaultId,
|
|
1245
|
-
positionId,
|
|
1246
1245
|
vaultState,
|
|
1247
1246
|
vaultConfig,
|
|
1248
|
-
hasDebt,
|
|
1249
1247
|
program
|
|
1250
1248
|
);
|
|
1251
1249
|
const accounts = {
|
package/dist/index.d.mts
CHANGED
|
@@ -106,4 +106,6 @@ declare namespace borrow {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
declare const version: string;
|
|
110
|
+
|
|
111
|
+
export { borrow as borrowPda, lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -106,4 +106,6 @@ declare namespace borrow {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
declare const version: string;
|
|
110
|
+
|
|
111
|
+
export { borrow as borrowPda, lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda, version };
|
package/dist/index.mjs
CHANGED