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: Allow updating interface context #2809

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

FrederikBolding
Copy link
Member

Allows updating the context object in the SnapInterfaceController via snap_updateInterface. This is a non-breaking change as context is optional.

Closes #2804

@FrederikBolding FrederikBolding requested a review from a team as a code owner October 8, 2024 12:12
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.43%. Comparing base (a80db22) to head (72497c6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2809   +/-   ##
=======================================
  Coverage   94.43%   94.43%           
=======================================
  Files         483      483           
  Lines       10302    10305    +3     
  Branches     1566     1567    +1     
=======================================
+ Hits         9729     9732    +3     
  Misses        573      573           

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

@@ -545,6 +545,60 @@ describe('SnapInterfaceController', () => {
expect(state).toStrictEqual({ foo: { baz: null } });
});

it('can update an interface and context', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a test to make sure the old context is used when no new context is provided?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure!

@FrederikBolding FrederikBolding merged commit 90784af into main Oct 8, 2024
166 checks passed
@FrederikBolding FrederikBolding deleted the fb/allow-updating-context branch October 8, 2024 14:44
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.

Allow interface context to be updated
2 participants