@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.
package/local/txSandbox.ts
CHANGED
@@ -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:
|
51
|
-
authority: new PublicKey("
|
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
@@ -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 {
|