@haven-fi/solauto-sdk 1.0.295 → 1.0.296

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.
@@ -219,7 +219,7 @@ async function sendSingleOptimizedTransaction(umi, connection, tx, txType, prior
219
219
  if (txType !== "skip-simulation") {
220
220
  const simulationResult = await (0, generalUtils_1.retryWithExponentialBackoff)(async () => await simulateTransaction(umi, connection, await assembleFinalTransaction(umi.identity, tx, cuPrice, 1400000).setLatestBlockhash(umi)), 3);
221
221
  simulationResult.value.err;
222
- computeUnitLimit = Math.round(simulationResult.value.unitsConsumed * 1.1);
222
+ computeUnitLimit = Math.round(simulationResult.value.unitsConsumed * 1.2);
223
223
  (0, generalUtils_1.consoleLog)("Compute unit limit: ", computeUnitLimit);
224
224
  }
225
225
  if (txType !== "only-simulate") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.295",
3
+ "version": "1.0.296",
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",
@@ -400,7 +400,7 @@ export async function sendSingleOptimizedTransaction(
400
400
  3
401
401
  );
402
402
  simulationResult.value.err;
403
- computeUnitLimit = Math.round(simulationResult.value.unitsConsumed! * 1.1);
403
+ computeUnitLimit = Math.round(simulationResult.value.unitsConsumed! * 1.2);
404
404
  consoleLog("Compute unit limit: ", computeUnitLimit);
405
405
  }
406
406
 
@@ -54,8 +54,8 @@ describe("Solauto Marginfi tests", async () => {
54
54
  // marginfiAccount: new PublicKey(
55
55
  // "4nNvUXF5YqHFcH2nGweSiuvy1ct7V5FXfoCLKFYUN36z"
56
56
  // ),
57
- supplyMint: NATIVE_MINT,
58
- debtMint: new PublicKey(USDC),
57
+ // supplyMint: NATIVE_MINT,
58
+ // debtMint: new PublicKey(USDC),
59
59
  });
60
60
 
61
61
  const transactionItems: TransactionItem[] = [];
@@ -9,6 +9,9 @@ import {
9
9
  } from "../../src/utils/solanaUtils";
10
10
  import { publicKey } from "@metaplex-foundation/umi";
11
11
  import { assert } from "chai";
12
+ import { getTokenAccount } from "../../src/utils";
13
+ import { SOLAUTO_FEES_WALLET } from "../../src/constants";
14
+ import { PublicKey } from "@solana/web3.js";
12
15
 
13
16
  describe("Assert Solauto fee token accounts are created", async () => {
14
17
  it("all Solauto fee token accounts created", async () => {
@@ -17,9 +20,12 @@ describe("Assert Solauto fee token accounts are created", async () => {
17
20
  );
18
21
 
19
22
  const tokenAccounts = await umi.rpc.getAccounts(
20
- ALL_SUPPORTED_TOKENS.map((x) => publicKey(x))
23
+ ALL_SUPPORTED_TOKENS.map((x) =>
24
+ publicKey(getTokenAccount(SOLAUTO_FEES_WALLET, new PublicKey(x)))
25
+ )
21
26
  );
22
27
  for (let i = 0; i < tokenAccounts.length; i++) {
28
+ console.log(tokenAccounts[i].publicKey.toString());
23
29
  if (!tokenAccounts[i].exists) {
24
30
  console.log(
25
31
  "Missing Solauto fees TA for ",