additive fees; burnSwapAmounts fix

This commit is contained in:
tim
2025-11-04 16:58:16 -04:00
parent 590acdd4dc
commit dc2e186331
10 changed files with 103 additions and 100 deletions

View File

@@ -484,7 +484,7 @@ contract NativeTest is Test {
uint256 thisEthBefore = address(this).balance;
// Burn LP and receive all proceeds as native currency (WETH unwrapped)
uint256 payout = pool.burnSwap(
(uint256 payout, ) = pool.burnSwap(
address(this), // payer (holds LP)
address(this), // receiver
lpToBurn, // lpAmount
@@ -506,7 +506,7 @@ contract NativeTest is Test {
uint256 bobEthBefore = bob.balance;
// Burn LP and send native currency to bob
uint256 payout = pool.burnSwap(
(uint256 payout, ) = pool.burnSwap(
address(this), // payer
bob, // receiver
lpToBurn,
@@ -555,7 +555,7 @@ contract NativeTest is Test {
// 4. Burn LP to native currency
uint256 lpToBurn = lpMinted / 2;
uint256 payout = pool.burnSwap(alice, alice, lpToBurn, 2, 0, true);
(uint256 payout, ) = pool.burnSwap(alice, alice, lpToBurn, 2, 0, true);
assertTrue(payout > 0, "Should receive payout in native");
// Alice should have some ETH back (maybe more or less depending on slippage)