four-flap-meme-sdk 1.7.41 → 1.7.42
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.
|
@@ -71,11 +71,11 @@ function buildV2BuyCalls(wallets, buyAmounts, tokenAddress, routerAddress) {
|
|
|
71
71
|
const amount = buyAmounts[i];
|
|
72
72
|
if (amount <= 0n)
|
|
73
73
|
continue;
|
|
74
|
-
//
|
|
74
|
+
// ✅ 修复:使用用户指定的买入金额,而不是 0(使用全部余额会导致严重 bug)
|
|
75
75
|
const callData = delegateInterface.encodeFunctionData('executeBuyV2', [
|
|
76
76
|
routerAddress,
|
|
77
77
|
path,
|
|
78
|
-
|
|
78
|
+
amount, // ✅ 使用指定金额
|
|
79
79
|
]);
|
|
80
80
|
calls.push({
|
|
81
81
|
target: wallet.address,
|
|
@@ -97,13 +97,13 @@ function buildV3BuyCalls(wallets, buyAmounts, tokenAddress, routerAddress, fee)
|
|
|
97
97
|
const amount = buyAmounts[i];
|
|
98
98
|
if (amount <= 0n)
|
|
99
99
|
continue;
|
|
100
|
-
//
|
|
100
|
+
// ✅ 修复:使用用户指定的买入金额,而不是 0(使用全部余额会导致严重 bug)
|
|
101
101
|
const callData = delegateInterface.encodeFunctionData('executeBuy', [
|
|
102
102
|
routerAddress,
|
|
103
103
|
WOKB_ADDRESS,
|
|
104
104
|
tokenAddress,
|
|
105
105
|
fee,
|
|
106
|
-
|
|
106
|
+
amount, // ✅ 使用指定金额
|
|
107
107
|
]);
|
|
108
108
|
calls.push({
|
|
109
109
|
target: wallet.address,
|