@jup-ag/lend 0.0.102 → 0.0.103
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 +11 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/borrow/index.mjs
CHANGED
|
@@ -1392,11 +1392,21 @@ async function getExchangePrices({
|
|
|
1392
1392
|
transaction.recentBlockhash = latestBlockHash.blockhash;
|
|
1393
1393
|
transaction.feePayer = signer;
|
|
1394
1394
|
const raw = await connection.simulateTransaction(transaction);
|
|
1395
|
+
if (raw.value.err && raw.value.err === "InvalidAccountForFee" && signer.toBase58() !== "HEyJLdMfZhhQ7FHCtjD5DWDFNFQhaeAVAsHeWqoY6dSD") {
|
|
1396
|
+
return await getExchangePrices({
|
|
1397
|
+
vaultId,
|
|
1398
|
+
vaultConfig,
|
|
1399
|
+
connection,
|
|
1400
|
+
signer: new PublicKey("HEyJLdMfZhhQ7FHCtjD5DWDFNFQhaeAVAsHeWqoY6dSD")
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1395
1403
|
const returnLog = raw.value.logs?.find(
|
|
1396
1404
|
(log) => log.startsWith("Program return:")
|
|
1397
1405
|
);
|
|
1398
1406
|
if (!returnLog) {
|
|
1399
|
-
|
|
1407
|
+
let error = new Error("No return data found in logs");
|
|
1408
|
+
error.simulation = raw.value;
|
|
1409
|
+
throw error;
|
|
1400
1410
|
}
|
|
1401
1411
|
const base64Data = returnLog.split(" ")[3];
|
|
1402
1412
|
const buffer = Buffer.from(base64Data, "base64");
|
package/dist/index.mjs
CHANGED