snaps
snaps copied to clipboard
Refactor `AccountSelector`
This refactors the AccountSelector:
- the state format for this component has changed to an object with an
idandaddresskey. - Adds a new optional prop
switchGlobalAccountthat defaults tofalse. It allows the component to switch the global selected account of the Extension to be switched on selection of an account. - Adds a new optional prop
hideExternalAccountsthat defaults tofalse. It allows the component to hide the accounts that are not owned by the snap. - Makes
selectedAccountprop optional. If it's not provided we will get the selected account in theAccountsController, if it is we will try to get the address related to this account and if it doesn't exist we will throw an error. - Makes the
chainIdsprop optional.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.44%. Comparing base (
ecbac90) to head (17a7ea6). Report is 10 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2779 +/- ##
=======================================
Coverage 94.43% 94.44%
=======================================
Files 483 483
Lines 10297 10310 +13
Branches 1568 1571 +3
=======================================
+ Hits 9724 9737 +13
Misses 573 573
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎
This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.
Ignoring: npm/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@keystonehq/[email protected], npm/@keystonehq/[email protected], npm/[email protected], npm/[email protected], npm/@keystonehq/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/@metamask/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@types/[email protected], npm/@keystonehq/[email protected], npm/[email protected], npm/@ngraveio/[email protected], npm/@keystonehq/[email protected], npm/@metamask/[email protected], npm/[email protected], npm/@metamask/[email protected], npm/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected]
Next steps
Take a deeper look at the dependency
Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.
Remove the package
If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.
Mark a package as acceptable risk
To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all
New dependencies detected. Learn more about Socket for GitHub ↗︎
| Package | New capabilities | Transitives | Size | Publisher |
|---|---|---|---|---|
| npm/@metamask/[email protected] | Transitive: environment, filesystem, network | +53 |
24.4 MB | metamaskbot |
| npm/@metamask/[email protected] | Transitive: environment, filesystem, network | +66 |
17.5 MB | metamaskbot |
@SocketSecurity ignore-all these depedencies are pulled by packages we own or are packages we own