@haven-fi/solauto-sdk 1.0.557 → 1.0.558

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":"jitoUtils.d.ts","sourceRoot":"","sources":["../../src/utils/jitoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAKV,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,GAAG,EAEH,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAMlE,wBAAgB,mBAAmB,IAAI,SAAS,CAG/C;AAgND,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB;;;;IAkB7D;AAED,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EAAE,EACtB,GAAG,EAAE,kBAAkB,EAAE,EACzB,MAAM,CAAC,EAAE,kBAAkB,EAC3B,kBAAkB,GAAE,kBAA2C,EAC/D,cAAc,CAAC,EAAE,MAAM,IAAI,GAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CA+F/B"}
1
+ {"version":3,"file":"jitoUtils.d.ts","sourceRoot":"","sources":["../../src/utils/jitoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAKV,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,GAAG,EAEH,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAMlE,wBAAgB,mBAAmB,IAAI,SAAS,CAG/C;AA+MD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB;;;;IAkB7D;AAED,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EAAE,EACtB,GAAG,EAAE,kBAAkB,EAAE,EACzB,MAAM,CAAC,EAAE,kBAAkB,EAC3B,kBAAkB,GAAE,kBAA2C,EAC/D,cAAc,CAAC,EAAE,MAAM,IAAI,GAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CA+F/B"}
@@ -59,15 +59,15 @@ async function simulateJitoBundle(umi, txs) {
59
59
  },
60
60
  ]);
61
61
  if (res.value && res.value.summary.failed) {
62
- const resValue = res.result.value;
63
- const transactionResults = resValue.transactionResults;
62
+ const transactionResults = res.value
63
+ .transactionResults;
64
64
  transactionResults.forEach((x) => {
65
65
  x.logs?.forEach((y) => {
66
66
  (0, generalUtils_1.consoleLog)(y);
67
67
  });
68
68
  });
69
69
  const failedTxIdx = transactionResults.length;
70
- const txFailure = resValue.summary.failed.error.TransactionFailure;
70
+ const txFailure = res.value.summary.failed.error.TransactionFailure;
71
71
  if (txFailure) {
72
72
  const info = parseJitoErrorMessage(txFailure[1]);
73
73
  if (info) {
@@ -78,7 +78,7 @@ async function simulateJitoBundle(umi, txs) {
78
78
  });
79
79
  }
80
80
  }
81
- throw new Error(txFailure ? txFailure[1] : resValue.summary.failed.toString());
81
+ throw new Error(txFailure ? txFailure[1] : res.value.summary.failed.toString());
82
82
  }
83
83
  else if (res.error && res.error.message) {
84
84
  throw new Error(res.error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.557",
3
+ "version": "1.0.558",
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",
@@ -94,9 +94,8 @@ async function simulateJitoBundle(umi: Umi, txs: VersionedTransaction[]) {
94
94
  ]);
95
95
 
96
96
  if (res.value && res.value.summary.failed) {
97
- const resValue = res.result.value;
98
- const transactionResults =
99
- resValue.transactionResults as SimulatedTransactionResponse[];
97
+ const transactionResults = res.value
98
+ .transactionResults as SimulatedTransactionResponse[];
100
99
  transactionResults.forEach((x) => {
101
100
  x.logs?.forEach((y) => {
102
101
  consoleLog(y);
@@ -104,7 +103,7 @@ async function simulateJitoBundle(umi: Umi, txs: VersionedTransaction[]) {
104
103
  });
105
104
 
106
105
  const failedTxIdx = transactionResults.length;
107
- const txFailure = resValue.summary.failed.error.TransactionFailure;
106
+ const txFailure = res.value.summary.failed.error.TransactionFailure;
108
107
 
109
108
  if (txFailure) {
110
109
  const info = parseJitoErrorMessage(txFailure[1] as string);
@@ -122,7 +121,7 @@ async function simulateJitoBundle(umi: Umi, txs: VersionedTransaction[]) {
122
121
  }
123
122
 
124
123
  throw new Error(
125
- txFailure ? txFailure[1] : resValue.summary.failed.toString()
124
+ txFailure ? txFailure[1] : res.value.summary.failed.toString()
126
125
  );
127
126
  } else if (res.error && res.error.message) {
128
127
  throw new Error(res.error.message);