Skip to content

Optional block explorer links after sending#1109

Closed
kunal-595 wants to merge 3 commits intojoinmarket-webui:v2from
kunal-595:feat/explorer-links-toggle
Closed

Optional block explorer links after sending#1109
kunal-595 wants to merge 3 commits intojoinmarket-webui:v2from
kunal-595:feat/explorer-links-toggle

Conversation

@kunal-595
Copy link
Copy Markdown
Contributor

Toggle in Display settings (off by default), when on the send success alert gets a mempool.space link.
Returns null for regtest so no broken link shows up

Recording.2026-02-17.161851.mp4

Copilot AI review requested due to automatic review settings February 17, 2026 12:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an opt-in setting to display block explorer links after a successful send, generating mempool.space URLs per network and hiding links on unsupported networks (e.g. regtest).

Changes:

  • Add showBlockExplorer setting persisted in jamSettingsStore (default off) and expose a toggle in Display settings.
  • Add getExplorerUrl() helper for mempool.space tx/address links by network.
  • Append an optional “View in explorer” link to the send success alert when enabled.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/store/jamSettingsStore.ts Adds persisted showBlockExplorer setting (default off).
src/lib/utils.ts Introduces getExplorerUrl() helper for explorer link generation.
src/i18n/locales/en/translation.json Adds UI strings for the new setting and link text.
src/components/settings/SettingsPage.tsx Adds Display setting switch to toggle explorer links.
src/components/send/SendPage.tsx Shows optional explorer link on successful send based on setting + network.
Comments suppressed due to low confidence (1)

src/store/jamSettingsStore.ts:38

  • Because this store persists a nested state object, Zustand's default persist merge will replace state wholesale from localStorage. Existing users with an older stored value won't get the new showBlockExplorer default, so it can be undefined at runtime (and future settings additions will have the same issue). Consider adding a version + migrate, or a custom merge that deep-merges state with initial so new keys are backfilled.
const initial: JamSettings = {
  developerMode: isDevMode(),
  privateMode: false,
  currencyUnit: 'sats',
  cheatsheetForceOpenAt: undefined,
  showBlockExplorer: false,
}

export const jamSettingsStore = createStore<JamSettingsStoreState>()(
  persist(
    (set) => ({
      state: initial,
      update: (val) => set((state) => ({ state: { ...state.state, ...val } })),
      clear: () => set({ state: initial }),
    }),
    {
      name: 'jam-settings-store',
      storage: createJSONStorage(() => localStorage),
    },

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/send/SendPage.tsx Outdated
Comment thread src/components/settings/SettingsPage.tsx Outdated
kunal-595 and others added 2 commits February 17, 2026 18:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@theborakompanioni
Copy link
Copy Markdown
Collaborator

I am not sure about this one @kunal-595.
Generally like the idea, but hardcoding mempool.space is not something I'd merge. Maybe it can be more generic, e.g. letting a user provide the url template - this way a local self-hosted block explorer can be used.
However, even then, maybe we can postpone the feature? Would that be okay for you?

@theborakompanioni
Copy link
Copy Markdown
Collaborator

@kunal-595 Would you make the url configurable and potentially add a component that displays txids with a link if an explorer is configured?
If not, I'd close this issue for now and we concentrate on the feature parity to legacy. But imho it is a "nice to have" feature!

@kunal-595
Copy link
Copy Markdown
Contributor Author

I will make the URL configurable via a template and add the conditional component for txid links , will update the pr shortly.

@MarnixCroes
Copy link
Copy Markdown
Contributor

I agree the idea is good. But having leading people to third party block explorers is bad for privacy.

Copy link
Copy Markdown
Collaborator

@theborakompanioni theborakompanioni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

@theborakompanioni
Copy link
Copy Markdown
Collaborator

Closing as wont do for now!

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.

5 participants