@haven-fi/solauto-sdk 1.0.602 → 1.0.603
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":"rebalanceSwapManager.d.ts","sourceRoot":"","sources":["../../../src/services/rebalance/rebalanceSwapManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAkB,UAAU,EAAa,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAapD,qBAAa,oBAAoB;IAQ7B,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,cAAc,CAAC;IACvB,OAAO,CAAC,2BAA2B,CAAC;IAV/B,UAAU,EAAG,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,cAAc,CAAkB;gBAG9B,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,eAAe,EACvB,cAAc,CAAC,EAAE,qBAAqB,YAAA,EACtC,2BAA2B,CAAC,EAAE,MAAM,YAAA;IAK9C,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,kCAAkC;YA6B5B,mBAAmB;IAoCjC,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,mBAAmB;IAIrB,aAAa,CAAC,UAAU,EAAE,MAAM;
|
1
|
+
{"version":3,"file":"rebalanceSwapManager.d.ts","sourceRoot":"","sources":["../../../src/services/rebalance/rebalanceSwapManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAkB,UAAU,EAAa,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAapD,qBAAa,oBAAoB;IAQ7B,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,cAAc,CAAC;IACvB,OAAO,CAAC,2BAA2B,CAAC;IAV/B,UAAU,EAAG,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,cAAc,CAAkB;gBAG9B,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,eAAe,EACvB,cAAc,CAAC,EAAE,qBAAqB,YAAA,EACtC,2BAA2B,CAAC,EAAE,MAAM,YAAA;IAK9C,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,kCAAkC;YA6B5B,mBAAmB;IAoCjC,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,mBAAmB;IAIrB,aAAa,CAAC,UAAU,EAAE,MAAM;IAkFhC,aAAa;;;;;;CAWpB"}
|
@@ -100,13 +100,16 @@ class RebalanceSwapManager {
|
|
100
100
|
? this.bigIntWithIncrement(outputAmount, this.flRequirements.flFeeBps ?? 0)
|
101
101
|
: outputAmount
|
102
102
|
: inputAmount;
|
103
|
+
const inputMint = (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(input.mint);
|
104
|
+
const outputMint = (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(output.mint);
|
105
|
+
const swappingMeme = (0, utils_1.tokenInfo)(inputMint).isMeme || (0, utils_1.tokenInfo)(outputMint).isMeme;
|
103
106
|
const swapInput = {
|
104
|
-
inputMint
|
105
|
-
outputMint
|
107
|
+
inputMint,
|
108
|
+
outputMint,
|
106
109
|
exactIn,
|
107
110
|
exactOut,
|
108
111
|
amount: swapAmount,
|
109
|
-
slippageBps:
|
112
|
+
slippageBps: swappingMeme ? 300 : 50,
|
110
113
|
};
|
111
114
|
(0, utils_1.consoleLog)("Swap input:", swapInput);
|
112
115
|
if (exactIn && (rebalanceToZero || this.values.repayingCloseToMaxLtv)) {
|
package/package.json
CHANGED
@@ -166,13 +166,18 @@ export class RebalanceSwapManager {
|
|
166
166
|
)
|
167
167
|
: outputAmount
|
168
168
|
: inputAmount;
|
169
|
+
|
170
|
+
const inputMint = toWeb3JsPublicKey(input.mint);
|
171
|
+
const outputMint = toWeb3JsPublicKey(output.mint);
|
172
|
+
const swappingMeme =
|
173
|
+
tokenInfo(inputMint).isMeme || tokenInfo(outputMint).isMeme;
|
169
174
|
const swapInput: SwapInput = {
|
170
|
-
inputMint
|
171
|
-
outputMint
|
175
|
+
inputMint,
|
176
|
+
outputMint,
|
172
177
|
exactIn,
|
173
178
|
exactOut,
|
174
179
|
amount: swapAmount,
|
175
|
-
slippageBps:
|
180
|
+
slippageBps: swappingMeme ? 300 : 50,
|
176
181
|
};
|
177
182
|
consoleLog("Swap input:", swapInput);
|
178
183
|
|