MetaMask / MetaMask/metamask-extension

Add API to review the current domain's sent transactions

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

Description

Sites want to provide good UX and good distributed safety, and this requires knowing what actions have been taken from those apps.

This was one problem raised in #3475, and it seems like we could easily fix it with a simple and quite safe API:

```
const txs = await provider.send({
method: 'wallet_getSentTransactions'
params: [],
})
```

In this case, `txs` could be an array of our internal `TransactionMetadata` objects, which include not just the final params, but any edits or retries the user performed, whether the transaction has been signed or sent to the network, and more.

I would also presume that a domain could only request the transactions that had been requested from itself.

We should consider privacy here: Would there be fields we would need to exclude to protect a user's privacy? The full `tx.history` could be a bit telling, as it demonstrates exactly how long the user spent doing different things, do we mind that?

We could also tuck this API behind a permissions request if we were too nervous about it, but it seems almost totally safe. If we were very paranoid we could just provide the final transactions, their hashes, and their submission statuses.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the provider.send entry point and the TransactionMetadata objects mentioned in the proposal. Before implementation, clarify the returned fields, privacy constraints, domain scoping, and whether permission is required; the work is done when those decisions are specified and the API has corresponding coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.