Skip to content

Commit

Permalink
Merge pull request #12076 from brave/20444-clear-fingerprint-after-reset
Browse files Browse the repository at this point in the history
fix(wallet): clear fingerprint after wallet reset
  • Loading branch information
Pavneet Singh authored Jan 31, 2022
2 parents b91657a + ac9bb69 commit d49880d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,11 @@ public static String decryptText()

return new String(cipher.doFinal(Base64.decode(encryptedBase64, Base64.DEFAULT)), "UTF-8");
}

public static void resetBiometric() {
SharedPreferencesManager manager = SharedPreferencesManager.getInstance();
manager.removeKey(BravePreferenceKeys.BRAVE_USE_BIOMETRICS_FOR_WALLET);
manager.removeKey(BravePreferenceKeys.BRAVE_BIOMETRICS_FOR_WALLET_ENCRYPTED);
manager.removeKey(BravePreferenceKeys.BRAVE_BIOMETRICS_FOR_WALLET_IV);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.crypto_wallet.util.KeystoreHelper;
import org.chromium.chrome.browser.crypto_wallet.util.Utils;
import org.chromium.chrome.browser.crypto_wallet.util.WalletNativeUtils;
import org.chromium.ui.KeyboardVisibilityDelegate;
Expand Down Expand Up @@ -87,6 +88,7 @@ public void onClick(DialogInterface dialog, int button) {
if (TextUtils.equals(inputText, mConfirmationPhrase)) {
Log.w(TAG, "Reset");
WalletNativeUtils.resetWallet();
KeystoreHelper.resetBiometric();
Utils.setCryptoOnboarding(true);
}

Expand Down

0 comments on commit d49880d

Please sign in to comment.