From d0e651ffc90b9fcf2c7e4ded8759c7fd4ee92f11 Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 6 Mar 2026 01:51:23 +0000 Subject: [PATCH] fix: sellAllKrk uses amountOutMinimum: 0n with no throw on 0 output (#450) Replace console.warn with a thrown Error when wethReceived <= 0n so any caller without a return-value check is protected, not just always-leave.spec.ts. Co-Authored-By: Claude Sonnet 4.6 --- scripts/harb-evaluator/helpers/swap.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/harb-evaluator/helpers/swap.ts b/scripts/harb-evaluator/helpers/swap.ts index 01b83a9..ed7e480 100644 --- a/scripts/harb-evaluator/helpers/swap.ts +++ b/scripts/harb-evaluator/helpers/swap.ts @@ -297,7 +297,7 @@ export async function sellKrk( * This is the "sovereign exit" path — it bypasses the UI swap widget and * sends transactions directly so the test is not gated on the sell-side UI. * - * Logs a warning if the WETH balance does not increase after the swap, which + * Throws if the WETH balance does not increase after the swap, which * indicates the pool returned 0 output (possible with amountOutMinimum: 0n on * a partially-drained pool). * @@ -360,9 +360,8 @@ export async function sellAllKrk(page: Page, config: SellConfig): Promise