Skip to content

Commit

Permalink
Merge pull request #2 from Consensys/fix/Incorrect-error-message-when…
Browse files Browse the repository at this point in the history
…-user-tries-to-reveal-Ledger-private-key

fix(MetaMask#18): change to display same error message with keystone
  • Loading branch information
stanleyyconsensys authored Jul 31, 2023
2 parents db707da + 511dc50 commit 9ca689c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { Authentication } from '../../../core/';

import Device from '../../../util/device';
import { strings } from '../../../../locales/i18n';
import { isQRHardwareAccount } from '../../../util/address';
import { isHardwareAccount } from '../../../util/address';
import AppConstants from '../../../core/AppConstants';
import { createStyles } from './styles';
import { getNavigationOptionsTitle } from '../../../components/UI/Navbar';
Expand Down Expand Up @@ -141,7 +141,7 @@ const RevealPrivateCredential = ({
}
} catch (e: any) {
let msg = strings('reveal_credential.warning_incorrect_password');
if (isQRHardwareAccount(selectedAddress)) {
if (isHardwareAccount(selectedAddress)) {
msg = strings('reveal_credential.hardware_error');
} else if (
e.toString().toLowerCase() !== WRONG_PASSWORD_ERROR.toLowerCase()
Expand Down

0 comments on commit 9ca689c

Please sign in to comment.