Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add context field to snap_createInterface #2413

Merged
merged 5 commits into from
May 23, 2024

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented May 16, 2024

Add optional context parameter to snap_createInterface, this context is stored in state and exposed to onUserInput, allowing for storage of small amounts of data (1 MB to start) for use in UIs without using manageState.

In the future we may consider allowing the Snap to modify this data using snap_updateInterface, but this implementation doesn't do that.

Progresses #2402

@FrederikBolding FrederikBolding changed the title Add context field to createInterface feat: add context field to createInterface May 16, 2024
@FrederikBolding FrederikBolding force-pushed the fb/add-interface-context branch 2 times, most recently from 196e10d to dd06df7 Compare May 22, 2024 11:27
@FrederikBolding
Copy link
Member Author

@metamaskbot update-pr

@FrederikBolding FrederikBolding marked this pull request as ready for review May 23, 2024 10:32
@FrederikBolding FrederikBolding requested a review from a team as a code owner May 23, 2024 10:32
@FrederikBolding FrederikBolding changed the title feat: add context field to createInterface feat: add context field to snap_createInterface May 23, 2024
@FrederikBolding FrederikBolding merged commit dcd01f2 into main May 23, 2024
151 checks passed
@FrederikBolding FrederikBolding deleted the fb/add-interface-context branch May 23, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants