frontend: add chain label to limit-order pre-sign summary (#461) #989

Merged
Brouie merged 1 commit from qa/461-limit-presign-chain-label into main 2026-06-30 22:07:21 +00:00
Brouie commented 2026-06-30 19:27:42 +00:00 (Migrated from gitlab.com)

The limit-order pre-sign card showed deviation + fees but no in-app chain
anchor, so the first place a user saw the chain during limit placement was the
Keplr dialog — unlike swaps, whose pre-sign card shows chainFullLabel
(SEC-I05 F-02, SEC-D11 anti-phishing parity).

Add a Chain row to LimitOrderPreSubmitSummary deriving from
getNetworkBadgeCopy().fullLabel (same source as the swap summary), via a new
optional chainFullLabel prop that defaults to the env badge.

Tests: new case asserts the -chain row renders the label; component suite 4/0,
tsc clean.

Source + unit verified; the before-the-wallet-dialog placement is confirmed by
the existing TradeOrderTicket wiring and a laptop browser pass.

The limit-order pre-sign card showed deviation + fees but no in-app chain anchor, so the first place a user saw the chain during limit placement was the Keplr dialog — unlike swaps, whose pre-sign card shows `chainFullLabel` (SEC-I05 F-02, SEC-D11 anti-phishing parity). Add a Chain row to `LimitOrderPreSubmitSummary` deriving from `getNetworkBadgeCopy().fullLabel` (same source as the swap summary), via a new optional `chainFullLabel` prop that defaults to the env badge. Tests: new case asserts the `-chain` row renders the label; component suite 4/0, tsc clean. Source + unit verified; the before-the-wallet-dialog placement is confirmed by the existing TradeOrderTicket wiring and a laptop browser pass.
Brouie commented 2026-06-30 19:27:43 +00:00 (Migrated from gitlab.com)

assigned to @Brouie

assigned to @Brouie
Brouie commented 2026-06-30 19:29:04 +00:00 (Migrated from gitlab.com)

mentioned in issue #461

mentioned in issue #461
PlasticDigits commented 2026-06-30 19:29:42 +00:00 (Migrated from gitlab.com)

Security review — MR !989

Commit reviewed: 8ca9eb5145e3bf18c0bf5c81a360dc103df07e37
Scope: LimitOrderPreSubmitSummary.tsx — optional chainFullLabel prop (defaults to getNetworkBadgeCopy().fullLabel) and Chain row in pre-sign UI; unit test in LimitOrderPreSubmitSummary.test.tsx.

Outcome: FINDINGS: 0 medium+

Summary: No medium, high, or critical vulnerabilities identified on this diff.

Review notes:

  • XSS: chainFullLabel is rendered as React text ({chainFullLabel}), not dangerouslySetInnerHTML. React escapes text nodes; no injection sink.
  • Input source: Production callers (TradeOrderTicket, LimitOrdersPage) do not pass chainFullLabel; the default comes from getNetworkBadgeCopy(), which maps build-time VITE_NETWORK to fixed allowlisted strings (LocalTerra, Terra Classic Testnet, Terra Classic). Not attacker-controlled at runtime.
  • Authn/authz / secrets / SSRF / CSRF: Not in scope; no server or wallet-signing logic changed.
  • Anti-phishing: This change adds an in-app chain anchor before the wallet dialog (SEC-I05 / #461 parity with swap pre-sign), reducing phishing exposure rather than introducing it.

Inline threads: None (no findings requiring line-level comments).

Prior security-review comments: None on this MR; nothing to re-report.

## Security review — MR !989 **Commit reviewed:** `8ca9eb5145e3bf18c0bf5c81a360dc103df07e37` **Scope:** `LimitOrderPreSubmitSummary.tsx` — optional `chainFullLabel` prop (defaults to `getNetworkBadgeCopy().fullLabel`) and Chain row in pre-sign UI; unit test in `LimitOrderPreSubmitSummary.test.tsx`. **Outcome:** `FINDINGS: 0` medium+ **Summary:** No medium, high, or critical vulnerabilities identified on this diff. **Review notes:** - **XSS:** `chainFullLabel` is rendered as React text (`{chainFullLabel}`), not `dangerouslySetInnerHTML`. React escapes text nodes; no injection sink. - **Input source:** Production callers (`TradeOrderTicket`, `LimitOrdersPage`) do not pass `chainFullLabel`; the default comes from `getNetworkBadgeCopy()`, which maps build-time `VITE_NETWORK` to fixed allowlisted strings (`LocalTerra`, `Terra Classic Testnet`, `Terra Classic`). Not attacker-controlled at runtime. - **Authn/authz / secrets / SSRF / CSRF:** Not in scope; no server or wallet-signing logic changed. - **Anti-phishing:** This change adds an in-app chain anchor before the wallet dialog (SEC-I05 / #461 parity with swap pre-sign), reducing phishing exposure rather than introducing it. **Inline threads:** None (no findings requiring line-level comments). **Prior security-review comments:** None on this MR; nothing to re-report.
PlasticDigits commented 2026-06-30 22:07:21 +00:00 (Migrated from gitlab.com)

mentioned in commit b803ac105b

mentioned in commit b803ac105b64663fcf3291410f5bc4e29b4cb904
PlasticDigits (Migrated from gitlab.com) merged commit b803ac105b into main 2026-06-30 22:07:21 +00:00
PlasticDigits commented 2026-07-01 01:03:56 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1000

mentioned in merge request !1000
Sign in to join this conversation.
No reviewers
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!989
No description provided.