@haven-fi/solauto-sdk 1.0.561 → 1.0.562

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.
@@ -449,6 +449,7 @@ async function convertReferralFeesToDestination(referralManager, tokenAccount, d
449
449
  return { tx, lookupTableAddresses };
450
450
  }
451
451
  function getErrorInfo(umi, txs, error, simulationSuccessful) {
452
+ console.log(error);
452
453
  let canBeIgnored = false;
453
454
  let errorName = undefined;
454
455
  let errorInfo = undefined;
@@ -458,7 +459,6 @@ function getErrorInfo(umi, txs, error, simulationSuccessful) {
458
459
  let errName;
459
460
  const computeIxs = simulationSuccessful ? 2 : 1; // sub ixs to account for computeUnitLimit and computeUnitPrice that get added
460
461
  try {
461
- console.log(error instanceof transactions_1.BundleSimulationError);
462
462
  if (error instanceof transactions_1.BundleSimulationError) {
463
463
  console.log(error.details);
464
464
  errTxIdx = error.details.transactionIdx;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.561",
3
+ "version": "1.0.562",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Typescript SDK for the Solauto program on the Solana blockchain",
@@ -844,6 +844,7 @@ export function getErrorInfo(
844
844
  error: Error,
845
845
  simulationSuccessful?: boolean
846
846
  ) {
847
+ console.log(error);
847
848
  let canBeIgnored = false;
848
849
  let errorName: string | undefined = undefined;
849
850
  let errorInfo: string | undefined = undefined;
@@ -856,7 +857,6 @@ export function getErrorInfo(
856
857
  const computeIxs = simulationSuccessful ? 2 : 1; // sub ixs to account for computeUnitLimit and computeUnitPrice that get added
857
858
 
858
859
  try {
859
- console.log(error instanceof BundleSimulationError);
860
860
  if (error instanceof BundleSimulationError) {
861
861
  console.log(error.details);
862
862
  errTxIdx = error.details.transactionIdx;
@@ -40,7 +40,7 @@ import {
40
40
  getSolautoPositionAccount,
41
41
  retryWithExponentialBackoff,
42
42
  } from "../../src/utils";
43
- import { PriorityFeeSetting } from "../../src/types";
43
+ import { BundleSimulationError, PriorityFeeSetting } from "../../src/types";
44
44
  import { buildIronforgeApiUrl, fromBaseUnit, tokenInfo, USD_DECIMALS } from "../../dist";
45
45
 
46
46
  describe("Solauto Marginfi tests", async () => {
@@ -62,18 +62,24 @@ describe("Solauto Marginfi tests", async () => {
62
62
  const supplyDecimals = 6;
63
63
  const debtDecimals = 6;
64
64
 
65
- await client.initialize({
66
- signer,
67
- positionId,
68
- // authority: new PublicKey("FKYQs7KgRvaKQHxXwb8HKfoBcFdSxLL3JvHWpPdVQ16v"),
69
- // new: true,
70
- // marginfiAccount: new PublicKey(
71
- // ""
72
- // ),
73
- // marginfiGroup: new PublicKey(""),
74
- // supplyMint: new PublicKey(""),
75
- // debtMint: new PublicKey(USDC),
76
- });
65
+ // await client.initialize({
66
+ // signer,
67
+ // positionId,
68
+ // // authority: new PublicKey("FKYQs7KgRvaKQHxXwb8HKfoBcFdSxLL3JvHWpPdVQ16v"),
69
+ // // new: true,
70
+ // // marginfiAccount: new PublicKey(
71
+ // // ""
72
+ // // ),
73
+ // // marginfiGroup: new PublicKey(""),
74
+ // // supplyMint: new PublicKey(""),
75
+ // // debtMint: new PublicKey(USDC),
76
+ // });
77
+
78
+ try {
79
+ throw new BundleSimulationError("temp", 400, { transactionIdx: 1, instructionIdx: 1, errorCode: 1 });
80
+ } catch (e: any) {
81
+ console.log(e instanceof BundleSimulationError);
82
+ }
77
83
 
78
84
  const transactionItems: TransactionItem[] = [];
79
85
  // const settingParams: SolautoSettingsParametersInpArgs = {