MetaMask / MetaMask/metamask-extension

Consolidate url+label generation for block explorer links into a utility function

Open
#10,750 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type-refactor
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

As of https://github.com/MetaMask/metamask-extension/pull/10743, there is similar logic for generating block explorer url links and labels in both `build-quote.js` and `awaiting-swap.js`. The need for similar logic exists wherever we provide block explorer links. We should extract this logic into a utility function so that it can be reused where needed and future whole app updates can simplified.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the block explorer URL and label logic in build-quote.js and awaiting-swap.js, as described in issue #10750 and PR #10743. Identify the shared behavior that should become a reusable utility, then check both existing call sites to confirm they use it consistently. Done means the duplicated logic is consolidated without changing the generated links or labels.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.