Skip to content

Commit

Permalink
refactor: prevent background from fail on importing from common const…
Browse files Browse the repository at this point in the history
…ants
  • Loading branch information
CedrikNikita committed Oct 19, 2024
1 parent dbf51ac commit 4c325de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/composables/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { generateMnemonic, mnemonicToSeed, validateMnemonic } from '@aeternity/b

import { tg as t } from '@/popup/plugins/i18n';
import {
AUTHENTICATION_TIMEOUT_DEFAULT,
AUTHENTICATION_TIMEOUTS,
IS_EXTENSION,
IS_IOS,
IS_MOBILE_APP,
Expand Down Expand Up @@ -44,6 +44,9 @@ import { useModals } from './modals';
import { useStorageRef } from './storageRef';

const CHECK_FOR_SESSION_KEY_INTERVAL = 5000;
const AUTHENTICATION_TIMEOUT_DEFAULT = (IS_MOBILE_APP)
? AUTHENTICATION_TIMEOUTS[0]
: AUTHENTICATION_TIMEOUTS[2];

/**
* Top level composable that controls if user is allowed to interact with the wallet.
Expand Down
7 changes: 1 addition & 6 deletions src/constants/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { ICurrency, IAppData, IPermission } from '@/types';
import { IS_MOBILE_APP } from './environment';
import type { IAppData, ICurrency, IPermission } from '@/types';

export const APP_NAME = 'Superhero Wallet';
export const APP_URL = 'wallet.superhero.com';
Expand Down Expand Up @@ -503,10 +502,6 @@ export const AUTHENTICATION_TIMEOUTS = [
1800000,
] as const;

export const AUTHENTICATION_TIMEOUT_DEFAULT = (IS_MOBILE_APP)
? AUTHENTICATION_TIMEOUTS[0]
: AUTHENTICATION_TIMEOUTS[2];

export const PASSWORD_STRENGTH = {
weak: 'weak',
medium: 'medium',
Expand Down

0 comments on commit 4c325de

Please sign in to comment.