@haven-fi/solauto-sdk 1.0.716 → 1.0.717
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/services/transactions/transactionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AAKxE,OAAO,EAIL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAiBlC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA4BjE,OAAO,EAAE,qBAAqB,EAAyB,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"transactionUtils.d.ts","sourceRoot":"","sources":["../../../src/services/transactions/transactionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AAKxE,OAAO,EAIL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAiBlC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA4BjE,OAAO,EAAE,qBAAqB,EAAyB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAgM/F,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,kBAAkB,EACtB,sBAAsB,EAAE,MAAM,EAAE,GAC/B,OAAO,CAAC,kBAAkB,CAAC,CAyF7B;AA+LD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,kBAAkB,GACrB,OAAO,CAAC,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC,CA0BnD;AAED,wBAAsB,gCAAgC,CACpD,eAAe,EAAE,oBAAoB,EACrC,YAAY,EAAE,SAAS,EACvB,eAAe,EAAE,SAAS,GACzB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAuC5C;AAED,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,kBAAkB,EAAE,EACzB,KAAK,EAAE,KAAK,EACZ,oBAAoB,CAAC,EAAE,OAAO,EAC9B,kBAAkB,CAAC,EAAE,kBAAkB;;;;EAuHxC;AAED,wBAAgB,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,8JAErE"}
|
@@ -102,9 +102,13 @@ async function transactionChoresBefore(client, accountsGettingCreated, solautoAc
|
|
102
102
|
const tokenAccount = (0, generated_1.isSolautoAction)("Withdraw", solautoAction)
|
103
103
|
? client.signerSupplyTa
|
104
104
|
: client.signerDebtTa;
|
105
|
+
console.log("withdraw", (0, generated_1.isSolautoAction)("Withdraw", solautoAction));
|
106
|
+
console.log(tokenAccount);
|
107
|
+
console.log("already getting created", accountsGettingCreated.includes(tokenAccount.toString()));
|
105
108
|
if (accountsGettingCreated.includes(tokenAccount.toString())) {
|
106
109
|
continue;
|
107
110
|
}
|
111
|
+
console.log("exists", (0, utils_1.getSolanaAccountCreated)(client.umi, tokenAccount));
|
108
112
|
if (!(0, utils_1.getSolanaAccountCreated)(client.umi, tokenAccount)) {
|
109
113
|
chores = chores.add((0, utils_1.createAssociatedTokenAccountUmiIx)(client.signer, (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(client.signer.publicKey), (0, generated_1.isSolautoAction)("Withdraw", solautoAction)
|
110
114
|
? client.pos.supplyMint
|
@@ -112,6 +116,7 @@ async function transactionChoresBefore(client, accountsGettingCreated, solautoAc
|
|
112
116
|
accountsGettingCreated.push(tokenAccount.toString());
|
113
117
|
}
|
114
118
|
}
|
119
|
+
console.log(chores.getInstructions().length);
|
115
120
|
return chores;
|
116
121
|
}
|
117
122
|
async function rebalanceChoresBefore(client, tx, accountsGettingCreated) {
|
package/package.json
CHANGED
@@ -221,10 +221,15 @@ async function transactionChoresBefore(
|
|
221
221
|
const tokenAccount = isSolautoAction("Withdraw", solautoAction)
|
222
222
|
? client.signerSupplyTa
|
223
223
|
: client.signerDebtTa;
|
224
|
+
|
225
|
+
console.log("withdraw", isSolautoAction("Withdraw", solautoAction));
|
226
|
+
console.log(tokenAccount);
|
227
|
+
console.log("already getting created", accountsGettingCreated.includes(tokenAccount.toString()))
|
224
228
|
if (accountsGettingCreated.includes(tokenAccount.toString())) {
|
225
229
|
continue;
|
226
230
|
}
|
227
231
|
|
232
|
+
console.log("exists", getSolanaAccountCreated(client.umi, tokenAccount))
|
228
233
|
if (!getSolanaAccountCreated(client.umi, tokenAccount)) {
|
229
234
|
chores = chores.add(
|
230
235
|
createAssociatedTokenAccountUmiIx(
|
@@ -239,6 +244,7 @@ async function transactionChoresBefore(
|
|
239
244
|
}
|
240
245
|
}
|
241
246
|
|
247
|
+
console.log(chores.getInstructions().length);
|
242
248
|
return chores;
|
243
249
|
}
|
244
250
|
|