Skip to content

[Bug] Tx hash in Trade/Donate widgets should link to block explorer #152

@realproject7

Description

@realproject7

Description

After a successful transaction, the tx hash shown (e.g. Tx: 0xd968380f...33315b98) is plain text. It should be a clickable link to the block explorer. This applies to ALL transaction-related result messages across the app.

Expected

Tx hash links to:

  • Testnet: https://sepolia.basescan.org/tx/{hash}
  • Mainnet: https://basescan.org/tx/{hash}

Affected components

  • src/components/TradingWidget.tsx — buy/sell tx hash
  • src/components/DonateWidget.tsx — donation tx hash
  • src/components/ClaimRoyalties.tsx — claim royalties tx hash
  • src/hooks/usePublish.ts / src/app/create/page.tsx — storyline creation tx hash
  • Any other component that shows a tx hash after on-chain action

Fix

  1. Add EXPLORER_URL to lib/contracts/constants.ts
  2. Replace all plain-text tx hash elements with clickable <a> links
  3. Search all components for txHash display and update every instance

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions