MetaMask / MetaMask/metamask-extension

Clarify constructTxParams parameters and deduplicate function

Open
#10,460 0 comments 0 reactions 0 assignees View on GitHub
type-refactor
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

`constructTxParams` accepts an `amount` param and returns a tx object with a `value` param. This has long been a source of confusion. Also there are two `constructTxParams` implementations that can be reduced to one. This was originally solved in this draft PR https://github.com/MetaMask/metamask-extension/pull/9728 That became dated. We should reopen when it makes sense to prioritize

Contributor guide

Open the contributing guide

Research direction

Start by locating both constructTxParams implementations and reviewing draft PR #9728 for the earlier approach. Trace callers to understand the amount/value naming and transaction shape; the work is done when one implementation remains, its parameter naming is clarified consistently, and affected tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, blockchain
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.