From 5ecb941831a0c1553ca6f38afa66f82f34e312ff Mon Sep 17 00:00:00 2001 From: yushi Date: Thu, 19 Dec 2024 23:20:59 +0800 Subject: [PATCH] lint --- .../app/components/wallet/create-wallet/CreateWalletPage.js | 2 -- .../app/components/wallet/create-wallet/steps.js | 2 -- packages/yoroi-extension/app/components/wallet/restore/steps.js | 2 -- .../app/components/wallet/settings/SwitchNetworkDialog.js | 1 - .../settings/categories/SwitchNetworkDialogContainer.js | 2 -- packages/yoroi-extension/app/stores/toplevel/ProfileStore.js | 2 +- .../chrome/extension/background/handlers/utils.js | 2 +- .../yoroi-extension/chrome/extension/background/state/index.js | 1 + 8 files changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/yoroi-extension/app/components/wallet/create-wallet/CreateWalletPage.js b/packages/yoroi-extension/app/components/wallet/create-wallet/CreateWalletPage.js index e6db7ab597..f95181fc22 100644 --- a/packages/yoroi-extension/app/components/wallet/create-wallet/CreateWalletPage.js +++ b/packages/yoroi-extension/app/components/wallet/create-wallet/CreateWalletPage.js @@ -9,9 +9,7 @@ import { CREATE_WALLET_SETPS, markDialogAsShown } from './steps'; import SaveRecoveryPhraseStep from './SaveRecoveryPhraseStep'; import VerifyRecoveryPhraseStep from './VerifyRecoveryPhraseStep'; import AddWalletDetailsStep from './AddWalletDetailsStep'; -import { networks } from '../../../api/ada/lib/storage/database/prepackaged/networks'; import CreateWalletPageHeader from './CreateWalletPageHeader'; -import environment from '../../../environment'; import { ROUTES } from '../../../routes-config'; import type { NetworkRow } from '../../../api/ada/lib/storage/database/primitives/tables'; import { ampli } from '../../../../ampli/index'; diff --git a/packages/yoroi-extension/app/components/wallet/create-wallet/steps.js b/packages/yoroi-extension/app/components/wallet/create-wallet/steps.js index 3e00395a76..b8f5ba50ee 100644 --- a/packages/yoroi-extension/app/components/wallet/create-wallet/steps.js +++ b/packages/yoroi-extension/app/components/wallet/create-wallet/steps.js @@ -1,6 +1,4 @@ // @flow -import environment from '../../../environment'; - export const CREATE_WALLET_SETPS = Object.freeze({ LEARN_ABOUT_RECOVERY_PHRASE: 'LEARN_ABOUT_RECOVER_PHRASE', SAVE_RECOVERY_PHRASE: 'SAVE_RECOVERY_PHRASE', diff --git a/packages/yoroi-extension/app/components/wallet/restore/steps.js b/packages/yoroi-extension/app/components/wallet/restore/steps.js index 8973a72cd0..ba51f77d05 100644 --- a/packages/yoroi-extension/app/components/wallet/restore/steps.js +++ b/packages/yoroi-extension/app/components/wallet/restore/steps.js @@ -1,6 +1,4 @@ // @flow -import environment from '../../../environment'; - export const RESTORE_WALLET_STEPS = Object.freeze({ SELECT_WALLET_TYPE: 'SELECT_WALLET_TYPE', ENTER_RECOVERY_PHRASE: 'ENTER_RECOVERY_PHRASE', diff --git a/packages/yoroi-extension/app/components/wallet/settings/SwitchNetworkDialog.js b/packages/yoroi-extension/app/components/wallet/settings/SwitchNetworkDialog.js index 5c46a0b128..a92a75c8fa 100644 --- a/packages/yoroi-extension/app/components/wallet/settings/SwitchNetworkDialog.js +++ b/packages/yoroi-extension/app/components/wallet/settings/SwitchNetworkDialog.js @@ -6,7 +6,6 @@ import { defineMessages, intlShape } from 'react-intl'; import ReactToolboxMobxForm from '../../../utils/ReactToolboxMobxForm'; import DialogCloseButton from '../../widgets/DialogCloseButton'; import Dialog from '../../widgets/Dialog'; -import { isValidWalletPassword, isValidRepeatPassword } from '../../../utils/validations'; import globalMessages from '../../../i18n/global-messages'; import type { $npm$ReactIntl$IntlFormat, $npm$ReactIntl$MessageDescriptor } from 'react-intl'; import { MenuItem, Box } from '@mui/material'; diff --git a/packages/yoroi-extension/app/containers/settings/categories/SwitchNetworkDialogContainer.js b/packages/yoroi-extension/app/containers/settings/categories/SwitchNetworkDialogContainer.js index 3a4f30df1c..bbf2cf8544 100644 --- a/packages/yoroi-extension/app/containers/settings/categories/SwitchNetworkDialogContainer.js +++ b/packages/yoroi-extension/app/containers/settings/categories/SwitchNetworkDialogContainer.js @@ -1,9 +1,7 @@ // @flow import type { Node } from 'react'; -import type { $npm$ReactIntl$IntlFormat } from 'react-intl'; import type { StoresAndActionsProps } from '../../../types/injectedProps.types'; import { Component } from 'react'; -import { action, observable } from 'mobx'; import { observer } from 'mobx-react'; import SwitchNetworkDialog from '../../../components/wallet/settings/SwitchNetworkDialog'; import { networks } from '../../../api/ada/lib/storage/database/prepackaged/networks'; diff --git a/packages/yoroi-extension/app/stores/toplevel/ProfileStore.js b/packages/yoroi-extension/app/stores/toplevel/ProfileStore.js index 0a999f98c4..1d6176944f 100644 --- a/packages/yoroi-extension/app/stores/toplevel/ProfileStore.js +++ b/packages/yoroi-extension/app/stores/toplevel/ProfileStore.js @@ -1,5 +1,5 @@ // @flow -import { action, observable, computed, runInAction } from 'mobx'; +import { observable, computed, runInAction } from 'mobx'; import BigNumber from 'bignumber.js'; import BaseProfileStore from '../base/BaseProfileStore'; import Request from '../lib/LocalizedRequest'; diff --git a/packages/yoroi-extension/chrome/extension/background/handlers/utils.js b/packages/yoroi-extension/chrome/extension/background/handlers/utils.js index d8fcb70054..8000ff49e6 100644 --- a/packages/yoroi-extension/chrome/extension/background/handlers/utils.js +++ b/packages/yoroi-extension/chrome/extension/background/handlers/utils.js @@ -85,7 +85,7 @@ export async function getWalletsState(publicDeriverId: ?number, targetNetworkId: const adaApi = new AdaApi(); const clonedWallet = await adaApi.cloneWallet(db, value[0], network); publicDeriversOfNetwork.push(clonedWallet); - syncWallet(clonedWallet, 'cloned wallet').catch(error => console.error); + syncWallet(clonedWallet, 'cloned wallet').catch(console.error); } } } else { diff --git a/packages/yoroi-extension/chrome/extension/background/state/index.js b/packages/yoroi-extension/chrome/extension/background/state/index.js index c16b876d5b..109516551b 100644 --- a/packages/yoroi-extension/chrome/extension/background/state/index.js +++ b/packages/yoroi-extension/chrome/extension/background/state/index.js @@ -2,6 +2,7 @@ import { getDb } from './databaseManager'; export { getDb }; +// eslint-disable-next-line import/no-cycle export { refreshingWalletIdSet, syncWallet } from './refreshScheduler'; export async function init(): Promise {