MetaMask / MetaMask/metamask-extension

Remove `confirmTransaction` Redux state for non-transaction confirmations

Open
#10,470 0 comments 1 reaction 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

The `confirmTransaction` Redux state serves only to store gas configuration during gas confirmation. However, we have many types of confirmations that don't involve gas (signatures, encryption, etc.). We use this same `confirmTransaction` Redux state for these transactions despite it serving no purpose, which further complicates the confirmation UI.

We should simplify the confirmation UI by refactoring the confirmation components to ensure this state is only used for transactions, where it serves an actual purpose. Any confirmations without gas can derive their state directly from the background state.

See here for more context: https://github.com/MetaMask/metamask-extension/pull/10350#issuecomment-775185072

Contributor guide

Open the contributing guide

Research direction

Start by locating the confirmation components and the confirmTransaction Redux state, then trace how non-transaction confirmations obtain state from the background. Refactor the confirmation UI so gas-related transaction state remains supported while confirmations without gas derive their state directly from the background; verify all confirmation types still behave correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
redux, typescript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.