From 19ef112c4bd89669252c32bb179d9675e96aa516 Mon Sep 17 00:00:00 2001 From: Doug Richar Date: Mon, 16 Feb 2026 14:54:48 -0500 Subject: [PATCH 1/2] fix(debug): include request amount in swap failure logs Add the `amount` field to debug output in `logSwapExecutionFailure` so both sides of a quote are visible: the requested amount and the quoted amount. For fixed-input swaps this shows the requested input; for fixed-output swaps it shows the requested output. The field is only present on `SwapQuote` objects, so a runtime check guards access. --- packages/haystack/src/debug.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/haystack/src/debug.ts b/packages/haystack/src/debug.ts index 4e0eed2..8ddfc61 100644 --- a/packages/haystack/src/debug.ts +++ b/packages/haystack/src/debug.ts @@ -32,6 +32,10 @@ export function logSwapExecutionFailure( fromASAID: context.quote.fromASAID, toASAID: context.quote.toASAID, type: context.quote.type, + amount: + 'amount' in context.quote + ? context.quote.amount.toString() + : undefined, quote: context.quote.quote.toString(), requiredAppOptIns: context.quote.requiredAppOptIns, route: context.quote.route?.map((r) => ({ From ae2eaabfc7a86aa0f8453f5befab44ed0223fef0 Mon Sep 17 00:00:00 2001 From: Doug Richar Date: Mon, 16 Feb 2026 14:56:38 -0500 Subject: [PATCH 2/2] style(debug): fix prettier formatting --- packages/haystack/src/debug.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/haystack/src/debug.ts b/packages/haystack/src/debug.ts index 8ddfc61..2d00d96 100644 --- a/packages/haystack/src/debug.ts +++ b/packages/haystack/src/debug.ts @@ -33,9 +33,7 @@ export function logSwapExecutionFailure( toASAID: context.quote.toASAID, type: context.quote.type, amount: - 'amount' in context.quote - ? context.quote.amount.toString() - : undefined, + 'amount' in context.quote ? context.quote.amount.toString() : undefined, quote: context.quote.quote.toString(), requiredAppOptIns: context.quote.requiredAppOptIns, route: context.quote.route?.map((r) => ({