MetaMask / MetaMask/snaps

Amon Hen V2 Snaps API Plan

Open
#2,578 3 comments 0 reactions 1 assignee Claimed by @Mrtenz View on GitHub
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

Description

This is a research and planning story to consider an approach to handling the points discussed in this conversation: https://consensys.slack.com/archives/C03Q3TCUVRT/p1720794034563159

Specifically:

- Currently Snaps are set to the current globally selected chain and this works now because Snaps are always set to the same chain as whatever the user sees in the UI
- Going forward this will no longer be the case. We will start to see confirmations for a different chain than the globally selected chain. This means for instance that transaction insight snaps wont have the correct chain state.

Suggestions offered in the conversation:

- Tie selected network for all Snaps to whatever network is represented in UI. If we are on a confirmation, all Snaps could have teh same network selected as the dapp that is requesting the confirmation. Otherwise use the globally selected network.
- Set the selected chain of each tx insight snap to whatever chain is relevant for the current confirmation if there are any possible insights for this confirmation

See linked thread for the whole conversation.

Acceptance Criteria
- At this point, put together a one pager proposal of an approach.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.