@t2000/sdk 1.24.1 → 1.24.2
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 +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7568,7 +7568,8 @@ async function addHarvestToTx(tx, client, address, options = {}) {
|
|
|
7568
7568
|
amount: aggRow.amount,
|
|
7569
7569
|
slippage,
|
|
7570
7570
|
inputCoin: coin,
|
|
7571
|
-
providers: options.providers
|
|
7571
|
+
providers: options.providers,
|
|
7572
|
+
overlayFee: options.overlayFee
|
|
7572
7573
|
});
|
|
7573
7574
|
usdcHandles.push(swapResult.coin);
|
|
7574
7575
|
expectedUsdcDeposited += swapResult.expectedAmountOut;
|
|
@@ -7602,6 +7603,14 @@ async function addHarvestToTx(tx, client, address, options = {}) {
|
|
|
7602
7603
|
tx.mergeCoins(primary, rest);
|
|
7603
7604
|
depositCoin = primary;
|
|
7604
7605
|
}
|
|
7606
|
+
if (options.saveFeeHook) {
|
|
7607
|
+
await options.saveFeeHook({
|
|
7608
|
+
tx,
|
|
7609
|
+
coin: depositCoin,
|
|
7610
|
+
input: { asset: "USDC", amount: expectedUsdcDeposited },
|
|
7611
|
+
sender: address
|
|
7612
|
+
});
|
|
7613
|
+
}
|
|
7605
7614
|
try {
|
|
7606
7615
|
await addSaveToTx(tx, client, address, depositCoin, { asset: "USDC" });
|
|
7607
7616
|
} catch (err) {
|
|
@@ -7839,7 +7848,9 @@ var WRITE_APPENDER_REGISTRY = {
|
|
|
7839
7848
|
const plan = await addHarvestToTx(tx, ctx.client, ctx.sender, {
|
|
7840
7849
|
slippage: input.slippage,
|
|
7841
7850
|
minRewardUsd: input.minRewardUsd,
|
|
7842
|
-
providers
|
|
7851
|
+
providers,
|
|
7852
|
+
overlayFee: ctx.overlayFee,
|
|
7853
|
+
saveFeeHook: ctx.feeHooks?.save_deposit
|
|
7843
7854
|
});
|
|
7844
7855
|
return {
|
|
7845
7856
|
preview: {
|