four-flap-meme-sdk 1.5.89 → 1.5.90
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/xlayer/bundle.js +8 -1
- package/package.json +1 -1
package/dist/xlayer/bundle.js
CHANGED
|
@@ -1668,18 +1668,25 @@ export class BundleExecutor {
|
|
|
1668
1668
|
const wallet = wallets[i];
|
|
1669
1669
|
const ownerAddr = wallet.address.toLowerCase();
|
|
1670
1670
|
const senderAddr = ownerToSender.get(ownerAddr) || '';
|
|
1671
|
-
|
|
1671
|
+
// ✅ 关键修复:按地址从 normalizedWalletAmounts 获取金额,而不是按索引获取
|
|
1672
|
+
// 这样即使钱包顺序不一致,金额也能正确匹配
|
|
1673
|
+
const amountNum = normalizedWalletAmounts[ownerAddr] ?? normalizedWalletAmounts[senderAddr] ?? finalAmounts[i] ?? 0;
|
|
1674
|
+
const amountWei = ethers.parseEther(amountNum.toFixed(18));
|
|
1672
1675
|
// ✅ 双重匹配:同时检查 Owner 和 Sender 地址
|
|
1673
1676
|
const isInCurve = curveSet.has(ownerAddr) || curveSet.has(senderAddr);
|
|
1674
1677
|
const isInDex = dexSet.has(ownerAddr) || dexSet.has(senderAddr);
|
|
1675
1678
|
if (isInCurve) {
|
|
1676
1679
|
curveBuyers.push({ wallet, amount: amountWei });
|
|
1680
|
+
console.log(`[GraduateBuy] Curve wallet: sender=${senderAddr}, amount=${amountNum.toFixed(6)} OKB`);
|
|
1677
1681
|
}
|
|
1678
1682
|
else if (isInDex && enableDexBuy) {
|
|
1679
1683
|
dexBuyers.push({ wallet, amount: amountWei });
|
|
1684
|
+
console.log(`[GraduateBuy] DEX wallet: sender=${senderAddr}, amount=${amountNum.toFixed(6)} OKB`);
|
|
1680
1685
|
}
|
|
1681
1686
|
// 如果钱包既不在 curveSet 也不在 dexSet,则跳过
|
|
1682
1687
|
}
|
|
1688
|
+
// ✅ 打印分组结果,方便调试
|
|
1689
|
+
console.log(`[GraduateBuy] Final grouping: ${curveBuyers.length} curve buyers, ${dexBuyers.length} dex buyers`);
|
|
1683
1690
|
}
|
|
1684
1691
|
else {
|
|
1685
1692
|
// ✅ 原逻辑:SDK 自动分组(可能与前端不一致)
|