Connected wallet chip missing standard elements : no balance display, no copy address, no explorer link, no switch wallet #140

Closed
opened 2026-05-06 16:14:14 +00:00 by totdking · 27 comments
totdking commented 2026-05-06 16:14:14 +00:00 (Migrated from gitlab.com)
No description provided.
totdking commented 2026-05-06 16:17:26 +00:00 (Migrated from gitlab.com)

Issue Summary

After connecting a wallet, the header chip and its dropdown are missing four standard connected-state elements expected on every DEX: wallet balance, copy-address button, explorer link, and switch-wallet option. The dropdown only exposes Disconnect and Trader Profile. A CEX-migrant trader cannot confirm their address, check their balance at a glance, or jump to an explorer without leaving the app.


Reproduction Steps

  1. Open the app at http://127.0.0.1:3000
  2. Connect a Station wallet configured for localterra
  3. Observe the header chip, check for balance display
  4. Click the chip to open the dropdown
  5. Check for: copy address button, explorer link, switch wallet option

Expected Behavior

The connected wallet chip and its dropdown should include:

  • Balance display: native token balance (LUNC) visible in the header or chip without opening anything
  • Copy address :one-click button to copy the full wallet address to clipboard
  • Explorer link : "View on explorer" link opening the address on a block explorer
  • Switch wallet : option to disconnect current wallet and connect a different one without a full page flow

Actual Behavior

  • No balance shown in header or chip
  • No copy address button in the dropdown
  • No explorer link in the dropdown
  • No switch wallet option dropdown contains only Disconnect and Trader Profile

image.png{width=735 height=600}

Disconnect works correctly and resets the header to the unconnected state.


Environment Details

Field Value
OS macOS (Apple M1 Pro, 14-inch)
Browser Google Chrome (desktop)
Viewport 1470×864
Network localterra (local Docker)
Frontend VITE_NETWORK=local npm run dev

Wallet / Device Details

  • Wallet: Station browser extension
  • Wallet state: Connected (all wallet options)

Severity / Impact

P2 Polish. No functionality is blocked , disconnect and reconnect work. However, the missing balance, copy, explorer link, and switch wallet are standard affordances on every multi-wallet DEX. CEX migrants expect to verify their address and check buying power at a glance. Found under W2-C3 (Connected state Display and Interactivity dimensions).

### Issue Summary After connecting a wallet, the header chip and its dropdown are missing four standard connected-state elements expected on every DEX: `wallet balance`, `copy-address` button, `explorer link`, and `switch-wallet` option. The dropdown only exposes Disconnect and Trader Profile. A CEX-migrant trader cannot confirm their address, check their balance at a glance, or jump to an explorer without leaving the app. --- ### Reproduction Steps 1. Open the app at `http://127.0.0.1:3000` 2. Connect a Station wallet configured for localterra 3. Observe the header chip, check for balance display 4. Click the chip to open the dropdown 5. Check for: copy address button, explorer link, switch wallet option --- ### Expected Behavior The connected wallet chip and its dropdown should include: - **Balance display**: native token balance (LUNC) visible in the header or chip without opening anything - **Copy address** :one-click button to copy the full wallet address to clipboard - **Explorer link** : "View on explorer" link opening the address on a block explorer - **Switch wallet** : option to disconnect current wallet and connect a different one without a full page flow --- ### Actual Behavior - No balance shown in header or chip - No copy address button in the dropdown - No explorer link in the dropdown - No switch wallet option dropdown contains only **Disconnect** and **Trader Profile** ![image.png](/uploads/7f707039be86b1a3b274f14d1ed5a55d/image.png){width=735 height=600} Disconnect works correctly and resets the header to the unconnected state. --- ### Environment Details | Field | Value | |-------|-------| | OS | macOS (Apple M1 Pro, 14-inch) | | Browser | Google Chrome (desktop) | | Viewport | 1470×864 | | Network | `localterra` (local Docker) | | Frontend | `VITE_NETWORK=local npm run dev` | --- ### Wallet / Device Details - **Wallet:** Station browser extension - **Wallet state:** Connected (all wallet options) --- ### Severity / Impact **P2 Polish.** No functionality is blocked , disconnect and reconnect work. However, the missing balance, copy, explorer link, and switch wallet are standard affordances on every multi-wallet DEX. CEX migrants expect to verify their address and check buying power at a glance. Found under W2-C3 (Connected state Display and Interactivity dimensions).
totdking commented 2026-05-06 16:19:15 +00:00 (Migrated from gitlab.com)

