@metamask/phishing-controller
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -9,2 +9,7 @@ # Changelog | ||
## [1.1.2] | ||
### Fixed | ||
- Improve performance of phishing list update ([#1086](https://github.com/MetaMask/core/pull/1086)) | ||
- We now use a `Set` + `has` method instead of the array `includes` method for detecting overlap between phishing lists after an update. | ||
## [1.1.1] | ||
@@ -32,5 +37,6 @@ ### Changed | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@1.1.1...HEAD | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@1.1.2...HEAD | ||
[1.1.2]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@1.1.1...@metamask/phishing-controller@1.1.2 | ||
[1.1.1]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@1.1.0...@metamask/phishing-controller@1.1.1 | ||
[1.1.0]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@1.0.0...@metamask/phishing-controller@1.1.0 | ||
[1.0.0]: https://github.com/MetaMask/core/releases/tag/@metamask/phishing-controller@1.0.0 |
@@ -205,6 +205,8 @@ "use strict"; | ||
} | ||
// Create Set from metamaskConfig.blocklist to improve look up performance when used within filter. | ||
const mmConfigBlocklist = new Set(metamaskConfig.blocklist); | ||
// Correctly shaping PhishFort config. | ||
const phishfortConfig = { | ||
allowlist: [], | ||
blocklist: (phishfortHotlist || []).filter((i) => !metamaskConfig.blocklist.includes(i)), | ||
blocklist: (phishfortHotlist || []).filter((i) => !mmConfigBlocklist.has(i)), | ||
fuzzylist: [], | ||
@@ -211,0 +213,0 @@ tolerance: 0, |
{ | ||
"name": "@metamask/phishing-controller", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Maintains a periodically updated list of approved and unapproved website origins", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36903
391