@haven-fi/solauto-sdk 1.0.754 → 1.0.755

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.
@@ -64,7 +64,7 @@ class TransactionsManager {
64
64
  ]);
65
65
  for (let j = i; j >= 0; j--) {
66
66
  const tx = txItems[j];
67
- if ((await newSet.fitsWith(tx))) {
67
+ if ((await newSet.fitsWith(tx)) && !tx.name?.includes("rebalance")) {
68
68
  newSet.prepend(tx);
69
69
  i--;
70
70
  }
@@ -1,9 +1,10 @@
1
1
  import { Keypair, PublicKey } from "@solana/web3.js";
2
- import { createSignerFromKeypair } from "@metaplex-foundation/umi";
2
+ import { createSignerFromKeypair, publicKey } from "@metaplex-foundation/umi";
3
3
  import { fromWeb3JsKeypair } from "@metaplex-foundation/umi-web3js-adapters";
4
4
  import {
5
5
  ClientTransactionsManager,
6
6
  consoleLog,
7
+ fetchSolautoPosition,
7
8
  getBatches,
8
9
  getClient,
9
10
  getPositionExBulk,
@@ -47,14 +48,14 @@ export async function main() {
47
48
  });
48
49
 
49
50
  await client.initializeExistingSolautoPosition({
50
- positionId: 2,
51
- authority: new PublicKey("EBhRj7jbF2EVE21i19JSuCX1BAbnZFYhoKW64HnaZ3kf"),
51
+ positionId: 1,
52
+ authority: new PublicKey("HqpPtE5WbBh3xU9C1Tzz125iYDQyoyodvFCRpwHwQpNc"),
52
53
  // lpUserAccount: new PublicKey(
53
54
  // "GEokw9jqbh6d1xUNA3qaeYFFetbSR5Y1nt7C3chwwgSz"
54
55
  // ),
55
56
  });
56
57
 
57
- const transactionItems = [rebalance(client)];
58
+ const transactionItems = [rebalance(client, undefined, 150)];
58
59
 
59
60
  const txManager = new ClientTransactionsManager({
60
61
  txHandler: client,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.754",
3
+ "version": "1.0.755",
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",
@@ -126,7 +126,7 @@ export class TransactionsManager<T extends TxHandler> {
126
126
  ]);
127
127
  for (let j = i; j >= 0; j--) {
128
128
  const tx = txItems[j];
129
- if ((await newSet.fitsWith(tx))) {
129
+ if ((await newSet.fitsWith(tx)) && !tx.name?.includes("rebalance")) {
130
130
  newSet.prepend(tx);
131
131
  i--;
132
132
  } else {