Skip to content

Commit

Permalink
exclude pin creation for isReadOnly mode (#3161)
Browse files Browse the repository at this point in the history
  • Loading branch information
perunt authored Apr 8, 2022
1 parent f497539 commit 8d7a5ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/model/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ export const createWallet = async (
} =
checkedWallet ||
(await ethereumUtils.deriveAccountFromWalletInput(walletSeed));
const isReadOnlyType = type === EthereumWalletType.readOnly;
let pkey = walletSeed;
if (!walletResult) return null;
const walletAddress = address;
Expand Down Expand Up @@ -600,8 +601,7 @@ export const createWallet = async (
if (
!overwrite &&
alreadyExistingWallet &&
(type === EthereumWalletType.readOnly ||
isPrivateKeyOverwritingSeedMnemonic)
(isReadOnlyType || isPrivateKeyOverwritingSeedMnemonic)
) {
setTimeout(
() =>
Expand All @@ -621,7 +621,7 @@ export const createWallet = async (

// Android users without biometrics need to secure their keys with a PIN
let userPIN = null;
if (android) {
if (android && !isReadOnlyType) {
const hasBiometricsEnabled = await getSupportedBiometryType();
// Fallback to custom PIN
if (!hasBiometricsEnabled) {
Expand Down

0 comments on commit 8d7a5ea

Please sign in to comment.