@haven-fi/solauto-sdk 1.0.560 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"transactionUtils.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AAoBxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAsCzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAOlD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA4LjD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,kBAAkB,EACtB,sBAAsB,EAAE,MAAM,EAAE,GAC/B,OAAO,CAAC,kBAAkB,CAAC,CAoH7B;AA2LD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,kBAAkB,GACrB,OAAO,CAAC,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC,CA0BnD;AAED,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,aAAa,oBAqDzE;AAED,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,aAAa,EACrB,2BAA2B,CAAC,EAAE,MAAM,EACpC,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAsI5C;AAED,wBAAsB,gCAAgC,CACpD,eAAe,EAAE,oBAAoB,EACrC,YAAY,EAAE,SAAS,EACvB,eAAe,EAAE,SAAS,GACzB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAsC5C;AAED,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,kBAAkB,EAAE,EACzB,KA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,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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.560",
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;
@@ -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 = {