@pyron-finance/pyron-client 2.7.0 → 2.7.1
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/dist/index.cjs +5 -5
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23295,8 +23295,6 @@ function makeSessionWrapSolIxs(walletAddress, sessionKey, payer, amount, existin
|
|
|
23295
23295
|
if (existingBalanceNative < TOKEN_ACCOUNT_RENT_EXEMPT) {
|
|
23296
23296
|
const rentNeeded = Math.max(0, TOKEN_ACCOUNT_RENT_EXEMPT - existingBalanceNative);
|
|
23297
23297
|
totalAmount = nativeAmount + rentNeeded;
|
|
23298
|
-
} else {
|
|
23299
|
-
totalAmount = nativeAmount + 1e4;
|
|
23300
23298
|
}
|
|
23301
23299
|
return (0, import_sessions_sdk.createSessionWrapInstructions)(sessionKey, walletAddress, BigInt(totalAmount));
|
|
23302
23300
|
}
|
|
@@ -23954,13 +23952,15 @@ var LendrAccount = class _LendrAccount {
|
|
|
23954
23952
|
);
|
|
23955
23953
|
if (bank.mint.equals(import_spl_token6.NATIVE_MINT)) {
|
|
23956
23954
|
const wSolBalanceUi = opts.wSolBalanceUi ?? 0;
|
|
23957
|
-
|
|
23955
|
+
let wrapAmount = new import_bignumber14.default(amount).minus(wSolBalanceUi);
|
|
23956
|
+
if (repayAll) {
|
|
23957
|
+
wrapAmount = wrapAmount.plus(96071e-8);
|
|
23958
|
+
}
|
|
23958
23959
|
const wrapIxs = makeSessionWrapSolIxs(
|
|
23959
23960
|
session.walletPublicKey,
|
|
23960
23961
|
session.sessionPublicKey,
|
|
23961
23962
|
session.payer,
|
|
23962
|
-
wrapAmount
|
|
23963
|
-
// add buffer in case more is needed
|
|
23963
|
+
wrapAmount,
|
|
23964
23964
|
wSolBalanceUi
|
|
23965
23965
|
// Pass existing balance to calculate rent correctly
|
|
23966
23966
|
);
|
package/dist/index.js
CHANGED
|
@@ -23119,8 +23119,6 @@ function makeSessionWrapSolIxs(walletAddress, sessionKey, payer, amount, existin
|
|
|
23119
23119
|
if (existingBalanceNative < TOKEN_ACCOUNT_RENT_EXEMPT) {
|
|
23120
23120
|
const rentNeeded = Math.max(0, TOKEN_ACCOUNT_RENT_EXEMPT - existingBalanceNative);
|
|
23121
23121
|
totalAmount = nativeAmount + rentNeeded;
|
|
23122
|
-
} else {
|
|
23123
|
-
totalAmount = nativeAmount + 1e4;
|
|
23124
23122
|
}
|
|
23125
23123
|
return createSessionWrapInstructions(sessionKey, walletAddress, BigInt(totalAmount));
|
|
23126
23124
|
}
|
|
@@ -23778,13 +23776,15 @@ var LendrAccount = class _LendrAccount {
|
|
|
23778
23776
|
);
|
|
23779
23777
|
if (bank.mint.equals(NATIVE_MINT2)) {
|
|
23780
23778
|
const wSolBalanceUi = opts.wSolBalanceUi ?? 0;
|
|
23781
|
-
|
|
23779
|
+
let wrapAmount = new BigNumber14(amount).minus(wSolBalanceUi);
|
|
23780
|
+
if (repayAll) {
|
|
23781
|
+
wrapAmount = wrapAmount.plus(96071e-8);
|
|
23782
|
+
}
|
|
23782
23783
|
const wrapIxs = makeSessionWrapSolIxs(
|
|
23783
23784
|
session.walletPublicKey,
|
|
23784
23785
|
session.sessionPublicKey,
|
|
23785
23786
|
session.payer,
|
|
23786
|
-
wrapAmount
|
|
23787
|
-
// add buffer in case more is needed
|
|
23787
|
+
wrapAmount,
|
|
23788
23788
|
wSolBalanceUi
|
|
23789
23789
|
// Pass existing balance to calculate rent correctly
|
|
23790
23790
|
);
|