diff --git a/ui/components/Keyring/KeyringSetPassword.tsx b/ui/components/Keyring/KeyringSetPassword.tsx index 5d693303bc..87ce76a981 100644 --- a/ui/components/Keyring/KeyringSetPassword.tsx +++ b/ui/components/Keyring/KeyringSetPassword.tsx @@ -5,7 +5,6 @@ import { selectDefaultWallet, } from "@tallyho/tally-background/redux-slices/ui" import { useHistory } from "react-router-dom" -import zxcvbn from "zxcvbn" import { useBackgroundDispatch, useAreKeyringsUnlocked, @@ -36,21 +35,14 @@ export default function KeyringSetPassword(): ReactElement { }, [history, areKeyringsUnlocked]) const validatePassword = (): boolean => { - if (password.length < 12) { - // Less than 12 won't reliably give users a score of 3 or more. - setPasswordErrorMessage("Must be at least 12 characters") + if (password.length < 8) { + setPasswordErrorMessage("Must be at least 8 characters") return false } if (password !== passwordConfirmation) { setPasswordErrorMessage("Passwords don’t match") return false } - const evaluation = zxcvbn(password) - - if (evaluation.score < 3) { - setPasswordErrorMessage("Password too weak") - return false - } return true } diff --git a/ui/package.json b/ui/package.json index a1c6931d6d..376ecb6902 100644 --- a/ui/package.json +++ b/ui/package.json @@ -45,13 +45,11 @@ "react-router-dom": "^5.3.0", "react-transition-group": "^4.4.2", "redux": "^4.1.0", - "webextension-polyfill": "^0.8.0", - "zxcvbn": "^4.4.2" + "webextension-polyfill": "^0.8.0" }, "devDependencies": { "@types/react-dom": "^17.0.9", "@types/react-transition-group": "^4.4.4", - "@types/zxcvbn": "^4.4.1", "webext-redux": "^2.1.7" } } diff --git a/yarn.lock b/yarn.lock index 4910014cd4..8850161e69 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3593,11 +3593,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/zxcvbn@^4.4.1": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@types/zxcvbn/-/zxcvbn-4.4.1.tgz#46e42cbdcee681b22181478feaf4af2bc4c1abd2" - integrity sha512-3NoqvZC2W5gAC5DZbTpCeJ251vGQmgcWIHQJGq2J240HY6ErQ9aWKkwfoKJlHLx+A83WPNTZ9+3cd2ILxbvr1w== - "@typescript-eslint/eslint-plugin@^4.28.4": version "4.30.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.30.0.tgz#4a0c1ae96b953f4e67435e20248d812bfa55e4fb" @@ -12954,8 +12949,3 @@ zip-stream@^4.1.0: archiver-utils "^2.1.0" compress-commons "^4.1.0" readable-stream "^3.6.0" - -zxcvbn@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/zxcvbn/-/zxcvbn-4.4.2.tgz#28ec17cf09743edcab056ddd8b1b06262cc73c30" - integrity sha1-KOwXzwl0PtyrBW3dixsGJizHPDA=