@haven-fi/solauto-sdk 1.0.622 → 1.0.623
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 @@ class MarginfiFlProvider extends flProviderBase_1.FlProviderBase {
|
|
219
219
|
return (0, umi_1.transactionBuilder)()
|
220
220
|
.add((0, marginfi_sdk_1.lendingAccountRepay)(this.umi, {
|
221
221
|
amount: flashLoan.baseUnitAmount,
|
222
|
-
repayAll:
|
222
|
+
repayAll: false,
|
223
223
|
bank: bank.publicKey,
|
224
224
|
bankLiquidityVault: (0, umi_1.publicKey)(associatedBankAccs.liquidityVault),
|
225
225
|
marginfiAccount: (0, umi_1.publicKey)(iMfiAccount.accountPk),
|
@@ -261,7 +261,6 @@ class SolautoMarginfiClient extends solautoClient_1.SolautoClient {
|
|
261
261
|
(postSwapRebalance &&
|
262
262
|
data.rebalanceType === generated_1.SolautoRebalanceType.FLSwapThenRebalance);
|
263
263
|
const addAuthorityTas = this.selfManaged || data.values.tokenBalanceChange !== undefined;
|
264
|
-
console.log("TARGET LIQ UTILIZATION RATE:", data.targetLiqUtilizationRateBps);
|
265
264
|
return (0, generated_1.marginfiRebalance)(this.umi, {
|
266
265
|
signer: this.signer,
|
267
266
|
marginfiProgram: (0, umi_1.publicKey)(marginfi_sdk_1.MARGINFI_PROGRAM_ID),
|
package/package.json
CHANGED
@@ -352,7 +352,7 @@ export class MarginfiFlProvider extends FlProviderBase {
|
|
352
352
|
.add(
|
353
353
|
lendingAccountRepay(this.umi, {
|
354
354
|
amount: flashLoan.baseUnitAmount,
|
355
|
-
repayAll:
|
355
|
+
repayAll: false,
|
356
356
|
bank: bank.publicKey,
|
357
357
|
bankLiquidityVault: publicKey(associatedBankAccs.liquidityVault),
|
358
358
|
marginfiAccount: publicKey(iMfiAccount.accountPk),
|
@@ -391,10 +391,6 @@ export class SolautoMarginfiClient extends SolautoClient {
|
|
391
391
|
const addAuthorityTas =
|
392
392
|
this.selfManaged || data.values.tokenBalanceChange !== undefined;
|
393
393
|
|
394
|
-
console.log(
|
395
|
-
"TARGET LIQ UTILIZATION RATE:",
|
396
|
-
data.targetLiqUtilizationRateBps
|
397
|
-
);
|
398
394
|
return marginfiRebalance(this.umi, {
|
399
395
|
signer: this.signer,
|
400
396
|
marginfiProgram: publicKey(MARGINFI_PROGRAM_ID),
|
@@ -429,7 +425,9 @@ export class SolautoMarginfiClient extends SolautoClient {
|
|
429
425
|
supplyPriceOracle: publicKey(this.supplyPriceOracle),
|
430
426
|
positionSupplyTa: publicKey(this.positionSupplyTa),
|
431
427
|
authoritySupplyTa: addAuthorityTas
|
432
|
-
? publicKey(
|
428
|
+
? publicKey(
|
429
|
+
getTokenAccount(this.authority, this.pos.supplyMint())
|
430
|
+
)
|
433
431
|
: undefined,
|
434
432
|
vaultSupplyTa: needSupplyAccounts
|
435
433
|
? publicKey(this.marginfiSupplyAccounts.liquidityVault)
|
@@ -441,7 +439,9 @@ export class SolautoMarginfiClient extends SolautoClient {
|
|
441
439
|
debtPriceOracle: publicKey(this.debtPriceOracle),
|
442
440
|
positionDebtTa: publicKey(this.positionDebtTa),
|
443
441
|
authorityDebtTa: addAuthorityTas
|
444
|
-
? publicKey(
|
442
|
+
? publicKey(
|
443
|
+
getTokenAccount(this.authority, this.pos.debtMint())
|
444
|
+
)
|
445
445
|
: undefined,
|
446
446
|
vaultDebtTa: needDebtAccounts
|
447
447
|
? publicKey(this.marginfiDebtAccounts.liquidityVault)
|