mentioned in issue #116

mentioned in issue #116
Brouie commented 2026-05-07 06:32:34 +00:00 (Migrated from gitlab.com)

@totdking @PlasticDigits — source-level audit found additional gaps in the wallet chip beyond the four standard elements this ticket covers (balance / copy / explorer / switch wallet). also surfacing infrastructure dependencies the fix needs.

Additional gaps at frontend-dapp/src/components/wallet/WalletButton.tsx

HIGH (extending the four standard elements)

  • Lines 16-42 — connected trigger shows wallet label (sm+ only) + truncated address + chain logo. Network text is never shown. The chain logo at line 40 is the SOLE chain indicator (alt="Terra Classic"). Sighted users without the chain logo memorized have to guess. Suggest adding network shortLabel as text alongside the logo.
  • Lines 36-38 — on <sm: (mobile), the chip drops the "Wallet" copy entirely and shows ONLY the truncated 4+4 address. There is no copy / explorer / network / balance affordance on mobile. The four standard elements you scoped need a mobile presentation strategy too.

POLISH

  • Line 46 — click-outside scrim is <div className="fixed inset-0 z-40" onClick={...} /> — no role, no keyboard dismissal, no Esc listener at the dropdown level. Escape is handled at Layout.tsx:39-48 for the More menu but NOT for the wallet menu. Replace with semantic dismisser, add Esc handler.

Infrastructure dependencies the fix needs

These need to land first or alongside, not after:

Copy address — needs a CopyButton primitive

  • Verified by grep: navigator.clipboard does not appear ANYWHERE in frontend-dapp/src. Zero hits. Whatever copy affordance lands here is the first one in the codebase.
  • Suggest extracting a reusable <CopyButton> primitive while at it. Same pattern will apply to address-row sites elsewhere (Trader page, Pool addresses, LP token, Tx hash — currently none have copy buttons either).
  • utils/terraExplorer.ts only exposes getExplorerTxUrl. There is no getExplorerAddressUrl helper today. Need to add one before wiring "View on explorer" in the dropdown.

Cross-cutting opportunity — <AddressRow> primitive

While building the chip dropdown's copy/explorer affordances, worth considering an <AddressRow> primitive (shortened text + copy button + explorer link) that can be reused at other partial-info surfaces matching this gap pattern:

  • TraderPage.tsx:88-99 — search input + result header use shortenAddress but no copy/explorer affordance
  • PoolPage.tsx:723 — LP token address as static <span className="font-mono">{shortenAddress(...)}</span>
  • Pair address chips in PoolPage, ChartsPage, LimitOrdersPage
  • TxResultAlert.tsx:21-35 — has explorer link, no copy button (parity gap)

migrating those to a shared <AddressRow> would close ~5 partial-info surfaces in one shape.

Suggestion

either:

A. expand this ticket to cover network text + mobile chip + dropdown Esc handler + CopyButton primitive + getExplorerAddressUrl helper. all interrelated.
B. keep this ticket scoped to dropdown elements only and file siblings for the chip-text, mobile-presentation, and infra primitives. file the AddressRow as a separate cross-cutting umbrella.

either works. flagging the infra dependencies regardless so the fix doesn't get blocked mid-implementation.

cc @PlasticDigits

