@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.
@@ -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
- throw new Error("No return data found in logs");
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
@@ -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.102";
11
+ const version = "0.0.103";
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.102",
3
+ "version": "0.0.103",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",