fix(frontend): Galaxy Finder columbus-5 path uses /mainnet instead of /columbus-5 #478

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

Summary

Mainnet (VITE_NETWORK=mainnet / columbus-5) builds open Terra Classic Galaxy Finder links under /mainnet/…. That path does not resolve txs reliably; Finder expects the chain-id path /columbus-5/…. Soft-launch users on dex.cl8y.com / dex.cl8y.co see “Swap successful!” with a TX link that fails or is hard to use.

Reported bad URL

https://finder.terraclassic.community/mainnet/tx/E73111142EC4548455DBE3D09531DF9987342D602CC4BAFB73E34DC953C40EB6

Expected URL

https://finder.terraclassic.community/columbus-5/tx/E73111142EC4548455DBE3D09531DF9987342D602CC4BAFB73E34DC953C40EB6

This issue bundles the config fix, Vitest expectations, and docs/playbook matrix updates (same root cause for tx and address explorer links).

Related: #184 (address helper), #430 (SEC-E10 segment validation — keep intact).


Current codebase

Explorer links are centralized; components must not hardcode Finder hosts.

Piece Behavior today
frontend-dapp/public/chains/chainlist.json columbus-5 entry has "explorerUrl": "https://finder.terraclassic.community/mainnet"
frontend-dapp/src/utils/terraExplorer.ts getExplorerTxUrl / getExplorerAddressUrl resolve NETWORKS[DEFAULT_NETWORK].terra.chainId → chainlist.explorerUrl → {base}/tx|address/{segment}
Local builds Still use LCD REST (/cosmos/tx/v1beta1/txs/…, /cosmos/auth/v1beta1/accounts/…) — unaffected
Testnet (rebel-2) Uses Hexxagon Finder /testnet — out of scope unless Hexxagon also requires chain-id paths
Consumers TxResultAlert, TerraBroadcastPendingLink, order history, AddressRow, wallet “View on explorer”
Tests / docs terraExplorer.test.ts and docs/frontend.md § Terra Classic block explorer URLs encode /mainnet/ as correct

terraExplorer.ts itself is fine structurally; the wrong base path is in chainlist.json, then frozen by tests and docs.


Why a new implementation is needed

Galaxy Finder’s public routing for Terra Classic mainnet is /columbus-5/, not the product label /mainnet/. Users cannot open successful swap / pool / limit txs from in-app links. Address explorer links are broken the same way (…/mainnet/address/…). Soft launch depends on these links for support and self-serve verification.


