MetaMask / MetaMask/metamask-extension

Supply a default `from` address when none is supplied by the caller.

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

Description

**What problem are you trying to solve?**
As a dapp, I want to submit a transaction on behalf of the user. I do not need to know the user's address to do this, and if they are using a smart contract then the `from` address may not match the `signer` account.

**Describe the solution you'd like**
When I submit a transaction to MetaMask for signing with no `from` field, the user's currently selected address should be used.

----

It is worth noting that the from field is actually not part of the Ethereum JSON-RPC specification for `eth_sendTransaction`.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the TypeScript handling of eth_sendTransaction in the MetaMask extension, especially where transactions without a from field are prepared for signing. Verify how the selected address and signer are represented, then test that an omitted from uses the currently selected address while an explicitly supplied from is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
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.