Hide misleading 'Pool only — add a book leg' notice when limit book is already enabled #492

Closed
opened 2026-07-15 03:45:35 +00:00 by PlasticDigits · 4 comments
PlasticDigits commented 2026-07-15 03:45:35 +00:00 (Migrated from gitlab.com)

Summary

On Swap, the Execution summary shows:

Pool only — add a book leg in Settings to use the on-chain book for part of the pay.

This notice still appears when the limit-book / hybrid setting is already activated in Settings, and the trade is pool-only only because there are no resting limit orders available to take. In that case the notice is misleading (it tells the user to enable something they already enabled).

Expected: show no Execution notice in this situation.

Steps to reproduce

  1. Open Swap with a direct CW20 pair.
  2. In Settings, enable Route part of input through the limit book (limit orders / hybrid on).
  3. Quote a swap where the on-chain book has no takeable liquidity for the pay side (empty / no matching limits).
  4. Observe the Execution card under the receive amount.

Actual

Execution shows “Pool only — add a book leg in Settings…”, even though the book leg feature is already on and the pool-only outcome is due to no limits available to take.

Expected

Do not show that notice when limit orders / the book leg are already activated in Settings and execution is pool-only only because there is nothing on the book to take.

Likely location

frontend-dapp/src/pages/SwapPage.tsx (Execution summary around the willSubmitHybrid === false / bookRaw === 0 branch) and related split helpers in frontend-dapp/src/utils/swapDisclosure.ts.

## Summary On Swap, the Execution summary shows: > **Pool only** — add a book leg in Settings to use the on-chain book for part of the pay. This notice still appears when the limit-book / hybrid setting is already **activated** in Settings, and the trade is pool-only only because there are **no resting limit orders available to take**. In that case the notice is misleading (it tells the user to enable something they already enabled). **Expected:** show **no** Execution notice in this situation. ## Steps to reproduce 1. Open Swap with a direct CW20 pair. 2. In Settings, enable **Route part of input through the limit book** (limit orders / hybrid on). 3. Quote a swap where the on-chain book has **no takeable liquidity** for the pay side (empty / no matching limits). 4. Observe the Execution card under the receive amount. ## Actual Execution shows “Pool only — add a book leg in Settings…”, even though the book leg feature is already on and the pool-only outcome is due to no limits available to take. ## Expected Do not show that notice when limit orders / the book leg are already activated in Settings and execution is pool-only only because there is nothing on the book to take. ## Likely location `frontend-dapp/src/pages/SwapPage.tsx` (Execution summary around the `willSubmitHybrid === false` / `bookRaw === 0` branch) and related split helpers in `frontend-dapp/src/utils/swapDisclosure.ts`.
PlasticDigits commented 2026-07-25 04:33:10 +00:00 (Migrated from gitlab.com)

mentioned in commit f778d9b130

mentioned in commit f778d9b130a79cc34c12c12e004f781c9acd45a4
PlasticDigits commented 2026-07-25 04:34:03 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1038

mentioned in merge request !1038
PlasticDigits commented 2026-07-25 04:34:11 +00:00 (Migrated from gitlab.com)

Implemented in !1038 (fix/492-hide-pool-only-book-leg-notice).

Done (acceptance):

  • Do not show “Pool only — add a book leg in Settings…” when hybrid Settings are already on and the trade is pool-only because the manual book leg is empty / nothing to take.
  • Unit + SwapPage tests for silence (getDirectHybridSettingsExecutionSummary → { show: false }).
  • Docs/skills invariants + cognitive-load silence rule.

Out of scope / not done:

  • Did not change Swap empty-book semantics to Trade’s “empty = full book leg”.
  • Trade market panel unchanged (no this copy).
Implemented in !1038 (`fix/492-hide-pool-only-book-leg-notice`). **Done (acceptance):** - [x] Do not show “Pool only — add a book leg in Settings…” when hybrid Settings are already on and the trade is pool-only because the manual book leg is empty / nothing to take. - [x] Unit + SwapPage tests for silence (`getDirectHybridSettingsExecutionSummary` → `{ show: false }`). - [x] Docs/skills invariants + cognitive-load silence rule. **Out of scope / not done:** - Did not change Swap empty-book semantics to Trade’s “empty = full book leg”. - Trade market panel unchanged (no this copy).
PlasticDigits commented 2026-07-25 04:53:30 +00:00 (Migrated from gitlab.com)

mentioned in commit 73b80b6f4d

mentioned in commit 73b80b6f4ddbba0fefd5de3da957a45ff88b4ff8
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-07-25 04:53:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#492
No description provided.