Constraints / guardrails

  1. Single source of truth — change explorerUrl in chainlist.json; do not hardcode Finder hosts in React components.
  2. Keep SEC-E10 (#430) — continue rejecting non-64-hex tx hashes and invalid bech32 addresses (null → no href). Do not weaken adversarial tests.
  3. Network follows the build — still driven by VITE_NETWORK / DEFAULT_NETWORK; do not infer network from the hash/address string.
  4. Do not break local — LocalTerra LCD paths must remain unchanged.
  5. Do not casually change testnet — only change rebel-2 / Hexxagon base if verified; this bug is columbus-5 / Galaxy Finder.
  6. Docs + playbook stay in sync — update the URL matrix in docs/frontend.md and any expectations in skills/AGENTS_FRONTEND_TERRA_EXPLORER.md.
  7. Scope — config + tests + docs only unless a consumer bypasses terraExplorer (grep for Finder hosts before merge).

Relevant files

File Role
frontend-dapp/public/chains/chainlist.json Primary fix: columbus-5 explorerUrl
frontend-dapp/src/utils/terraExplorer.ts URL composition (likely unchanged)
frontend-dapp/src/utils/__tests__/terraExplorer.test.ts Update mainnet expectations to /columbus-5/
docs/frontend.md URL matrix under § Terra Classic block explorer URLs
skills/AGENTS_FRONTEND_TERRA_EXPLORER.md Agent invariants if they mention /mainnet
Consumers (smoke / no logic change expected) TxResultAlert.tsx, TerraBroadcastPendingLink.tsx, AddressRow.tsx, WalletDropdownMenuItems.tsx, order-history tx column

  1. Set columbus-5 explorerUrl to https://finder.terraclassic.community/columbus-5 (no trailing slash; existing code strips trailing /).
  2. Update Vitest mainnet cases:
    • …/columbus-5/tx/{hash}
    • …/columbus-5/address/{addr}
  3. Update docs/frontend.md matrix cells that still say /mainnet/….
  4. Grep for finder.terraclassic.community/mainnet and clear leftovers.
  5. Manually open one mainnet tx + one address link against live Galaxy Finder after deploy (or against a mainnet-env local build).

Optional hardening (only if cheap): add a one-line comment on the chainlist entry that Finder uses chain id path segments, not the word mainnet.


Acceptance criteria

  • Mainnet getExplorerTxUrl(validHash) returns https://finder.terraclassic.community/columbus-5/tx/{hash}.
  • Mainnet getExplorerAddressUrl(validAddr) returns https://finder.terraclassic.community/columbus-5/address/{addr}.
  • Local and testnet URL shapes unchanged (unless a separate verified Hexxagon change is included).
  • SEC-E10 adversarial cases still return null (no injectable href).
  • No component hardcodes the old /mainnet Finder base.
  • docs/frontend.md (and playbook if needed) document /columbus-5/ for mainnet.
  • After soft-launch deploy, Swap success TX link opens the reported tx on Galaxy Finder.

Test plan (all paths)

Unit

  • VITE_NETWORK=mainnet — tx URL uses /columbus-5/tx/…
  • VITE_NETWORK=mainnet — address URL uses /columbus-5/address/…
  • VITE_NETWORK=local — LCD tx + account REST unchanged
  • VITE_NETWORK=testnet — Hexxagon /testnet/… unchanged (unless intentionally updated)
  • Existing adversarial suites in terraExplorer.test.ts still pass
  • Run: cd frontend-dapp && npx vitest run src/utils/__tests__/terraExplorer.test.ts (or make test-frontend scoped equivalently)

Integration / UI smoke

  • Mainnet (or mainnet env) Swap success alert: TX link href contains /columbus-5/tx/ and opens Finder
  • Wallet “View on explorer” / AddressRow: address link contains /columbus-5/address/
  • Order history / pending broadcast link (if shown): same tx base
  • LocalTerra build: explorer still hits LCD, not Galaxy Finder

Docs drift

  • Grep clean: no remaining finder.terraclassic.community/mainnet in repo (except historical issue text if any)
  • docs/frontend.md matrix matches implemented URLs

Test plan (attack / hack / abuse vectors)

Keep #430 / SEC-E10 coverage; path-segment change must not open new injection surface.

Vector Expectation
javascript:… as tx hash or address Helper returns null; no anchor rendered
HTML / script fragments in hash or address null
Path traversal (../, extra /) in hash null (non-64-hex)
Truncated / oversized / non-hex hash null
Invalid bech32 / wrong HRP address null
Open redirect via forged explorerUrl in chainlist Treat as trusted build asset; PR review only — do not load explorer base from user input or query params
Phishing via lookalike Finder host Do not introduce alternate hosts without maintainer approval; stay on finder.terraclassic.community for columbus-5
Mixed content / HTTP explorer base Keep https://

Add or retain Vitest cases for the adversarial rows above; component-level safety tests (AddressRow.explorerSafety, TerraBroadcastPendingLink) must still omit links when helpers return null.


Verification criteria

  1. Automated: terraExplorer Vitest file green with /columbus-5/ expectations; SEC-E10 cases green.
  2. Manual (mainnet): Open reported hash via in-app link → Galaxy Finder shows tx E7311114…C40EB6 (or equivalent new swap).
  3. Manual (address): Connected wallet explorer link loads the account page under /columbus-5/address/….
  4. Regression: LocalTerra swap success still links to LCD REST (or hides link if LCD unavailable) — not Finder /columbus-5.
  5. Grep: finder.terraclassic.community/mainnet absent from source/docs after the change.
  6. Sign-off note (optional on MR): paste one working Finder tx URL from a soft-launch swap.

Severity

Minor UX / correctness — does not block swap execution, but impairs post-tx discovery and support on soft launch.

## Summary Mainnet (`VITE_NETWORK=mainnet` / `columbus-5`) builds open Terra Classic **Galaxy Finder** links under `/mainnet/…`. That path does not resolve txs reliably; Finder expects the **chain-id path** `/columbus-5/…`. Soft-launch users on `dex.cl8y.com` / `dex.cl8y.co` see “Swap successful!” with a TX link that fails or is hard to use. **Reported bad URL** `https://finder.terraclassic.community/mainnet/tx/E73111142EC4548455DBE3D09531DF9987342D602CC4BAFB73E34DC953C40EB6` **Expected URL** `https://finder.terraclassic.community/columbus-5/tx/E73111142EC4548455DBE3D09531DF9987342D602CC4BAFB73E34DC953C40EB6` This issue bundles the config fix, Vitest expectations, and docs/playbook matrix updates (same root cause for **tx** and **address** explorer links). Related: [#184](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/184) (address helper), [#430](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/430) (SEC-E10 segment validation — keep intact). --- ## Current codebase Explorer links are centralized; components must not hardcode Finder hosts. | Piece | Behavior today | |-------|----------------| | [`frontend-dapp/public/chains/chainlist.json`](frontend-dapp/public/chains/chainlist.json) | `columbus-5` entry has `"explorerUrl": "https://finder.terraclassic.community/mainnet"` | | [`frontend-dapp/src/utils/terraExplorer.ts`](frontend-dapp/src/utils/terraExplorer.ts) | `getExplorerTxUrl` / `getExplorerAddressUrl` resolve `NETWORKS[DEFAULT_NETWORK].terra.chainId` → `chainlist.explorerUrl` → `{base}/tx\|address/{segment}` | | Local builds | Still use LCD REST (`/cosmos/tx/v1beta1/txs/…`, `/cosmos/auth/v1beta1/accounts/…`) — unaffected | | Testnet (`rebel-2`) | Uses Hexxagon Finder `/testnet` — out of scope unless Hexxagon also requires chain-id paths | | Consumers | `TxResultAlert`, `TerraBroadcastPendingLink`, order history, `AddressRow`, wallet “View on explorer” | | Tests / docs | [`terraExplorer.test.ts`](frontend-dapp/src/utils/__tests__/terraExplorer.test.ts) and [`docs/frontend.md`](docs/frontend.md) § Terra Classic block explorer URLs **encode `/mainnet/` as correct** | `terraExplorer.ts` itself is fine structurally; the **wrong base path** is in `chainlist.json`, then frozen by tests and docs. --- ## Why a new implementation is needed Galaxy Finder’s public routing for Terra Classic mainnet is **`/columbus-5/`**, not the product label `/mainnet/`. Users cannot open successful swap / pool / limit txs from in-app links. Address explorer links are broken the same way (`…/mainnet/address/…`). Soft launch depends on these links for support and self-serve verification. --- ## Constraints / guardrails 1. **Single source of truth** — change `explorerUrl` in `chainlist.json`; do not hardcode Finder hosts in React components. 2. **Keep SEC-E10 (#430)** — continue rejecting non-64-hex tx hashes and invalid bech32 addresses (`null` → no `href`). Do not weaken adversarial tests. 3. **Network follows the build** — still driven by `VITE_NETWORK` / `DEFAULT_NETWORK`; do not infer network from the hash/address string. 4. **Do not break local** — LocalTerra LCD paths must remain unchanged. 5. **Do not casually change testnet** — only change `rebel-2` / Hexxagon base if verified; this bug is columbus-5 / Galaxy Finder. 6. **Docs + playbook stay in sync** — update the URL matrix in `docs/frontend.md` and any expectations in [`skills/AGENTS_FRONTEND_TERRA_EXPLORER.md`](skills/AGENTS_FRONTEND_TERRA_EXPLORER.md). 7. **Scope** — config + tests + docs only unless a consumer bypasses `terraExplorer` (grep for Finder hosts before merge). --- ## Relevant files | File | Role | |------|------| | `frontend-dapp/public/chains/chainlist.json` | **Primary fix:** `columbus-5` `explorerUrl` | | `frontend-dapp/src/utils/terraExplorer.ts` | URL composition (likely unchanged) | | `frontend-dapp/src/utils/__tests__/terraExplorer.test.ts` | Update mainnet expectations to `/columbus-5/` | | `docs/frontend.md` | URL matrix under § Terra Classic block explorer URLs | | `skills/AGENTS_FRONTEND_TERRA_EXPLORER.md` | Agent invariants if they mention `/mainnet` | | Consumers (smoke / no logic change expected) | `TxResultAlert.tsx`, `TerraBroadcastPendingLink.tsx`, `AddressRow.tsx`, `WalletDropdownMenuItems.tsx`, order-history tx column | --- ## Recommended direction 1. Set columbus-5 `explorerUrl` to `https://finder.terraclassic.community/columbus-5` (no trailing slash; existing code strips trailing `/`). 2. Update Vitest mainnet cases: - `…/columbus-5/tx/{hash}` - `…/columbus-5/address/{addr}` 3. Update `docs/frontend.md` matrix cells that still say `/mainnet/…`. 4. Grep for `finder.terraclassic.community/mainnet` and clear leftovers. 5. Manually open one mainnet tx + one address link against live Galaxy Finder after deploy (or against a mainnet-env local build). Optional hardening (only if cheap): add a one-line comment on the `chainlist` entry that Finder uses **chain id** path segments, not the word `mainnet`. --- ## Acceptance criteria - [ ] Mainnet `getExplorerTxUrl(validHash)` returns `https://finder.terraclassic.community/columbus-5/tx/{hash}`. - [ ] Mainnet `getExplorerAddressUrl(validAddr)` returns `https://finder.terraclassic.community/columbus-5/address/{addr}`. - [ ] Local and testnet URL shapes unchanged (unless a separate verified Hexxagon change is included). - [ ] SEC-E10 adversarial cases still return `null` (no injectable `href`). - [ ] No component hardcodes the old `/mainnet` Finder base. - [ ] `docs/frontend.md` (and playbook if needed) document `/columbus-5/` for mainnet. - [ ] After soft-launch deploy, Swap success TX link opens the reported tx on Galaxy Finder. --- ## Test plan (all paths) ### Unit - [ ] `VITE_NETWORK=mainnet` — tx URL uses `/columbus-5/tx/…` - [ ] `VITE_NETWORK=mainnet` — address URL uses `/columbus-5/address/…` - [ ] `VITE_NETWORK=local` — LCD tx + account REST unchanged - [ ] `VITE_NETWORK=testnet` — Hexxagon `/testnet/…` unchanged (unless intentionally updated) - [ ] Existing adversarial suites in `terraExplorer.test.ts` still pass - [ ] Run: `cd frontend-dapp && npx vitest run src/utils/__tests__/terraExplorer.test.ts` (or `make test-frontend` scoped equivalently) ### Integration / UI smoke - [ ] Mainnet (or mainnet env) Swap success alert: TX link `href` contains `/columbus-5/tx/` and opens Finder - [ ] Wallet “View on explorer” / `AddressRow`: address link contains `/columbus-5/address/` - [ ] Order history / pending broadcast link (if shown): same tx base - [ ] LocalTerra build: explorer still hits LCD, not Galaxy Finder ### Docs drift - [ ] Grep clean: no remaining `finder.terraclassic.community/mainnet` in repo (except historical issue text if any) - [ ] `docs/frontend.md` matrix matches implemented URLs --- ## Test plan (attack / hack / abuse vectors) Keep [#430](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/430) / SEC-E10 coverage; path-segment change must not open new injection surface. | Vector | Expectation | |--------|-------------| | `javascript:…` as tx hash or address | Helper returns `null`; no anchor rendered | | HTML / script fragments in hash or address | `null` | | Path traversal (`../`, extra `/`) in hash | `null` (non-64-hex) | | Truncated / oversized / non-hex hash | `null` | | Invalid bech32 / wrong HRP address | `null` | | Open redirect via forged `explorerUrl` in chainlist | Treat as trusted build asset; PR review only — do not load explorer base from user input or query params | | Phishing via lookalike Finder host | Do not introduce alternate hosts without maintainer approval; stay on `finder.terraclassic.community` for columbus-5 | | Mixed content / HTTP explorer base | Keep `https://` | Add or retain Vitest cases for the adversarial rows above; component-level safety tests (`AddressRow.explorerSafety`, `TerraBroadcastPendingLink`) must still omit links when helpers return `null`. --- ## Verification criteria 1. **Automated:** `terraExplorer` Vitest file green with `/columbus-5/` expectations; SEC-E10 cases green. 2. **Manual (mainnet):** Open reported hash via in-app link → Galaxy Finder shows tx `E7311114…C40EB6` (or equivalent new swap). 3. **Manual (address):** Connected wallet explorer link loads the account page under `/columbus-5/address/…`. 4. **Regression:** LocalTerra swap success still links to LCD REST (or hides link if LCD unavailable) — not Finder `/columbus-5`. 5. **Grep:** `finder.terraclassic.community/mainnet` absent from source/docs after the change. 6. **Sign-off note (optional on MR):** paste one working Finder tx URL from a soft-launch swap. ## Severity Minor UX / correctness — does not block swap execution, but impairs post-tx discovery and support on soft launch.
PlasticDigits commented 2026-07-12 09:01:30 +00:00 (Migrated from gitlab.com)

mentioned in commit 976c123dc5

mentioned in commit 976c123dc53a9ef207e06813f3041cedce6b0773
PlasticDigits commented 2026-07-12 09:03:14 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1014

mentioned in merge request !1014
PlasticDigits commented 2026-07-12 09:22:36 +00:00 (Migrated from gitlab.com)

mentioned in commit 8ed7b2d6ce

mentioned in commit 8ed7b2d6ced3237fc9671092f5ee4687203b92ac
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-07-12 09:22:36 +00:00
PlasticDigits commented 2026-08-17 03:45:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #541

mentioned in issue #541
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#478
No description provided.