Skip to content

fix(widget): add Lighter explorer path override for address links#747

Merged
chybisov merged 2 commits into
mainfrom
feature/emb-395-resolve-address-path-for-lighter
May 26, 2026
Merged

fix(widget): add Lighter explorer path override for address links#747
chybisov merged 2 commits into
mainfrom
feature/emb-395-resolve-address-path-for-lighter

Conversation

@chybisov
Copy link
Copy Markdown
Member

Which Linear task is linked to this PR?

EMB-395

Why was it implemented this way?

Lighter's explorer doesn't expose /address/<wallet> — it only supports /explorer/logs/<hash> for transactions and /explorer/accounts/<index> for accounts. The widget built https://lighter.exchange/explorer/address/<wallet> from blockExplorerUrls, which 404'd.

Followed the existing explorerPathOverrides pattern in useExplorer.ts (already used for SUI and TVM) and added a ChainId.LTR entry. This keeps the resolution logic centralized and is the minimal, contained change.

Caveat: Lighter accounts are keyed by a numeric index resolved from the L1 wallet via an API call (/api/v1/accountsByL1Address). The widget can't do that resolution synchronously, so the address link won't deep-link to the exact account. It now lands on the /explorer/accounts/<wallet> route, which the SPA serves (no HTTP 404) — satisfying the ticket's acceptance criterion.

Visual showcase (Screenshots or Videos)

N/A — link generation change only.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the Widget API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

Lighter's explorer doesn't support /address/<wallet>, only /explorer/logs/<hash>
and /explorer/accounts/<index>. Add ChainId.LTR override so address and
transaction links no longer 404.

Resolves EMB-395
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

E2E Examples — failures

The following example(s) failed:

  • nft-checkout
  • vite-iframe-wagmi

See the workflow run for Playwright reports and logs.

The base blockExplorerUrl already ends with /explorer.
@chybisov chybisov merged commit 8269902 into main May 26, 2026
18 of 20 checks passed
@chybisov chybisov deleted the feature/emb-395-resolve-address-path-for-lighter branch May 26, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants