Bug: Tx hash overflows success box on Limit Orders and Swap pages #54

Closed
opened 2026-04-06 05:48:02 +00:00 by Brouie · 6 comments
Brouie commented 2026-04-06 05:48:02 +00:00 (Migrated from gitlab.com)

Current behavior: when a limit order is placed or swap completes, the success box shows the tx hash but the text overflows the container and gets cut off on the right. hash is not truncated or wrapped.

Expected behavior: tx hash should be truncated with ellipsis (e.g. 290F52E6...D819A) or wrapped to fit within the success box. should also be a clickable link to the block explorer.

Acceptance criteria:

  • tx hash fits within success box on Limit Orders page
  • tx hash fits within success box on Swap page
  • hash is clickable and links to block explorer
  • visual QA on desktop and mobile viewports
  • screenshot evidence of fix

tested on 671e72f.

**Current behavior:** when a limit order is placed or swap completes, the success box shows the tx hash but the text overflows the container and gets cut off on the right. hash is not truncated or wrapped. **Expected behavior:** tx hash should be truncated with ellipsis (e.g. 290F52E6...D819A) or wrapped to fit within the success box. should also be a clickable link to the block explorer. **Acceptance criteria:** - [ ] tx hash fits within success box on Limit Orders page - [ ] tx hash fits within success box on Swap page - [ ] hash is clickable and links to block explorer - [ ] visual QA on desktop and mobile viewports - [ ] screenshot evidence of fix tested on 671e72f.
Brouie commented 2026-04-06 05:48:39 +00:00 (Migrated from gitlab.com)

marked the checklist item screenshot evidence of fix as completed

marked the checklist item **screenshot evidence of fix** as completed
Brouie commented 2026-04-06 05:48:42 +00:00 (Migrated from gitlab.com)

marked the checklist item screenshot evidence of fix as incomplete

marked the checklist item **screenshot evidence of fix** as incomplete
Brouie commented 2026-04-06 05:49:10 +00:00 (Migrated from gitlab.com)

image.png{width=562 height=590}

![image.png](/uploads/f703e83174c9f65fb89ded941e8d79e6/image.png){width=562 height=590}
Brouie commented 2026-04-06 06:13:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #50

mentioned in issue #50
PlasticDigits commented 2026-04-06 12:24:16 +00:00 (Migrated from gitlab.com)

Pushed a fix on main (b5751a9).

Cause: Limit orders put the full tx hash in the success message string instead of using the txHash prop, so TxResultAlert never applied truncation or explorer links. When getExplorerTxUrl returned null, the alert also fell back to showing the full raw hash.

Fix: Added shortenTxHashForDisplay() in terraExplorer.ts (reuses shortenAddress). TxResultAlert always shows a middle-elided label with title for the full hash; explorer links are unchanged when a URL exists. Limit orders now pass txHash separately. TradesTable uses the same helper for consistent tx labels.

Unit tests: TxResultAlert, terraExplorer, and updated TradesTable tests.

Please verify swap + limit flows on desktop and mobile and add a screenshot for the AC. Leaving this issue open for QA.

cc @brouie

Pushed a fix on `main` (`b5751a9`). **Cause:** Limit orders put the full tx hash in the success `message` string instead of using the `txHash` prop, so `TxResultAlert` never applied truncation or explorer links. When `getExplorerTxUrl` returned null, the alert also fell back to showing the full raw hash. **Fix:** Added `shortenTxHashForDisplay()` in `terraExplorer.ts` (reuses `shortenAddress`). `TxResultAlert` always shows a middle-elided label with `title` for the full hash; explorer links are unchanged when a URL exists. Limit orders now pass `txHash` separately. `TradesTable` uses the same helper for consistent tx labels. Unit tests: `TxResultAlert`, `terraExplorer`, and updated `TradesTable` tests. Please verify swap + limit flows on desktop and mobile and add a screenshot for the AC. Leaving this issue open for QA. cc @brouie
Brouie commented 2026-04-07 03:35:25 +00:00 (Migrated from gitlab.com)

Verified on 38afbf8. Tx hash now truncates cleanly in success alerts on both Swap and Limit Orders pages. shortenTxHashForDisplay helper reuses existing shortenAddress. Full hash visible on hover via title attr. break-all prevents overflow. New test file TxResultAlert.test.tsx (3 tests passing). Frontend 214/214.

Verified on 38afbf8. Tx hash now truncates cleanly in success alerts on both Swap and Limit Orders pages. shortenTxHashForDisplay helper reuses existing shortenAddress. Full hash visible on hover via title attr. break-all prevents overflow. New test file TxResultAlert.test.tsx (3 tests passing). Frontend 214/214.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-07 03:35:41 +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#54
No description provided.