four-flap-meme-sdk 1.7.39 → 1.7.40
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.
|
@@ -165,12 +165,10 @@ export async function washVolume(params) {
|
|
|
165
165
|
const buyCall = buildBuyCall(wallet, buyAmountWei, tokenAddress, poolType, actualRouter, fee, delegateInterface, portalInterface);
|
|
166
166
|
calls.push(buyCall);
|
|
167
167
|
// 卖出调用(使用预估的代币数量)
|
|
168
|
-
// ✅ FLAP
|
|
169
|
-
// 因为实际买入获得的代币可能略少于预估值
|
|
168
|
+
// ✅ FLAP 模式使用按比例分配的预估数量(全部卖出)
|
|
170
169
|
const estimatedAmount = estimatedTokenAmounts[i] || 0n;
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
? buildSellCallWithAmount(wallet, safeAmount, tokenAddress, poolType, actualRouter, fee, delegateInterface, portalInterface)
|
|
170
|
+
const sellCall = poolType === 'FLAP' && estimatedAmount > 0n
|
|
171
|
+
? buildSellCallWithAmount(wallet, estimatedAmount, tokenAddress, poolType, actualRouter, fee, delegateInterface, portalInterface)
|
|
174
172
|
: buildSellCall(wallet, tokenAddress, sellPercent, tokenDecimals, poolType, actualRouter, fee, delegateInterface, portalInterface);
|
|
175
173
|
calls.push(sellCall);
|
|
176
174
|
}
|