Skip to content

fix: use Id component for txId display in watcher actions (#9) - #17

Open
odiseusme wants to merge 1 commit into
rosen-bridge:devfrom
odiseusme:fix/issue-9-link-txids
Open

odiseusme wants to merge 1 commit into
rosen-bridge:devfrom
odiseusme:fix/issue-9-link-txids

Conversation

@odiseusme

Copy link
Copy Markdown

Closes #9

Changes

Replaces raw {response.txId} text wrapped in <Link> with the <Id> component across all 3 watcher action forms (lock, unlock, withdraw).

What this does:

  • Displays txIds truncated (first 10 + ... + last 8 characters) using <Id indicator="middle">
  • Links to the Ergo block explorer via getTxURL(NETWORKS.ergo.key, response.txId) passed as href to <Id>
  • target="_blank" and rel="noopener noreferrer" are handled internally by the <Id> component
  • Full txId is visible on hover (tooltip)

Per-file changes:

  • lock/page.tsx — Added Id import, removed unused Link import, replaced <Link> with <Id>
  • unlock/page.tsx — Removed next/link import, added Id to ui-kit import, replaced <Link> with <Id>
  • withdraw/page.tsx — Removed unused Link import (Id was already imported), replaced <Link> with <Id>

Notes:

  • Dropped ?? '/' and ?? '' fallbacks on getTxURL() in unlock and withdraw — the Id component's href is optional, so undefined gracefully renders plain text without a broken link
  • Follows the existing <Id indicator="middle"> pattern already used in withdraw/page.tsx for token IDs

@vercel

vercel Bot commented Apr 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
ui-guard Skipped Skipped Sep 13, 2026 1:12pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – ui-guard April 15, 2026 19:32 Inactive
@vercel

vercel Bot commented Apr 15, 2026

Copy link
Copy Markdown

@odiseusme is attempting to deploy a commit to the rosen-bridge Team on Vercel.

A member of the Team first needs to authorize it.

@odiseusme

Copy link
Copy Markdown
Author

I noticed from today's dev update that Id is being removed from @rosen-bridge/ui-kit as a legacy component. If this PR needs to be adapted to a replacement component, happy to update it — just let me know what the new component/pattern is.

More broadly — I'm interested in picking up more bounties and contributing to the watcher app. Is there a preferred way to check which open issues are still relevant before starting work, so I don't spend time on things that are about to be refactored? Happy to coordinate.

@abdolian

Copy link
Copy Markdown
Collaborator

As you mentioned in This Comment, we have dropped the Id component and introduced a new component called Identifier.

To complete this issue, please follow these steps:

  1. Update your branch with the latest changes from the dev branch.
  2. Use the following template to generate the link:
<Link target="_blank" href={/* TODO */}>
  <Identifier variant="legacy-middle" value={/* TODO */} />
</Link>
  1. Import both Link and Identifier from the ui-kit.
  2. Keep all changes in one short, meaningful commit.

@odiseusme

@odiseusme
odiseusme force-pushed the fix/issue-9-link-txids branch from 35cf335 to 4abb526 Compare September 13, 2026 13:12
@vercel
vercel Bot temporarily deployed to Preview – ui-guard September 13, 2026 13:12 Inactive
@odiseusme

Copy link
Copy Markdown
Author

Thanks for the pointer @abdolian — updated. Branch is rebased onto latest dev, and all three watcher action forms (lock, unlock, withdraw) now use Identifier with variant="legacy-middle" wrapped in Link from @rosen-bridge/ui-kit, matching the template. Kept it to one commit as requested. Ready for another look whenever you get a chance.

@abdolian

abdolian commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

This pull request can be merged
@zargarzadehm

@abdolian abdolian assigned vorujack and unassigned zargarzadehm Sep 16, 2026
@abdolian

Copy link
Copy Markdown
Collaborator

Update your branch with the latest dev branch to ensure the pipeline passes successfully.

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.

Link transaction ids of Watcher action responses to their appropriate block explorer

4 participants