From 5d319a8bc2a228d647e0f48cceaae2cad37dbeeb Mon Sep 17 00:00:00 2001 From: iGroza Date: Thu, 20 Jun 2024 16:35:29 +0700 Subject: [PATCH] test --- src/contexts/app.ts | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/contexts/app.ts b/src/contexts/app.ts index d01e569d83..3a2d9f2463 100644 --- a/src/contexts/app.ts +++ b/src/contexts/app.ts @@ -411,7 +411,8 @@ class App extends AsyncEventEmitter { let shouldSkipAuth = false; try { - await this.getPassword(); + const pass = await this.getPassword(); + Alert.alert('your PIN', pass); } catch (err) { if (err === 'password_migration_not_possible') { shouldSkipAuth = true; @@ -561,23 +562,26 @@ class App extends AsyncEventEmitter { } async auth() { - this.resetAuth(); - const close = showModal(ModalType.pin); - if (SecurePinUtils.isPinChangedWithFail()) { - try { - await SecurePinUtils.rollbackPin(); - showModal(ModalType.pinError); - } catch (e) { - const details = (e as Error)?.message || e?.toString(); - showModal(ModalType.pinError, {details}); - Logger.error(e, 'app.auth rollback pin failed'); - } - } - await Promise.race([this.makeBiometryAuth(), this.makePinAuth()]); - - if (this.authenticated) { - close(); - } + this.user.successEnter(); + this.authenticated = true; + return; + // this.resetAuth(); + // const close = showModal(ModalType.pin); + // if (SecurePinUtils.isPinChangedWithFail()) { + // try { + // await SecurePinUtils.rollbackPin(); + // showModal(ModalType.pinError); + // } catch (e) { + // const details = (e as Error)?.message || e?.toString(); + // showModal(ModalType.pinError, {details}); + // Logger.error(e, 'app.auth rollback pin failed'); + // } + // } + // await Promise.race([this.makeBiometryAuth(), this.makePinAuth()]); + + // if (this.authenticated) { + // close(); + // } } async makeBiometryAuth() {