@totdking @PlasticDigits — source-level audit found additional gaps in the wallet chip beyond the four standard elements this ticket covers (balance / copy / explorer / switch wallet). also surfacing infrastructure dependencies the fix needs. ## Additional gaps at `frontend-dapp/src/components/wallet/WalletButton.tsx` ### HIGH (extending the four standard elements) - **Lines 16-42** — connected trigger shows wallet label (sm+ only) + truncated address + chain logo. Network text is never shown. The chain logo at line 40 is the SOLE chain indicator (alt="Terra Classic"). Sighted users without the chain logo memorized have to guess. Suggest adding network shortLabel as text alongside the logo. - **Lines 36-38** — on `<sm:` (mobile), the chip drops the "Wallet" copy entirely and shows ONLY the truncated 4+4 address. There is no copy / explorer / network / balance affordance on mobile. The four standard elements you scoped need a mobile presentation strategy too. ### POLISH - **Line 46** — click-outside scrim is `<div className="fixed inset-0 z-40" onClick={...} />` — no role, no keyboard dismissal, no Esc listener at the dropdown level. `Escape` is handled at `Layout.tsx:39-48` for the More menu but NOT for the wallet menu. Replace with semantic dismisser, add Esc handler. ## Infrastructure dependencies the fix needs These need to land first or alongside, not after: ### Copy address — needs a CopyButton primitive - Verified by grep: `navigator.clipboard` does not appear ANYWHERE in `frontend-dapp/src`. Zero hits. Whatever copy affordance lands here is the first one in the codebase. - Suggest extracting a reusable `<CopyButton>` primitive while at it. Same pattern will apply to address-row sites elsewhere (Trader page, Pool addresses, LP token, Tx hash — currently none have copy buttons either). ### Explorer link — needs a new helper - `utils/terraExplorer.ts` only exposes `getExplorerTxUrl`. There is no `getExplorerAddressUrl` helper today. Need to add one before wiring "View on explorer" in the dropdown. ### Cross-cutting opportunity — `<AddressRow>` primitive While building the chip dropdown's copy/explorer affordances, worth considering an `<AddressRow>` primitive (shortened text + copy button + explorer link) that can be reused at other partial-info surfaces matching this gap pattern: - `TraderPage.tsx:88-99` — search input + result header use `shortenAddress` but no copy/explorer affordance - `PoolPage.tsx:723` — LP token address as static `<span className="font-mono">{shortenAddress(...)}</span>` - Pair address chips in `PoolPage`, `ChartsPage`, `LimitOrdersPage` - `TxResultAlert.tsx:21-35` — has explorer link, no copy button (parity gap) migrating those to a shared `<AddressRow>` would close ~5 partial-info surfaces in one shape. ## Suggestion either: **A. expand this ticket** to cover network text + mobile chip + dropdown Esc handler + CopyButton primitive + getExplorerAddressUrl helper. all interrelated. **B. keep this ticket scoped to dropdown elements only** and file siblings for the chip-text, mobile-presentation, and infra primitives. file the AddressRow as a separate cross-cutting umbrella. either works. flagging the infra dependencies regardless so the fix doesn't get blocked mid-implementation. cc @PlasticDigits
Brouie commented 2026-05-07 06:38:59 +00:00 (Migrated from gitlab.com)

mentioned in issue #145

mentioned in issue #145
PlasticDigits commented 2026-05-07 12:14:17 +00:00 (Migrated from gitlab.com)

B is approved, open the issues.

B is approved, open the issues.
totdking commented 2026-05-07 12:26:00 +00:00 (Migrated from gitlab.com)

Visual checklist verification : W3-C1 (LUNC balance visible before trading).

While carrying out the visual checklist for #116 the W3-C1 (Native + token balances shown in hybrid UI (header, sidebar, pair strip, modal) shows the other tokens i.e CW20 tokens before and after trading but do not display the lunc(native token) . Not sure this qualifies as a big issue, but just documenting as per checklist rules.

cc: @PlasticDigits

Visual checklist verification : W3-C1 (LUNC balance visible before trading). While carrying out the visual checklist for #116 the W3-C1 (Native + token balances shown in hybrid UI (header, sidebar, pair strip, modal) shows the other tokens i.e CW20 tokens before and after trading but do not display the lunc(native token) . Not sure this qualifies as a big issue, but just documenting as per checklist rules. cc: @PlasticDigits
PlasticDigits commented 2026-05-09 05:06:54 +00:00 (Migrated from gitlab.com)

@totdking Missing the lunc information is important. @Brouie

@totdking Missing the lunc information is important. @Brouie
PlasticDigits commented 2026-05-25 02:10:12 +00:00 (Migrated from gitlab.com)

mentioned in commit 1b6fbbb957

mentioned in commit 1b6fbbb95760cc8ba9e47f08d9cfc5de358bc4be
PlasticDigits commented 2026-05-25 02:10:20 +00:00 (Migrated from gitlab.com)

Update — native LUNC balance on connected wallet chip

