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 snap_getPreferences #2607

Merged
merged 6 commits into from
Jul 29, 2024
Merged

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Jul 29, 2024

Adds snap_getPreferences, an alternative to snap_getLocale that exposes both the currently selected locale and the currently selected currency for fiat conversion.

Following the release of this, we should deprecate snap_getLocale for eventual removal.

Breaking: As this modifies the method hooks for snap_getLocale to use a shared hook with snap_getPreferences.

Closes #2600

Copy link

codecov bot commented Jul 29, 2024

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.18%. Comparing base (87ae21f) to head (547d9b4).
Report is 2 commits behind head on main.

Files Patch % Lines
...s/snaps-simulator/src/features/simulation/sagas.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2607   +/-   ##
=======================================
  Coverage   94.17%   94.18%           
=======================================
  Files         476      477    +1     
  Lines        9820     9833   +13     
  Branches     1497     1498    +1     
=======================================
+ Hits         9248     9261   +13     
  Misses        572      572           

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

@FrederikBolding FrederikBolding marked this pull request as ready for review July 29, 2024 11:44
@FrederikBolding FrederikBolding requested a review from a team as a code owner July 29, 2024 11:44
@FrederikBolding FrederikBolding merged commit 9e38c78 into main Jul 29, 2024
156 checks passed
@FrederikBolding FrederikBolding deleted the fb/add-snap-get-preferences branch July 29, 2024 12:45
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 Snaps to get the user's fiat preference similar to getting the locale preference
3 participants