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

BREAKING: Add support for new state methods to snaps-simulation #2966

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Dec 18, 2024

This adds support for the state methods introduced in #2916 to snaps-simulation (and snaps-jest), and updates the example to test these methods as well.

Breaking changes

  • The middleware hooks in snaps-simulation were separated into two separate types, PermittedMiddlewareHooks and RestrictedMiddlewareHooks.
  • The MiddlewareHooks type was removed.

@Mrtenz Mrtenz marked this pull request as ready for review December 18, 2024 09:23
@Mrtenz Mrtenz requested a review from a team as a code owner December 18, 2024 09:23
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (mrtenz/state-methods@6d1af36). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                   @@
##             mrtenz/state-methods    #2966   +/-   ##
=======================================================
  Coverage                        ?   94.58%           
=======================================================
  Files                           ?      493           
  Lines                           ?    10652           
  Branches                        ?     1634           
=======================================================
  Hits                            ?    10075           
  Misses                          ?      577           
  Partials                        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* @returns The state of the Snap.
* @yields Selects the state from the store.
*/
function* getSnapStateImplementation(encrypted: boolean): SagaIterator<string> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC we already have a function for this, can we dedupe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hook doesn't expect an origin as first parameter, so it's slightly different.

@Mrtenz Mrtenz changed the title Add support for new state methods to snaps-simulation BREAKING: Add support for new state methods to snaps-simulation Dec 18, 2024
Base automatically changed from mrtenz/state-methods to main December 18, 2024 18:25
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.

2 participants