Implemented the missing LUNC (bank uluna) display called out in the W3-C1 visual checklist thread on this issue. Pushed to main as 1b6fbbb.

What changed

Still open on #140 (scope B — sibling issues)

  • Copy address, explorer link, switch wallet, network text on chip, Esc on wallet menu, CopyButton / getExplorerAddressUrl primitives

Verification checklist

  • Connect Station (or dev wallet) on LocalTerra / target network
  • Header chip shows human LUNC (e.g. 12.5 LUNC) without opening the menu
  • Mobile width: LUNC visible on the compact chip trigger
  • Open chip menu: LUNC + full terra1… address at top
  • After a swap or tx that spends LUNC fees, balance updates within ~15s (or after invalidation) without reload
  • LCD offline: chip shows — LUNC (not blank); disconnect still works
  • Vitest: WalletLuncBalance.test.tsx, WalletButton.test.tsx

@Brouie — please verify on your LocalTerra stack when convenient. Leaving the issue open until copy/explorer/switch-wallet siblings land.

cc @totdking @PlasticDigits

## Update — native LUNC balance on connected wallet chip Implemented the **missing LUNC (bank `uluna`) display** called out in the W3-C1 visual checklist thread on this issue. Pushed to `main` as `1b6fbbb`. ### What changed - New [`WalletLuncBalance`](frontend-dapp/src/components/wallet/WalletLuncBalance.tsx) uses existing [`useNativeUlunaBalance`](frontend-dapp/src/hooks/useNativeUlunaBalance.ts) (same React Query key as swap/pool/trade gas gates). - [`WalletButton`](frontend-dapp/src/components/wallet/WalletButton.tsx) shows formatted **LUNC** on the connected chip at all breakpoints (no menu open required) and repeats balance + **full** bech32 address in the dropdown header. - Docs: [frontend.md § Connected wallet chip — native LUNC balance](docs/frontend.md#connected-wallet-chip-lunc-balance) - Agent playbook: [`skills/AGENTS_FRONTEND_WALLET_CHIP.md`](skills/AGENTS_FRONTEND_WALLET_CHIP.md) ### Still open on #140 (scope B — sibling issues) - Copy address, explorer link, switch wallet, network text on chip, Esc on wallet menu, `CopyButton` / `getExplorerAddressUrl` primitives ### Verification checklist - [ ] Connect Station (or dev wallet) on LocalTerra / target network - [ ] Header chip shows **human LUNC** (e.g. `12.5 LUNC`) without opening the menu - [ ] Mobile width: LUNC visible on the compact chip trigger - [ ] Open chip menu: LUNC + full `terra1…` address at top - [ ] After a swap or tx that spends LUNC fees, balance updates within ~15s (or after invalidation) without reload - [ ] LCD offline: chip shows `— LUNC` (not blank); disconnect still works - [ ] Vitest: `WalletLuncBalance.test.tsx`, `WalletButton.test.tsx` @Brouie — please verify on your LocalTerra stack when convenient. Leaving the issue **open** until copy/explorer/switch-wallet siblings land. cc @totdking @PlasticDigits
PlasticDigits commented 2026-05-25 02:13:00 +00:00 (Migrated from gitlab.com)

mentioned in issue #183

mentioned in issue #183
PlasticDigits commented 2026-05-25 02:13:00 +00:00 (Migrated from gitlab.com)

marked as related to #183

marked as related to #183
PlasticDigits commented 2026-05-25 02:13:23 +00:00 (Migrated from gitlab.com)

mentioned in issue #184

mentioned in issue #184
PlasticDigits commented 2026-05-25 02:13:23 +00:00 (Migrated from gitlab.com)

marked as related to #184

marked as related to #184
PlasticDigits commented 2026-05-25 02:13:26 +00:00 (Migrated from gitlab.com)

mentioned in issue #185

mentioned in issue #185
PlasticDigits commented 2026-05-25 02:13:26 +00:00 (Migrated from gitlab.com)

marked as related to #185

marked as related to #185
PlasticDigits commented 2026-05-25 02:13:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #186

mentioned in issue #186
PlasticDigits commented 2026-05-25 02:13:45 +00:00 (Migrated from gitlab.com)

marked as related to #186

marked as related to #186
PlasticDigits commented 2026-05-25 02:13:47 +00:00 (Migrated from gitlab.com)

mentioned in issue #187

mentioned in issue #187
PlasticDigits commented 2026-05-25 02:13:48 +00:00 (Migrated from gitlab.com)

marked as related to #187

marked as related to #187
PlasticDigits commented 2026-05-25 02:13:51 +00:00 (Migrated from gitlab.com)

mentioned in issue #188

mentioned in issue #188
PlasticDigits commented 2026-05-25 02:13:51 +00:00 (Migrated from gitlab.com)

marked as related to #188

marked as related to #188
PlasticDigits commented 2026-05-25 02:14:01 +00:00 (Migrated from gitlab.com)

Scope B — sibling issues opened

Per @PlasticDigits approval on scope B, the remaining #140 work is split into dedicated issues (LUNC balance remains here / main):

IID Title
#183 Frontend: CopyButton primitive (clipboard)
#184 Frontend: getExplorerAddressUrl helper
#185 Wallet chip dropdown: copy, explorer, switch wallet (depends on 183 + 184)
#186 Wallet chip trigger: network shortLabel + mobile layout
#187 Wallet chip menu: Escape dismiss + semantic backdrop
#188 Frontend: AddressRow primitive (cross-cutting)

This issue can close once #185, #186, and #187 are verified; #188 may trail as a separate umbrella.

cc @Brouie @totdking

## Scope B — sibling issues opened Per [@PlasticDigits](https://gitlab.com/PlasticDigits) approval on scope **B**, the remaining #140 work is split into dedicated issues (LUNC balance remains here / `main`): | IID | Title | |-----|--------| | [#183](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/183) | Frontend: `CopyButton` primitive (clipboard) | | [#184](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/184) | Frontend: `getExplorerAddressUrl` helper | | [#185](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/185) | Wallet chip dropdown: copy, explorer, switch wallet *(depends on 183 + 184)* | | [#186](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/186) | Wallet chip trigger: network shortLabel + mobile layout | | [#187](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/187) | Wallet chip menu: Escape dismiss + semantic backdrop | | [#188](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/188) | Frontend: `AddressRow` primitive (cross-cutting) | This issue can close once **#185**, **#186**, and **#187** are verified; **#188** may trail as a separate umbrella. cc @Brouie @totdking
PlasticDigits commented 2026-05-25 02:14:13 +00:00 (Migrated from gitlab.com)

mentioned in commit 574dfdf4e6

mentioned in commit 574dfdf4e6a43d0c7f2b0933301f440bf326b679
totdking commented 2026-05-26 13:08:56 +00:00 (Migrated from gitlab.com)

Verification checklist

  • Connect Station (or dev wallet) on LocalTerra / target network
  • Header chip shows human LUNC (e.g. 12.5 LUNC) without opening the menu
  • Mobile width: LUNC visible on the compact chip trigger
  • Open chip menu: LUNC + full terra1… address at top
  • After a swap or tx that spends LUNC fees, balance updates within ~15s (or after invalidation) without reload
  • LCD offline: chip shows — LUNC (not blank); disconnect still works
  • Vitest: WalletLuncBalance.test.tsx, WalletButton.test.tsx

Good to go, can close

cc: @PlasticDigits , @Brouie

### Verification checklist * [x] Connect Station (or dev wallet) on LocalTerra / target network * [x] Header chip shows **human LUNC** (e.g. `12.5 LUNC`) without opening the menu * [x] Mobile width: LUNC visible on the compact chip trigger * [x] Open chip menu: LUNC + full `terra1…` address at top * [x] After a swap or tx that spends LUNC fees, balance updates within \~15s (or after invalidation) without reload * [x] LCD offline: chip shows `— LUNC` (not blank); disconnect still works * [x] Vitest: `WalletLuncBalance.test.tsx`, `WalletButton.test.tsx` Good to go, can close cc: @PlasticDigits , @Brouie
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-05-26 13:12:13 +00:00
PlasticDigits commented 2026-08-25 01:55:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #630

mentioned in issue #630
PlasticDigits commented 2026-08-26 04:22:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #671

mentioned in issue #671
PlasticDigits commented 2026-08-26 04:22:43 +00:00 (Migrated from gitlab.com)

marked as related to #671

marked as related to #671
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#140
No description provided.