From ed54d08f90533a9fd7e9d8388b95b8df9ffd33d9 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Thu, 31 Oct 2024 19:05:31 +0100 Subject: [PATCH 01/29] chore: add recommanded checks from eslint-plugin-jest --- .eslintrc.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index ee701ffc086..f5c78ab543c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -238,7 +238,6 @@ module.exports = { 'no-undefined': 'off', // disallow use of undefined variable (off by default) 'no-undef-init': 'error', // disallow use of undefined when initializing variables 'no-unused-vars': 'off', - 'no-useless-escape': 'error', 'no-unused-expressions': 0, 'chai-friendly/no-unused-expressions': 2, '@typescript-eslint/no-unused-vars': [ @@ -311,7 +310,9 @@ module.exports = { // Jest plugin config 'jest/valid-title': 'off', // This rule does not use Typescript and produces false positives - 'jest/no-disabled-tests': 'off', // we still have a lot of skipped tests (WIP) + 'jest/valid-describe-callback': 'off', // This rule does not use Typescript and produces false positives + 'jest/no-disabled-tests': 'off', // Well, what can I say... ¯\_(ツ)_/¯ We skip tests sometimes. + 'jest/no-focused-tests': 'off', // Same as above, but // Todo: shall be easy to get rid of this 'jest/no-conditional-expect': 'off', // Todo: we shall solve this, this is bad practice 'jest/expect-expect': 'off', // Todo: we have test with no assertions, this may be legit but it needs to be checked 'jest/no-standalone-expect': [ From a1c1dc340bb1a167aebbfd43b7dc06a26e7eb0f3 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Thu, 31 Oct 2024 16:01:30 +0100 Subject: [PATCH 02/29] chore: add 'import/no-duplicates' ESLint rule --- packages/connect-explorer/src/pages/_app.tsx | 2 +- packages/connect/src/api/ethereum/ethereumDefinitions.ts | 2 +- packages/connect/src/core/AbstractMethod.ts | 2 +- .../src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx | 2 +- .../src/components/RotateDeviceImage/RotateDeviceImage.tsx | 2 +- packages/suite/src/actions/wallet/coinjoinClientActions.ts | 2 +- .../src/actions/wallet/coinmarket/coinmarketCommonActions.ts | 2 +- packages/suite/src/components/suite/AccountLabel.tsx | 2 +- .../PageHeader/PageNames/AccountName/AccountDetails.tsx | 2 +- .../AccountTypeSelect/AccountTypeDescription.tsx | 4 ++-- .../MultiShareBackupModal/instructionSteps.tsx | 2 +- packages/suite/src/components/wallet/Fees/Fees.tsx | 2 +- packages/suite/src/utils/wallet/exportTransactionsUtils.ts | 2 +- .../src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx | 2 +- packages/suite/src/views/settings/SettingsDebug/Backends.tsx | 2 +- .../src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx | 2 +- .../coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx | 2 +- packages/suite/src/views/wallet/send/Outputs/Address.tsx | 2 +- suite-native/discovery/src/discoveryThunks.ts | 2 +- 19 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/connect-explorer/src/pages/_app.tsx b/packages/connect-explorer/src/pages/_app.tsx index 732673bbaae..ec5afa0166c 100644 --- a/packages/connect-explorer/src/pages/_app.tsx +++ b/packages/connect-explorer/src/pages/_app.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { Provider } from 'react-redux'; -import { ThemeProvider as NextThemeProvider, useTheme } from 'next-themes'; +import { ThemeProvider as NextThemeProvider , useTheme } from 'next-themes'; import { ThemeProvider } from 'styled-components'; import type { AppProps } from 'next/app'; import Head from 'next/head'; diff --git a/packages/connect/src/api/ethereum/ethereumDefinitions.ts b/packages/connect/src/api/ethereum/ethereumDefinitions.ts index 0601766d188..58d1e87f2ea 100644 --- a/packages/connect/src/api/ethereum/ethereumDefinitions.ts +++ b/packages/connect/src/api/ethereum/ethereumDefinitions.ts @@ -1,6 +1,6 @@ import fetch from 'cross-fetch'; -import { MessagesSchema, parseConfigure, decode as decodeProtobuf } from '@trezor/protobuf'; +import { MessagesSchema , parseConfigure, decode as decodeProtobuf } from '@trezor/protobuf'; import { trzd } from '@trezor/protocol'; import { DataManager } from '../../data/DataManager'; import { EthereumNetworkInfo } from '../../types'; diff --git a/packages/connect/src/core/AbstractMethod.ts b/packages/connect/src/core/AbstractMethod.ts index a584336585c..66f25e217d8 100644 --- a/packages/connect/src/core/AbstractMethod.ts +++ b/packages/connect/src/core/AbstractMethod.ts @@ -1,6 +1,6 @@ import { storage } from '@trezor/connect-common'; import { versionUtils } from '@trezor/utils'; -import { NETWORK, ERRORS } from '../constants'; +import { NETWORK , ERRORS } from '../constants'; import { UI, DEVICE, diff --git a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx index a255793cb07..9b0d29c8189 100644 --- a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx +++ b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx @@ -1,6 +1,6 @@ import { ReactNode } from 'react'; import styled, { css, useTheme } from 'styled-components'; -import { Icon, useElevation } from '@trezor/components'; +import { Icon , useElevation } from '@trezor/components'; import { DeviceModelInternal } from '@trezor/connect'; import { Elevation, diff --git a/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx b/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx index 3340ca80c65..9ae1740385f 100644 --- a/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx +++ b/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { DeviceAnimation, Image } from '@trezor/components'; +import { DeviceAnimation , Image } from '@trezor/components'; import { DeviceModelInternal } from '@trezor/connect'; import styled from 'styled-components'; diff --git a/packages/suite/src/actions/wallet/coinjoinClientActions.ts b/packages/suite/src/actions/wallet/coinjoinClientActions.ts index bc3ee929688..9379a8cf0fa 100644 --- a/packages/suite/src/actions/wallet/coinjoinClientActions.ts +++ b/packages/suite/src/actions/wallet/coinjoinClientActions.ts @@ -13,7 +13,7 @@ import { arrayDistinct, arrayToDictionary, promiseAllSequence } from '@trezor/ut import { getOsName } from '@trezor/env-utils'; import { selectAccountByKey, selectDevices } from '@suite-common/wallet-core'; import { getUtxoOutpoint } from '@suite-common/wallet-utils'; -import { Account, AddressDisplayOptions } from '@suite-common/wallet-types'; +import { Account , AddressDisplayOptions } from '@suite-common/wallet-types'; import { notificationsActions } from '@suite-common/toast-notifications'; import { getDeviceInstances } from '@suite-common/suite-utils'; diff --git a/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts b/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts index b50cfa972d1..24075501460 100644 --- a/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts +++ b/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts @@ -8,7 +8,7 @@ import { hasNetworkFeatures, parseFormDraftKey, } from '@suite-common/wallet-utils'; -import { Output, AddressDisplayOptions } from '@suite-common/wallet-types/src'; +import { Output , AddressDisplayOptions } from '@suite-common/wallet-types/src'; import { confirmAddressOnDeviceThunk, selectDevice, diff --git a/packages/suite/src/components/suite/AccountLabel.tsx b/packages/suite/src/components/suite/AccountLabel.tsx index c4d55ae4c56..6293972428c 100644 --- a/packages/suite/src/components/suite/AccountLabel.tsx +++ b/packages/suite/src/components/suite/AccountLabel.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components'; import { BadgeSize, Row, TOOLTIP_DELAY_LONG, TruncateWithTooltip } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { AccountType, NetworkSymbol, Bip43Path, NetworkType } from '@suite-common/wallet-config'; +import { AccountType, NetworkSymbol , Bip43Path, NetworkType } from '@suite-common/wallet-config'; import { AccountTypeBadge } from './AccountTypeBadge'; import { useDefaultAccountLabel } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx index 522d1cf85da..4a27996bf3a 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react'; import styled, { keyframes } from 'styled-components'; import { Account } from '@suite-common/wallet-types'; -import { spacingsPx, zIndices, typography } from '@trezor/theme'; +import { spacingsPx, zIndices , typography } from '@trezor/theme'; import { H2 } from '@trezor/components'; import { MetadataLabeling, diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx index 57b76aa36e6..b46cbbe00d0 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx @@ -1,5 +1,5 @@ -import { Paragraph, Column } from '@trezor/components'; -import { Bip43PathTemplate, AccountType, NetworkType } from '@suite-common/wallet-config'; +import { Paragraph , Column } from '@trezor/components'; +import { Bip43PathTemplate , AccountType , NetworkType } from '@suite-common/wallet-config'; import { Translation } from 'src/components/suite'; import { getAccountTypeDesc, diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx index 7a70242e4e5..3e6aae04f75 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx @@ -1,4 +1,4 @@ -import { Row, Image, Text } from '@trezor/components'; +import { Row , Image, Text } from '@trezor/components'; import styled from 'styled-components'; import { borders, spacings, spacingsPx } from '@trezor/theme'; diff --git a/packages/suite/src/components/wallet/Fees/Fees.tsx b/packages/suite/src/components/wallet/Fees/Fees.tsx index 8ff975849d9..d93d9ec7320 100644 --- a/packages/suite/src/components/wallet/Fees/Fees.tsx +++ b/packages/suite/src/components/wallet/Fees/Fees.tsx @@ -10,7 +10,7 @@ import { } from 'react-hook-form'; import { Icon, Paragraph, SelectBar, Tooltip, motionEasing, variables } from '@trezor/components'; import { - FormState, + FormState , FeeInfo, PrecomposedLevels, PrecomposedLevelsCardano, diff --git a/packages/suite/src/utils/wallet/exportTransactionsUtils.ts b/packages/suite/src/utils/wallet/exportTransactionsUtils.ts index cfcb4a4e281..ce997407fd6 100644 --- a/packages/suite/src/utils/wallet/exportTransactionsUtils.ts +++ b/packages/suite/src/utils/wallet/exportTransactionsUtils.ts @@ -4,7 +4,7 @@ import { fromWei } from 'web3-utils'; import { FiatCurrencyCode } from '@suite-common/suite-config'; import { trezorLogo } from '@suite-common/suite-constants'; -import { TokenDefinitions, getIsPhishingTransaction } from '@suite-common/token-definitions'; +import { TokenDefinitions , getIsPhishingTransaction } from '@suite-common/token-definitions'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { ExportFileType, diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx index c86299783a2..a391f17fd0e 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx @@ -1,7 +1,7 @@ import { memo } from 'react'; import { useTheme } from 'styled-components'; import { Network } from '@suite-common/wallet-config'; -import { Icon, Table, Row, IconButton, Column, Text } from '@trezor/components'; +import { Icon, Table, Row, IconButton, Column , Text } from '@trezor/components'; import { AmountUnitSwitchWrapper, CoinBalance, diff --git a/packages/suite/src/views/settings/SettingsDebug/Backends.tsx b/packages/suite/src/views/settings/SettingsDebug/Backends.tsx index 4d27709e2f8..9329c750fbc 100644 --- a/packages/suite/src/views/settings/SettingsDebug/Backends.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/Backends.tsx @@ -1,6 +1,6 @@ import styled from 'styled-components'; -import { networks, NetworkSymbol } from '@suite-common/wallet-config'; +import { networks , NetworkSymbol } from '@suite-common/wallet-config'; import { selectNetworkBlockchainInfo } from '@suite-common/wallet-core'; import { ConnectionStatus } from '@suite-common/wallet-types'; import { Button } from '@trezor/components'; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx index 0ce2f655961..9b2e467e6ab 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx @@ -2,7 +2,7 @@ import styled from 'styled-components'; import { variables, Column } from '@trezor/components'; import * as deviceUtils from '@suite-common/suite-utils'; -import { selectDevice, selectDeviceThunk, acquireDevice } from '@suite-common/wallet-core'; +import { selectDevice, selectDeviceThunk , acquireDevice } from '@suite-common/wallet-core'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { WalletInstance } from './WalletInstance'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx index 84b1fc16898..d619a67a006 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx @@ -1,5 +1,5 @@ import { Button, TextButton, Row, Column, Paragraph } from '@trezor/components'; -import { CryptoId, ExchangeTrade } from 'invity-api'; +import { CryptoId , ExchangeTrade } from 'invity-api'; import { spacings } from '@trezor/theme'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { diff --git a/packages/suite/src/views/wallet/send/Outputs/Address.tsx b/packages/suite/src/views/wallet/send/Outputs/Address.tsx index 762935f69fe..25ce04a5b69 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Address.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Address.tsx @@ -17,7 +17,7 @@ import { notificationsActions } from '@suite-common/toast-notifications'; import { formInputsMaxLength } from '@suite-common/validators'; import type { Output } from '@suite-common/wallet-types'; import TrezorConnect from '@trezor/connect'; -import { useSelector, useDevice, useDispatch, useTranslation } from 'src/hooks/suite'; +import { useSelector , useDevice, useDispatch, useTranslation } from 'src/hooks/suite'; import { isAddressValid, isAddressDeprecated, diff --git a/suite-native/discovery/src/discoveryThunks.ts b/suite-native/discovery/src/discoveryThunks.ts index 091ebf61c41..3bab457507c 100644 --- a/suite-native/discovery/src/discoveryThunks.ts +++ b/suite-native/discovery/src/discoveryThunks.ts @@ -1,6 +1,6 @@ import { A, G, pipe } from '@mobily/ts-belt'; -import { getWeakRandomId, isArrayMember } from '@trezor/utils'; +import { getWeakRandomId , isArrayMember } from '@trezor/utils'; import { createThunk } from '@suite-common/redux-utils'; import { accountsActions, From 10ebe62695704c96876aecb395901a29a9a63de8 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 30 Oct 2024 11:17:46 +0100 Subject: [PATCH 03/29] chore: remove ESLint so we can upgrade by installing fresh version --- .eslintrc.js | 400 -- package.json | 11 - packages/connect-explorer/package.json | 1 - .../common-dependencies.txt | 14 +- yarn.lock | 3514 +++++++---------- 5 files changed, 1462 insertions(+), 2478 deletions(-) delete mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index f5c78ab543c..00000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,400 +0,0 @@ -const path = require('path'); - -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - parserOptions: { - // latest is best, because it's backwards compatible and we have linted everything - ecmaVersion: 'latest', - sourceType: 'module', - ecmaFeatures: { - jsx: true, - }, - }, - plugins: [ - 'import', - '@typescript-eslint', - 'react-hooks', - 'jest', - 'chai-friendly', - 'react', - 'local-rules', - ], - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:react/recommended', - 'plugin:import/typescript', - 'plugin:react-hooks/recommended', - 'plugin:jest/recommended', - ], - settings: { - react: { - version: 'detect', - }, - 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], - 'import/resolver': { - node: { - paths: [path.resolve(__dirname, 'eslint-rules')], - }, - }, - }, - env: { - jest: true, - 'jest/globals': true, - }, - ignorePatterns: [ - '**/lib/*', - '**/libDev/*', - '**/dist/*', - '**/coverage/*', - '**/build/*', - '**/build-electron/*', - '**/node_modules/*', - '**/public/*', - 'packages/suite-data/files/*', - 'packages/protobuf/scripts/protobuf-patches/*', - 'packages/address-validator', - 'packages/connect-examples', - 'ci/', - 'eslint-local-rules/*', - ], - rules: { - 'no-extra-boolean-cast': 'error', - 'no-irregular-whitespace': 'error', - 'no-empty': 'error', - '@typescript-eslint/no-empty-object-type': 'off', - '@typescript-eslint/no-require-imports': 'off', - '@typescript-eslint/prefer-ts-expect-error': 'error', - // I believe type is enforced by callers. - '@typescript-eslint/explicit-function-return-type': 'off', - // Enforce arrow functions only is afaik not possible. But this helps. - 'func-style': [ - 'error', - 'declaration', - { - allowArrowFunctions: true, - }, - ], - 'no-case-declarations': 'error', - // Fix for TypeScript. - 'react/jsx-filename-extension': [ - 'error', - { - extensions: ['.tsx'], - }, - ], - 'import/order': [ - 1, - { - groups: [['builtin', 'external'], 'internal', ['sibling', 'parent']], - pathGroups: [ - { - pattern: 'react*', - group: 'external', - position: 'before', - }, - { pattern: '@trezor/**', group: 'internal' }, // Translates to /packages/** */ - { pattern: '@suite-native/**', group: 'internal' }, - { pattern: '@suite-common/**', group: 'internal' }, - { pattern: 'src/**', group: 'internal', position: 'after' }, - ], - pathGroupsExcludedImportTypes: ['internal', 'react'], - 'newlines-between': 'always', - }, - ], - 'import/no-duplicates': 'error', - 'import/no-extraneous-dependencies': [ - 'error', - { - devDependencies: [ - '**/*fixtures*/**', - '**/*.test.{tsx,ts,js}', - '**/blockchain-link/tests/**', - '**/blockchain-link/webpack/**', - '**/suite-desktop-core/**', - '**/*e2e/**', - '**/suite/src/support/tests/**', - '**/suite-data/**', - '**/*.stories.*', - '**/*webpack.config*', - '**/webpack/**', - ], - includeTypes: true, - }, - ], - // This promotes using default case, which is not always correct (explicit is better than implicit) - 'default-case': 'off', - // Does not work with TypeScript export type. - 'import/prefer-default-export': 'off', - 'import/no-named-as-default': 'off', // default export is forbidden anyway - 'no-nested-ternary': 'error', - // Does not work with Babel react-native to react-native-web - 'import/no-unresolved': 'off', - 'import/extensions': 'off', - // Could be useful, but it's very very very slow - 'import/no-cycle': 'off', - 'import/no-anonymous-default-export': [ - 'error', - { - allowArray: true, - allowLiteral: true, - allowObject: true, - }, - ], - // We have typescript. - 'react/prop-types': 'off', - // It's fine. - 'react/no-multi-comp': 'off', - 'react/no-unescaped-entities': 'off', - 'react/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'never' }], - // This is fine. - 'class-methods-use-this': 'off', - 'lines-between-class-members': 'off', - // We use it for immer. It should be checked by readonly anyway. - 'no-param-reassign': 'off', - // Irrelevant. - 'no-plusplus': 'off', - 'no-return-assign': 'off', - 'consistent-return': 'off', - 'no-console': ['error', { allow: ['warn', 'error'] }], - // TSC checks it. - 'no-undef': 'off', - 'react/jsx-no-undef': 'off', - 'react/react-in-jsx-scope': 'off', - // React Hooks. - 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'error', - // Reconsider, maybe enable later: - '@typescript-eslint/explicit-member-accessibility': 'off', - '@typescript-eslint/no-explicit-any': 'off', - 'react/destructuring-assignment': 'off', - 'func-names': 'off', - 'react/require-default-props': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - // We use this syntax - '@typescript-eslint/triple-slash-reference': 'off', - // new rules (eslint 6) temporary disabled until components-v2 and ts-ignore resolve - 'react/jsx-props-no-spreading': 'off', - '@typescript-eslint/ban-ts-ignore': 'off', - // We need empty functions for mocking modules for react-native - '@typescript-eslint/no-empty-function': 'off', - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'error', - // valid case of class method overloads in typescript - 'no-dupe-class-members': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - // Missing return type on function - '@typescript-eslint/explicit-module-boundary-types': 'off', - // note you must disable the base rule as it can report incorrect errors - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': ['error'], - 'require-await': ['error'], - 'react/display-name': 'off', - 'react/jsx-key': 'warn', - 'react/prefer-stateless-function': 'off', // we don't use classes at all - 'react/no-deprecated': 'off', // checked by TS - 'react/no-direct-mutation-state': 'off', // we don't use classes at all - 'react/require-render-return': 'off', // we don't use classes at all - 'react/no-is-mounted': 'off', // we don't use classes at all - 'react/jsx-indent': 'off', // we use prettier - 'prefer-destructuring': [ - 'error', - { - VariableDeclarator: { - array: false, - object: true, - }, - AssignmentExpression: { - array: false, - object: false, - }, - }, - { - enforceForRenamedProperties: false, - }, - ], - - // Node.js - // These rules are specific to JavaScript running on Node.js. - 'handle-callback-err': 'error', // enforces error handling in callbacks (off by default) (on by default in the node environment) - 'no-mixed-requires': 'error', // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) - 'no-new-require': 'error', // disallow use of new operator with the require function (off by default) (on by default in the node environment) - 'no-path-concat': 'error', // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) - 'no-process-exit': 'off', // disallow process.exit() (on by default in the node environment) - 'no-restricted-modules': 'error', // restrict usage of specified node modules (off by default) - 'no-sync': 'off', // disallow use of synchronous methods (off by default) - 'eol-last': 'error', - 'import/no-default-export': 'error', - - // Variables - // These rules have to do with variable declarations. - 'no-label-var': 'error', // disallow labels that share a name with a variable - 'no-shadow': 'off', // @typescript-eslint/no-shadow will be used instead - '@typescript-eslint/no-shadow': [ - 'error', - { builtinGlobals: true, allow: ['_', 'error', 'resolve', 'reject', 'fetch'] }, - ], // disallow declaration of variables already declared in the outer scope - 'no-shadow-restricted-names': 'error', // disallow shadowing of names such as arguments - 'no-undefined': 'off', // disallow use of undefined variable (off by default) - 'no-undef-init': 'error', // disallow use of undefined when initializing variables - 'no-unused-vars': 'off', - 'no-unused-expressions': 0, - 'chai-friendly/no-unused-expressions': 2, - '@typescript-eslint/no-unused-vars': [ - 'error', - { vars: 'all', args: 'none', ignoreRestSiblings: true, varsIgnorePattern: '^_' }, - ], - '@typescript-eslint/no-restricted-imports': [ - 'error', - { - paths: [{ name: '.' }, { name: '..' }, { name: '../..' }], - patterns: ['@trezor/*/lib', '@trezor/*/lib/**'], - }, - ], - 'no-restricted-syntax': [ - 'error', - { - message: - "Please don't use createAsyncThunk. Use createThunk from @suite-common/redux-utils instead.", - selector: "CallExpression[callee.name='createAsyncThunk']", - }, - { - message: - 'Please don\'t use getState directly. Always use strongly typed selector, because geState is typed as "any" and it\'s dangerous to use it directly.', - selector: - 'MemberExpression[property.type="Identifier"]:matches([object.callee.name="getState"])', - }, - { - message: - 'Do not assign "getState" directly. Always use strongly typed selector, because geState is typed as "any" and it\'s dangerous to use it directly.', - selector: - "VariableDeclarator[init.type='CallExpression']:matches([init.callee.name='getState'])", - }, - { - message: - 'Please don\'t use "state" directly because it\'s typed as "any". Always use it only as parameter for strongly typed selector function.', - selector: - "CallExpression[callee.name='useSelector'] MemberExpression[object.name='state']:matches([property.type='Identifier'])", - }, - ], - 'object-shorthand': [ - 'error', - 'always', - { - ignoreConstructors: false, - avoidQuotes: true, - }, - ], - 'constructor-super': 'error', - 'no-duplicate-imports': 'off', - // disallow renaming import, export, and destructured assignments to the same name - // https://eslint.org/docs/rules/no-useless-rename - 'no-useless-rename': [ - 'error', - { - ignoreDestructuring: false, - ignoreImport: false, - ignoreExport: false, - }, - ], - 'prefer-numeric-literals': 'error', - 'no-unsafe-optional-chaining': 'error', - 'padding-line-between-statements': [ - 'error', - { blankLine: 'always', prev: '*', next: 'return' }, - ], - 'local-rules/no-override-ds-component': [ - 'error', - { packageNames: ['@trezor/product-components', '@trezor/components'] }, - ], - - // Jest plugin config - 'jest/valid-title': 'off', // This rule does not use Typescript and produces false positives - 'jest/valid-describe-callback': 'off', // This rule does not use Typescript and produces false positives - 'jest/no-disabled-tests': 'off', // Well, what can I say... ¯\_(ツ)_/¯ We skip tests sometimes. - 'jest/no-focused-tests': 'off', // Same as above, but // Todo: shall be easy to get rid of this - 'jest/no-conditional-expect': 'off', // Todo: we shall solve this, this is bad practice - 'jest/expect-expect': 'off', // Todo: we have test with no assertions, this may be legit but it needs to be checked - 'jest/no-standalone-expect': [ - 'error', - { additionalTestBlockFunctions: ['conditionalTest'] }, - ], - }, - overrides: [ - { - files: ['**/*.js'], - rules: { - // JS files are usually configs or scripts where require is OK - '@typescript-eslint/no-var-requires': 'off', - 'no-console': 'off', - }, - }, - { - // we are using explicit blacklist because this will enforce new rules in newly created packages - files: [ - 'packages/analytics/**/*', - 'packages/blockchain-link/**/*', - 'packages/components/**/*', - 'packages/product-components/**/*', - 'packages/connect/**/*', - 'packages/connect-common/**/*', - 'packages/connect-explorer/**/*', - 'packages/connect-web/**/*', - 'packages/connect-popup/**/*', - 'packages/connect-iframe/**/*', - 'packages/connect-examples/**/*', - 'packages/connect-plugin-ethereum/**/*', - 'packages/connect-plugin-stellar/**/*', - 'packages/request-manager/**/*', - 'packages/suite/**/*', - 'packages/suite-build/**/*', - 'packages/suite-data/**/*', - 'packages/suite-desktop-api/**/*', - 'packages/suite-storage/**/*', - 'packages/suite-web/**/*', - 'packages/transport/**/*', - 'packages/utxo-lib/**/*', - 'scripts/**/*', - 'docs/**/*', - ], - rules: { - '@typescript-eslint/no-shadow': 'off', - 'import/no-default-export': 'off', - 'import/order': 'off', - '@typescript-eslint/no-unused-vars': 'off', - 'no-console': 'off', - 'react/jsx-no-undef': 'off', - 'no-catch-shadow': 'off', - 'no-restricted-syntax': 'off', - }, - }, - { - files: ['suite-native/**/*'], - rules: { - '@typescript-eslint/no-var-requires': 'off', - 'global-require': 'off', - }, - }, - // tests - { - files: ['**/*.test.*', '**/__tests__/**/*'], - rules: { - 'import/no-extraneous-dependencies': 'off', - 'import/no-unresolved': 'off', - 'import/no-default-export': 'off', - }, - }, - { - files: ['packages/suite-web/e2e/**/*'], - rules: { - 'jest/valid-expect': 'off', // Cypress - }, - }, - { - files: ['packages/connect/e2e/**/*'], - rules: { - 'jest/no-jasmine-globals': 'off', // Kamma tests - }, - }, - ], -}; diff --git a/package.json b/package.json index c55a94488a6..ec68e76f827 100644 --- a/package.json +++ b/package.json @@ -126,19 +126,8 @@ "@types/prettier": "^3.0.0", "@types/semver": "^7.5.6", "@types/tar": "^6.1.11", - "@typescript-eslint/eslint-plugin": "^8.8.1", - "@typescript-eslint/parser": "^8.8.1", "babel-jest": "29.7.0", "depcheck": "^1.4.7", - "eslint": "^8.57.1", - "eslint-plugin-chai-friendly": "^1.0.1", - "eslint-plugin-cypress": "^3.5.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jest": "^28.8.3", - "eslint-plugin-jsx-a11y": "^6.10.0", - "eslint-plugin-local-rules": "^3.0.2", - "eslint-plugin-react": "^7.37.1", - "eslint-plugin-react-hooks": "^4.6.2", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "jest-expo": "^50.0.2", diff --git a/packages/connect-explorer/package.json b/packages/connect-explorer/package.json index 306af433770..8a0cf74fa25 100644 --- a/packages/connect-explorer/package.json +++ b/packages/connect-explorer/package.json @@ -52,7 +52,6 @@ "babel-plugin-styled-components": "^2.1.4", "concurrently": "^8.2.2", "copy-webpack-plugin": "^12.0.2", - "eslint-plugin-mdx": "^3.1.5", "html-webpack-plugin": "^5.6.0", "rimraf": "^6.0.1", "tsx": "^4.16.3", diff --git a/scripts/list-outdated-dependencies/common-dependencies.txt b/scripts/list-outdated-dependencies/common-dependencies.txt index 6394b39d7e8..3448d857a00 100644 --- a/scripts/list-outdated-dependencies/common-dependencies.txt +++ b/scripts/list-outdated-dependencies/common-dependencies.txt @@ -28,8 +28,6 @@ @types/tar @types/webpack-bundle-analyzer @types/webpack-plugin-serve -@typescript-eslint/eslint-plugin -@typescript-eslint/parser babel-jest babel-loader bignumber.js @@ -40,16 +38,6 @@ copy-webpack-plugin cross-fetch depcheck dotenv -eslint -eslint-plugin-chai-friendly -eslint-plugin-cypress -eslint-plugin-import -eslint-plugin-jest -eslint-plugin-jsx-a11y -eslint-plugin-local-rules -eslint-plugin-mdx -eslint-plugin-react -eslint-plugin-react-hooks escape-string-regexp fake-indexeddb file-saver @@ -106,4 +94,4 @@ webpack-merge webpack-nano webpack-plugin-serve worker-loader -yargs \ No newline at end of file +yargs diff --git a/yarn.lock b/yarn.lock index 7297a4067b4..25c5b7c0494 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,20 +12,6 @@ __metadata: languageName: node linkType: hard -"@aashutoshrathi/word-wrap@npm:^1.2.3": - version: 1.2.6 - resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" - checksum: 10/6eebd12a5cd03cee38fcb915ef9f4ea557df6a06f642dfc7fe8eb4839eb5c9ca55a382f3604d52c14200b0c214c12af5e1f23d2a6d8e23ef2d016b105a9d6c0a - languageName: node - linkType: hard - -"@adraffy/ens-normalize@npm:^1.8.8": - version: 1.11.0 - resolution: "@adraffy/ens-normalize@npm:1.11.0" - checksum: 10/abef75f21470ea43dd6071168e092d2d13e38067e349e76186c78838ae174a46c3e18ca50921d05bea6ec3203074147c9e271f8cb6531d1c2c0e146f3199ddcb - languageName: node - linkType: hard - "@alloc/quick-lru@npm:^5.2.0": version: 5.2.0 resolution: "@alloc/quick-lru@npm:5.2.0" @@ -111,7 +97,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.7": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.7": version: 7.24.7 resolution: "@babel/code-frame@npm:7.24.7" dependencies: @@ -1805,7 +1791,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.5, @babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.25.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.5, @babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.24.7, @babel/runtime@npm:^7.25.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.25.6 resolution: "@babel/runtime@npm:7.25.6" dependencies: @@ -3332,45 +3318,13 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.0 - resolution: "@eslint-community/eslint-utils@npm:4.4.0" - dependencies: - eslint-visitor-keys: "npm:^3.3.0" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10/8d70bcdcd8cd279049183aca747d6c2ed7092a5cf0cf5916faac1ef37ffa74f0c245c2a3a3d3b9979d9dfdd4ca59257b4c5621db699d637b847a2c5e02f491c2 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.6.1": - version: 4.11.1 - resolution: "@eslint-community/regexpp@npm:4.11.1" - checksum: 10/934b6d3588c7f16b18d41efec4fdb89616c440b7e3256b8cb92cfd31ae12908600f2b986d6c1e61a84cbc10256b1dd3448cd1eec79904bd67ac365d0f1aba2e2 - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^2.1.4": - version: 2.1.4 - resolution: "@eslint/eslintrc@npm:2.1.4" +"@ethereumjs/common@npm:2.6.5, @ethereumjs/common@npm:^2.6.4": + version: 2.6.5 + resolution: "@ethereumjs/common@npm:2.6.5" dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10/7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8 - languageName: node - linkType: hard - -"@eslint/js@npm:8.57.1": - version: 8.57.1 - resolution: "@eslint/js@npm:8.57.1" - checksum: 10/7562b21be10c2adbfa4aa5bb2eccec2cb9ac649a3569560742202c8d1cb6c931ce634937a2f0f551e078403a1c1285d6c2c0aa345dafc986149665cd69fe8b59 + crc-32: "npm:^1.2.0" + ethereumjs-util: "npm:^7.1.5" + checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 languageName: node linkType: hard @@ -3384,12 +3338,12 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:^4.4.0": - version: 4.4.0 - resolution: "@ethereumjs/common@npm:4.4.0" +"@ethereumjs/common@npm:^4.3.0": + version: 4.3.0 + resolution: "@ethereumjs/common@npm:4.3.0" dependencies: - "@ethereumjs/util": "npm:^9.1.0" - checksum: 10/dd5cc78575a762b367601f94d6af7e36cb3a5ecab45eec0c1259c433e755a16c867753aa88f331e3963791a18424ad0549682a3a6a0a160640fe846db6ce8014 + "@ethereumjs/util": "npm:^9.0.3" + checksum: 10/90f7fe1ba6827b65cd25e9bb4adf07a117ea554a950bb364d5fd9873cb770d383addb0ad34839a91fbec22ebc25516c6fb7e70ae0198c78f933920bf39797a94 languageName: node linkType: hard @@ -3411,6 +3365,16 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/tx@npm:3.5.2": + version: 3.5.2 + resolution: "@ethereumjs/tx@npm:3.5.2" + dependencies: + "@ethereumjs/common": "npm:^2.6.4" + ethereumjs-util: "npm:^7.1.5" + checksum: 10/891e12738206229ac428685536844f7765e8547ae794462b1e406399445bf1f6f918af6ebc33ee5fa4a1340f14f48871a579f11c0e1d7c142ba0dd525bae5df5 + languageName: node + linkType: hard + "@ethereumjs/tx@npm:^4.2.0": version: 4.2.0 resolution: "@ethereumjs/tx@npm:4.2.0" @@ -3423,15 +3387,15 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^5.4.0": - version: 5.4.0 - resolution: "@ethereumjs/tx@npm:5.4.0" +"@ethereumjs/tx@npm:^5.3.0": + version: 5.3.0 + resolution: "@ethereumjs/tx@npm:5.3.0" dependencies: - "@ethereumjs/common": "npm:^4.4.0" + "@ethereumjs/common": "npm:^4.3.0" "@ethereumjs/rlp": "npm:^5.0.2" - "@ethereumjs/util": "npm:^9.1.0" - ethereum-cryptography: "npm:^2.2.1" - checksum: 10/8d2c0a69ab37015f945f9de065cfb9f05e8e79179efeed725ea0a14760c3eb8ff900bcf915bb71ec29fe2f753db35d1b78a15ac4ddec489e87c995dec1ba6e85 + "@ethereumjs/util": "npm:^9.0.3" + ethereum-cryptography: "npm:^2.1.3" + checksum: 10/4eb48e763d81ea0978648367d61c568c8d10f769c1ea7d32307ebe02299d4fa9fe5d7bf794ec1ee22e92edef6bfe1f459d5816e1c62d3f93602d931807ca488b languageName: node linkType: hard @@ -3446,19 +3410,232 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/util@npm:^9.1.0": - version: 9.1.0 - resolution: "@ethereumjs/util@npm:9.1.0" +"@ethereumjs/util@npm:^9.0.3": + version: 9.0.3 + resolution: "@ethereumjs/util@npm:9.0.3" dependencies: "@ethereumjs/rlp": "npm:^5.0.2" - ethereum-cryptography: "npm:^2.2.1" - checksum: 10/4e22c4081c63eebb808eccd54f7f91cd3407f4cac192da5f30a0d6983fe07d51f25e6a9d08624f1376e604bb7dce574aafcf0fbf0becf42f62687c11e710ac41 + ethereum-cryptography: "npm:^2.1.3" + checksum: 10/d9c313a0672e0b4842ba80e2f413ccd5302c3942dc4ed718d6e3faab89c4eeeaaeb6661e9275679c22b83b1cb6502ea772e1c837d105b6a9faf5957a59bc3e4c + languageName: node + linkType: hard + +"@ethersproject/abi@npm:^5.6.3": + version: 5.7.0 + resolution: "@ethersproject/abi@npm:5.7.0" + dependencies: + "@ethersproject/address": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/constants": "npm:^5.7.0" + "@ethersproject/hash": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/strings": "npm:^5.7.0" + checksum: 10/6ed002cbc61a7e21bc0182702345659c1984f6f8e6bad166e43aee76ea8f74766dd0f6236574a868e1b4600af27972bf25b973fae7877ae8da3afa90d3965cac + languageName: node + linkType: hard + +"@ethersproject/abstract-provider@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/abstract-provider@npm:5.7.0" + dependencies: + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/networks": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/transactions": "npm:^5.7.0" + "@ethersproject/web": "npm:^5.7.0" + checksum: 10/c03e413a812486002525f4036bf2cb90e77a19b98fa3d16279e28e0a05520a1085690fac2ee9f94b7931b9a803249ff8a8bbb26ff8dee52196a6ef7a3fc5edc5 + languageName: node + linkType: hard + +"@ethersproject/abstract-signer@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/abstract-signer@npm:5.7.0" + dependencies: + "@ethersproject/abstract-provider": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + checksum: 10/0a6ffade0a947c9ba617048334e1346838f394d1d0a5307ac435a0c63ed1033b247e25ffb0cd6880d7dcf5459581f52f67e3804ebba42ff462050f1e4321ba0c + languageName: node + linkType: hard + +"@ethersproject/address@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/address@npm:5.7.0" + dependencies: + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/rlp": "npm:^5.7.0" + checksum: 10/1ac4f3693622ed9fbbd7e966a941ec1eba0d9445e6e8154b1daf8e93b8f62ad91853d1de5facf4c27b41e6f1e47b94a317a2492ba595bee1841fd3030c3e9a27 languageName: node linkType: hard -"@everstake/wallet-sdk@npm:^0.3.66": - version: 0.3.66 - resolution: "@everstake/wallet-sdk@npm:0.3.66" +"@ethersproject/base64@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/base64@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + checksum: 10/7105105f401e1c681e61db1e9da1b5960d8c5fbd262bbcacc99d61dbb9674a9db1181bb31903d98609f10e8a0eb64c850475f3b040d67dea953e2b0ac6380e96 + languageName: node + linkType: hard + +"@ethersproject/bignumber@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/bignumber@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + bn.js: "npm:^5.2.1" + checksum: 10/09cffa18a9f0730856b57c14c345bd68ba451159417e5aff684a8808011cd03b27b7c465d423370333a7d1c9a621392fc74f064a3b02c9edc49ebe497da6d45d + languageName: node + linkType: hard + +"@ethersproject/bytes@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/bytes@npm:5.7.0" + dependencies: + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/8b3ffedb68c1a82cfb875e9738361409cc33e2dcb1286b6ccfdc4dd8dd0317f7eacc8937b736c467d213dffc44b469690fe1a951e901953d5a90c5af2b675ae4 + languageName: node + linkType: hard + +"@ethersproject/constants@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/constants@npm:5.7.0" + dependencies: + "@ethersproject/bignumber": "npm:^5.7.0" + checksum: 10/6d4b1355747cce837b3e76ec3bde70e4732736f23b04f196f706ebfa5d4d9c2be50904a390d4d40ce77803b98d03d16a9b6898418e04ba63491933ce08c4ba8a + languageName: node + linkType: hard + +"@ethersproject/hash@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/hash@npm:5.7.0" + dependencies: + "@ethersproject/abstract-signer": "npm:^5.7.0" + "@ethersproject/address": "npm:^5.7.0" + "@ethersproject/base64": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/strings": "npm:^5.7.0" + checksum: 10/d83de3f3a1b99b404a2e7bb503f5cdd90c66a97a32cce1d36b09bb8e3fb7205b96e30ad28e2b9f30083beea6269b157d0c6e3425052bb17c0a35fddfdd1c72a3 + languageName: node + linkType: hard + +"@ethersproject/keccak256@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/keccak256@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + js-sha3: "npm:0.8.0" + checksum: 10/ff70950d82203aab29ccda2553422cbac2e7a0c15c986bd20a69b13606ed8bb6e4fdd7b67b8d3b27d4f841e8222cbaccd33ed34be29f866fec7308f96ed244c6 + languageName: node + linkType: hard + +"@ethersproject/logger@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/logger@npm:5.7.0" + checksum: 10/683a939f467ae7510deedc23d7611d0932c3046137f5ffb92ba1e3c8cd9cf2fbbaa676b660c248441a0fa9143783137c46d6e6d17d676188dd5a6ef0b72dd091 + languageName: node + linkType: hard + +"@ethersproject/networks@npm:^5.7.0": + version: 5.7.1 + resolution: "@ethersproject/networks@npm:5.7.1" + dependencies: + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/5265d0b4b72ef91af57be804b44507f4943038d609699764d8a69157ed381e30fe22ebf63630ed8e530ceb220f15d69dae8cda2e5023ccd793285c9d5882e599 + languageName: node + linkType: hard + +"@ethersproject/properties@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/properties@npm:5.7.0" + dependencies: + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/f8401a161940aa1c32695115a20c65357877002a6f7dc13ab1600064bf54d7b825b4db49de8dc8da69efcbb0c9f34f8813e1540427e63e262ab841c1bf6c1c1e + languageName: node + linkType: hard + +"@ethersproject/rlp@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/rlp@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/3b8c5279f7654794d5874569f5598ae6a880e19e6616013a31e26c35c5f586851593a6e85c05ed7b391fbc74a1ea8612dd4d867daefe701bf4e8fcf2ab2f29b9 + languageName: node + linkType: hard + +"@ethersproject/signing-key@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/signing-key@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + bn.js: "npm:^5.2.1" + elliptic: "npm:6.5.4" + hash.js: "npm:1.1.7" + checksum: 10/ff2f79ded86232b139e7538e4aaa294c6022a7aaa8c95a6379dd7b7c10a6d363685c6967c816f98f609581cf01f0a5943c667af89a154a00bcfe093a8c7f3ce7 + languageName: node + linkType: hard + +"@ethersproject/strings@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/strings@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/constants": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + checksum: 10/24191bf30e98d434a9fba2f522784f65162d6712bc3e1ccc98ed85c5da5884cfdb5a1376b7695374655a7b95ec1f5fdbeef5afc7d0ea77ffeb78047e9b791fa5 + languageName: node + linkType: hard + +"@ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/transactions@npm:5.7.0" + dependencies: + "@ethersproject/address": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/constants": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/rlp": "npm:^5.7.0" + "@ethersproject/signing-key": "npm:^5.7.0" + checksum: 10/d809e9d40020004b7de9e34bf39c50377dce8ed417cdf001bfabc81ecb1b7d1e0c808fdca0a339ea05e1b380648eaf336fe70f137904df2d3c3135a38190a5af + languageName: node + linkType: hard + +"@ethersproject/web@npm:^5.7.0": + version: 5.7.1 + resolution: "@ethersproject/web@npm:5.7.1" + dependencies: + "@ethersproject/base64": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/properties": "npm:^5.7.0" + "@ethersproject/strings": "npm:^5.7.0" + checksum: 10/c83b6b3ac40573ddb67b1750bb4cf21ded7d8555be5e53a97c0f34964622fd88de9220a90a118434bae164a2bff3acbdc5ecb990517b5f6dc32bdad7adf604c2 + languageName: node + linkType: hard + +"@everstake/wallet-sdk@npm:^0.3.49": + version: 0.3.49 + resolution: "@everstake/wallet-sdk@npm:0.3.49" dependencies: "@cosmjs/stargate": "npm:^0.30.1" "@mysten/sui.js": "npm:^0.46.1" @@ -3469,8 +3646,8 @@ __metadata: bignumber.js: "npm:^9.1.2" bip39: "npm:^3.1.0" bs58: "npm:^5.0.0" - web3: "npm:^4.14.0" - checksum: 10/035e4ac89b5d2d48c4731382e4bf03bc3b6c7e66a5c72a58629f3528eb8b6c6ad91f0eae392e6cdcd5b601d3b72d73f1b94cb8266c64267546a9ebda7189cf3d + web3: "npm:^1.9.0" + checksum: 10/75791291d9bbf417746c5794b8f3e3cfdaeace05a46d2861adcf725eaaab08fbd9c501c1a62918da98ebbd41d0f8e61d9cd8f6085a60426f09238e7e3a14b4e5 languageName: node linkType: hard @@ -4267,9 +4444,9 @@ __metadata: languageName: node linkType: hard -"@gorhom/bottom-sheet@npm:5.0.5": - version: 5.0.5 - resolution: "@gorhom/bottom-sheet@npm:5.0.5" +"@gorhom/bottom-sheet@npm:5.0.1": + version: 5.0.1 + resolution: "@gorhom/bottom-sheet@npm:5.0.1" dependencies: "@gorhom/portal": "npm:1.0.14" invariant: "npm:^2.2.4" @@ -4285,7 +4462,7 @@ __metadata: optional: true "@types/react-native": optional: true - checksum: 10/4c972e5c4459dce02858c4b5af691e412e8075e1cbfe049ae7d308746173ba27c3802d867eb54a94a804987d3d9e78f5886dc5a3f4163fb19ca2a91b4ad44864 + checksum: 10/61134493ac61f96a5bc7aae20f4a6465f19138d7d2d36129d2285022ee52fe02648d7706212b17d5e1c6acdf0d0a5ee0124884b44a34eb468406e89a86c6102c languageName: node linkType: hard @@ -4359,31 +4536,6 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.13.0": - version: 0.13.0 - resolution: "@humanwhocodes/config-array@npm:0.13.0" - dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.3" - debug: "npm:^4.3.1" - minimatch: "npm:^3.0.5" - checksum: 10/524df31e61a85392a2433bf5d03164e03da26c03d009f27852e7dcfdafbc4a23f17f021dacf88e0a7a9fe04ca032017945d19b57a16e2676d9114c22a53a9d11 - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10/e993950e346331e5a32eefb27948ecdee2a2c4ab3f072b8f566cd213ef485dd50a3ca497050608db91006f5479e43f91a439aef68d2a313bd3ded06909c7c5b3 - languageName: node - linkType: hard - -"@humanwhocodes/object-schema@npm:^2.0.3": - version: 2.0.3 - resolution: "@humanwhocodes/object-schema@npm:2.0.3" - checksum: 10/05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 - languageName: node - linkType: hard - "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -4971,9 +5123,9 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-sig-util@npm:^8.0.0": - version: 8.0.0 - resolution: "@metamask/eth-sig-util@npm:8.0.0" +"@metamask/eth-sig-util@npm:^7.0.3": + version: 7.0.3 + resolution: "@metamask/eth-sig-util@npm:7.0.3" dependencies: "@ethereumjs/util": "npm:^8.1.0" "@metamask/abi-utils": "npm:^2.0.4" @@ -4981,7 +5133,7 @@ __metadata: "@scure/base": "npm:~1.1.3" ethereum-cryptography: "npm:^2.1.2" tweetnacl: "npm:^1.0.3" - checksum: 10/5de92bc59df31bcf417ecbdfd2b47f15c21b29454f45108513c55d9c005b7cb51373e9d254bd97533603ab7c7758fdf8fc5159612f366b05f92ebe5beb6d75d8 + checksum: 10/a71b28607b0815d609cf27ab2d8535393d0a7e7f2c6b7a23d92669b770c664c14e2f539129351147339172b0bb865bb977e7cfb30624870eedab5d7ab700beff languageName: node linkType: hard @@ -5250,7 +5402,16 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.4.2, @noble/curves@npm:^1.1.0, @noble/curves@npm:^1.4.2, @noble/curves@npm:~1.4.0": +"@noble/curves@npm:1.3.0, @noble/curves@npm:~1.3.0": + version: 1.3.0 + resolution: "@noble/curves@npm:1.3.0" + dependencies: + "@noble/hashes": "npm:1.3.3" + checksum: 10/f3cbdd1af00179e30146eac5539e6df290228fb857a7a8ba36d1a772cbe59288a2ca83d06f175d3446ef00db3a80d7fd8b8347f7de9c2d4d5bf3865d8bb78252 + languageName: node + linkType: hard + +"@noble/curves@npm:^1.1.0, @noble/curves@npm:^1.4.2": version: 1.4.2 resolution: "@noble/curves@npm:1.4.2" dependencies: @@ -5259,14 +5420,14 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.3, @noble/hashes@npm:~1.3.0": +"@noble/hashes@npm:1.3.3, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.2": version: 1.3.3 resolution: "@noble/hashes@npm:1.3.3" checksum: 10/1025ddde4d24630e95c0818e63d2d54ee131b980fe113312d17ed7468bc18f54486ac86c907685759f8a7e13c2f9b9e83ec7b67d1cc20836f36b5e4a65bb102d languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1, @noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.2.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.3.2, @noble/hashes@npm:^1.4.0, @noble/hashes@npm:~1.4.0": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1, @noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.2.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.3.2, @noble/hashes@npm:^1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 10/e156e65794c473794c52fa9d06baf1eb20903d0d96719530f523cc4450f6c721a957c544796e6efd0197b2296e7cd70efeb312f861465e17940a3e3c7e0febc6 @@ -5290,7 +5451,7 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": +"@nodelib/fs.walk@npm:^1.2.3": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: @@ -5300,22 +5461,6 @@ __metadata: languageName: node linkType: hard -"@npmcli/config@npm:^8.0.0": - version: 8.2.0 - resolution: "@npmcli/config@npm:8.2.0" - dependencies: - "@npmcli/map-workspaces": "npm:^3.0.2" - ci-info: "npm:^4.0.0" - ini: "npm:^4.1.0" - nopt: "npm:^7.0.0" - proc-log: "npm:^3.0.0" - read-package-json-fast: "npm:^3.0.2" - semver: "npm:^7.3.5" - walk-up-path: "npm:^3.0.1" - checksum: 10/1701a6ac0e90c7e350494a58d53f2b7266227d471abe5486abc494030cc49a1cf3c895b465024f0d4eb45ab525e1617ba93c516aad4f6b6b880ca682e0f42938 - languageName: node - linkType: hard - "@npmcli/fs@npm:^2.1.0": version: 2.1.2 resolution: "@npmcli/fs@npm:2.1.2" @@ -5335,18 +5480,6 @@ __metadata: languageName: node linkType: hard -"@npmcli/map-workspaces@npm:^3.0.2": - version: 3.0.4 - resolution: "@npmcli/map-workspaces@npm:3.0.4" - dependencies: - "@npmcli/name-from-folder": "npm:^2.0.0" - glob: "npm:^10.2.2" - minimatch: "npm:^9.0.0" - read-package-json-fast: "npm:^3.0.0" - checksum: 10/3fe80df9ac436355f23b35438a4341a75f597d0bb5dcadc46bb0b5591aabf6cc0036dba0a2a4987d02416f20b829293a9ac19d4cb218fe8de87191c229f83f59 - languageName: node - linkType: hard - "@npmcli/move-file@npm:^2.0.0": version: 2.0.1 resolution: "@npmcli/move-file@npm:2.0.1" @@ -5357,13 +5490,6 @@ __metadata: languageName: node linkType: hard -"@npmcli/name-from-folder@npm:^2.0.0": - version: 2.0.0 - resolution: "@npmcli/name-from-folder@npm:2.0.0" - checksum: 10/75beb40373f916cfcf7327958b3ab920ab4e32d24217197927dd1c76a325c7645695011fce9cb2a8f93616f8b74946e84eebe3830303e11ed9d400dae623a99b - languageName: node - linkType: hard - "@nrwl/tao@npm:18.0.3": version: 18.0.3 resolution: "@nrwl/tao@npm:18.0.3" @@ -5748,13 +5874,6 @@ __metadata: languageName: node linkType: hard -"@pkgr/core@npm:^0.1.0": - version: 0.1.1 - resolution: "@pkgr/core@npm:0.1.1" - checksum: 10/6f25fd2e3008f259c77207ac9915b02f1628420403b2630c92a07ff963129238c9262afc9e84344c7a23b5cc1f3965e2cd17e3798219f5fd78a63d144d3cceba - languageName: node - linkType: hard - "@playwright/browser-chromium@npm:^1.46.1": version: 1.46.1 resolution: "@playwright/browser-chromium@npm:1.46.1" @@ -7446,13 +7565,6 @@ __metadata: languageName: node linkType: hard -"@rtsao/scc@npm:^1.1.0": - version: 1.1.0 - resolution: "@rtsao/scc@npm:1.1.0" - checksum: 10/17d04adf404e04c1e61391ed97bca5117d4c2767a76ae3e879390d6dec7b317fcae68afbf9e98badee075d0b64fa60f287729c4942021b4d19cd01db77385c01 - languageName: node - linkType: hard - "@sagold/json-pointer@npm:^5.1.1, @sagold/json-pointer@npm:^5.1.2": version: 5.1.2 resolution: "@sagold/json-pointer@npm:5.1.2" @@ -7470,21 +7582,21 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:^1.1.3, @scure/base@npm:~1.1.0, @scure/base@npm:~1.1.3, @scure/base@npm:~1.1.6": - version: 1.1.9 - resolution: "@scure/base@npm:1.1.9" - checksum: 10/f0ab7f687bbcdee2a01377fe3cd808bf63977999672751295b6a92625d5322f4754a96d40f6bd579bc367aad48ecf8a4e6d0390e70296e6ded1076f52adb16bb +"@scure/base@npm:^1.1.3, @scure/base@npm:~1.1.0, @scure/base@npm:~1.1.3, @scure/base@npm:~1.1.4": + version: 1.1.7 + resolution: "@scure/base@npm:1.1.7" + checksum: 10/fc50ffaab36cb46ff9fa4dc5052a06089ab6a6707f63d596bb34aaaec76173c9a564ac312a0b981b5e7a5349d60097b8878673c75d6cbfc4da7012b63a82099b languageName: node linkType: hard -"@scure/bip32@npm:1.4.0, @scure/bip32@npm:^1.3.1": - version: 1.4.0 - resolution: "@scure/bip32@npm:1.4.0" +"@scure/bip32@npm:1.3.3, @scure/bip32@npm:^1.3.1": + version: 1.3.3 + resolution: "@scure/bip32@npm:1.3.3" dependencies: - "@noble/curves": "npm:~1.4.0" - "@noble/hashes": "npm:~1.4.0" - "@scure/base": "npm:~1.1.6" - checksum: 10/6cd5062d902564d9e970597ec8b1adacb415b2eadfbb95aee1a1a0480a52eb0de4d294d3753aa8b48548064c9795ed108d348a31a8ce3fc88785377bb12c63b9 + "@noble/curves": "npm:~1.3.0" + "@noble/hashes": "npm:~1.3.2" + "@scure/base": "npm:~1.1.4" + checksum: 10/4b8b75567866ff7d6b3ba154538add02d2951e9433e8dd7f0014331ac500cda5a88fe3d39b408fcc36e86b633682013f172b967af022c2e4e4ab07336801d688 languageName: node linkType: hard @@ -7498,13 +7610,13 @@ __metadata: languageName: node linkType: hard -"@scure/bip39@npm:1.3.0, @scure/bip39@npm:^1.2.1": - version: 1.3.0 - resolution: "@scure/bip39@npm:1.3.0" +"@scure/bip39@npm:1.2.2, @scure/bip39@npm:^1.2.1": + version: 1.2.2 + resolution: "@scure/bip39@npm:1.2.2" dependencies: - "@noble/hashes": "npm:~1.4.0" - "@scure/base": "npm:~1.1.6" - checksum: 10/7d71fd58153de22fe8cd65b525f6958a80487bc9d0fbc32c71c328aeafe41fa259f989d2f1e0fa4fdfeaf83b8fcf9310d52ed9862987e46c2f2bfb9dd8cf9fc1 + "@noble/hashes": "npm:~1.3.2" + "@scure/base": "npm:~1.1.4" + checksum: 10/f71aceda10a7937bf3779fd2b4c4156c95ec9813269470ddca464cb8ab610d2451b173037f4b1e6dac45414e406e7adc7b5814c51279f4474d5d38140bbee542 languageName: node linkType: hard @@ -8049,7 +8161,7 @@ __metadata: languageName: node linkType: hard -"@sindresorhus/is@npm:^4.0.0": +"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.6.0": version: 4.6.0 resolution: "@sindresorhus/is@npm:4.6.0" checksum: 10/e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 @@ -8097,11 +8209,11 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.75.0, @solana/web3.js@npm:^1.95.4": - version: 1.95.4 - resolution: "@solana/web3.js@npm:1.95.4" +"@solana/web3.js@npm:^1.75.0, @solana/web3.js@npm:^1.95.0": + version: 1.95.0 + resolution: "@solana/web3.js@npm:1.95.0" dependencies: - "@babel/runtime": "npm:^7.25.0" + "@babel/runtime": "npm:^7.24.7" "@noble/curves": "npm:^1.4.2" "@noble/hashes": "npm:^1.4.0" "@solana/buffer-layout": "npm:^4.0.1" @@ -8112,26 +8224,26 @@ __metadata: bs58: "npm:^4.0.1" buffer: "npm:6.0.3" fast-stable-stringify: "npm:^1.0.0" - jayson: "npm:^4.1.1" + jayson: "npm:^4.1.0" node-fetch: "npm:^2.7.0" rpc-websockets: "npm:^9.0.2" superstruct: "npm:^2.0.2" - checksum: 10/353e04ac1110035ff108f16af4029c7a98f71cce841d45877c9bc4a354cdc58a051681603c92289b81e3dc5ef6b1567c6f866e4ba56a434db145e38a5a41d276 + checksum: 10/24837dbbc00203c8396a6d43b17fecec337f64e1cadc0f7155408062d540cd3fbfb64d044ac14e2ef09c48e4b3d273634fa3954f9dfccf2af1535e249ade750c languageName: node linkType: hard -"@stellar/js-xdr@npm:^3.1.2": - version: 3.1.2 - resolution: "@stellar/js-xdr@npm:3.1.2" - checksum: 10/96b5c52088bb2f2cc11a04ee1766ceb9431bdb0195058b9bc8d60cd1459772c2be6a9aa1bf69ba8b7589cfaf71beef96890e60d7fd7de0332c11ae1917f95440 +"@stellar/js-xdr@npm:^3.1.1": + version: 3.1.1 + resolution: "@stellar/js-xdr@npm:3.1.1" + checksum: 10/3bc8ee3f1611b55938ef0249b7a90b3d689177d45b4c8c24c5562b8fe32372148f7544a0aab67776f4c7b95aef8cb0f97606b86ec800bb087302ff404cb8ccbc languageName: node linkType: hard -"@stellar/stellar-base@npm:^12.1.1": - version: 12.1.1 - resolution: "@stellar/stellar-base@npm:12.1.1" +"@stellar/stellar-base@npm:^12.0.1": + version: 12.0.1 + resolution: "@stellar/stellar-base@npm:12.0.1" dependencies: - "@stellar/js-xdr": "npm:^3.1.2" + "@stellar/js-xdr": "npm:^3.1.1" base32.js: "npm:^0.1.0" bignumber.js: "npm:^9.1.2" buffer: "npm:^6.0.3" @@ -8141,22 +8253,22 @@ __metadata: dependenciesMeta: sodium-native: optional: true - checksum: 10/6376f8c61a4299d5951acd0ed84b36e4c8dafeb0fab339acd314f9639c99a5059cce666410e8d2a825ea0daf4c19b91b504814eb1a5af40ba7c425f0124326e3 + checksum: 10/5185ef4a747ac6c037efc82b784fd3f41e0aaccd17ed6adb63b460e2938c29a9ef6d8f9d082fcc14420b6385ec08c55fc59ced34776a0bcab859f9bc31be72f2 languageName: node linkType: hard -"@stellar/stellar-sdk@npm:^12.1.3": - version: 12.3.0 - resolution: "@stellar/stellar-sdk@npm:12.3.0" +"@stellar/stellar-sdk@npm:^12.1.0": + version: 12.1.0 + resolution: "@stellar/stellar-sdk@npm:12.1.0" dependencies: - "@stellar/stellar-base": "npm:^12.1.1" - axios: "npm:^1.7.7" + "@stellar/stellar-base": "npm:^12.0.1" + axios: "npm:^1.7.2" bignumber.js: "npm:^9.1.2" eventsource: "npm:^2.0.2" randombytes: "npm:^2.1.0" toml: "npm:^3.0.0" urijs: "npm:^1.19.1" - checksum: 10/47a609172e583d462785bf5f865c33dee8b59e9828cfc2056c22d867121aeba76b5464ec0e871dc0b6656a9d8252e3efeea96878db3e558b2249dfe60e0cd9b5 + checksum: 10/bb4455261320f9718d415eca9cfc2228edabbc28c4fd768fe23a5abc64254600c9c4db13a2f7dd417991222805e8ab77df63ab5504b44f325b5c5a5c958dde96 languageName: node linkType: hard @@ -9265,7 +9377,7 @@ __metadata: dependencies: "@mobily/ts-belt": "npm:^3.13.1" "@solana/buffer-layout": "npm:^4.0.1" - "@solana/web3.js": "npm:^1.95.4" + "@solana/web3.js": "npm:^1.95.0" "@suite-common/fiat-services": "workspace:*" "@suite-common/metadata-types": "workspace:*" "@suite-common/suite-config": "workspace:*" @@ -9364,7 +9476,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@babel/plugin-transform-export-namespace-from": "npm:^7.23.4" "@config-plugins/detox": "npm:^8.0.0" - "@gorhom/bottom-sheet": "npm:5.0.5" + "@gorhom/bottom-sheet": "npm:5.0.1" "@mobily/ts-belt": "npm:^3.13.1" "@react-native-community/netinfo": "npm:11.3.2" "@react-native/babel-preset": "npm:^0.75.2" @@ -9512,7 +9624,7 @@ __metadata: version: 0.0.0-use.local resolution: "@suite-native/atoms@workspace:suite-native/atoms" dependencies: - "@gorhom/bottom-sheet": "npm:5.0.5" + "@gorhom/bottom-sheet": "npm:5.0.1" "@mobily/ts-belt": "npm:^3.13.1" "@shopify/flash-list": "npm:1.7.1" "@shopify/react-native-skia": "npm:1.3.11" @@ -10810,6 +10922,15 @@ __metadata: languageName: node linkType: hard +"@szmarczak/http-timer@npm:^5.0.1": + version: 5.0.1 + resolution: "@szmarczak/http-timer@npm:5.0.1" + dependencies: + defer-to-connect: "npm:^2.0.1" + checksum: 10/fc9cb993e808806692e4a3337c90ece0ec00c89f4b67e3652a356b89730da98bc824273a6d67ca84d5f33cd85f317dcd5ce39d8cc0a2f060145a608a7cb8ce92 + languageName: node + linkType: hard + "@tailwindcss/nesting@npm:^0.0.0-insiders.565cd3e": version: 0.0.0-insiders.565cd3e resolution: "@tailwindcss/nesting@npm:0.0.0-insiders.565cd3e" @@ -10985,7 +11106,7 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/blockchain-link-types@workspace:packages/blockchain-link-types" dependencies: - "@solana/web3.js": "npm:^1.95.4" + "@solana/web3.js": "npm:^1.95.0" "@trezor/type-utils": "workspace:*" "@trezor/utxo-lib": "workspace:*" tsx: "npm:^4.16.3" @@ -10999,7 +11120,7 @@ __metadata: resolution: "@trezor/blockchain-link-utils@workspace:packages/blockchain-link-utils" dependencies: "@mobily/ts-belt": "npm:^3.13.1" - "@solana/web3.js": "npm:^1.95.4" + "@solana/web3.js": "npm:^1.95.0" "@trezor/blockchain-link-types": "workspace:*" "@trezor/env-utils": "workspace:*" "@trezor/type-utils": "workspace:*" @@ -11015,7 +11136,7 @@ __metadata: resolution: "@trezor/blockchain-link@workspace:packages/blockchain-link" dependencies: "@solana/buffer-layout": "npm:^4.0.1" - "@solana/web3.js": "npm:^1.95.4" + "@solana/web3.js": "npm:^1.95.0" "@trezor/blockchain-link-types": "workspace:*" "@trezor/blockchain-link-utils": "workspace:*" "@trezor/e2e-utils": "workspace:*" @@ -11200,7 +11321,6 @@ __metadata: codemirror-json5: "npm:^1.0.3" concurrently: "npm:^8.2.2" copy-webpack-plugin: "npm:^12.0.2" - eslint-plugin-mdx: "npm:^3.1.5" html-webpack-plugin: "npm:^5.6.0" json5: "npm:^2.2.3" next: "npm:^14.2.6" @@ -11265,9 +11385,9 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/connect-plugin-ethereum@workspace:packages/connect-plugin-ethereum" dependencies: - "@metamask/eth-sig-util": "npm:^8.0.0" + "@metamask/eth-sig-util": "npm:^7.0.3" peerDependencies: - "@metamask/eth-sig-util": ^8.0.0 + "@metamask/eth-sig-util": ^7.0.3 tslib: ^2.6.2 languageName: unknown linkType: soft @@ -11276,10 +11396,10 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/connect-plugin-stellar@workspace:packages/connect-plugin-stellar" dependencies: - "@stellar/stellar-sdk": "npm:^12.1.3" + "@stellar/stellar-sdk": "npm:^12.1.0" "@trezor/utils": "workspace:*" peerDependencies: - "@stellar/stellar-sdk": ^12.1.3 + "@stellar/stellar-sdk": ^12.1.0 "@trezor/connect": 9.x.x tslib: ^2.6.2 languageName: unknown @@ -11423,8 +11543,8 @@ __metadata: resolution: "@trezor/connect@workspace:packages/connect" dependencies: "@babel/preset-typescript": "npm:^7.24.7" - "@ethereumjs/common": "npm:^4.4.0" - "@ethereumjs/tx": "npm:^5.4.0" + "@ethereumjs/common": "npm:^4.3.0" + "@ethereumjs/tx": "npm:^5.3.0" "@fivebinaries/coin-selection": "npm:2.2.1" "@trezor/blockchain-link": "workspace:*" "@trezor/blockchain-link-types": "workspace:*" @@ -11909,7 +12029,7 @@ __metadata: resolution: "@trezor/suite@workspace:packages/suite" dependencies: "@crowdin/cli": "npm:^4.0.0" - "@everstake/wallet-sdk": "npm:^0.3.66" + "@everstake/wallet-sdk": "npm:^0.3.49" "@floating-ui/react": "npm:^0.26.9" "@formatjs/cli": "npm:^6.2.7" "@formatjs/intl": "npm:2.10.0" @@ -11918,7 +12038,7 @@ __metadata: "@reduxjs/toolkit": "npm:1.9.5" "@sentry/core": "npm:^7.100.1" "@solana/buffer-layout": "npm:^4.0.1" - "@solana/web3.js": "npm:^1.95.4" + "@solana/web3.js": "npm:^1.95.0" "@suite-common/analytics": "workspace:*" "@suite-common/assets": "workspace:*" "@suite-common/connect-init": "workspace:*" @@ -12167,11 +12287,9 @@ __metadata: dependencies: "@trezor/utils": "workspace:*" "@types/bchaddrjs": "npm:^0.4.3" - "@types/bn.js": "npm:^5.1.6" "@types/bs58": "npm:^4.0.4" "@types/bs58check": "npm:^2.1.2" "@types/create-hmac": "npm:^1.1.3" - "@types/events": "npm:^3.0.3" "@types/wif": "npm:^2.0.5" bchaddrjs: "npm:^0.5.2" bech32: "npm:^2.0.0" @@ -12322,12 +12440,12 @@ __metadata: languageName: node linkType: hard -"@types/bn.js@npm:^5.1.6": - version: 5.1.6 - resolution: "@types/bn.js@npm:5.1.6" +"@types/bn.js@npm:^5.1.0, @types/bn.js@npm:^5.1.1": + version: 5.1.5 + resolution: "@types/bn.js@npm:5.1.5" dependencies: "@types/node": "npm:*" - checksum: 10/db565b5a2af59b09459d74441153bf23a0e80f1fb2d070330786054e7ce1a7285dc40afcd8f289426c61a83166bdd70814f70e2d439744686aac5d3ea75daf13 + checksum: 10/9719330c86aeae0a6a447c974cf0f853ba3660ede20de61f435b03d699e30e6d8b35bf71a8dc9fdc8317784438e83177644ba068ed653d0ae0106e1ecbfe289e languageName: node linkType: hard @@ -12386,7 +12504,7 @@ __metadata: languageName: node linkType: hard -"@types/cacheable-request@npm:^6.0.1": +"@types/cacheable-request@npm:^6.0.1, @types/cacheable-request@npm:^6.0.2": version: 6.0.3 resolution: "@types/cacheable-request@npm:6.0.3" dependencies: @@ -12424,15 +12542,6 @@ __metadata: languageName: node linkType: hard -"@types/concat-stream@npm:^2.0.0": - version: 2.0.3 - resolution: "@types/concat-stream@npm:2.0.3" - dependencies: - "@types/node": "npm:*" - checksum: 10/e829fde246528665b31a9b8f64c369ffc66aa2a1337d2bab1d38f4d4145701480af7c67e877dd09a7fa97fcbaa0f3baa816ed1b3e71c3ad430930acd37f4eb1f - languageName: node - linkType: hard - "@types/connect-history-api-fallback@npm:*, @types/connect-history-api-fallback@npm:^1.5.4": version: 1.5.4 resolution: "@types/connect-history-api-fallback@npm:1.5.4" @@ -12694,13 +12803,6 @@ __metadata: languageName: node linkType: hard -"@types/events@npm:^3.0.3": - version: 3.0.3 - resolution: "@types/events@npm:3.0.3" - checksum: 10/50af9312fab001fd6bd4bb3ff65830f940877e6778de140a92481a0d9bf5f4853d44ec758a8800ef60e0598ac43ed1b5688116a3c65906ae54e989278d6c7c82 - languageName: node - linkType: hard - "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33": version: 4.17.35 resolution: "@types/express-serve-static-core@npm:4.17.35" @@ -12907,13 +13009,6 @@ __metadata: languageName: node linkType: hard -"@types/is-empty@npm:^1.0.0": - version: 1.2.3 - resolution: "@types/is-empty@npm:1.2.3" - checksum: 10/b22065de5978dacacb6b7401df03e94b9688a3ce07c7faab1bab5e943adbdd6455b190963079bb0aae12c8e56980e54c49bc6902a5805741b82fb4f7335b0c44 - languageName: node - linkType: hard - "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.4 resolution: "@types/istanbul-lib-coverage@npm:2.0.4" @@ -12988,13 +13083,6 @@ __metadata: languageName: node linkType: hard -"@types/json5@npm:^0.0.29": - version: 0.0.29 - resolution: "@types/json5@npm:0.0.29" - checksum: 10/4e5aed58cabb2bbf6f725da13421aa50a49abb6bc17bfab6c31b8774b073fa7b50d557c61f961a09a85f6056151190f8ac95f13f5b48136ba5841f7d4484ec56 - languageName: node - linkType: hard - "@types/jsonfile@npm:*": version: 6.1.1 resolution: "@types/jsonfile@npm:6.1.1" @@ -13270,6 +13358,15 @@ __metadata: languageName: node linkType: hard +"@types/pbkdf2@npm:^3.0.0": + version: 3.1.0 + resolution: "@types/pbkdf2@npm:3.1.0" + dependencies: + "@types/node": "npm:*" + checksum: 10/d15024b1957c21cf3b8887329d9bd8dfde754cf13a09d76ae25f1391cfc62bb8b8d7b760773c5dbaa748172fba8b3e0c3dbe962af6ccbd69b76df12a48dfba40 + languageName: node + linkType: hard + "@types/pdfkit@npm:*": version: 0.12.6 resolution: "@types/pdfkit@npm:0.12.6" @@ -13496,6 +13593,15 @@ __metadata: languageName: node linkType: hard +"@types/secp256k1@npm:^4.0.1": + version: 4.0.3 + resolution: "@types/secp256k1@npm:4.0.3" + dependencies: + "@types/node": "npm:*" + checksum: 10/aa8176f3fb9a9f37189592425cb6bfec4ffcf3dc397f2bfd8e3acd06be25f5213cbc0df01f541c7cc955b906a61befd5c1092d46adc62e489970bfebf4409e1d + languageName: node + linkType: hard + "@types/semver@npm:^7.3.4, @types/semver@npm:^7.5.6, @types/semver@npm:^7.5.8": version: 7.5.8 resolution: "@types/semver@npm:7.5.8" @@ -13577,13 +13683,6 @@ __metadata: languageName: node linkType: hard -"@types/supports-color@npm:^8.0.0": - version: 8.1.3 - resolution: "@types/supports-color@npm:8.1.3" - checksum: 10/f5a3ca4aa94ac9d45beae8aa06dcba45e6d56b77999707a2708b54a9b042f84c68e619b10ef6e4b6f447f801824adebb9ed4d7a82c0b5d5d7bf29d5ff34d53a9 - languageName: node - linkType: hard - "@types/tar@npm:^6.1.11": version: 6.1.11 resolution: "@types/tar@npm:6.1.11" @@ -13615,7 +13714,7 @@ __metadata: languageName: node linkType: hard -"@types/unist@npm:^2, @types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2": +"@types/unist@npm:^2, @types/unist@npm:^2.0.0": version: 2.0.10 resolution: "@types/unist@npm:2.0.10" checksum: 10/e2924e18dedf45f68a5c6ccd6015cd62f1643b1b43baac1854efa21ae9e70505db94290434a23da1137d9e31eb58e54ca175982005698ac37300a1c889f6c4aa @@ -13707,15 +13806,6 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:8.5.3": - version: 8.5.3 - resolution: "@types/ws@npm:8.5.3" - dependencies: - "@types/node": "npm:*" - checksum: 10/08aac698ce6480b532d8311f790a8744ae489ccdd98f374cfe4b8245855439825c64b031abcbba4f30fb280da6cc2b02a4e261e16341d058ffaeecaa24ba2bd3 - languageName: node - linkType: hard - "@types/ws@npm:^7.2.0, @types/ws@npm:^7.4.4": version: 7.4.7 resolution: "@types/ws@npm:7.4.7" @@ -13775,122 +13865,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/eslint-plugin@npm:8.8.1" - dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/type-utils": "npm:8.8.1" - "@typescript-eslint/utils": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.3.1" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^1.3.0" - peerDependencies: - "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/6d45d7c3b2993f9d4130794596b029e72646f69581741ff2032b33f5c5d6b46c241b854556d04f769c2ef491e117c7d73013a07d74de3a0e0b557e648bc82a9c - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/parser@npm:8.8.1" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/typescript-estree": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/f19e9be6e8d3e4b574d5f2b1d7e23e3594ea8d5f0b2bd2e59d2fd237bd0a379597f4b7ba466b7e290c5f3c7bce044107a73b20159c17dc54a4cc6b2ca9470b4b - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/scope-manager@npm:8.8.1" - dependencies: - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" - checksum: 10/ab86b533d0cadaa3f325404ae8cda2c1c8e0b820d7b2265ad376a233bb073aa89783a8d20c2effa77552426f38405edaa71e4aa6a2676613ae8dec0e1f1ba061 - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/type-utils@npm:8.8.1" - dependencies: - "@typescript-eslint/typescript-estree": "npm:8.8.1" - "@typescript-eslint/utils": "npm:8.8.1" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/3aed62459e68a49f468004d966c914457db2288979234a9452043bff6d5ac7f2d46490fe13f4bb06fd91af085a50e6ac63b69eb66f9a27ee477f958af4738587 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/types@npm:8.8.1" - checksum: 10/5ac571810f24a266e1d46a8ce2a6665498fddf757a70eeeec959c993991f72d06a2bee7b848a6b27db958f7771034d8169a77117fd6ca7ed2c3166da9d27396b - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/typescript-estree@npm:8.8.1" - dependencies: - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/b569cd362c5f68cf0e1ca53a85bf78c989f10fe4b680423d47c6089bef7cb60b3ed10927232f57dd666e457e43259cec9415da54f2c7b2425062d7acd2e7c98e - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:8.8.1, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0": - version: 8.8.1 - resolution: "@typescript-eslint/utils@npm:8.8.1" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/typescript-estree": "npm:8.8.1" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - checksum: 10/8ecd827af49d3c69ebe65283e5a4e6b44b48f24392319ed9336b8eec47e84fcbcc3e1b5f855ed6b782996cfc0cd289a0a14e40dd69234fd60eeee0a29047bde5 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/visitor-keys@npm:8.8.1" - dependencies: - "@typescript-eslint/types": "npm:8.8.1" - eslint-visitor-keys: "npm:^3.4.3" - checksum: 10/b5bfb4c9a98d3320639abcfd5aae52dd9c8af477743c5e324ceee1a9ea5f101e0ff7da3de08d3ef66e57854a86e155359bafff13f184493db9e0dffaf9e363c7 - languageName: node - linkType: hard - "@uiw/codemirror-extensions-basic-setup@npm:4.23.0": version: 4.23.0 resolution: "@uiw/codemirror-extensions-basic-setup@npm:4.23.0" @@ -13936,7 +13910,7 @@ __metadata: languageName: node linkType: hard -"@ungap/structured-clone@npm:^1.0.0, @ungap/structured-clone@npm:^1.2.0": +"@ungap/structured-clone@npm:^1.0.0": version: 1.2.0 resolution: "@ungap/structured-clone@npm:1.2.0" checksum: 10/c6fe89a505e513a7592e1438280db1c075764793a2397877ff1351721fe8792a966a5359769e30242b3cd023f2efb9e63ca2ca88019d73b564488cc20e3eab12 @@ -14429,26 +14403,6 @@ __metadata: languageName: node linkType: hard -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 - languageName: node - linkType: hard - -"abitype@npm:0.7.1": - version: 0.7.1 - resolution: "abitype@npm:0.7.1" - peerDependencies: - typescript: ">=4.9.4" - zod: ^3 >=3.19.1 - peerDependenciesMeta: - zod: - optional: true - checksum: 10/deee4a18c9c7218ab2e5e57e07e4cb3e2f3e785657be364d098ab0587cd552c4fbb41e1bdddbc6fa52387f51ebd181461fe70a13127cc77091655775fdfb18fe - languageName: node - linkType: hard - "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -14458,6 +14412,13 @@ __metadata: languageName: node linkType: hard +"abortcontroller-polyfill@npm:^1.7.5": + version: 1.7.5 + resolution: "abortcontroller-polyfill@npm:1.7.5" + checksum: 10/aac398f7fc076235fe731adaffd2c319fe6c1527af8ca561890242d5396351350e0705726478778dc90326a69a4c044890c156fe867cba7f3ffeb670f8665a51 + languageName: node + linkType: hard + "accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:^1.3.8, accepts@npm:~1.3.4, accepts@npm:~1.3.5, accepts@npm:~1.3.7, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" @@ -14636,7 +14597,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.0, ajv@npm:^6.12.4, ajv@npm:^6.12.5": +"ajv@npm:^6.10.0, ajv@npm:^6.12.0, ajv@npm:^6.12.3, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -14994,15 +14955,6 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:~5.1.3": - version: 5.1.3 - resolution: "aria-query@npm:5.1.3" - dependencies: - deep-equal: "npm:^2.0.5" - checksum: 10/e5da608a7c4954bfece2d879342b6c218b6b207e2d9e5af270b5e38ef8418f02d122afdc948b68e32649b849a38377785252059090d66fa8081da95d1609c0d2 - languageName: node - linkType: hard - "array-back@npm:^3.0.1, array-back@npm:^3.1.0": version: 3.1.0 resolution: "array-back@npm:3.1.0" @@ -15010,7 +14962,7 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.0, array-buffer-byte-length@npm:^1.0.1": +"array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: @@ -15041,20 +14993,6 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.6, array-includes@npm:^3.1.8": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - is-string: "npm:^1.0.7" - checksum: 10/290b206c9451f181fb2b1f79a3bf1c0b66bb259791290ffbada760c79b284eef6f5ae2aeb4bcff450ebc9690edd25732c4c73a3c2b340fcc0f4563aed83bf488 - languageName: node - linkType: hard - "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -15062,58 +15000,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlast@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlast@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10/7dffcc665aa965718ad6de7e17ac50df0c5e38798c0a5bf9340cf24feb8594df6ec6f3fcbe714c1577728a1b18b5704b15669474b27bceeca91ef06ce2a23c31 - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10/7c5c821f357cd53ab6cc305de8086430dd8d7a2485db87b13f843e868055e9582b1fd338f02338f67fc3a1603ceaf9610dd2a470b0b506f9d18934780f95b246 - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flat@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/d9d2f6f27584de92ec7995bc931103e6de722cd2498bdbfc4cba814fc3e52f056050a93be883018811f7c0a35875f5056584a0e940603a5e5934f0279896aebe - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flatmap@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10/33f20006686e0cbe844fde7fd290971e8366c6c5e3380681c2df15738b1df766dd02c7784034aeeb3b037f65c496ee54de665388288edb323a2008bb550f77ea - languageName: node - linkType: hard - "array.prototype.reduce@npm:^1.0.4": version: 1.0.4 resolution: "array.prototype.reduce@npm:1.0.4" @@ -15127,19 +15013,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.tosorted@npm:^1.1.4": - version: 1.1.4 - resolution: "array.prototype.tosorted@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" - es-errors: "npm:^1.3.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10/874694e5d50e138894ff5b853e639c29b0aa42bbd355acda8e8e9cd337f1c80565f21edc15e8c727fa4c0877fd9d8783c575809e440cc4d2d19acaa048bf967d - languageName: node - linkType: hard - "arraybuffer.prototype.slice@npm:^1.0.3": version: 1.0.3 resolution: "arraybuffer.prototype.slice@npm:1.0.3" @@ -15239,13 +15112,6 @@ __metadata: languageName: node linkType: hard -"ast-types-flow@npm:^0.0.8": - version: 0.0.8 - resolution: "ast-types-flow@npm:0.0.8" - checksum: 10/85a1c24af4707871c27cfe456bd2ff7fcbe678f3d1c878ac968c9557735a171a17bdcc8c8f903ceab3fc3c49d5b3da2194e6ab0a6be7fec0e133fa028f21ba1b - languageName: node - linkType: hard - "ast-types@npm:0.15.2": version: 0.15.2 resolution: "ast-types@npm:0.15.2" @@ -15393,13 +15259,6 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:^4.10.0": - version: 4.10.0 - resolution: "axe-core@npm:4.10.0" - checksum: 10/6158489a7a704edc98bd30ed56243b8280c5203c60e095a2feb5bff95d9bf2ef10becfe359b1cbc8601338418999c26cf4eee704181dedbcb487f4d63a06d8d5 - languageName: node - linkType: hard - "axios-retry@npm:^3.4.0": version: 3.9.1 resolution: "axios-retry@npm:3.9.1" @@ -15430,21 +15289,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.3.5, axios@npm:^1.6.0, axios@npm:^1.6.1, axios@npm:^1.6.7, axios@npm:^1.7.7": - version: 1.7.7 - resolution: "axios@npm:1.7.7" +"axios@npm:^1.3.5, axios@npm:^1.6.0, axios@npm:^1.6.1, axios@npm:^1.6.7, axios@npm:^1.7.2": + version: 1.7.2 + resolution: "axios@npm:1.7.2" dependencies: follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" proxy-from-env: "npm:^1.1.0" - checksum: 10/7f875ea13b9298cd7b40fd09985209f7a38d38321f1118c701520939de2f113c4ba137832fe8e3f811f99a38e12c8225481011023209a77b0c0641270e20cde1 - languageName: node - linkType: hard - -"axobject-query@npm:^4.1.0": - version: 4.1.0 - resolution: "axobject-query@npm:4.1.0" - checksum: 10/e275dea9b673f71170d914f2d2a18be5d57d8d29717b629e7fedd907dcc2ebdc7a37803ff975874810bd423f222f299c020d28fde40a146f537448bf6bfecb6e + checksum: 10/6ae80dda9736bb4762ce717f1a26ff997d94672d3a5799ad9941c24d4fb019c1dff45be8272f08d1975d7950bac281f3ba24aff5ecd49ef5a04d872ec428782f languageName: node linkType: hard @@ -15741,7 +15593,7 @@ __metadata: languageName: node linkType: hard -"base-x@npm:3.0.9, base-x@npm:^3.0.2, base-x@npm:^3.0.6": +"base-x@npm:3.0.9, base-x@npm:^3.0.2, base-x@npm:^3.0.6, base-x@npm:^3.0.8": version: 3.0.9 resolution: "base-x@npm:3.0.9" dependencies: @@ -15986,7 +15838,7 @@ __metadata: languageName: node linkType: hard -"blakejs@npm:^1.2.1": +"blakejs@npm:^1.1.0, blakejs@npm:^1.2.1": version: 1.2.1 resolution: "blakejs@npm:1.2.1" checksum: 10/0638b1bd058b21892633929c43005aa6a4cc4b2ac5b338a146c3c076622f1b360795bd7a4d1f077c9b01863ed2df0c1504a81c5b520d164179120434847e6cd7 @@ -16016,7 +15868,7 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:^3.5.4, bluebird@npm:^3.5.5, bluebird@npm:^3.7.2": +"bluebird@npm:^3.5.0, bluebird@npm:^3.5.4, bluebird@npm:^3.5.5, bluebird@npm:^3.7.2": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 10/007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 @@ -16030,7 +15882,7 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.3, body-parser@npm:^1.19.0": +"body-parser@npm:1.20.3, body-parser@npm:^1.16.0, body-parser@npm:^1.19.0": version: 1.20.3 resolution: "body-parser@npm:1.20.3" dependencies: @@ -16221,7 +16073,7 @@ __metadata: languageName: node linkType: hard -"browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4": +"browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": version: 1.2.0 resolution: "browserify-aes@npm:1.2.0" dependencies: @@ -16371,7 +16223,7 @@ __metadata: languageName: node linkType: hard -"bs58check@npm:2.1.2": +"bs58check@npm:2.1.2, bs58check@npm:^2.1.2": version: 2.1.2 resolution: "bs58check@npm:2.1.2" dependencies: @@ -16467,6 +16319,13 @@ __metadata: languageName: node linkType: hard +"buffer-to-arraybuffer@npm:^0.0.5": + version: 0.0.5 + resolution: "buffer-to-arraybuffer@npm:0.0.5" + checksum: 10/df16190b3bf0ecdf70e761514ecc8dbb9b8310e7c2882c800dc6d2d06859b9c85baa67f4cad53aaf9f0cbdd936f4b1c09f549eed8ae33c1c1258d7b6b1648cde + languageName: node + linkType: hard + "buffer-xor@npm:^1.0.3": version: 1.0.3 resolution: "buffer-xor@npm:1.0.3" @@ -16505,7 +16364,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.1.0, buffer@npm:^5.4.3, buffer@npm:^5.5.0, buffer@npm:^5.6.0": +"buffer@npm:^5.0.5, buffer@npm:^5.1.0, buffer@npm:^5.4.3, buffer@npm:^5.5.0, buffer@npm:^5.6.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -16769,6 +16628,13 @@ __metadata: languageName: node linkType: hard +"cacheable-lookup@npm:^6.0.4": + version: 6.1.0 + resolution: "cacheable-lookup@npm:6.1.0" + checksum: 10/9b37d31fba27ff244254294814dfdad69e3d257cb283932f58823141de5043a46d35339fa81ec40fdbb5d76d1578324258995f41a4fd37ed05d4e9b54823802e + languageName: node + linkType: hard + "cacheable-request@npm:^7.0.2": version: 7.0.2 resolution: "cacheable-request@npm:7.0.2" @@ -17074,13 +16940,6 @@ __metadata: languageName: node linkType: hard -"character-entities-legacy@npm:^1.0.0": - version: 1.1.4 - resolution: "character-entities-legacy@npm:1.1.4" - checksum: 10/fe03a82c154414da3a0c8ab3188e4237ec68006cbcd681cf23c7cfb9502a0e76cd30ab69a2e50857ca10d984d57de3b307680fff5328ccd427f400e559c3a811 - languageName: node - linkType: hard - "character-entities-legacy@npm:^3.0.0": version: 3.0.0 resolution: "character-entities-legacy@npm:3.0.0" @@ -17088,13 +16947,6 @@ __metadata: languageName: node linkType: hard -"character-entities@npm:^1.0.0": - version: 1.2.4 - resolution: "character-entities@npm:1.2.4" - checksum: 10/7c11641c48d1891aaba7bc800d4500804d91a28f46d64e88c001c38e6ab2e7eae28873a77ae16e6c55d24cac35ddfbb15efe56c3012b86684a3c4e95c70216b7 - languageName: node - linkType: hard - "character-entities@npm:^2.0.0": version: 2.0.2 resolution: "character-entities@npm:2.0.2" @@ -17102,13 +16954,6 @@ __metadata: languageName: node linkType: hard -"character-reference-invalid@npm:^1.0.0": - version: 1.1.4 - resolution: "character-reference-invalid@npm:1.1.4" - checksum: 10/812ebc5e6e8d08fd2fa5245ae78c1e1a4bea4692e93749d256a135c4a442daf931ca18e067cc61ff4a58a419eae52677126a0bc4f05a511290427d60d3057805 - languageName: node - linkType: hard - "character-reference-invalid@npm:^2.0.0": version: 2.0.1 resolution: "character-reference-invalid@npm:2.0.1" @@ -17176,7 +17021,7 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^1.1.1": +"chownr@npm:^1.1.1, chownr@npm:^1.1.4": version: 1.1.4 resolution: "chownr@npm:1.1.4" checksum: 10/115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d @@ -17253,10 +17098,16 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^4.0.0": - version: 4.0.0 - resolution: "ci-info@npm:4.0.0" - checksum: 10/c983bb7ff1b06648f4a47432201abbd58291147d8ab5043dbb5c03e1a0e3fb2347f40d29b66a3044f28ffeb5dade01ac35aa6bd4e7464a44d9a49a3d7532415a +"cids@npm:^0.7.1": + version: 0.7.5 + resolution: "cids@npm:0.7.5" + dependencies: + buffer: "npm:^5.5.0" + class-is: "npm:^1.1.0" + multibase: "npm:~0.6.0" + multicodec: "npm:^1.0.0" + multihashes: "npm:~0.4.15" + checksum: 10/b916b0787e238dd9f84fb5e155333cadf07fd7ad34ea8dbd47f98bb618eecc9c70760767c0966d0eae73050c4fa6080fdc387e515565b009d2126253c7775fac languageName: node linkType: hard @@ -17277,6 +17128,13 @@ __metadata: languageName: node linkType: hard +"class-is@npm:^1.1.0": + version: 1.1.0 + resolution: "class-is@npm:1.1.0" + checksum: 10/8147a3e4ce86eb103d78621d665b87e8e33fcb3f54932fdca894b8222820903b43b2f6b4335d8822104702a5dc904c8f187127fdea4e7d48d905488b35c9e6a7 + languageName: node + linkType: hard + "classnames@npm:^2.2.6": version: 2.3.2 resolution: "classnames@npm:2.3.2" @@ -17829,18 +17687,6 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "concat-stream@npm:2.0.0" - dependencies: - buffer-from: "npm:^1.0.0" - inherits: "npm:^2.0.3" - readable-stream: "npm:^3.0.2" - typedarray: "npm:^0.0.6" - checksum: 10/250e576d0617e7c58e1c4b2dd6fe69560f316d2c962a409f9f3aac794018499ddb31948b1e4296f217008e124cd5d526432097745157fe504b5d9f3dc469eadb - languageName: node - linkType: hard - "concurrently@npm:^8.0.0, concurrently@npm:^8.2.2": version: 8.2.2 resolution: "concurrently@npm:8.2.2" @@ -18008,6 +17854,17 @@ __metadata: languageName: node linkType: hard +"content-hash@npm:^2.5.2": + version: 2.5.2 + resolution: "content-hash@npm:2.5.2" + dependencies: + cids: "npm:^0.7.1" + multicodec: "npm:^0.5.5" + multihashes: "npm:^0.4.15" + checksum: 10/7c5d05052aecead40a1bbdd251468a6cc9bf4c48b361b4f138d60e6d876dc3028da6142031578ddc42e44e0024f91cc01b7a539bdb0bf7187e36bec15052e02d + languageName: node + linkType: hard + "content-type@npm:^1.0.4, content-type@npm:^1.0.5, content-type@npm:~1.0.4, content-type@npm:~1.0.5": version: 1.0.5 resolution: "content-type@npm:1.0.5" @@ -18129,7 +17986,7 @@ __metadata: languageName: node linkType: hard -"cors@npm:^2.8.5, cors@npm:~2.8.5": +"cors@npm:^2.8.1, cors@npm:^2.8.5, cors@npm:~2.8.5": version: 2.8.5 resolution: "cors@npm:2.8.5" dependencies: @@ -18200,7 +18057,7 @@ __metadata: languageName: node linkType: hard -"crc-32@npm:^1.2.0, crc-32@npm:^1.2.2": +"crc-32@npm:^1.2.0": version: 1.2.2 resolution: "crc-32@npm:1.2.2" bin: @@ -18338,7 +18195,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -19180,13 +19037,6 @@ __metadata: languageName: node linkType: hard -"damerau-levenshtein@npm:^1.0.8": - version: 1.0.8 - resolution: "damerau-levenshtein@npm:1.0.8" - checksum: 10/f4eba1c90170f96be25d95fa3857141b5f81e254f7e4d530da929217b19990ea9a0390fc53d3c1cafac9152fda78e722ea4894f765cf6216be413b5af1fbf821 - languageName: node - linkType: hard - "dash-ast@npm:^2.0.1": version: 2.0.1 resolution: "dash-ast@npm:2.0.1" @@ -19343,7 +19193,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.1.0, debug@npm:^3.2.7": +"debug@npm:^3.1.0": version: 3.2.7 resolution: "debug@npm:3.2.7" dependencies: @@ -19389,13 +19239,22 @@ __metadata: languageName: node linkType: hard -"decode-uri-component@npm:^0.2.2": +"decode-uri-component@npm:^0.2.0, decode-uri-component@npm:^0.2.2": version: 0.2.2 resolution: "decode-uri-component@npm:0.2.2" checksum: 10/17a0e5fa400bf9ea84432226e252aa7b5e72793e16bf80b907c99b46a799aeacc139ec20ea57121e50c7bd875a1a4365928f884e92abf02e21a5a13790a0f33e languageName: node linkType: hard +"decompress-response@npm:^3.3.0": + version: 3.3.0 + resolution: "decompress-response@npm:3.3.0" + dependencies: + mimic-response: "npm:^1.0.0" + checksum: 10/952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 + languageName: node + linkType: hard + "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -19454,32 +19313,6 @@ __metadata: languageName: node linkType: hard -"deep-equal@npm:^2.0.5": - version: 2.2.3 - resolution: "deep-equal@npm:2.2.3" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.5" - es-get-iterator: "npm:^1.1.3" - get-intrinsic: "npm:^1.2.2" - is-arguments: "npm:^1.1.1" - is-array-buffer: "npm:^3.0.2" - is-date-object: "npm:^1.0.5" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - isarray: "npm:^2.0.5" - object-is: "npm:^1.1.5" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.1" - side-channel: "npm:^1.0.4" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.13" - checksum: 10/1ce49d0b71d0f14d8ef991a742665eccd488dfc9b3cada069d4d7a86291e591c92d2589c832811dea182b4015736b210acaaebce6184be356c1060d176f5a05f - languageName: node - linkType: hard - "deep-equal@npm:~1.0.1": version: 1.0.1 resolution: "deep-equal@npm:1.0.1" @@ -19494,7 +19327,7 @@ __metadata: languageName: node linkType: hard -"deep-is@npm:^0.1.3, deep-is@npm:~0.1.3": +"deep-is@npm:~0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" checksum: 10/ec12d074aef5ae5e81fa470b9317c313142c9e8e2afe3f8efa124db309720db96d1d222b82b84c834e5f87e7a614b44a4684b6683583118b87c833b3be40d4d8 @@ -19570,7 +19403,7 @@ __metadata: languageName: node linkType: hard -"defer-to-connect@npm:^2.0.0": +"defer-to-connect@npm:^2.0.0, defer-to-connect@npm:^2.0.1": version: 2.0.1 resolution: "defer-to-connect@npm:2.0.1" checksum: 10/8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b @@ -20036,15 +19869,6 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:^2.1.0": - version: 2.1.0 - resolution: "doctrine@npm:2.1.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10/555684f77e791b17173ea86e2eea45ef26c22219cb64670669c4f4bebd26dbc95cd90ec1f4159e9349a6bb9eb892ce4dde8cd0139e77bedd8bf4518238618474 - languageName: node - linkType: hard - "doctrine@npm:^3.0.0": version: 3.0.0 resolution: "doctrine@npm:3.0.0" @@ -20114,6 +19938,13 @@ __metadata: languageName: node linkType: hard +"dom-walk@npm:^0.1.0": + version: 0.1.2 + resolution: "dom-walk@npm:0.1.2" + checksum: 10/19eb0ce9c6de39d5e231530685248545d9cd2bd97b2cb3486e0bfc0f2a393a9addddfd5557463a932b52fdfcf68ad2a619020cd2c74a5fe46fbecaa8e80872f3 + languageName: node + linkType: hard + "domain-browser@npm:^1.1.1": version: 1.2.0 resolution: "domain-browser@npm:1.2.0" @@ -20467,7 +20298,22 @@ __metadata: languageName: node linkType: hard -"elliptic@npm:^6.4.0, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4": +"elliptic@npm:6.5.4": + version: 6.5.4 + resolution: "elliptic@npm:6.5.4" + dependencies: + bn.js: "npm:^4.11.9" + brorand: "npm:^1.1.0" + hash.js: "npm:^1.0.0" + hmac-drbg: "npm:^1.0.1" + inherits: "npm:^2.0.4" + minimalistic-assert: "npm:^1.0.1" + minimalistic-crypto-utils: "npm:^1.0.1" + checksum: 10/2cd7ff4b69720dbb2ca1ca650b2cf889d1df60c96d4a99d331931e4fe21e45a7f3b8074e86618ca7e56366c4b6258007f234f9d61d9b0c87bbbc8ea990b99e94 + languageName: node + linkType: hard + +"elliptic@npm:^6.4.0, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4, elliptic@npm:^6.5.7": version: 6.5.7 resolution: "elliptic@npm:6.5.7" dependencies: @@ -20499,13 +20345,6 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^10.2.1": - version: 10.3.0 - resolution: "emoji-regex@npm:10.3.0" - checksum: 10/b9b084ebe904f13bb4b66ee4c29fb41a7a4a1165adcc33c1ce8056c0194b882cc91ebdc782f1a779b5d7ea7375c5064643a7734893d7c657b44c5c6b9d7bf1e7 - languageName: node - linkType: hard - "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -20672,7 +20511,7 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.3.1, error-ex@npm:^1.3.2": +"error-ex@npm:^1.3.1": version: 1.3.2 resolution: "error-ex@npm:1.3.2" dependencies: @@ -20700,7 +20539,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.19.2, es-abstract@npm:^1.20.1, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": +"es-abstract@npm:^1.19.2, es-abstract@npm:^1.20.1, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0": version: 1.23.3 resolution: "es-abstract@npm:1.23.3" dependencies: @@ -20777,45 +20616,6 @@ __metadata: languageName: node linkType: hard -"es-get-iterator@npm:^1.1.3": - version: 1.1.3 - resolution: "es-get-iterator@npm:1.1.3" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.3" - has-symbols: "npm:^1.0.3" - is-arguments: "npm:^1.1.1" - is-map: "npm:^2.0.2" - is-set: "npm:^2.0.2" - is-string: "npm:^1.0.7" - isarray: "npm:^2.0.5" - stop-iteration-iterator: "npm:^1.0.0" - checksum: 10/bc2194befbe55725f9489098626479deee3c801eda7e83ce0dff2eb266a28dc808edb9b623ff01d31ebc1328f09d661333d86b601036692c2e3c1a6942319433 - languageName: node - linkType: hard - -"es-iterator-helpers@npm:^1.0.19": - version: 1.1.0 - resolution: "es-iterator-helpers@npm:1.1.0" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" - es-errors: "npm:^1.3.0" - es-set-tostringtag: "npm:^2.0.3" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - globalthis: "npm:^1.0.4" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - iterator.prototype: "npm:^1.1.3" - safe-array-concat: "npm:^1.1.2" - checksum: 10/7aa8f17934abbebeb8cd3ba5135c1f107c568470f4c4b798f457f3d0039caaece1f9d7addbe1fc01079ea2f2ce8f922b736ee914c37ea99dbef22c86b006d338 - languageName: node - linkType: hard - "es-module-lexer@npm:^1.2.1, es-module-lexer@npm:^1.4.1": version: 1.4.1 resolution: "es-module-lexer@npm:1.4.1" @@ -20843,15 +20643,6 @@ __metadata: languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": - version: 1.0.2 - resolution: "es-shim-unscopables@npm:1.0.2" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10/6d3bf91f658a27cc7217cd32b407a0d714393a84d125ad576319b9e83a893bea165cf41270c29e9ceaa56d3cf41608945d7e2a2c31fd51c0009b0c31402b91c7 - languageName: node - linkType: hard - "es-to-primitive@npm:^1.2.1": version: 1.2.1 resolution: "es-to-primitive@npm:1.2.1" @@ -21394,219 +21185,6 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-node@npm:^0.3.9": - version: 0.3.9 - resolution: "eslint-import-resolver-node@npm:0.3.9" - dependencies: - debug: "npm:^3.2.7" - is-core-module: "npm:^2.13.0" - resolve: "npm:^1.22.4" - checksum: 10/d52e08e1d96cf630957272e4f2644dcfb531e49dcfd1edd2e07e43369eb2ec7a7d4423d417beee613201206ff2efa4eb9a582b5825ee28802fc7c71fcd53ca83 - languageName: node - linkType: hard - -"eslint-mdx@npm:^3.1.5": - version: 3.1.5 - resolution: "eslint-mdx@npm:3.1.5" - dependencies: - acorn: "npm:^8.11.3" - acorn-jsx: "npm:^5.3.2" - espree: "npm:^9.6.1" - estree-util-visit: "npm:^2.0.0" - remark-mdx: "npm:^3.0.0" - remark-parse: "npm:^11.0.0" - remark-stringify: "npm:^11.0.0" - synckit: "npm:^0.9.0" - tslib: "npm:^2.6.2" - unified: "npm:^11.0.4" - unified-engine: "npm:^11.2.0" - unist-util-visit: "npm:^5.0.0" - uvu: "npm:^0.5.6" - vfile: "npm:^6.0.1" - peerDependencies: - eslint: ">=8.0.0" - checksum: 10/8218476bf4dde702d7d0bd846163f407fef2c44de5315e08206cb025734f73a29baae7588f32e0c6745ea56bf10fe495ee6efc240083b79b47565b0bcb3096cb - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.12.0": - version: 2.12.0 - resolution: "eslint-module-utils@npm:2.12.0" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10/dd27791147eca17366afcb83f47d6825b6ce164abb256681e5de4ec1d7e87d8605641eb869298a0dbc70665e2446dbcc2f40d3e1631a9475dd64dd23d4ca5dee - languageName: node - linkType: hard - -"eslint-plugin-chai-friendly@npm:^1.0.1": - version: 1.0.1 - resolution: "eslint-plugin-chai-friendly@npm:1.0.1" - peerDependencies: - eslint: ">=3.0.0" - checksum: 10/459c0162b606d290bc6b10caa7bd7b67a3ce3d37d98ee1b9b91646842553d7282887858efd20cb6a6b8cbaa42746e83258244a32bce0e1d038ebe5559e747730 - languageName: node - linkType: hard - -"eslint-plugin-cypress@npm:^3.5.0": - version: 3.5.0 - resolution: "eslint-plugin-cypress@npm:3.5.0" - dependencies: - globals: "npm:^13.20.0" - peerDependencies: - eslint: ">=7" - checksum: 10/c7797902d76331e4b243f8c97c8ecde451e6959af6ec54c07faf54e095ad64e64a588dc3bb466cb172f63219ea07fd6efb2bcb6ae63a64dd9c067edbd222327e - languageName: node - linkType: hard - -"eslint-plugin-import@npm:^2.31.0": - version: 2.31.0 - resolution: "eslint-plugin-import@npm:2.31.0" - dependencies: - "@rtsao/scc": "npm:^1.1.0" - array-includes: "npm:^3.1.8" - array.prototype.findlastindex: "npm:^1.2.5" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.12.0" - hasown: "npm:^2.0.2" - is-core-module: "npm:^2.15.1" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - object.groupby: "npm:^1.0.3" - object.values: "npm:^1.2.0" - semver: "npm:^6.3.1" - string.prototype.trimend: "npm:^1.0.8" - tsconfig-paths: "npm:^3.15.0" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - checksum: 10/6b76bd009ac2db0615d9019699d18e2a51a86cb8c1d0855a35fb1b418be23b40239e6debdc6e8c92c59f1468ed0ea8d7b85c817117a113d5cc225be8a02ad31c - languageName: node - linkType: hard - -"eslint-plugin-jest@npm:^28.8.3": - version: 28.8.3 - resolution: "eslint-plugin-jest@npm:28.8.3" - dependencies: - "@typescript-eslint/utils": "npm:^6.0.0 || ^7.0.0 || ^8.0.0" - peerDependencies: - "@typescript-eslint/eslint-plugin": ^6.0.0 || ^7.0.0 || ^8.0.0 - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - jest: "*" - peerDependenciesMeta: - "@typescript-eslint/eslint-plugin": - optional: true - jest: - optional: true - checksum: 10/3f1798c61e143981eefcfb2fbc4b2e5b329378ebaafdec6485f443c79ee0d3304e9409e8ea8ce089ac15abb4e700d8d838e0a1da29feb528d77a2b3cce6989ec - languageName: node - linkType: hard - -"eslint-plugin-jsx-a11y@npm:^6.10.0": - version: 6.10.0 - resolution: "eslint-plugin-jsx-a11y@npm:6.10.0" - dependencies: - aria-query: "npm:~5.1.3" - array-includes: "npm:^3.1.8" - array.prototype.flatmap: "npm:^1.3.2" - ast-types-flow: "npm:^0.0.8" - axe-core: "npm:^4.10.0" - axobject-query: "npm:^4.1.0" - damerau-levenshtein: "npm:^1.0.8" - emoji-regex: "npm:^9.2.2" - es-iterator-helpers: "npm:^1.0.19" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^3.3.5" - language-tags: "npm:^1.0.9" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - safe-regex-test: "npm:^1.0.3" - string.prototype.includes: "npm:^2.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - checksum: 10/d66e5e541a5a747d8a7ffd6e45b79c9da416b42be5891c259f3d9af63ed8897b5ff67373b00682ecdfc04fe2a2bc9df9c23b2f1749a228221d2dae0914543303 - languageName: node - linkType: hard - -"eslint-plugin-local-rules@npm:^3.0.2": - version: 3.0.2 - resolution: "eslint-plugin-local-rules@npm:3.0.2" - checksum: 10/6ec5a9e6d5a0a8f56ed22307761d1bc2bebee75ebfc9518e0eeed0d334c45c84713aff1969eefa5ac0fdeca63e427fee53b3912333caa9e70cc1f87e4c198f11 - languageName: node - linkType: hard - -"eslint-plugin-markdown@npm:^3.0.1": - version: 3.0.1 - resolution: "eslint-plugin-markdown@npm:3.0.1" - dependencies: - mdast-util-from-markdown: "npm:^0.8.5" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10/1408ccd48f6358dfc528a0fe7abc1f468c913144c74392cc3ed4926ed6556e7c87524a0a1b8a40174135e872979d213d05dcd3edc90a3ad555f12feb31c3c87d - languageName: node - linkType: hard - -"eslint-plugin-mdx@npm:^3.1.5": - version: 3.1.5 - resolution: "eslint-plugin-mdx@npm:3.1.5" - dependencies: - eslint-mdx: "npm:^3.1.5" - eslint-plugin-markdown: "npm:^3.0.1" - remark-mdx: "npm:^3.0.0" - remark-parse: "npm:^11.0.0" - remark-stringify: "npm:^11.0.0" - tslib: "npm:^2.6.2" - unified: "npm:^11.0.4" - vfile: "npm:^6.0.1" - peerDependencies: - eslint: ">=8.0.0" - checksum: 10/56c4cffb0e7931ed5200084878367f9ee2fc7c1c910509dbea32f227ff911b1451b36b7500bf393ef9b7ca67c8ca7825bbd0e6694bb35360c0182c974581fa80 - languageName: node - linkType: hard - -"eslint-plugin-react-hooks@npm:^4.6.2": - version: 4.6.2 - resolution: "eslint-plugin-react-hooks@npm:4.6.2" - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - checksum: 10/5a0680941f34e70cf505bcb6082df31a3e445d193ee95a88ff3483041eb944f4cefdaf7e81b0eb1feb4eeceee8c7c6ddb8a2a6e8c4c0388514a42e16ac7b7a69 - languageName: node - linkType: hard - -"eslint-plugin-react@npm:^7.37.1": - version: 7.37.1 - resolution: "eslint-plugin-react@npm:7.37.1" - dependencies: - array-includes: "npm:^3.1.8" - array.prototype.findlast: "npm:^1.2.5" - array.prototype.flatmap: "npm:^1.3.2" - array.prototype.tosorted: "npm:^1.1.4" - doctrine: "npm:^2.1.0" - es-iterator-helpers: "npm:^1.0.19" - estraverse: "npm:^5.3.0" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" - minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.8" - object.fromentries: "npm:^2.0.8" - object.values: "npm:^1.2.0" - prop-types: "npm:^15.8.1" - resolve: "npm:^2.0.0-next.5" - semver: "npm:^6.3.1" - string.prototype.matchall: "npm:^4.0.11" - string.prototype.repeat: "npm:^1.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - checksum: 10/a7b9cf2c43255844ad0c9d4e3758a8c2b687a2ce9a09f4161ab245581d5d2d91b37742e541c88aa9ce368ec6c860e23dc78c15117f3fc1cdc433847038e8346b - languageName: node - linkType: hard - "eslint-scope@npm:5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" @@ -21617,71 +21195,13 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.2.2": - version: 7.2.2 - resolution: "eslint-scope@npm:7.2.2" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10/5c660fb905d5883ad018a6fea2b49f3cb5b1cbf2cd4bd08e98646e9864f9bc2c74c0839bed2d292e90a4a328833accc197c8f0baed89cbe8d605d6f918465491 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.4.1": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b languageName: node linkType: hard -"eslint@npm:^8.57.1": - version: 8.57.1 - resolution: "eslint@npm:8.57.1" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.57.1" - "@humanwhocodes/config-array": "npm:^0.13.0" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - "@ungap/structured-clone": "npm:^1.2.0" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" - debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" - bin: - eslint: bin/eslint.js - checksum: 10/5504fa24879afdd9f9929b2fbfc2ee9b9441a3d464efd9790fbda5f05738858530182029f13323add68d19fec749d3ab4a70320ded091ca4432b1e9cc4ed104c - languageName: node - linkType: hard - "esm@npm:^3.2.25": version: 3.2.25 resolution: "esm@npm:3.2.25" @@ -21701,7 +21221,7 @@ __metadata: languageName: node linkType: hard -"espree@npm:^9.0.0, espree@npm:^9.6.0, espree@npm:^9.6.1": +"espree@npm:^9.0.0": version: 9.6.1 resolution: "espree@npm:9.6.1" dependencies: @@ -21732,15 +21252,6 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.2": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10/c587fb8ec9ed83f2b1bc97cf2f6854cc30bf784a79d62ba08c6e358bf22280d69aee12827521cf38e69ae9761d23fb7fde593ce315610f85655c139d99b05e5a - languageName: node - linkType: hard - "esrecurse@npm:^4.3.0": version: 4.3.0 resolution: "esrecurse@npm:4.3.0" @@ -21757,7 +21268,7 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" checksum: 10/37cbe6e9a68014d34dbdc039f90d0baf72436809d02edffcc06ba3c2a12eb298048f877511353b130153e532aac8d68ba78430c0dd2f44806ebc7c014b01585e @@ -21805,13 +21316,6 @@ __metadata: languageName: node linkType: hard -"estree-util-is-identifier-name@npm:^3.0.0": - version: 3.0.0 - resolution: "estree-util-is-identifier-name@npm:3.0.0" - checksum: 10/cdc9187614fdb269d714eddfdf72c270a79daa9ed51e259bb78527983be6dcc68da6a914ccc41175b662194c67fbd2a1cd262f85fac1eef7111cfddfaf6f77f8 - languageName: node - linkType: hard - "estree-util-to-js@npm:^1.1.0": version: 1.2.0 resolution: "estree-util-to-js@npm:1.2.0" @@ -21842,16 +21346,6 @@ __metadata: languageName: node linkType: hard -"estree-util-visit@npm:^2.0.0": - version: 2.0.0 - resolution: "estree-util-visit@npm:2.0.0" - dependencies: - "@types/estree-jsx": "npm:^1.0.0" - "@types/unist": "npm:^3.0.0" - checksum: 10/e3c39d34c8b42fc2067dfa64d460f754b43cca4b573b031a5e5bb185e02c4efc753353197815bbb094b8149a781ab76f18116bec8056b5ff375162e68bffa0bd - languageName: node - linkType: hard - "estree-walker@npm:^2.0.2": version: 2.0.2 resolution: "estree-walker@npm:2.0.2" @@ -21889,6 +21383,41 @@ __metadata: languageName: node linkType: hard +"eth-ens-namehash@npm:2.0.8": + version: 2.0.8 + resolution: "eth-ens-namehash@npm:2.0.8" + dependencies: + idna-uts46-hx: "npm:^2.3.1" + js-sha3: "npm:^0.5.7" + checksum: 10/098c04378b0b998191b4bcd2f1a59be976946bbb80cea7bc2a6d1df3a035e061b2fd120b16bf41558c4beb2dd846433742058b091b20195e4b0e1fc64b67979f + languageName: node + linkType: hard + +"eth-lib@npm:0.2.8": + version: 0.2.8 + resolution: "eth-lib@npm:0.2.8" + dependencies: + bn.js: "npm:^4.11.6" + elliptic: "npm:^6.4.0" + xhr-request-promise: "npm:^0.1.2" + checksum: 10/85a6f1673c7106252864fdf6c86973d6bfdf454b238ee8d07d8f642599fa9f390129b6fbd060742a5be7c197be924951535a0c0ebb3e912cfd9f2130b64f74ce + languageName: node + linkType: hard + +"eth-lib@npm:^0.1.26": + version: 0.1.29 + resolution: "eth-lib@npm:0.1.29" + dependencies: + bn.js: "npm:^4.11.6" + elliptic: "npm:^6.4.0" + nano-json-stream-parser: "npm:^0.1.2" + servify: "npm:^0.1.12" + ws: "npm:^3.0.0" + xhr-request-promise: "npm:^0.1.2" + checksum: 10/ee4fcd8400fad0b637c25bd0a4483a54c986b78ac6c4d7fd2a5df12b41468abfa50a66684e315e16894b870d2fcf5d2273a81f429f89c460b275bf4477365f60 + languageName: node + linkType: hard + "eth-phishing-detect@npm:^1.2.0": version: 1.2.0 resolution: "eth-phishing-detect@npm:1.2.0" @@ -21898,15 +21427,70 @@ __metadata: languageName: node linkType: hard -"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2, ethereum-cryptography@npm:^2.2.1": - version: 2.2.1 - resolution: "ethereum-cryptography@npm:2.2.1" +"ethereum-bloom-filters@npm:^1.0.6": + version: 1.0.10 + resolution: "ethereum-bloom-filters@npm:1.0.10" dependencies: - "@noble/curves": "npm:1.4.2" - "@noble/hashes": "npm:1.4.0" - "@scure/bip32": "npm:1.4.0" - "@scure/bip39": "npm:1.3.0" - checksum: 10/ab123bbfe843500ac2d645ce9edc4bc814962ffb598db6bf8bf01fbecac656e6c81ff4cf2472f1734844bbcbad2bf658d8b699cb7248d768e0f06ae13ecf43b8 + js-sha3: "npm:^0.8.0" + checksum: 10/dc4191c5d810db864ace106886f340b541bf03f1ad3249459ac630cab9c191f1e45c03e935887cca903cca884326e3ac97acfef0a083c7e1a004108f5991f9ba + languageName: node + linkType: hard + +"ethereum-cryptography@npm:^0.1.3": + version: 0.1.3 + resolution: "ethereum-cryptography@npm:0.1.3" + dependencies: + "@types/pbkdf2": "npm:^3.0.0" + "@types/secp256k1": "npm:^4.0.1" + blakejs: "npm:^1.1.0" + browserify-aes: "npm:^1.2.0" + bs58check: "npm:^2.1.2" + create-hash: "npm:^1.2.0" + create-hmac: "npm:^1.1.7" + hash.js: "npm:^1.1.7" + keccak: "npm:^3.0.0" + pbkdf2: "npm:^3.0.17" + randombytes: "npm:^2.1.0" + safe-buffer: "npm:^5.1.2" + scrypt-js: "npm:^3.0.0" + secp256k1: "npm:^4.0.1" + setimmediate: "npm:^1.0.5" + checksum: 10/975e476782746acd97d5b37366801ae622a52fb31e5d83f600804be230a61ef7b9d289dcecd9c308fb441967caf3a6e3768dd7c8add6441fcc60c398175d5a96 + languageName: node + linkType: hard + +"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2, ethereum-cryptography@npm:^2.1.3": + version: 2.1.3 + resolution: "ethereum-cryptography@npm:2.1.3" + dependencies: + "@noble/curves": "npm:1.3.0" + "@noble/hashes": "npm:1.3.3" + "@scure/bip32": "npm:1.3.3" + "@scure/bip39": "npm:1.2.2" + checksum: 10/cc5aa9a4368dc1dd7680ba921957c098ced7b3d7dbb1666334013ab2f8d4cd25a785ad84e66fd9f5c5a9b6de337930ea24ff8c722938f36a9c00cec597ca16b5 + languageName: node + linkType: hard + +"ethereumjs-util@npm:^7.1.5": + version: 7.1.5 + resolution: "ethereumjs-util@npm:7.1.5" + dependencies: + "@types/bn.js": "npm:^5.1.0" + bn.js: "npm:^5.1.2" + create-hash: "npm:^1.1.2" + ethereum-cryptography: "npm:^0.1.3" + rlp: "npm:^2.2.4" + checksum: 10/f28fc1ebb8f35bf9e418f76f51be737d94d603b912c3e014c4e87cd45ccd1b10bdfef764c8f152574b57e9faa260a18773cbc110f9e0a754d6b3730699e54dc9 + languageName: node + linkType: hard + +"ethjs-unit@npm:0.1.6": + version: 0.1.6 + resolution: "ethjs-unit@npm:0.1.6" + dependencies: + bn.js: "npm:4.11.6" + number-to-bn: "npm:1.7.0" + checksum: 10/35086cb671806992ec36d5dd43ab67e68ad7a9237e42c0e963f9081c88e40147cda86c1a258b0a3180bf2b7bc1960e607c5bcaefdb2196e0f3564acf73276189 languageName: node linkType: hard @@ -21941,6 +21525,13 @@ __metadata: languageName: node linkType: hard +"eventemitter3@npm:4.0.4": + version: 4.0.4 + resolution: "eventemitter3@npm:4.0.4" + checksum: 10/6a85beb36d7ff2363de71aa19a17c24ecde7a92f706347891befc5901793e41ac847ce9c04c96dc0f5095384890cc737e64f21ed334e75c523d2352056fc6a9e + languageName: node + linkType: hard + "eventemitter3@npm:^4.0.0, eventemitter3@npm:^4.0.1, eventemitter3@npm:^4.0.4": version: 4.0.7 resolution: "eventemitter3@npm:4.0.7" @@ -22569,7 +22160,7 @@ __metadata: languageName: node linkType: hard -"express@npm:^4.17.3, express@npm:^4.18.2, express@npm:^4.21.0": +"express@npm:^4.14.0, express@npm:^4.17.3, express@npm:^4.18.2, express@npm:^4.21.0": version: 4.21.0 resolution: "express@npm:4.21.0" dependencies: @@ -23103,15 +22694,6 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^6.0.1": - version: 6.0.1 - resolution: "file-entry-cache@npm:6.0.1" - dependencies: - flat-cache: "npm:^3.0.4" - checksum: 10/099bb9d4ab332cb93c48b14807a6918a1da87c45dce91d4b61fd40e6505d56d0697da060cb901c729c90487067d93c9243f5da3dc9c41f0358483bfdebca736b - languageName: node - linkType: hard - "file-entry-cache@npm:^8.0.0": version: 8.0.0 resolution: "file-entry-cache@npm:8.0.0" @@ -23449,6 +23031,13 @@ __metadata: languageName: node linkType: hard +"form-data-encoder@npm:1.7.1": + version: 1.7.1 + resolution: "form-data-encoder@npm:1.7.1" + checksum: 10/1abc9059d991b105ba4122a36f9b5c17fd0af77ce8fa59a826a5b9ce56d616807e7780963616dd7e7906ec7aa1ba28cfb7c9defd9747ad10484e039a2b946cca + languageName: node + linkType: hard + "form-data@npm:4.0.0, form-data@npm:^4.0.0": version: 4.0.0 resolution: "form-data@npm:4.0.0" @@ -23593,6 +23182,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^4.0.2": + version: 4.0.3 + resolution: "fs-extra@npm:4.0.3" + dependencies: + graceful-fs: "npm:^4.1.2" + jsonfile: "npm:^4.0.0" + universalify: "npm:^0.1.0" + checksum: 10/c1ab28ac6b19a1e37f9c0fb3a233b7333bd4d12ea2a514b5469ba956f022fa0e2aefa3b351d1117b80ed45495bb779427c8f64727c150bb1599c2ce9ab3b42ac + languageName: node + linkType: hard + "fs-extra@npm:^7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" @@ -23627,6 +23227,15 @@ __metadata: languageName: node linkType: hard +"fs-minipass@npm:^1.2.7": + version: 1.2.7 + resolution: "fs-minipass@npm:1.2.7" + dependencies: + minipass: "npm:^2.6.0" + checksum: 10/6a2d39963eaad748164530ffab49606d0f3462c7867748521af3b7039d13689be533636d50a04e8ba6bd327d4d2e899d0907f8830d1161fe2db467d59cc46dc3 + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -23711,7 +23320,7 @@ __metadata: languageName: node linkType: hard -"function.prototype.name@npm:^1.1.5, function.prototype.name@npm:^1.1.6": +"function.prototype.name@npm:^1.1.6": version: 1.1.6 resolution: "function.prototype.name@npm:1.1.6" dependencies: @@ -23788,7 +23397,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -24208,6 +23817,16 @@ __metadata: languageName: node linkType: hard +"global@npm:~4.4.0": + version: 4.4.0 + resolution: "global@npm:4.4.0" + dependencies: + min-document: "npm:^2.19.0" + process: "npm:^0.11.10" + checksum: 10/9c057557c8f5a5bcfbeb9378ba4fe2255d04679452be504608dd5f13b54edf79f7be1db1031ea06a4ec6edd3b9f5f17d2d172fb47e6c69dae57fd84b7e72b77f + languageName: node + linkType: hard + "globals@npm:^11.1.0": version: 11.12.0 resolution: "globals@npm:11.12.0" @@ -24215,16 +23834,7 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.19.0, globals@npm:^13.20.0": - version: 13.24.0 - resolution: "globals@npm:13.24.0" - dependencies: - type-fest: "npm:^0.20.2" - checksum: 10/62c5b1997d06674fc7191d3e01e324d3eda4d65ac9cc4e78329fa3b5c4fd42a0e1c8722822497a6964eee075255ce21ccf1eec2d83f92ef3f06653af4d0ee28e - languageName: node - linkType: hard - -"globalthis@npm:^1.0.1, globalthis@npm:^1.0.3, globalthis@npm:^1.0.4": +"globalthis@npm:^1.0.1, globalthis@npm:^1.0.3": version: 1.0.4 resolution: "globalthis@npm:1.0.4" dependencies: @@ -24333,6 +23943,27 @@ __metadata: languageName: node linkType: hard +"got@npm:12.1.0": + version: 12.1.0 + resolution: "got@npm:12.1.0" + dependencies: + "@sindresorhus/is": "npm:^4.6.0" + "@szmarczak/http-timer": "npm:^5.0.1" + "@types/cacheable-request": "npm:^6.0.2" + "@types/responselike": "npm:^1.0.0" + cacheable-lookup: "npm:^6.0.4" + cacheable-request: "npm:^7.0.2" + decompress-response: "npm:^6.0.0" + form-data-encoder: "npm:1.7.1" + get-stream: "npm:^6.0.1" + http2-wrapper: "npm:^2.1.10" + lowercase-keys: "npm:^3.0.0" + p-cancelable: "npm:^3.0.0" + responselike: "npm:^2.0.0" + checksum: 10/d1dab1884b14d1f59d10005ee3834faf6d9b43530c7faf603c176d35dceb2b8e0e2e01b9e0d4fc320409ac1b4d958196ff928dc6df0ddd0a3e7a254aa9edfd45 + languageName: node + linkType: hard + "got@npm:^11.7.0, got@npm:^11.8.5, got@npm:^11.8.6": version: 11.8.6 resolution: "got@npm:11.8.6" @@ -24359,13 +23990,6 @@ __metadata: languageName: node linkType: hard -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10/6dd60dba97007b21e3a829fab3f771803cc1292977fe610e240ea72afd67e5690ac9eeaafc4a99710e78962e5936ab5a460787c2a1180f1cb0ccfac37d29f897 - languageName: node - linkType: hard - "graphql-tag@npm:^2.10.1": version: 2.12.6 resolution: "graphql-tag@npm:2.12.6" @@ -24453,6 +24077,23 @@ __metadata: languageName: node linkType: hard +"har-schema@npm:^2.0.0": + version: 2.0.0 + resolution: "har-schema@npm:2.0.0" + checksum: 10/d8946348f333fb09e2bf24cc4c67eabb47c8e1d1aa1c14184c7ffec1140a49ec8aa78aa93677ae452d71d5fc0fdeec20f0c8c1237291fc2bcb3f502a5d204f9b + languageName: node + linkType: hard + +"har-validator@npm:~5.1.3": + version: 5.1.5 + resolution: "har-validator@npm:5.1.5" + dependencies: + ajv: "npm:^6.12.3" + har-schema: "npm:^2.0.0" + checksum: 10/b998a7269ca560d7f219eedc53e2c664cd87d487e428ae854a6af4573fc94f182fe9d2e3b92ab968249baec7ebaf9ead69cf975c931dc2ab282ec182ee988280 + languageName: node + linkType: hard + "has-ansi@npm:^2.0.0": version: 2.0.0 resolution: "has-ansi@npm:2.0.0" @@ -24560,7 +24201,7 @@ __metadata: languageName: node linkType: hard -"hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": +"hash.js@npm:1.1.7, hash.js@npm:^1.0.0, hash.js@npm:^1.0.3, hash.js@npm:^1.1.7": version: 1.1.7 resolution: "hash.js@npm:1.1.7" dependencies: @@ -25201,6 +24842,13 @@ __metadata: languageName: node linkType: hard +"http-https@npm:^1.0.0": + version: 1.0.0 + resolution: "http-https@npm:1.0.0" + checksum: 10/fd3c0802982b1e951a03206690271dacb641b39b80d1820e95095db923d8f63cc7f0df1259969400c8487787a2a46f7b33383c0427ec780a78131b153741b144 + languageName: node + linkType: hard + "http-parser-js@npm:>=0.5.1": version: 0.5.8 resolution: "http-parser-js@npm:0.5.8" @@ -25271,6 +24919,17 @@ __metadata: languageName: node linkType: hard +"http-signature@npm:~1.2.0": + version: 1.2.0 + resolution: "http-signature@npm:1.2.0" + dependencies: + assert-plus: "npm:^1.0.0" + jsprim: "npm:^1.2.2" + sshpk: "npm:^1.7.0" + checksum: 10/2ff7112e6b0d8f08b382dfe705078c655501f2ddd76cf589d108445a9dd388a0a9be928c37108261519a7f53e6bbd1651048d74057b804807cce1ec49e87a95b + languageName: node + linkType: hard + "http-signature@npm:~1.3.6": version: 1.3.6 resolution: "http-signature@npm:1.3.6" @@ -25292,6 +24951,16 @@ __metadata: languageName: node linkType: hard +"http2-wrapper@npm:^2.1.10": + version: 2.2.1 + resolution: "http2-wrapper@npm:2.2.1" + dependencies: + quick-lru: "npm:^5.1.1" + resolve-alpn: "npm:^1.2.0" + checksum: 10/e7a5ac6548318e83fc0399cd832cdff6bbf902b165d211cad47a56ee732922e0aa1107246dd884b12532a1c4649d27c4d44f2480911c65202e93c90bde8fa29d + languageName: node + linkType: hard + "https-browserify@npm:^1.0.0": version: 1.0.0 resolution: "https-browserify@npm:1.0.0" @@ -25417,6 +25086,15 @@ __metadata: languageName: node linkType: hard +"idna-uts46-hx@npm:^2.3.1": + version: 2.3.1 + resolution: "idna-uts46-hx@npm:2.3.1" + dependencies: + punycode: "npm:2.1.0" + checksum: 10/5cb65dbc375d42ce9b38dab6e2a7f41b8c059f9a88d236bc9ca32084485f5f22fec11ea5b4e6b61239448148443c3f825fddaa5f298d22e12ecfe845de71a807 + languageName: node + linkType: hard + "ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" @@ -25424,7 +25102,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.0.0, ignore@npm:^5.0.4, ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.0, ignore@npm:^5.3.1": +"ignore@npm:^5.0.4, ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.0, ignore@npm:^5.3.1": version: 5.3.2 resolution: "ignore@npm:5.3.2" checksum: 10/cceb6a457000f8f6a50e1196429750d782afce5680dd878aa4221bd79972d68b3a55b4b1458fc682be978f4d3c6a249046aa0880637367216444ab7b014cfc98 @@ -25502,13 +25180,6 @@ __metadata: languageName: node linkType: hard -"import-meta-resolve@npm:^4.0.0": - version: 4.0.0 - resolution: "import-meta-resolve@npm:4.0.0" - checksum: 10/73f0f1d68f7280cb4415e3a212a6e5d57fbfe61ab6f467df3dad5361529fbd89ac7d8ea2b694412b74985a4226d218ad3fb22fd8f06f5429beda521dc9f0229c - languageName: node - linkType: hard - "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -25575,13 +25246,6 @@ __metadata: languageName: node linkType: hard -"ini@npm:^4.1.0": - version: 4.1.2 - resolution: "ini@npm:4.1.2" - checksum: 10/383396e45965bdd32ac18d405db1726d51e43e5c792325b4247736c4a402cdc0b448cc9e85960f0c13f1ab603a14a11ed4c9c796a385aced6d9045756a19a469 - languageName: node - linkType: hard - "inline-style-parser@npm:0.1.1": version: 0.1.1 resolution: "inline-style-parser@npm:0.1.1" @@ -25637,7 +25301,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.7": +"internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -25771,13 +25435,6 @@ __metadata: languageName: node linkType: hard -"is-alphabetical@npm:^1.0.0": - version: 1.0.4 - resolution: "is-alphabetical@npm:1.0.4" - checksum: 10/6508cce44fd348f06705d377b260974f4ce68c74000e7da4045f0d919e568226dc3ce9685c5a2af272195384df6930f748ce9213fc9f399b5d31b362c66312cb - languageName: node - linkType: hard - "is-alphabetical@npm:^2.0.0": version: 2.0.1 resolution: "is-alphabetical@npm:2.0.1" @@ -25785,16 +25442,6 @@ __metadata: languageName: node linkType: hard -"is-alphanumerical@npm:^1.0.0": - version: 1.0.4 - resolution: "is-alphanumerical@npm:1.0.4" - dependencies: - is-alphabetical: "npm:^1.0.0" - is-decimal: "npm:^1.0.0" - checksum: 10/e2e491acc16fcf5b363f7c726f666a9538dba0a043665740feb45bba1652457a73441e7c5179c6768a638ed396db3437e9905f403644ec7c468fb41f4813d03f - languageName: node - linkType: hard - "is-alphanumerical@npm:^2.0.0": version: 2.0.1 resolution: "is-alphanumerical@npm:2.0.1" @@ -25805,7 +25452,7 @@ __metadata: languageName: node linkType: hard -"is-arguments@npm:^1.0.4, is-arguments@npm:^1.1.1": +"is-arguments@npm:^1.0.4": version: 1.1.1 resolution: "is-arguments@npm:1.1.1" dependencies: @@ -25815,7 +25462,7 @@ __metadata: languageName: node linkType: hard -"is-array-buffer@npm:^3.0.2, is-array-buffer@npm:^3.0.4": +"is-array-buffer@npm:^3.0.4": version: 3.0.4 resolution: "is-array-buffer@npm:3.0.4" dependencies: @@ -25839,15 +25486,6 @@ __metadata: languageName: node linkType: hard -"is-async-function@npm:^2.0.0": - version: 2.0.0 - resolution: "is-async-function@npm:2.0.0" - dependencies: - has-tostringtag: "npm:^1.0.0" - checksum: 10/2cf336fbf8cba3badcf526aa3d10384c30bab32615ac4831b74492eb4e843ccb7d8439a119c27f84bcf217d72024e611b1373f870f433b48f3fa57d3d1b863f1 - languageName: node - linkType: hard - "is-bigint@npm:^1.0.1": version: 1.0.4 resolution: "is-bigint@npm:1.0.4" @@ -25917,7 +25555,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1": +"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.0": version: 2.15.1 resolution: "is-core-module@npm:2.15.1" dependencies: @@ -25935,7 +25573,7 @@ __metadata: languageName: node linkType: hard -"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": +"is-date-object@npm:^1.0.1": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" dependencies: @@ -25944,13 +25582,6 @@ __metadata: languageName: node linkType: hard -"is-decimal@npm:^1.0.0": - version: 1.0.4 - resolution: "is-decimal@npm:1.0.4" - checksum: 10/ed483a387517856dc395c68403a10201fddcc1b63dc56513fbe2fe86ab38766120090ecdbfed89223d84ca8b1cd28b0641b93cb6597b6e8f4c097a7c24e3fb96 - languageName: node - linkType: hard - "is-decimal@npm:^2.0.0": version: 2.0.1 resolution: "is-decimal@npm:2.0.1" @@ -25990,13 +25621,6 @@ __metadata: languageName: node linkType: hard -"is-empty@npm:^1.0.0": - version: 1.2.0 - resolution: "is-empty@npm:1.2.0" - checksum: 10/dc80e0a8ad5439d98d128d126fe69e5dcd6b474e29753107bcfe82fc7d628c9da618d48bb24878a7891f231696405ad0a854dfe3cfc955c23d24e80d9e252e62 - languageName: node - linkType: hard - "is-extendable@npm:^0.1.0": version: 0.1.1 resolution: "is-extendable@npm:0.1.1" @@ -26018,15 +25642,6 @@ __metadata: languageName: node linkType: hard -"is-finalizationregistry@npm:^1.0.2": - version: 1.0.2 - resolution: "is-finalizationregistry@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10/1b8e9e1bf2075e862315ef9d38ce6d39c43ca9d81d46f73b34473506992f4b0fbaadb47ec9b420a5e76afe3f564d9f1f0d9b552ef272cc2395e0f21d743c9c29 - languageName: node - linkType: hard - "is-fullwidth-code-point@npm:^2.0.0": version: 2.0.0 resolution: "is-fullwidth-code-point@npm:2.0.0" @@ -26041,6 +25656,13 @@ __metadata: languageName: node linkType: hard +"is-function@npm:^1.0.1": + version: 1.0.2 + resolution: "is-function@npm:1.0.2" + checksum: 10/7d564562e07b4b51359547d3ccc10fb93bb392fd1b8177ae2601ee4982a0ece86d952323fc172a9000743a3971f09689495ab78a1d49a9b14fc97a7e28521dc0 + languageName: node + linkType: hard + "is-generator-fn@npm:^2.0.0": version: 2.1.0 resolution: "is-generator-fn@npm:2.1.0" @@ -26048,7 +25670,7 @@ __metadata: languageName: node linkType: hard -"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7": +"is-generator-function@npm:^1.0.7": version: 1.0.10 resolution: "is-generator-function@npm:1.0.10" dependencies: @@ -26066,7 +25688,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": +"is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -26082,10 +25704,10 @@ __metadata: languageName: node linkType: hard -"is-hexadecimal@npm:^1.0.0": - version: 1.0.4 - resolution: "is-hexadecimal@npm:1.0.4" - checksum: 10/a452e047587b6069332d83130f54d30da4faf2f2ebaa2ce6d073c27b5703d030d58ed9e0b729c8e4e5b52c6f1dab26781bb77b7bc6c7805f14f320e328ff8cd5 +"is-hex-prefixed@npm:1.0.0": + version: 1.0.0 + resolution: "is-hex-prefixed@npm:1.0.0" + checksum: 10/5ac58e6e528fb029cc43140f6eeb380fad23d0041cc23154b87f7c9a1b728bcf05909974e47248fd0b7fcc11ba33cf7e58d64804883056fabd23e2b898be41de languageName: node linkType: hard @@ -26140,13 +25762,6 @@ __metadata: languageName: node linkType: hard -"is-map@npm:^2.0.1, is-map@npm:^2.0.2": - version: 2.0.3 - resolution: "is-map@npm:2.0.3" - checksum: 10/8de7b41715b08bcb0e5edb0fb9384b80d2d5bcd10e142188f33247d19ff078abaf8e9b6f858e2302d8d05376a26a55cd23a3c9f8ab93292b02fcd2cc9e4e92bb - languageName: node - linkType: hard - "is-nan@npm:^1.3.2": version: 1.3.2 resolution: "is-nan@npm:1.3.2" @@ -26208,7 +25823,7 @@ __metadata: languageName: node linkType: hard -"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": +"is-path-inside@npm:^3.0.2": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" checksum: 10/abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 @@ -26299,13 +25914,6 @@ __metadata: languageName: node linkType: hard -"is-set@npm:^2.0.1, is-set@npm:^2.0.2": - version: 2.0.3 - resolution: "is-set@npm:2.0.3" - checksum: 10/5685df33f0a4a6098a98c72d94d67cad81b2bc72f1fb2091f3d9283c4a1c582123cd709145b02a9745f0ce6b41e3e43f1c944496d1d74d4ea43358be61308669 - languageName: node - linkType: hard - "is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": version: 1.0.3 resolution: "is-shared-array-buffer@npm:1.0.3" @@ -26372,7 +25980,7 @@ __metadata: languageName: node linkType: hard -"is-typedarray@npm:~1.0.0": +"is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c @@ -26395,13 +26003,6 @@ __metadata: languageName: node linkType: hard -"is-weakmap@npm:^2.0.1": - version: 2.0.1 - resolution: "is-weakmap@npm:2.0.1" - checksum: 10/289fa4e8ba1bdda40ca78481266f6925b7c46a85599e6a41a77010bf91e5a24dfb660db96863bbf655ecdbda0ab517204d6a4e0c151dbec9d022c556321f3776 - languageName: node - linkType: hard - "is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" @@ -26411,16 +26012,6 @@ __metadata: languageName: node linkType: hard -"is-weakset@npm:^2.0.1": - version: 2.0.2 - resolution: "is-weakset@npm:2.0.2" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.1" - checksum: 10/8f2ddb9639716fd7936784e175ea1183c5c4c05274c34f34f6a53175313cb1c9c35a8b795623306995e2f7cc8f25aa46302f15a2113e51c5052d447be427195c - languageName: node - linkType: hard - "is-windows@npm:^1.0.1": version: 1.0.2 resolution: "is-windows@npm:1.0.2" @@ -26609,19 +26200,6 @@ __metadata: languageName: node linkType: hard -"iterator.prototype@npm:^1.1.3": - version: 1.1.3 - resolution: "iterator.prototype@npm:1.1.3" - dependencies: - define-properties: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - reflect.getprototypeof: "npm:^1.0.4" - set-function-name: "npm:^2.0.1" - checksum: 10/1a2a508d3baac121b76c834404ff552d1bb96a173b1d74ff947b2c5763840c0b1e5be01be7e2183a19b08e99e38729812668ff1f23b35f6655a366017bc32519 - languageName: node - linkType: hard - "iterm2-version@npm:^4.1.0": version: 4.2.0 resolution: "iterm2-version@npm:4.2.0" @@ -26679,9 +26257,9 @@ __metadata: languageName: node linkType: hard -"jayson@npm:^4.1.1": - version: 4.1.2 - resolution: "jayson@npm:4.1.2" +"jayson@npm:^4.1.0": + version: 4.1.0 + resolution: "jayson@npm:4.1.0" dependencies: "@types/connect": "npm:^3.4.33" "@types/node": "npm:^12.12.54" @@ -26694,10 +26272,10 @@ __metadata: isomorphic-ws: "npm:^4.0.1" json-stringify-safe: "npm:^5.0.1" uuid: "npm:^8.3.2" - ws: "npm:^7.5.10" + ws: "npm:^7.4.5" bin: jayson: bin/jayson.js - checksum: 10/7ad5e80e11ef39b7382509d046546883d2595998aa245768b342bcc0a63843e011e16f02a023d5a78fb74df788b5f97c1e850568fc1b90c138fa4772cc55572c + checksum: 10/d76b3f220e14388007958b8f79e793009d6bc572b6e5ea65848a0f027b324d1950d836468986d7e38ddfb30b660e8b048b459c8bc8456e9b38dbbebc60a563b4 languageName: node linkType: hard @@ -27409,6 +26987,20 @@ __metadata: languageName: node linkType: hard +"js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": + version: 0.8.0 + resolution: "js-sha3@npm:0.8.0" + checksum: 10/a49ac6d3a6bfd7091472a28ab82a94c7fb8544cc584ee1906486536ba1cb4073a166f8c7bb2b0565eade23c5b3a7b8f7816231e0309ab5c549b737632377a20c + languageName: node + linkType: hard + +"js-sha3@npm:^0.5.7": + version: 0.5.7 + resolution: "js-sha3@npm:0.5.7" + checksum: 10/32885c7edb50fca04017bacada8e5315c072d21d3d35e071e9640fc5577e200076a4718e0b2f33d86ab704accb68d2ade44f1e2ca424cc73a5929b9129dab948 + languageName: node + linkType: hard + "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -27693,13 +27285,6 @@ __metadata: languageName: node linkType: hard -"json-parse-even-better-errors@npm:^3.0.0": - version: 3.0.1 - resolution: "json-parse-even-better-errors@npm:3.0.1" - checksum: 10/bf74fa3f715e56699ccd68b80a7d20908de432a3fae2d5aa2ed530a148e9d9ccdf8e6983b93d9966a553aa70dcf003ce3a7ffec2c0ce74d2a6173e3691a426f0 - languageName: node - linkType: hard - "json-schema-deref-sync@npm:^0.13.0": version: 0.13.0 resolution: "json-schema-deref-sync@npm:0.13.0" @@ -27783,13 +27368,6 @@ __metadata: languageName: node linkType: hard -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10/12786c2e2f22c27439e6db0532ba321f1d0617c27ad8cb1c352a0e9249a50182fd1ba8b52a18899291604b0c32eafa8afd09e51203f19109a0537f68db2b652d - languageName: node - linkType: hard - "json-stable-stringify@npm:^1.0.2, json-stable-stringify@npm:^1.1.1": version: 1.1.1 resolution: "json-stable-stringify@npm:1.1.1" @@ -27809,17 +27387,6 @@ __metadata: languageName: node linkType: hard -"json5@npm:^1.0.2": - version: 1.0.2 - resolution: "json5@npm:1.0.2" - dependencies: - minimist: "npm:^1.2.0" - bin: - json5: lib/cli.js - checksum: 10/a78d812dbbd5642c4f637dd130954acfd231b074965871c3e28a5bbd571f099d623ecf9161f1960c4ddf68e0cc98dee8bebfdb94a71ad4551f85a1afc94b63f6 - languageName: node - linkType: hard - "json5@npm:^2.1.2, json5@npm:^2.2.1, json5@npm:^2.2.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" @@ -27914,6 +27481,18 @@ __metadata: languageName: node linkType: hard +"jsprim@npm:^1.2.2": + version: 1.4.2 + resolution: "jsprim@npm:1.4.2" + dependencies: + assert-plus: "npm:1.0.0" + extsprintf: "npm:1.3.0" + json-schema: "npm:0.4.0" + verror: "npm:1.10.0" + checksum: 10/df2bf234eab1b5078d01bcbff3553d50a243f7b5c10a169745efeda6344d62798bd1d85bcca6a8446f3b5d0495e989db45f9de8dae219f0f9796e70e0c776089 + languageName: node + linkType: hard + "jsprim@npm:^2.0.2": version: 2.0.2 resolution: "jsprim@npm:2.0.2" @@ -27940,18 +27519,6 @@ __metadata: languageName: node linkType: hard -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.5": - version: 3.3.5 - resolution: "jsx-ast-utils@npm:3.3.5" - dependencies: - array-includes: "npm:^3.1.6" - array.prototype.flat: "npm:^1.3.1" - object.assign: "npm:^4.1.4" - object.values: "npm:^1.1.6" - checksum: 10/b61d44613687dfe4cc8ad4b4fbf3711bf26c60b8d5ed1f494d723e0808415c59b24a7c0ed8ab10736a40ff84eef38cbbfb68b395e05d31117b44ffc59d31edfc - languageName: node - linkType: hard - "jwa@npm:^1.4.1": version: 1.4.1 resolution: "jwa@npm:1.4.1" @@ -28099,6 +27666,18 @@ __metadata: languageName: node linkType: hard +"keccak@npm:^3.0.0": + version: 3.0.2 + resolution: "keccak@npm:3.0.2" + dependencies: + node-addon-api: "npm:^2.0.0" + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.2.0" + readable-stream: "npm:^3.6.0" + checksum: 10/03f8d513040562f90ae892765431de29de0abf329dec40f1ef8b17eae634d56e283a7aeec5ae62e6ef96b9e8d1601329f2ef5c30a9d6c7baa6062d0f78d11b58 + languageName: node + linkType: hard + "keyboardevent-from-electron-accelerator@npm:^2.0.0": version: 2.0.0 resolution: "keyboardevent-from-electron-accelerator@npm:2.0.0" @@ -28291,22 +27870,6 @@ __metadata: languageName: node linkType: hard -"language-subtag-registry@npm:^0.3.20": - version: 0.3.22 - resolution: "language-subtag-registry@npm:0.3.22" - checksum: 10/5591f4abd775d1ab5945355a5ba894327d2d94c900607bdb69aac1bc5bb921dbeeeb5f616df95e8c0ae875501d19c1cfa0e852ece822121e95048deb34f2b4d2 - languageName: node - linkType: hard - -"language-tags@npm:^1.0.9": - version: 1.0.9 - resolution: "language-tags@npm:1.0.9" - dependencies: - language-subtag-registry: "npm:^0.3.20" - checksum: 10/d3a7c14b694e67f519153d6df6cb200681648d38d623c3bfa9d6a66a5ec5493628acb88e9df5aceef3cf1902ab263a205e7d59ee4cf1d6bb67e707b83538bd6d - languageName: node - linkType: hard - "launch-editor@npm:^2.6.1": version: 2.8.0 resolution: "launch-editor@npm:2.8.0" @@ -28356,16 +27919,6 @@ __metadata: languageName: node linkType: hard -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10/2e4720ff79f21ae08d42374b0a5c2f664c5be8b6c8f565bb4e1315c96ed3a8acaa9de788ffed82d7f2378cf36958573de07ef92336cb5255ed74d08b8318c9ee - languageName: node - linkType: hard - "levn@npm:~0.3.0": version: 0.3.0 resolution: "levn@npm:0.3.0" @@ -28638,7 +28191,7 @@ __metadata: languageName: node linkType: hard -"lines-and-columns@npm:^2.0.3, lines-and-columns@npm:~2.0.3": +"lines-and-columns@npm:~2.0.3": version: 2.0.4 resolution: "lines-and-columns@npm:2.0.4" checksum: 10/81ac2f943f5428a46bd4ea2561c74ba674a107d8e6cc70cd317d16892a36ff3ba0dc6e599aca8b6f8668d26c85288394c6edf7a40e985ca843acab3701b80d4c @@ -28675,16 +28228,6 @@ __metadata: languageName: node linkType: hard -"load-plugin@npm:^6.0.0": - version: 6.0.2 - resolution: "load-plugin@npm:6.0.2" - dependencies: - "@npmcli/config": "npm:^8.0.0" - import-meta-resolve: "npm:^4.0.0" - checksum: 10/3478776e42a58e1cc6ea317865776ed2c78d2610fd90725dc8aefe8e5d91f522f9d43f9806d9262c6b1cce3e579b43a82c4a3c50bd295f2965fa7331f0752eac - languageName: node - linkType: hard - "loader-runner@npm:^4.2.0": version: 4.3.0 resolution: "loader-runner@npm:4.3.0" @@ -29056,6 +28599,13 @@ __metadata: languageName: node linkType: hard +"lowercase-keys@npm:^3.0.0": + version: 3.0.0 + resolution: "lowercase-keys@npm:3.0.0" + checksum: 10/67a3f81409af969bc0c4ca0e76cd7d16adb1e25aa1c197229587eaf8671275c8c067cd421795dbca4c81be0098e4c426a086a05e30de8a9c587b7a13c0c7ccc5 + languageName: node + linkType: hard + "lru-cache@npm:^10.0.0, lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -29393,19 +28943,6 @@ __metadata: languageName: node linkType: hard -"mdast-util-from-markdown@npm:^0.8.5": - version: 0.8.5 - resolution: "mdast-util-from-markdown@npm:0.8.5" - dependencies: - "@types/mdast": "npm:^3.0.0" - mdast-util-to-string: "npm:^2.0.0" - micromark: "npm:~2.11.0" - parse-entities: "npm:^2.0.0" - unist-util-stringify-position: "npm:^2.0.0" - checksum: 10/f42166eb7a3c2a8cf17dffd868a6dfdab6a77d4e4c8f35d7c3d63247a16ddfeae45a59d9f5fa5eacc48d76d82d18cb0157961d03d1732bc616f9ddf3bb450984 - languageName: node - linkType: hard - "mdast-util-from-markdown@npm:^1.0.0, mdast-util-from-markdown@npm:^1.1.0, mdast-util-from-markdown@npm:^1.3.0": version: 1.3.1 resolution: "mdast-util-from-markdown@npm:1.3.1" @@ -29617,20 +29154,6 @@ __metadata: languageName: node linkType: hard -"mdast-util-mdx-expression@npm:^2.0.0": - version: 2.0.0 - resolution: "mdast-util-mdx-expression@npm:2.0.0" - dependencies: - "@types/estree-jsx": "npm:^1.0.0" - "@types/hast": "npm:^3.0.0" - "@types/mdast": "npm:^4.0.0" - devlop: "npm:^1.0.0" - mdast-util-from-markdown: "npm:^2.0.0" - mdast-util-to-markdown: "npm:^2.0.0" - checksum: 10/378f3cbc899e95a07f3889e413ed353597331790fdbd6b9efd24bee4fb1eae11e10d35785a86e3967f301ad445b218a4d4f9af4f1453cc58e7c6a6c02a178a8a - languageName: node - linkType: hard - "mdast-util-mdx-jsx@npm:^2.0.0": version: 2.1.4 resolution: "mdast-util-mdx-jsx@npm:2.1.4" @@ -29651,27 +29174,6 @@ __metadata: languageName: node linkType: hard -"mdast-util-mdx-jsx@npm:^3.0.0": - version: 3.1.2 - resolution: "mdast-util-mdx-jsx@npm:3.1.2" - dependencies: - "@types/estree-jsx": "npm:^1.0.0" - "@types/hast": "npm:^3.0.0" - "@types/mdast": "npm:^4.0.0" - "@types/unist": "npm:^3.0.0" - ccount: "npm:^2.0.0" - devlop: "npm:^1.1.0" - mdast-util-from-markdown: "npm:^2.0.0" - mdast-util-to-markdown: "npm:^2.0.0" - parse-entities: "npm:^4.0.0" - stringify-entities: "npm:^4.0.0" - unist-util-remove-position: "npm:^5.0.0" - unist-util-stringify-position: "npm:^4.0.0" - vfile-message: "npm:^4.0.0" - checksum: 10/b0b457b0fd8b2c71ff4136eac04428e1cfb5ed65918948c899c5907ba41373fdf790f0c29f5aa0125e03bfde02444589a6c59006929a76a176648a053d79931b - languageName: node - linkType: hard - "mdast-util-mdx@npm:^2.0.0": version: 2.0.1 resolution: "mdast-util-mdx@npm:2.0.1" @@ -29685,19 +29187,6 @@ __metadata: languageName: node linkType: hard -"mdast-util-mdx@npm:^3.0.0": - version: 3.0.0 - resolution: "mdast-util-mdx@npm:3.0.0" - dependencies: - mdast-util-from-markdown: "npm:^2.0.0" - mdast-util-mdx-expression: "npm:^2.0.0" - mdast-util-mdx-jsx: "npm:^3.0.0" - mdast-util-mdxjs-esm: "npm:^2.0.0" - mdast-util-to-markdown: "npm:^2.0.0" - checksum: 10/547d928f0d1e60d9087cd8ad301cdf2e1d14b094d2662a00292874b923bcb59323bdad3a29804c7f323ad78f4d3954361bfdaf4a9be765c4e6fe47a815df50c2 - languageName: node - linkType: hard - "mdast-util-mdxjs-esm@npm:^1.0.0": version: 1.3.1 resolution: "mdast-util-mdxjs-esm@npm:1.3.1" @@ -29711,20 +29200,6 @@ __metadata: languageName: node linkType: hard -"mdast-util-mdxjs-esm@npm:^2.0.0": - version: 2.0.1 - resolution: "mdast-util-mdxjs-esm@npm:2.0.1" - dependencies: - "@types/estree-jsx": "npm:^1.0.0" - "@types/hast": "npm:^3.0.0" - "@types/mdast": "npm:^4.0.0" - devlop: "npm:^1.0.0" - mdast-util-from-markdown: "npm:^2.0.0" - mdast-util-to-markdown: "npm:^2.0.0" - checksum: 10/05474226e163a3f407fccb5780b0d8585a95e548e5da4a85227df43f281b940c7941a9a9d4af1be4f885fe554731647addb057a728e87aa1f503ff9cc72c9163 - languageName: node - linkType: hard - "mdast-util-phrasing@npm:^3.0.0": version: 3.0.1 resolution: "mdast-util-phrasing@npm:3.0.1" @@ -29809,13 +29284,6 @@ __metadata: languageName: node linkType: hard -"mdast-util-to-string@npm:^2.0.0": - version: 2.0.0 - resolution: "mdast-util-to-string@npm:2.0.0" - checksum: 10/0b2113ada10e002fbccb014170506dabe2f2ddacaacbe4bc1045c33f986652c5a162732a2c057c5335cdb58419e2ad23e368e5be226855d4d4e280b81c4e9ec2 - languageName: node - linkType: hard - "mdast-util-to-string@npm:^3.0.0, mdast-util-to-string@npm:^3.1.0": version: 3.2.0 resolution: "mdast-util-to-string@npm:3.2.0" @@ -30568,22 +30036,6 @@ __metadata: languageName: node linkType: hard -"micromark-extension-mdx-expression@npm:^3.0.0": - version: 3.0.0 - resolution: "micromark-extension-mdx-expression@npm:3.0.0" - dependencies: - "@types/estree": "npm:^1.0.0" - devlop: "npm:^1.0.0" - micromark-factory-mdx-expression: "npm:^2.0.0" - micromark-factory-space: "npm:^2.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-events-to-acorn: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10/a5592160319d4617362f6b72a6fc44b5570466afa07419d44bcfdd9398a77a5693d7c5f8da7b3ff4682edf6209d4781835f5d2e3166fdf6bba37db456fd2d091 - languageName: node - linkType: hard - "micromark-extension-mdx-jsx@npm:^1.0.0": version: 1.0.5 resolution: "micromark-extension-mdx-jsx@npm:1.0.5" @@ -30602,24 +30054,6 @@ __metadata: languageName: node linkType: hard -"micromark-extension-mdx-jsx@npm:^3.0.0": - version: 3.0.0 - resolution: "micromark-extension-mdx-jsx@npm:3.0.0" - dependencies: - "@types/acorn": "npm:^4.0.0" - "@types/estree": "npm:^1.0.0" - devlop: "npm:^1.0.0" - estree-util-is-identifier-name: "npm:^3.0.0" - micromark-factory-mdx-expression: "npm:^2.0.0" - micromark-factory-space: "npm:^2.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - vfile-message: "npm:^4.0.0" - checksum: 10/65b3a55b4abc9207e12174caba44d05d2f15e7191161ed9536a1dd558eae9ab5a9d67689bff86869e481f33e181d69e792fc0a3c85ecaf9c11bca9111ebdffec - languageName: node - linkType: hard - "micromark-extension-mdx-md@npm:^1.0.0": version: 1.0.1 resolution: "micromark-extension-mdx-md@npm:1.0.1" @@ -30629,15 +30063,6 @@ __metadata: languageName: node linkType: hard -"micromark-extension-mdx-md@npm:^2.0.0": - version: 2.0.0 - resolution: "micromark-extension-mdx-md@npm:2.0.0" - dependencies: - micromark-util-types: "npm:^2.0.0" - checksum: 10/8b364a69b23196075258143c8c19fa58d7d5a91f6811ec0f881b75cf024a4869994be29f84f4d281147275c5a104af8b6a7fcd98abd8fde9f5b534a1acb254e8 - languageName: node - linkType: hard - "micromark-extension-mdxjs-esm@npm:^1.0.0": version: 1.0.5 resolution: "micromark-extension-mdxjs-esm@npm:1.0.5" @@ -30655,23 +30080,6 @@ __metadata: languageName: node linkType: hard -"micromark-extension-mdxjs-esm@npm:^3.0.0": - version: 3.0.0 - resolution: "micromark-extension-mdxjs-esm@npm:3.0.0" - dependencies: - "@types/estree": "npm:^1.0.0" - devlop: "npm:^1.0.0" - micromark-core-commonmark: "npm:^2.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-events-to-acorn: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - unist-util-position-from-estree: "npm:^2.0.0" - vfile-message: "npm:^4.0.0" - checksum: 10/f2e0977f9a65284b0c765d1175d55ec5d1928dae3ae90f65cc36f293cda152a97fe2007977aaf5595b1bc02298b34c96e8ce8b647c9c647c75f1ea53e92d14d2 - languageName: node - linkType: hard - "micromark-extension-mdxjs@npm:^1.0.0": version: 1.0.1 resolution: "micromark-extension-mdxjs@npm:1.0.1" @@ -30688,22 +30096,6 @@ __metadata: languageName: node linkType: hard -"micromark-extension-mdxjs@npm:^3.0.0": - version: 3.0.0 - resolution: "micromark-extension-mdxjs@npm:3.0.0" - dependencies: - acorn: "npm:^8.0.0" - acorn-jsx: "npm:^5.0.0" - micromark-extension-mdx-expression: "npm:^3.0.0" - micromark-extension-mdx-jsx: "npm:^3.0.0" - micromark-extension-mdx-md: "npm:^2.0.0" - micromark-extension-mdxjs-esm: "npm:^3.0.0" - micromark-util-combine-extensions: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10/66e0df7b2db05b9c88796600e354e0753594f06760abfddcac706afcd5754586c9085adb89e15447ce1450e6a5f2fa66a75f6da394e0eceb919e9c364475593e - languageName: node - linkType: hard - "micromark-factory-destination@npm:^1.0.0": version: 1.1.0 resolution: "micromark-factory-destination@npm:1.1.0" @@ -30766,22 +30158,6 @@ __metadata: languageName: node linkType: hard -"micromark-factory-mdx-expression@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-factory-mdx-expression@npm:2.0.1" - dependencies: - "@types/estree": "npm:^1.0.0" - devlop: "npm:^1.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-events-to-acorn: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - unist-util-position-from-estree: "npm:^2.0.0" - vfile-message: "npm:^4.0.0" - checksum: 10/93cf94ccbe73c22d12dfe724fd43eeab326e29e2b776e3fcc13613ad06ad5ae7fe621955445c3254893008cd205d0df9505b778716c4a75fa5bcdcefaf192673 - languageName: node - linkType: hard - "micromark-factory-space@npm:^1.0.0": version: 1.1.0 resolution: "micromark-factory-space@npm:1.1.0" @@ -31002,22 +30378,6 @@ __metadata: languageName: node linkType: hard -"micromark-util-events-to-acorn@npm:^2.0.0": - version: 2.0.2 - resolution: "micromark-util-events-to-acorn@npm:2.0.2" - dependencies: - "@types/acorn": "npm:^4.0.0" - "@types/estree": "npm:^1.0.0" - "@types/unist": "npm:^3.0.0" - devlop: "npm:^1.0.0" - estree-util-visit: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - vfile-message: "npm:^4.0.0" - checksum: 10/475367e716c4d24f2a57464a7f2c8aa507ae36c05b7767fd652895525f3f0a1179ea3219cabccc0f3038bb5e4f9cce5390d530dc56decaa5f1786bda42739810 - languageName: node - linkType: hard - "micromark-util-html-tag-name@npm:^1.0.0": version: 1.2.0 resolution: "micromark-util-html-tag-name@npm:1.2.0" @@ -31192,16 +30552,6 @@ __metadata: languageName: node linkType: hard -"micromark@npm:~2.11.0": - version: 2.11.4 - resolution: "micromark@npm:2.11.4" - dependencies: - debug: "npm:^4.0.0" - parse-entities: "npm:^2.0.0" - checksum: 10/cd3bcbc4c113c74d0897e7787103eb9c92c86974b0af1f87d2079b34f1543511a1e72face3f80c1d47c6614c2eaf860d94eee8c06f80dc48bc2441691576364b - languageName: node - linkType: hard - "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": version: 4.0.5 resolution: "micromatch@npm:4.0.5" @@ -31231,7 +30581,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:^2.1.18, mime-types@npm:^2.1.25, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.16, mime-types@npm:^2.1.18, mime-types@npm:^2.1.25, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -31300,6 +30650,15 @@ __metadata: languageName: node linkType: hard +"min-document@npm:^2.19.0": + version: 2.19.0 + resolution: "min-document@npm:2.19.0" + dependencies: + dom-walk: "npm:^0.1.0" + checksum: 10/4e45a0686c81cc04509989235dc6107e2678a59bb48ce017d3c546d7d9a18d782e341103e66c78081dd04544704e2196e529905c41c2550bca069b69f95f07c8 + languageName: node + linkType: hard + "min-indent@npm:^1.0.1": version: 1.0.1 resolution: "min-indent@npm:1.0.1" @@ -31331,7 +30690,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:2 || 3, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:2 || 3, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -31376,7 +30735,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.0, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -31452,6 +30811,16 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^2.6.0, minipass@npm:^2.9.0": + version: 2.9.0 + resolution: "minipass@npm:2.9.0" + dependencies: + safe-buffer: "npm:^5.1.2" + yallist: "npm:^3.0.0" + checksum: 10/fdd1a77996c184991f8d2ce7c5b3979bec624e2a3225e2e1e140c4038fd65873d7eb90fb29779f8733735a8827b2686f283871a0c74c908f4f7694c56fa8dadf + languageName: node + linkType: hard + "minipass@npm:^3.0.0, minipass@npm:^3.1.1, minipass@npm:^3.1.6": version: 3.3.6 resolution: "minipass@npm:3.3.6" @@ -31482,6 +30851,15 @@ __metadata: languageName: node linkType: hard +"minizlib@npm:^1.3.3": + version: 1.3.3 + resolution: "minizlib@npm:1.3.3" + dependencies: + minipass: "npm:^2.9.0" + checksum: 10/9c2c47e5687d7f896431a9b5585988ef72f848b56c6a974c9489534e8f619388d500d986ef82e1c13aedd46f3a0e81b6a88110cb1b27de7524cc8dabe8885e17 + languageName: node + linkType: hard + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -31509,6 +30887,24 @@ __metadata: languageName: node linkType: hard +"mkdirp-promise@npm:^5.0.1": + version: 5.0.1 + resolution: "mkdirp-promise@npm:5.0.1" + dependencies: + mkdirp: "npm:*" + checksum: 10/31ddc9478216adf6d6bee9ea7ce9ccfe90356d9fcd1dfb18128eac075390b4161356d64c3a7b0a75f9de01a90aadd990a0ec8c7434036563985c4b853a053ee2 + languageName: node + linkType: hard + +"mkdirp@npm:*, mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 10/16fd79c28645759505914561e249b9a1f5fe3362279ad95487a4501e4467abeb714fd35b95307326b8fd03f3c7719065ef11a6f97b7285d7888306d1bd2232ba + languageName: node + linkType: hard + "mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.4, mkdirp@npm:^0.5.5, mkdirp@npm:~0.5.1": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" @@ -31529,15 +30925,6 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^3.0.1": - version: 3.0.1 - resolution: "mkdirp@npm:3.0.1" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10/16fd79c28645759505914561e249b9a1f5fe3362279ad95487a4501e4467abeb714fd35b95307326b8fd03f3c7719065ef11a6f97b7285d7888306d1bd2232ba - languageName: node - linkType: hard - "mlly@npm:^1.2.0, mlly@npm:^1.4.0": version: 1.6.1 resolution: "mlly@npm:1.6.1" @@ -31550,6 +30937,13 @@ __metadata: languageName: node linkType: hard +"mock-fs@npm:^4.1.0": + version: 4.14.0 + resolution: "mock-fs@npm:4.14.0" + checksum: 10/20facbc85bb62df02dbfc946b354fcdd8b2b2aeafef4986adab18dc9a23efccb34ce49d4dac22aaed1a24420fc50c53d77e90984cc888bcce314e18e0e21872a + languageName: node + linkType: hard + "moment@npm:^2.19.3": version: 2.30.1 resolution: "moment@npm:2.30.1" @@ -31628,6 +31022,26 @@ __metadata: languageName: node linkType: hard +"multibase@npm:^0.7.0": + version: 0.7.0 + resolution: "multibase@npm:0.7.0" + dependencies: + base-x: "npm:^3.0.8" + buffer: "npm:^5.5.0" + checksum: 10/a5cbbf00b8aa61bcb92a706e210d8f258e8413cff2893584fedbc316c98bf2a44b8f648b57c124ddfaa29750c3b686ee5ba973cb8da84a896c19d63101b09445 + languageName: node + linkType: hard + +"multibase@npm:~0.6.0": + version: 0.6.1 + resolution: "multibase@npm:0.6.1" + dependencies: + base-x: "npm:^3.0.8" + buffer: "npm:^5.5.0" + checksum: 10/c9e3bf20dc1b109019b94b14a76731ea0a6b0e654a4ef627ba154bfc2b8602ac43b160c44d8245d18cd6a9ed971826efb204230f22b929c8b3e72da13dbc1859 + languageName: node + linkType: hard + "multicast-dns@npm:^7.2.5": version: 7.2.5 resolution: "multicast-dns@npm:7.2.5" @@ -31640,6 +31054,36 @@ __metadata: languageName: node linkType: hard +"multicodec@npm:^0.5.5": + version: 0.5.7 + resolution: "multicodec@npm:0.5.7" + dependencies: + varint: "npm:^5.0.0" + checksum: 10/b61bbf04e1bfff180f77693661b8111bf94f65580abc455e6d83d2240c227d8c2e8af99ca93b6c02500c5da43d16e2b028dbbec1b376a85145a774f542d9ca2c + languageName: node + linkType: hard + +"multicodec@npm:^1.0.0": + version: 1.0.4 + resolution: "multicodec@npm:1.0.4" + dependencies: + buffer: "npm:^5.6.0" + varint: "npm:^5.0.0" + checksum: 10/3a78ac54d3715e6b095a1805f63b4c4e7d5bb4642445691c0c4e6442cad9f97823469634e73ee362ba748596570db1050d69d5cc74a88928b1e9658916cdfbcd + languageName: node + linkType: hard + +"multihashes@npm:^0.4.15, multihashes@npm:~0.4.15": + version: 0.4.21 + resolution: "multihashes@npm:0.4.21" + dependencies: + buffer: "npm:^5.5.0" + multibase: "npm:^0.7.0" + varint: "npm:^5.0.0" + checksum: 10/a482d9ba7ed0ad41db22ca589f228e4b7a30207a229a64dfc9888796752314fca00a8d03025fe40d6d73965bbb246f54b73626c5a235463e30c06c7bf7a8785f + languageName: node + linkType: hard + "multimatch@npm:^5.0.0": version: 5.0.0 resolution: "multimatch@npm:5.0.0" @@ -31737,6 +31181,13 @@ __metadata: languageName: node linkType: hard +"nano-json-stream-parser@npm:^0.1.2": + version: 0.1.2 + resolution: "nano-json-stream-parser@npm:0.1.2" + checksum: 10/00a3ce63d3b66220def9fd6c26cd495100efd155e7bda54a11f1dfd185ba6750d5ce266076e0f229bad3f5ef892e2017f24da012669f146b404a8e47a44568ec + languageName: node + linkType: hard + "nanoid@npm:^3.1.23, nanoid@npm:^3.1.3, nanoid@npm:^3.3.1, nanoid@npm:^3.3.4, nanoid@npm:^3.3.6, nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" @@ -32041,6 +31492,15 @@ __metadata: languageName: node linkType: hard +"node-addon-api@npm:^2.0.0": + version: 2.0.2 + resolution: "node-addon-api@npm:2.0.2" + dependencies: + node-gyp: "npm:latest" + checksum: 10/e4ce4daac5b2fefa6b94491b86979a9c12d9cceba571d2c6df1eb5859f9da68e5dc198f128798e1785a88aafee6e11f4992dcccd4bf86bec90973927d158bd60 + languageName: node + linkType: hard + "node-addon-api@npm:^3.0.0": version: 3.2.1 resolution: "node-addon-api@npm:3.2.1" @@ -32050,6 +31510,15 @@ __metadata: languageName: node linkType: hard +"node-addon-api@npm:^5.0.0": + version: 5.1.0 + resolution: "node-addon-api@npm:5.1.0" + dependencies: + node-gyp: "npm:latest" + checksum: 10/595f59ffb4630564f587c502119cbd980d302e482781021f3b479f5fc7e41cf8f2f7280fdc2795f32d148e4f3259bd15043c52d4a3442796aa6f1ae97b959636 + languageName: node + linkType: hard + "node-addon-api@npm:^6.1.0": version: 6.1.0 resolution: "node-addon-api@npm:6.1.0" @@ -32124,7 +31593,7 @@ __metadata: languageName: node linkType: hard -"node-gyp-build@npm:^4.2.2, node-gyp-build@npm:^4.3.0, node-gyp-build@npm:^4.5.0, node-gyp-build@npm:^4.8.0": +"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.2.2, node-gyp-build@npm:^4.3.0, node-gyp-build@npm:^4.5.0, node-gyp-build@npm:^4.8.0": version: 4.8.1 resolution: "node-gyp-build@npm:4.8.1" bin: @@ -32271,17 +31740,6 @@ __metadata: languageName: node linkType: hard -"nopt@npm:^7.0.0": - version: 7.2.0 - resolution: "nopt@npm:7.2.0" - dependencies: - abbrev: "npm:^2.0.0" - bin: - nopt: bin/nopt.js - checksum: 10/1e7489f17cbda452c8acaf596a8defb4ae477d2a9953b76eb96f4ec3f62c6b421cd5174eaa742f88279871fde9586d8a1d38fb3f53fa0c405585453be31dff4c - languageName: node - linkType: hard - "normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" @@ -32315,13 +31773,6 @@ __metadata: languageName: node linkType: hard -"npm-normalize-package-bin@npm:^3.0.0": - version: 3.0.1 - resolution: "npm-normalize-package-bin@npm:3.0.1" - checksum: 10/de416d720ab22137a36292ff8a333af499ea0933ef2320a8c6f56a73b0f0448227fec4db5c890d702e26d21d04f271415eab6580b5546456861cc0c19498a4bf - languageName: node - linkType: hard - "npm-package-arg@npm:^7.0.0": version: 7.0.0 resolution: "npm-package-arg@npm:7.0.0" @@ -32396,6 +31847,16 @@ __metadata: languageName: node linkType: hard +"number-to-bn@npm:1.7.0": + version: 1.7.0 + resolution: "number-to-bn@npm:1.7.0" + dependencies: + bn.js: "npm:4.11.6" + strip-hex-prefix: "npm:1.0.0" + checksum: 10/702e8f00b6b90abd23f711056005179c3bd5ce3b063c47d468250f63ab3b9b4b82e27bff3b4642a9e71e06c717d5ed359873501746df0a64c3db1fa6d704e704 + languageName: node + linkType: hard + "nwsapi@npm:^2.2.2": version: 2.2.7 resolution: "nwsapi@npm:2.2.7" @@ -32487,6 +31948,13 @@ __metadata: languageName: node linkType: hard +"oauth-sign@npm:~0.9.0": + version: 0.9.0 + resolution: "oauth-sign@npm:0.9.0" + checksum: 10/1809a366d258f41fdf4ab5310cff3d1e15f96b187503bc7333cef4351de7bd0f52cb269bc95800f1fae5fb04dd886287df1471985fd67e8484729fdbcf857119 + languageName: node + linkType: hard + "ob1@npm:0.80.11": version: 0.80.11 resolution: "ob1@npm:0.80.11" @@ -32546,29 +32014,6 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.8": - version: 1.1.8 - resolution: "object.entries@npm:1.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10/2301918fbd1ee697cf6ff7cd94f060c738c0a7d92b22fd24c7c250e9b593642c9707ad2c44d339303c1439c5967d8964251cdfc855f7f6ec55db2dd79e8dc2a7 - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.8": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10/5b2e80f7af1778b885e3d06aeb335dcc86965e39464671adb7167ab06ac3b0f5dd2e637a90d8ebd7426d69c6f135a4753ba3dd7d0fe2a7030cf718dcb910fd92 - languageName: node - linkType: hard - "object.getownpropertydescriptors@npm:^2.0.3": version: 2.1.4 resolution: "object.getownpropertydescriptors@npm:2.1.4" @@ -32581,28 +32026,6 @@ __metadata: languageName: node linkType: hard -"object.groupby@npm:^1.0.3": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - checksum: 10/44cb86dd2c660434be65f7585c54b62f0425b0c96b5c948d2756be253ef06737da7e68d7106e35506ce4a44d16aa85a413d11c5034eb7ce5579ec28752eb42d0 - languageName: node - linkType: hard - -"object.values@npm:^1.1.6, object.values@npm:^1.2.0": - version: 1.2.0 - resolution: "object.values@npm:1.2.0" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10/db2e498019c354428c5dd30d02980d920ac365b155fce4dcf63eb9433f98ccf0f72624309e182ce7cc227c95e45d474e1d483418e60de2293dd23fa3ebe34903 - languageName: node - linkType: hard - "objectorarray@npm:^1.0.5": version: 1.0.5 resolution: "objectorarray@npm:1.0.5" @@ -32617,6 +32040,15 @@ __metadata: languageName: node linkType: hard +"oboe@npm:2.1.5": + version: 2.1.5 + resolution: "oboe@npm:2.1.5" + dependencies: + http-https: "npm:^1.0.0" + checksum: 10/451d0c28b45f518fc86d4689075cf74c7fea92fb09e2f994dd1208e5c5516a6958f9dc476714b61c62c959a3e7e0db8a69999c59ff63777c7a8af24fbddd0848 + languageName: node + linkType: hard + "obuf@npm:^1.0.0, obuf@npm:^1.1.2": version: 1.1.2 resolution: "obuf@npm:1.1.2" @@ -32791,20 +32223,6 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.9.3": - version: 0.9.3 - resolution: "optionator@npm:0.9.3" - dependencies: - "@aashutoshrathi/word-wrap": "npm:^1.2.3" - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - checksum: 10/fa28d3016395974f7fc087d6bbf0ac7f58ac3489f4f202a377e9c194969f329a7b88c75f8152b33fb08794a30dcd5c079db6bb465c28151357f113d80bbf67da - languageName: node - linkType: hard - "ora@npm:3.4.0, ora@npm:^3.4.0": version: 3.4.0 resolution: "ora@npm:3.4.0" @@ -32897,6 +32315,13 @@ __metadata: languageName: node linkType: hard +"p-cancelable@npm:^3.0.0": + version: 3.0.0 + resolution: "p-cancelable@npm:3.0.0" + checksum: 10/a5eab7cf5ac5de83222a014eccdbfde65ecfb22005ee9bc242041f0b4441e07fac7629432c82f48868aa0f8413fe0df6c6067c16f76bf9217cd8dc651923c93d + languageName: node + linkType: hard + "p-debounce@npm:^2.1.0": version: 2.1.0 resolution: "p-debounce@npm:2.1.0" @@ -33094,20 +32519,6 @@ __metadata: languageName: node linkType: hard -"parse-entities@npm:^2.0.0": - version: 2.0.0 - resolution: "parse-entities@npm:2.0.0" - dependencies: - character-entities: "npm:^1.0.0" - character-entities-legacy: "npm:^1.0.0" - character-reference-invalid: "npm:^1.0.0" - is-alphanumerical: "npm:^1.0.0" - is-decimal: "npm:^1.0.0" - is-hexadecimal: "npm:^1.0.0" - checksum: 10/feb46b516722474797d72331421f3e62856750cfb4f70ba098b36447bf0b169e819cc4fdee53e022874d5f0c81b605d86e1912b9842a70e59a54de2fee81589d - languageName: node - linkType: hard - "parse-entities@npm:^4.0.0": version: 4.0.1 resolution: "parse-entities@npm:4.0.1" @@ -33124,6 +32535,13 @@ __metadata: languageName: node linkType: hard +"parse-headers@npm:^2.0.0": + version: 2.0.5 + resolution: "parse-headers@npm:2.0.5" + checksum: 10/210b13bc0f99cf6f1183896f01de164797ac35b2720c9f1c82a3e2ceab256f87b9048e8e16a14cfd1b75448771f8379cd564bd1674a179ab0168c90005d4981b + languageName: node + linkType: hard + "parse-json@npm:^4.0.0": version: 4.0.0 resolution: "parse-json@npm:4.0.0" @@ -33146,19 +32564,6 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^7.0.0": - version: 7.1.1 - resolution: "parse-json@npm:7.1.1" - dependencies: - "@babel/code-frame": "npm:^7.21.4" - error-ex: "npm:^1.3.2" - json-parse-even-better-errors: "npm:^3.0.0" - lines-and-columns: "npm:^2.0.3" - type-fest: "npm:^3.8.0" - checksum: 10/187275c7ac097dcfb3c7420bca2399caa4da33bcd5d5aac3604bda0e2b8eee4df61cc26aa0d79fab97f0d67bf42d41d332baa9f9f56ad27636ad785f1ae639e5 - languageName: node - linkType: hard - "parse-ms@npm:^2.1.0": version: 2.1.0 resolution: "parse-ms@npm:2.1.0" @@ -33409,7 +32814,7 @@ __metadata: languageName: node linkType: hard -"pbkdf2@npm:^3.0.3": +"pbkdf2@npm:^3.0.17, pbkdf2@npm:^3.0.3": version: 3.1.2 resolution: "pbkdf2@npm:3.1.2" dependencies: @@ -34356,13 +33761,6 @@ __metadata: languageName: node linkType: hard -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10/0b9d2c76801ca652a7f64892dd37b7e3fab149a37d2424920099bf894acccc62abb4424af2155ab36dea8744843060a2d8ddc983518d0b1e22265a22324b72ed - languageName: node - linkType: hard - "prelude-ls@npm:~1.1.2": version: 1.1.2 resolution: "prelude-ls@npm:1.1.2" @@ -34446,13 +33844,6 @@ __metadata: languageName: node linkType: hard -"proc-log@npm:^3.0.0": - version: 3.0.0 - resolution: "proc-log@npm:3.0.0" - checksum: 10/02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 - languageName: node - linkType: hard - "process-nextick-args@npm:~2.0.0": version: 2.0.1 resolution: "process-nextick-args@npm:2.0.1" @@ -34690,7 +34081,7 @@ __metadata: languageName: node linkType: hard -"psl@npm:^1.1.33": +"psl@npm:^1.1.28, psl@npm:^1.1.33": version: 1.9.0 resolution: "psl@npm:1.9.0" checksum: 10/d07879d4bfd0ac74796306a8e5a36a93cfb9c4f4e8ee8e63fbb909066c192fe1008cd8f12abd8ba2f62ca28247949a20c8fb32e1d18831d9e71285a1569720f9 @@ -34756,6 +34147,13 @@ __metadata: languageName: node linkType: hard +"punycode@npm:2.1.0": + version: 2.1.0 + resolution: "punycode@npm:2.1.0" + checksum: 10/012f9443fe56baf485db702d0d07cef7d89c0670ce1ac4da8fb8b5bd3677e42a8f5d2b35f595ffa31ba843661c9c6766f2feb1e1e3393e1ff1033120d0f94d60 + languageName: node + linkType: hard + "punycode@npm:^1.2.4": version: 1.4.1 resolution: "punycode@npm:1.4.1" @@ -34854,6 +34252,24 @@ __metadata: languageName: node linkType: hard +"qs@npm:~6.5.2": + version: 6.5.3 + resolution: "qs@npm:6.5.3" + checksum: 10/485c990fba7ad17671e16c92715fb064c1600337738f5d140024eb33a49fbc1ed31890d3db850117c760caeb9c9cc9f4ba22a15c20dd119968e41e3d3fe60b28 + languageName: node + linkType: hard + +"query-string@npm:^5.0.1": + version: 5.1.1 + resolution: "query-string@npm:5.1.1" + dependencies: + decode-uri-component: "npm:^0.2.0" + object-assign: "npm:^4.1.0" + strict-uri-encode: "npm:^1.0.0" + checksum: 10/8834591ed02c324ac10397094c2ae84a3d3460477ef30acd5efe03b1afbf15102ccc0829ab78cc58ecb12f70afeb7a1f81e604487a9ad4859742bb14748e98cc + languageName: node + linkType: hard + "query-string@npm:^7.1.3": version: 7.1.3 resolution: "query-string@npm:7.1.3" @@ -35864,16 +35280,6 @@ __metadata: languageName: node linkType: hard -"read-package-json-fast@npm:^3.0.0, read-package-json-fast@npm:^3.0.2": - version: 3.0.2 - resolution: "read-package-json-fast@npm:3.0.2" - dependencies: - json-parse-even-better-errors: "npm:^3.0.0" - npm-normalize-package-bin: "npm:^3.0.0" - checksum: 10/8d406869f045f1d76e2a99865a8fd1c1af9c1dc06200b94d2b07eef87ed734b22703a8d72e1cd36ea36cc48e22020bdd187f88243c7dd0563f72114d38c17072 - languageName: node - linkType: hard - "read-pkg-up@npm:^7.0.1": version: 7.0.1 resolution: "read-pkg-up@npm:7.0.1" @@ -35912,7 +35318,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^3.0.2, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": +"readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -36162,20 +35568,6 @@ __metadata: languageName: node linkType: hard -"reflect.getprototypeof@npm:^1.0.4": - version: 1.0.4 - resolution: "reflect.getprototypeof@npm:1.0.4" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - get-intrinsic: "npm:^1.2.1" - globalthis: "npm:^1.0.3" - which-builtin-type: "npm:^1.1.3" - checksum: 10/52ff881f62a9cb4acdd7f9a8f4ac88234056c4a6b1ed570c249cc085de5c313249b90251d16eb8e58302b82ae697eec19dde16ff62949f6b87f035a3a26dc5df - languageName: node - linkType: hard - "regenerate-unicode-properties@npm:^10.1.0": version: 10.1.0 resolution: "regenerate-unicode-properties@npm:10.1.0" @@ -36215,7 +35607,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.2.0, regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2": +"regexp.prototype.flags@npm:^1.2.0, regexp.prototype.flags@npm:^1.5.2": version: 1.5.3 resolution: "regexp.prototype.flags@npm:1.5.3" dependencies: @@ -36392,16 +35784,6 @@ __metadata: languageName: node linkType: hard -"remark-mdx@npm:^3.0.0": - version: 3.0.1 - resolution: "remark-mdx@npm:3.0.1" - dependencies: - mdast-util-mdx: "npm:^3.0.0" - micromark-extension-mdxjs: "npm:^3.0.0" - checksum: 10/aa1d9b8baf62c98d973ff3538402378ee47eef0e7adb10123421b4fde7e187b9c5820f72a11846193b6fe43983221e1078d97ed9cebbcde0938e55cb159d5455 - languageName: node - linkType: hard - "remark-parse@npm:^10.0.0": version: 10.0.2 resolution: "remark-parse@npm:10.0.2" @@ -36509,6 +35891,34 @@ __metadata: languageName: node linkType: hard +"request@npm:^2.79.0": + version: 2.88.2 + resolution: "request@npm:2.88.2" + dependencies: + aws-sign2: "npm:~0.7.0" + aws4: "npm:^1.8.0" + caseless: "npm:~0.12.0" + combined-stream: "npm:~1.0.6" + extend: "npm:~3.0.2" + forever-agent: "npm:~0.6.1" + form-data: "npm:~2.3.2" + har-validator: "npm:~5.1.3" + http-signature: "npm:~1.2.0" + is-typedarray: "npm:~1.0.0" + isstream: "npm:~0.1.2" + json-stringify-safe: "npm:~5.0.1" + mime-types: "npm:~2.1.19" + oauth-sign: "npm:~0.9.0" + performance-now: "npm:^2.1.0" + qs: "npm:~6.5.2" + safe-buffer: "npm:^5.1.2" + tough-cookie: "npm:~2.5.0" + tunnel-agent: "npm:^0.6.0" + uuid: "npm:^3.3.2" + checksum: 10/005b8b237b56f1571cfd4ecc09772adaa2e82dcb884fc14ea2bb25e23dbf7c2009f9929e0b6d3fd5802e33ed8ee705a3b594c8f9467c1458cd973872bf89db8e + languageName: node + linkType: hard + "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -36594,7 +36004,7 @@ __metadata: languageName: node linkType: hard -"resolve-alpn@npm:^1.0.0": +"resolve-alpn@npm:^1.0.0, resolve-alpn@npm:^1.2.0": version: 1.2.1 resolution: "resolve-alpn@npm:1.2.1" checksum: 10/744e87888f0b6fa0b256ab454ca0b9c0b80808715e2ef1f3672773665c92a941f6181194e30ccae4a8cd0adbe0d955d3f133102636d2ee0cca0119fec0bc9aec @@ -36679,7 +36089,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.3, resolve@npm:^1.22.4, resolve@npm:^1.9.0": +"resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.3, resolve@npm:^1.9.0": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -36692,19 +36102,6 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^2.0.0-next.5": - version: 2.0.0-next.5 - resolution: "resolve@npm:2.0.0-next.5" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/2d6fd28699f901744368e6f2032b4268b4c7b9185fd8beb64f68c93ac6b22e52ae13560ceefc96241a665b985edf9ffd393ae26d2946a7d3a07b7007b7d51e79 - languageName: node - linkType: hard - "resolve@npm:~1.7.1": version: 1.7.1 resolution: "resolve@npm:1.7.1" @@ -36721,7 +36118,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.5#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.9.0#optional!builtin": +"resolve@patch:resolve@npm%3A^1.1.5#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.9.0#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -36734,19 +36131,6 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin": - version: 2.0.0-next.5 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10/05fa778de9d0347c8b889eb7a18f1f06bf0f801b0eb4610b4871a4b2f22e220900cf0ad525e94f990bb8d8921c07754ab2122c0c225ab4cdcea98f36e64fa4c2 - languageName: node - linkType: hard - "resolve@patch:resolve@npm%3A~1.7.1#optional!builtin": version: 1.7.1 resolution: "resolve@patch:resolve@npm%3A1.7.1#optional!builtin::version=1.7.1&hash=3bafbf" @@ -36963,6 +36347,17 @@ __metadata: languageName: node linkType: hard +"rlp@npm:^2.2.4": + version: 2.2.7 + resolution: "rlp@npm:2.2.7" + dependencies: + bn.js: "npm:^5.2.0" + bin: + rlp: bin/rlp + checksum: 10/cf1919a2dc99f336191b3363b76299db567c192b7ee3c6f5c722728c34f65577883c9c88eeb7a1bfcbc26693c8a4f1fb0662e79ee86f0c98dd258d6987303498 + languageName: node + linkType: hard + "roarr@npm:^2.15.3": version: 2.15.4 resolution: "roarr@npm:2.15.4" @@ -37322,6 +36717,13 @@ __metadata: languageName: node linkType: hard +"scrypt-js@npm:^3.0.0, scrypt-js@npm:^3.0.1": + version: 3.0.1 + resolution: "scrypt-js@npm:3.0.1" + checksum: 10/2f8aa72b7f76a6f9c446bbec5670f80d47497bccce98474203d89b5667717223eeb04a50492ae685ed7adc5a060fc2d8f9fd988f8f7ebdaf3341967f3aeff116 + languageName: node + linkType: hard + "sdp@npm:^2.12.0, sdp@npm:^2.6.0": version: 2.12.0 resolution: "sdp@npm:2.12.0" @@ -37329,6 +36731,18 @@ __metadata: languageName: node linkType: hard +"secp256k1@npm:^4.0.1": + version: 4.0.4 + resolution: "secp256k1@npm:4.0.4" + dependencies: + elliptic: "npm:^6.5.7" + node-addon-api: "npm:^5.0.0" + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.2.0" + checksum: 10/45000f348c853df7c1e2b67c48efb062ae78c0620ab1a5cfb02fa20d3aad39c641f4e7a18b3de3b54a7c0cc1e0addeb8ecd9d88bc332e92df17a92b60c36122a + languageName: node + linkType: hard + "section-matter@npm:^1.0.0": version: 1.0.0 resolution: "section-matter@npm:1.0.0" @@ -37504,6 +36918,19 @@ __metadata: languageName: node linkType: hard +"servify@npm:^0.1.12": + version: 0.1.12 + resolution: "servify@npm:0.1.12" + dependencies: + body-parser: "npm:^1.16.0" + cors: "npm:^2.8.1" + express: "npm:^4.14.0" + request: "npm:^2.79.0" + xhr: "npm:^2.3.3" + checksum: 10/d61b145034aa26c143d7081a56c544aceff256eead27a5894b6785346254438d2b387ac7411bf664024d258779a00dc6c5d9da65f8d60382dac23a8cba0b0d9e + languageName: node + linkType: hard + "set-blocking@npm:^2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -37532,7 +36959,7 @@ __metadata: languageName: node linkType: hard -"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": +"set-function-name@npm:^2.0.2": version: 2.0.2 resolution: "set-function-name@npm:2.0.2" dependencies: @@ -37746,6 +37173,17 @@ __metadata: languageName: node linkType: hard +"simple-get@npm:^2.7.0": + version: 2.8.2 + resolution: "simple-get@npm:2.8.2" + dependencies: + decompress-response: "npm:^3.3.0" + once: "npm:^1.3.1" + simple-concat: "npm:^1.0.0" + checksum: 10/b827672695bbe504217311c47c6a106358babcfbf3d69c8d67ad56da40c2ed05185eec12538dfe3637e1cf0441bcd5931b022a84dc7f8f2d84969d595f7f7fda + languageName: node + linkType: hard + "simple-get@npm:^4.0.0, simple-get@npm:^4.0.1": version: 4.0.1 resolution: "simple-get@npm:4.0.1" @@ -38218,7 +37656,7 @@ __metadata: languageName: node linkType: hard -"sshpk@npm:^1.14.1": +"sshpk@npm:^1.14.1, sshpk@npm:^1.7.0": version: 1.18.0 resolution: "sshpk@npm:1.18.0" dependencies: @@ -38385,15 +37823,6 @@ __metadata: languageName: node linkType: hard -"stop-iteration-iterator@npm:^1.0.0": - version: 1.0.0 - resolution: "stop-iteration-iterator@npm:1.0.0" - dependencies: - internal-slot: "npm:^1.0.4" - checksum: 10/2a23a36f4f6bfa63f46ae2d53a3f80fe8276110b95a55345d8ed3d92125413494033bc8697eb774e8f7aeb5725f70e3d69753caa2ecacdac6258c16fa8aa8b0f - languageName: node - linkType: hard - "store2@npm:^2.14.2": version: 2.14.2 resolution: "store2@npm:2.14.2" @@ -38532,6 +37961,13 @@ __metadata: languageName: node linkType: hard +"strict-uri-encode@npm:^1.0.0": + version: 1.1.0 + resolution: "strict-uri-encode@npm:1.1.0" + checksum: 10/9466d371f7b36768d43f7803f26137657559e4c8b0161fb9e320efb8edba3ae22f8e99d4b0d91da023b05a13f62ec5412c3f4f764b5788fac11d1fea93720bb3 + languageName: node + linkType: hard + "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -38588,57 +38024,6 @@ __metadata: languageName: node linkType: hard -"string-width@npm:^6.0.0": - version: 6.1.0 - resolution: "string-width@npm:6.1.0" - dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^10.2.1" - strip-ansi: "npm:^7.0.1" - checksum: 10/8aefb456a230c8d7fe254049b1b2d62603da1a3b6c7fc9f3332f6779583cc1c72653f9b6e4cd0c1c92befee1565d4a0a7542d09ba4ceb6d96af02fbd8425bb03 - languageName: node - linkType: hard - -"string.prototype.includes@npm:^2.0.0": - version: 2.0.0 - resolution: "string.prototype.includes@npm:2.0.0" - dependencies: - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.17.5" - checksum: 10/34c1e71ac5cab469bef52a4f3d983d141ca61c43b9fe8859574c8829822aad0a61fce1dddfaf8a48ad7ac5032a1730c19f1fb2d09715f57025cd138b1ad4b0e4 - languageName: node - linkType: hard - -"string.prototype.matchall@npm:^4.0.11": - version: 4.0.11 - resolution: "string.prototype.matchall@npm:4.0.11" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - regexp.prototype.flags: "npm:^1.5.2" - set-function-name: "npm:^2.0.2" - side-channel: "npm:^1.0.6" - checksum: 10/a902ff4500f909f2a08e55cc5ab1ffbbc905f603b36837674370ee3921058edd0392147e15891910db62a2f31ace2adaf065eaa3bc6e9810bdbc8ca48e05a7b5 - languageName: node - linkType: hard - -"string.prototype.repeat@npm:^1.0.0": - version: 1.0.0 - resolution: "string.prototype.repeat@npm:1.0.0" - dependencies: - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.17.5" - checksum: 10/4b1bd91b75fa8fdf0541625184ebe80e445a465ce4253c19c3bccd633898005dadae0f74b85ae72662a53aafb8035bf48f8f5c0755aec09bc106a7f13959d05e - languageName: node - linkType: hard - "string.prototype.trim@npm:^1.2.9": version: 1.2.9 resolution: "string.prototype.trim@npm:1.2.9" @@ -38779,6 +38164,15 @@ __metadata: languageName: node linkType: hard +"strip-hex-prefix@npm:1.0.0": + version: 1.0.0 + resolution: "strip-hex-prefix@npm:1.0.0" + dependencies: + is-hex-prefixed: "npm:1.0.0" + checksum: 10/4cafe7caee1d281d3694d14920fd5d3c11adf09371cef7e2ccedd5b83efd9e9bd2219b5d6ce6e809df6e0f437dc9d30db1192116580875698aad164a6d6b285b + languageName: node + linkType: hard + "strip-indent@npm:^4.0.0": version: 4.0.0 resolution: "strip-indent@npm:4.0.0" @@ -39123,13 +38517,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^9.0.0": - version: 9.4.0 - resolution: "supports-color@npm:9.4.0" - checksum: 10/cb8ff8daeaf1db642156f69a9aa545b6c01dd9c4def4f90a49f46cbf24be0c245d392fcf37acd119cd1819b99dad2cc9b7e3260813f64bcfd7f5b18b5a1eefb8 - languageName: node - linkType: hard - "supports-hyperlinks@npm:^2.0.0": version: 2.3.0 resolution: "supports-hyperlinks@npm:2.3.0" @@ -39225,6 +38612,25 @@ __metadata: languageName: node linkType: hard +"swarm-js@npm:^0.1.40": + version: 0.1.42 + resolution: "swarm-js@npm:0.1.42" + dependencies: + bluebird: "npm:^3.5.0" + buffer: "npm:^5.0.5" + eth-lib: "npm:^0.1.26" + fs-extra: "npm:^4.0.2" + got: "npm:^11.8.5" + mime-types: "npm:^2.1.16" + mkdirp-promise: "npm:^5.0.1" + mock-fs: "npm:^4.1.0" + setimmediate: "npm:^1.0.5" + tar: "npm:^4.0.2" + xhr-request: "npm:^1.0.1" + checksum: 10/341bcfef6daadc1904ea87b1781f10dc99ec14e33c9a9041e43e9617dcc3b7d632230e1baf2fafecb8e10e63c2e4eeb7cce7c85592dc0cf0dde935f49c77050b + languageName: node + linkType: hard + "swc-loader@npm:^0.2.3": version: 0.2.3 resolution: "swc-loader@npm:0.2.3" @@ -39268,16 +38674,6 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.9.0": - version: 0.9.0 - resolution: "synckit@npm:0.9.0" - dependencies: - "@pkgr/core": "npm:^0.1.0" - tslib: "npm:^2.6.2" - checksum: 10/e93f3f5ee43fa71d3bb2a345049642d9034f34fa9528706b5ef26e825335ca5446143c56c2b041810afe26aa6e343583ff08525f5530618a4707375270f87be1 - languageName: node - linkType: hard - "systeminformation@npm:^5.23.5": version: 5.23.5 resolution: "systeminformation@npm:5.23.5" @@ -39401,6 +38797,21 @@ __metadata: languageName: node linkType: hard +"tar@npm:^4.0.2": + version: 4.4.19 + resolution: "tar@npm:4.4.19" + dependencies: + chownr: "npm:^1.1.4" + fs-minipass: "npm:^1.2.7" + minipass: "npm:^2.9.0" + minizlib: "npm:^1.3.3" + mkdirp: "npm:^0.5.5" + safe-buffer: "npm:^5.2.1" + yallist: "npm:^3.1.1" + checksum: 10/2715b5964578424ba5164632905a85e5a98c8dffeba657860aafa3a771b2602e6fd2a350bca891d78b8bda8cab5c53134c683ed2269b9925533477a24722e73b + languageName: node + linkType: hard + "tar@npm:^6.0.5, tar@npm:^6.1.11, tar@npm:^6.1.12, tar@npm:^6.1.13, tar@npm:^6.1.2, tar@npm:^6.2.0": version: 6.2.1 resolution: "tar@npm:6.2.1" @@ -39705,6 +39116,13 @@ __metadata: languageName: node linkType: hard +"timed-out@npm:^4.0.1": + version: 4.0.1 + resolution: "timed-out@npm:4.0.1" + checksum: 10/d52648e5fc0ebb0cae1633737a1db1b7cb464d5d43d754bd120ddebd8067a1b8f42146c250d8cfb9952183b7b0f341a99fc71b59c52d659218afae293165004f + languageName: node + linkType: hard + "timers-browserify@npm:^2.0.4": version: 2.0.12 resolution: "timers-browserify@npm:2.0.12" @@ -39933,6 +39351,16 @@ __metadata: languageName: node linkType: hard +"tough-cookie@npm:~2.5.0": + version: 2.5.0 + resolution: "tough-cookie@npm:2.5.0" + dependencies: + psl: "npm:^1.1.28" + punycode: "npm:^2.1.1" + checksum: 10/024cb13a4d1fe9af57f4323dff765dd9b217cc2a69be77e3b8a1ca45600aa33a097b6ad949f225d885e904f4bd3ceccef104741ef202d8378e6ca78e850ff82f + languageName: node + linkType: hard + "tr46@npm:^2.1.0": version: 2.1.0 resolution: "tr46@npm:2.1.0" @@ -40021,19 +39449,8 @@ __metadata: "@types/prettier": "npm:^3.0.0" "@types/semver": "npm:^7.5.6" "@types/tar": "npm:^6.1.11" - "@typescript-eslint/eslint-plugin": "npm:^8.8.1" - "@typescript-eslint/parser": "npm:^8.8.1" babel-jest: "npm:29.7.0" depcheck: "npm:^1.4.7" - eslint: "npm:^8.57.1" - eslint-plugin-chai-friendly: "npm:^1.0.1" - eslint-plugin-cypress: "npm:^3.5.0" - eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-jest: "npm:^28.8.3" - eslint-plugin-jsx-a11y: "npm:^6.10.0" - eslint-plugin-local-rules: "npm:^3.0.2" - eslint-plugin-react: "npm:^7.37.1" - eslint-plugin-react-hooks: "npm:^4.6.2" jest: "npm:29.7.0" jest-environment-jsdom: "npm:29.7.0" jest-expo: "npm:^50.0.2" @@ -40083,15 +39500,6 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^1.3.0": - version: 1.3.0 - resolution: "ts-api-utils@npm:1.3.0" - peerDependencies: - typescript: ">=4.2.0" - checksum: 10/3ee44faa24410cd649b5c864e068d438aa437ef64e9e4a66a41646a6d3024d3097a695eeb3fb26ee364705d3cb9653a65756d009e6a53badb6066a5f447bf7ed - languageName: node - linkType: hard - "ts-dedent@npm:^2.0.0, ts-dedent@npm:^2.2.0": version: 2.2.0 resolution: "ts-dedent@npm:2.2.0" @@ -40219,18 +39627,6 @@ __metadata: languageName: node linkType: hard -"tsconfig-paths@npm:^3.15.0": - version: 3.15.0 - resolution: "tsconfig-paths@npm:3.15.0" - dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10/2041beaedc6c271fc3bedd12e0da0cc553e65d030d4ff26044b771fac5752d0460944c0b5e680f670c2868c95c664a256cec960ae528888db6ded83524e33a14 - languageName: node - linkType: hard - "tsconfig-paths@npm:^4.1.2, tsconfig-paths@npm:^4.2.0": version: 4.2.0 resolution: "tsconfig-paths@npm:4.2.0" @@ -40360,15 +39756,6 @@ __metadata: languageName: node linkType: hard -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" - dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10/14687776479d048e3c1dbfe58a2409e00367810d6960c0f619b33793271ff2a27f81b52461f14a162f1f89a9b1d8da1b237fc7c99b0e1fdcec28ec63a86b1fec - languageName: node - linkType: hard - "type-check@npm:~0.3.2": version: 0.3.2 resolution: "type-check@npm:0.3.2" @@ -40468,6 +39855,15 @@ __metadata: languageName: node linkType: hard +"typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c + languageName: node + linkType: hard + "typedarray@npm:^0.0.6": version: 0.0.6 resolution: "typedarray@npm:0.0.6" @@ -40591,6 +39987,13 @@ __metadata: languageName: node linkType: hard +"ultron@npm:~1.1.0": + version: 1.1.1 + resolution: "ultron@npm:1.1.1" + checksum: 10/7cc6e8e98a2c62c87ab25a79a274f90492f13f5cf7c622dbda1ec85913e207aed392c26e76ed6250c4f05f842571b05dcce1f8ad0f5ecded64a99002b1fdf6e5 + languageName: node + linkType: hard + "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -40682,35 +40085,6 @@ __metadata: languageName: node linkType: hard -"unified-engine@npm:^11.2.0": - version: 11.2.0 - resolution: "unified-engine@npm:11.2.0" - dependencies: - "@types/concat-stream": "npm:^2.0.0" - "@types/debug": "npm:^4.0.0" - "@types/is-empty": "npm:^1.0.0" - "@types/node": "npm:^20.0.0" - "@types/unist": "npm:^3.0.0" - "@ungap/structured-clone": "npm:^1.0.0" - concat-stream: "npm:^2.0.0" - debug: "npm:^4.0.0" - glob: "npm:^10.0.0" - ignore: "npm:^5.0.0" - is-empty: "npm:^1.0.0" - is-plain-obj: "npm:^4.0.0" - load-plugin: "npm:^6.0.0" - parse-json: "npm:^7.0.0" - trough: "npm:^2.0.0" - unist-util-inspect: "npm:^8.0.0" - vfile: "npm:^6.0.0" - vfile-message: "npm:^4.0.0" - vfile-reporter: "npm:^8.0.0" - vfile-statistics: "npm:^3.0.0" - yaml: "npm:^2.0.0" - checksum: 10/652c38d2cc5a0406a962cb30b09a383568f194198ce1c2223999eff8f17f4e952be88822034b06594560a7c6a5f8f085499551c27458697d3cb9b9da627c3117 - languageName: node - linkType: hard - "unified@npm:^10.0.0": version: 10.1.2 resolution: "unified@npm:10.1.2" @@ -40726,7 +40100,7 @@ __metadata: languageName: node linkType: hard -"unified@npm:^11.0.0, unified@npm:^11.0.4": +"unified@npm:^11.0.0": version: 11.0.4 resolution: "unified@npm:11.0.4" dependencies: @@ -40812,15 +40186,6 @@ __metadata: languageName: node linkType: hard -"unist-util-inspect@npm:^8.0.0": - version: 8.0.0 - resolution: "unist-util-inspect@npm:8.0.0" - dependencies: - "@types/unist": "npm:^3.0.0" - checksum: 10/6d49bbda767a44e28f55de472fd05368e7916fc534484364d59f6c403ed0911789cdd70936098f6a45d5ac55a21a96ac302c8bd1cb909bec50d56703e33cf0a5 - languageName: node - linkType: hard - "unist-util-is@npm:^5.0.0": version: 5.2.1 resolution: "unist-util-is@npm:5.2.1" @@ -40848,15 +40213,6 @@ __metadata: languageName: node linkType: hard -"unist-util-position-from-estree@npm:^2.0.0": - version: 2.0.0 - resolution: "unist-util-position-from-estree@npm:2.0.0" - dependencies: - "@types/unist": "npm:^3.0.0" - checksum: 10/d3b3048a5727c2367f64ef6dcc5b20c4717215ef8b1372ff9a7c426297c5d1e5776409938acd01531213e2cd2543218d16e73f9f862f318e9496e2c73bb18354 - languageName: node - linkType: hard - "unist-util-position@npm:^4.0.0": version: 4.0.4 resolution: "unist-util-position@npm:4.0.4" @@ -40906,15 +40262,6 @@ __metadata: languageName: node linkType: hard -"unist-util-stringify-position@npm:^2.0.0": - version: 2.0.3 - resolution: "unist-util-stringify-position@npm:2.0.3" - dependencies: - "@types/unist": "npm:^2.0.2" - checksum: 10/affbfd151f0df055ce0dddf443fc41353ab3870cdba6b3805865bd6a41ce22d9d8e65be0ed8839a8731d05b61421d2df9fd8c35b67adf86040bf4b1f8a04a42c - languageName: node - linkType: hard - "unist-util-stringify-position@npm:^3.0.0": version: 3.0.3 resolution: "unist-util-stringify-position@npm:3.0.3" @@ -41121,6 +40468,13 @@ __metadata: languageName: node linkType: hard +"url-set-query@npm:^1.0.0": + version: 1.0.0 + resolution: "url-set-query@npm:1.0.0" + checksum: 10/a6e4d1ac5c3e7db8644655a2774b9462d8d95ec7abae341ff53d4a3d03adc2dabc38650dc757659fcbce4859372bbea4a896ac842dd5b54cc22aae087ba35664 + languageName: node + linkType: hard + "url@npm:^0.11.0": version: 0.11.0 resolution: "url@npm:0.11.0" @@ -41233,6 +40587,13 @@ __metadata: languageName: node linkType: hard +"utf8@npm:3.0.0": + version: 3.0.0 + resolution: "utf8@npm:3.0.0" + checksum: 10/31d19c4faacbb65b09ebc1c21c32b20bdb0919c6f6773cee5001b99bb83f8e503e7233c08fc71ebb34f7cfebd95cec3243b81d90176097aa2f286cccb4ce866e + languageName: node + linkType: hard + "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -41294,7 +40655,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^3.0.1": +"uuid@npm:^3.0.1, uuid@npm:^3.3.2": version: 3.4.0 resolution: "uuid@npm:3.4.0" bin: @@ -41330,7 +40691,7 @@ __metadata: languageName: node linkType: hard -"uvu@npm:^0.5.0, uvu@npm:^0.5.6": +"uvu@npm:^0.5.0": version: 0.5.6 resolution: "uvu@npm:0.5.6" dependencies: @@ -41404,6 +40765,13 @@ __metadata: languageName: node linkType: hard +"varint@npm:^5.0.0": + version: 5.0.2 + resolution: "varint@npm:5.0.2" + checksum: 10/e1a66bf9a6cea96d1f13259170d4d41b845833acf3a9df990ea1e760d279bd70d5b1f4c002a50197efd2168a2fd43eb0b808444600fd4d23651e8d42fe90eb05 + languageName: node + linkType: hard + "varuint-bitcoin@npm:2.0.0": version: 2.0.0 resolution: "varuint-bitcoin@npm:2.0.0" @@ -41504,42 +40872,6 @@ __metadata: languageName: node linkType: hard -"vfile-reporter@npm:^8.0.0": - version: 8.1.0 - resolution: "vfile-reporter@npm:8.1.0" - dependencies: - "@types/supports-color": "npm:^8.0.0" - string-width: "npm:^6.0.0" - supports-color: "npm:^9.0.0" - unist-util-stringify-position: "npm:^4.0.0" - vfile: "npm:^6.0.0" - vfile-message: "npm:^4.0.0" - vfile-sort: "npm:^4.0.0" - vfile-statistics: "npm:^3.0.0" - checksum: 10/b6230b1aaa8cd95367c4286aa98cd5d1831b71e0695fa731bdba9d546b96990e1367da1b4a6729734f45f7c69ea4307196040fab6d17e2a5fd0a04c595f72fef - languageName: node - linkType: hard - -"vfile-sort@npm:^4.0.0": - version: 4.0.0 - resolution: "vfile-sort@npm:4.0.0" - dependencies: - vfile: "npm:^6.0.0" - vfile-message: "npm:^4.0.0" - checksum: 10/2d60298ccf30b6f1068560660985670ad3345cfa1f85f1feb66f0d9b74b847a81af94db26fc798e98a09eed58ea4502c7bbd69c969e26848f5badcdb90d28bc8 - languageName: node - linkType: hard - -"vfile-statistics@npm:^3.0.0": - version: 3.0.0 - resolution: "vfile-statistics@npm:3.0.0" - dependencies: - vfile: "npm:^6.0.0" - vfile-message: "npm:^4.0.0" - checksum: 10/0dbbc8adeb73bb24b5f723e947122e1ae7b6bd0c5ff3fd1ae0ef4a3066f74be00425102c95aa4eaa0f529ba05237255fe8342af76661b0ba6aee3f4c16ca135f - languageName: node - linkType: hard - "vfile@npm:^5.0.0, vfile@npm:^5.3.0": version: 5.3.7 resolution: "vfile@npm:5.3.7" @@ -41552,7 +40884,7 @@ __metadata: languageName: node linkType: hard -"vfile@npm:^6.0.0, vfile@npm:^6.0.1": +"vfile@npm:^6.0.0": version: 6.0.1 resolution: "vfile@npm:6.0.1" dependencies: @@ -41853,13 +41185,6 @@ __metadata: languageName: node linkType: hard -"walk-up-path@npm:^3.0.1": - version: 3.0.1 - resolution: "walk-up-path@npm:3.0.1" - checksum: 10/9ffca02fe30fb65f6db531260582988c5e766f4c739cf86a6109380a7f791236b5d0b92b1dce37a6f73e22dca6bc9d93bf3700413e16251b2bd6bbd1ca2be316 - languageName: node - linkType: hard - "walker@npm:^1.0.7, walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -41938,236 +41263,293 @@ __metadata: languageName: node linkType: hard -"web3-core@npm:^4.4.0, web3-core@npm:^4.5.0, web3-core@npm:^4.5.1, web3-core@npm:^4.6.0, web3-core@npm:^4.7.0": - version: 4.7.0 - resolution: "web3-core@npm:4.7.0" - dependencies: - web3-errors: "npm:^1.3.0" - web3-eth-accounts: "npm:^4.2.1" - web3-eth-iban: "npm:^4.0.7" - web3-providers-http: "npm:^4.2.0" - web3-providers-ipc: "npm:^4.0.7" - web3-providers-ws: "npm:^4.0.8" - web3-types: "npm:^1.8.1" - web3-utils: "npm:^4.3.2" - web3-validator: "npm:^2.0.6" - dependenciesMeta: - web3-providers-ipc: - optional: true - checksum: 10/76f740cff838f32e21992a2d263b770256562fe9cad5c7b6b220db9990b09b940ff7eb7261400dab971fc2a00bfb75ab4f89f9b5b67c4e70cac099072c177944 +"web3-bzz@npm:1.10.3": + version: 1.10.3 + resolution: "web3-bzz@npm:1.10.3" + dependencies: + "@types/node": "npm:^12.12.6" + got: "npm:12.1.0" + swarm-js: "npm:^0.1.40" + checksum: 10/c3985e345c3149238189497b5df0b0d6a7f290f67782d4f77c733c17f0ed85ac063d9d2e1cc4c4592d668ba5ae333c6bab94cbd7c78f7f3553c1a10d478d90a6 languageName: node linkType: hard -"web3-errors@npm:^1.1.3, web3-errors@npm:^1.2.0, web3-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "web3-errors@npm:1.3.0" +"web3-core-helpers@npm:1.10.3": + version: 1.10.3 + resolution: "web3-core-helpers@npm:1.10.3" dependencies: - web3-types: "npm:^1.7.0" - checksum: 10/613b01013b697dcaaad0ff9cfac8c4c69557fb0ffbc9efe86ac3eaf5179c6f18687fdcd2e53faf0a2c3ee68409491171968eb2017444cb14ffa74663ff77556f + web3-eth-iban: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/4ec48d8ab81f3fcaabdab028e40aa958d08abc5bbd48f37b9cfba48ccc0f9e7a556754960b524199fb333688e71c073281dc78639e2944d17b2c57fc6ecf744d languageName: node linkType: hard -"web3-eth-abi@npm:^4.2.3, web3-eth-abi@npm:^4.3.0": - version: 4.3.0 - resolution: "web3-eth-abi@npm:4.3.0" +"web3-core-method@npm:1.10.3": + version: 1.10.3 + resolution: "web3-core-method@npm:1.10.3" dependencies: - abitype: "npm:0.7.1" - web3-errors: "npm:^1.3.0" - web3-types: "npm:^1.8.1" - web3-utils: "npm:^4.3.2" - web3-validator: "npm:^2.0.6" - checksum: 10/e490ad7142ae14c2def2b596551b54e83727af76a96ee4854e236cd19477028960eb944af258c42efc4646fc0b685ae4f3b3f2e0c4c75e15bfc346fc05c1ff6e + "@ethersproject/transactions": "npm:^5.6.2" + web3-core-helpers: "npm:1.10.3" + web3-core-promievent: "npm:1.10.3" + web3-core-subscriptions: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/cd201944b4158ba0e267e02f1c2c043a79d29aa54c2e59e3abdef8b4145e5fd4c3b2839f1bd6a5cea705178919fb19039ecdaeae185ad13d9aa05aeb734bf8c5 languageName: node linkType: hard -"web3-eth-accounts@npm:^4.2.1": - version: 4.2.1 - resolution: "web3-eth-accounts@npm:4.2.1" +"web3-core-promievent@npm:1.10.3": + version: 1.10.3 + resolution: "web3-core-promievent@npm:1.10.3" dependencies: - "@ethereumjs/rlp": "npm:^4.0.1" - crc-32: "npm:^1.2.2" - ethereum-cryptography: "npm:^2.0.0" - web3-errors: "npm:^1.3.0" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.1" - web3-validator: "npm:^2.0.6" - checksum: 10/a19a2bad97ed9cc7a82af6ce6acba906f3ed8829116bda1dcd72dd4ee7e31d332239f7464cfa89f053dffcef857fc284777474571e68878dbc2377057f9ea329 + eventemitter3: "npm:4.0.4" + checksum: 10/5406e3d84a4f02e301ddae7e560be7e83c0f5f87988e1b1efb141697d816bbba8e4ddd0d0160123745a43fa152a5b986135b16901639172490abee4f9e16d106 languageName: node linkType: hard -"web3-eth-contract@npm:^4.5.0, web3-eth-contract@npm:^4.7.0": - version: 4.7.0 - resolution: "web3-eth-contract@npm:4.7.0" +"web3-core-requestmanager@npm:1.10.3": + version: 1.10.3 + resolution: "web3-core-requestmanager@npm:1.10.3" dependencies: - "@ethereumjs/rlp": "npm:^5.0.2" - web3-core: "npm:^4.5.1" - web3-errors: "npm:^1.3.0" - web3-eth: "npm:^4.8.2" - web3-eth-abi: "npm:^4.2.3" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.1" - web3-validator: "npm:^2.0.6" - checksum: 10/1ae62530fdf1389aa896af527c028e3c39ca16e2318e010d07e6b7d421abb8b1c6a6dbe834d3317098a29a6c8ad47f057d17e1c9602dc0060b689c331c3ce440 + util: "npm:^0.12.5" + web3-core-helpers: "npm:1.10.3" + web3-providers-http: "npm:1.10.3" + web3-providers-ipc: "npm:1.10.3" + web3-providers-ws: "npm:1.10.3" + checksum: 10/9ec5fe7f621fbab0fe9acab3fd115e46bf86d7b398306e261073b471205c0e1171c4e276ebbe8a0b49906b37677a21b8b1b6d5da83ef86ee7dd29ff87b09e0a6 languageName: node linkType: hard -"web3-eth-ens@npm:^4.4.0": - version: 4.4.0 - resolution: "web3-eth-ens@npm:4.4.0" +"web3-core-subscriptions@npm:1.10.3": + version: 1.10.3 + resolution: "web3-core-subscriptions@npm:1.10.3" dependencies: - "@adraffy/ens-normalize": "npm:^1.8.8" - web3-core: "npm:^4.5.0" - web3-errors: "npm:^1.2.0" - web3-eth: "npm:^4.8.0" - web3-eth-contract: "npm:^4.5.0" - web3-net: "npm:^4.1.0" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.0" - web3-validator: "npm:^2.0.6" - checksum: 10/25a1535e095d8ffcbc0641041af69e42aa60ba2989477108a5678c42a06135df9134ccc6024c89c216cb3408848e3905ee178d5b12e3bb740e895ee6ee0bd2cf + eventemitter3: "npm:4.0.4" + web3-core-helpers: "npm:1.10.3" + checksum: 10/202d54cba012999dad34b2711afca831e7a64d2a4ea9dbf6486cd1465df7df40b884760c1606b524cf30a403389ad19627fd99bcfee58058e3d5a080a5beef5d languageName: node linkType: hard -"web3-eth-iban@npm:^4.0.7": - version: 4.0.7 - resolution: "web3-eth-iban@npm:4.0.7" +"web3-core@npm:1.10.3": + version: 1.10.3 + resolution: "web3-core@npm:1.10.3" dependencies: - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - web3-validator: "npm:^2.0.3" - checksum: 10/9d7521b4d4aef3a0d697905c7859d8e4d7ce82234320beecba9b24d254592a7ccf0354f329289b4e11a816fcbe3eceb842c4c87678f5e8ec622c8351bc1b9170 + "@types/bn.js": "npm:^5.1.1" + "@types/node": "npm:^12.12.6" + bignumber.js: "npm:^9.0.0" + web3-core-helpers: "npm:1.10.3" + web3-core-method: "npm:1.10.3" + web3-core-requestmanager: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/2e1db4570acadd94fa5206a1a92be094adc0b1e98f8b53c8d289395cc56d56ab587d259f508d24fb811f5d46330beac2c25e831628522d31589ec3fad94c6053 languageName: node linkType: hard -"web3-eth-personal@npm:^4.1.0": - version: 4.1.0 - resolution: "web3-eth-personal@npm:4.1.0" +"web3-errors@npm:^1.2.0": + version: 1.2.0 + resolution: "web3-errors@npm:1.2.0" dependencies: - web3-core: "npm:^4.6.0" - web3-eth: "npm:^4.9.0" - web3-rpc-methods: "npm:^1.3.0" - web3-types: "npm:^1.8.0" - web3-utils: "npm:^4.3.1" - web3-validator: "npm:^2.0.6" - checksum: 10/a560b0ef1f28961101c47824aa6fc71722c4e581ef5ffc5b68cf1b7db0fd5804032239f872a167a589b3c0ebe223353b8112b38e247e1f5b5ac48991e12f853c + web3-types: "npm:^1.6.0" + checksum: 10/99d0ecc4368c2969cc799ed4ef1b35f233dc3e7e0ccde713bcc850be4e75725ce175127342512504057ca48186266d6a053f129634f20ae23c405855a766d13d languageName: node linkType: hard -"web3-eth@npm:^4.10.0, web3-eth@npm:^4.8.0, web3-eth@npm:^4.8.2, web3-eth@npm:^4.9.0": - version: 4.10.0 - resolution: "web3-eth@npm:4.10.0" +"web3-eth-abi@npm:1.10.3": + version: 1.10.3 + resolution: "web3-eth-abi@npm:1.10.3" dependencies: - setimmediate: "npm:^1.0.5" - web3-core: "npm:^4.7.0" - web3-errors: "npm:^1.3.0" - web3-eth-abi: "npm:^4.3.0" - web3-eth-accounts: "npm:^4.2.1" - web3-net: "npm:^4.1.0" - web3-providers-ws: "npm:^4.0.8" - web3-rpc-methods: "npm:^1.3.0" - web3-types: "npm:^1.8.1" - web3-utils: "npm:^4.3.2" - web3-validator: "npm:^2.0.6" - checksum: 10/9dcbce05e160cde8148f2ad9919c56e0ad242beb05c2a013219a7d7ab697f5ca7e3c55089d27bdff50c28eebc36a9e1ae4b8b40c57432bdf5a200ace46d8cdc8 + "@ethersproject/abi": "npm:^5.6.3" + web3-utils: "npm:1.10.3" + checksum: 10/8b2ab1c381957102f367fa29300010a0cdedfd29017585d285c4bedf7eeae0a70801b135661c5bf977713b48ab424df107c0236dbe2387290adaa0750136067f languageName: node linkType: hard -"web3-net@npm:^4.1.0": - version: 4.1.0 - resolution: "web3-net@npm:4.1.0" +"web3-eth-accounts@npm:1.10.3": + version: 1.10.3 + resolution: "web3-eth-accounts@npm:1.10.3" dependencies: - web3-core: "npm:^4.4.0" - web3-rpc-methods: "npm:^1.3.0" - web3-types: "npm:^1.6.0" - web3-utils: "npm:^4.3.0" - checksum: 10/2899ed28d9afda9f9faee6424752cb967dabf79128bce25321318e069a41571b9bd9477b480f290fd65f07cd6c0c641def0d72f31a730705112bd14c301f4e5e + "@ethereumjs/common": "npm:2.6.5" + "@ethereumjs/tx": "npm:3.5.2" + "@ethereumjs/util": "npm:^8.1.0" + eth-lib: "npm:0.2.8" + scrypt-js: "npm:^3.0.1" + uuid: "npm:^9.0.0" + web3-core: "npm:1.10.3" + web3-core-helpers: "npm:1.10.3" + web3-core-method: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/ad534fe6b602d2f1c7317dc35e23a7a53951a52f4cd24b8b53a27d92bd8bedf8c61438a230dea06913224c20117e5b07fb849d8e437690b3765aaa11665759e8 languageName: node linkType: hard -"web3-providers-http@npm:^4.2.0": - version: 4.2.0 - resolution: "web3-providers-http@npm:4.2.0" +"web3-eth-contract@npm:1.10.3": + version: 1.10.3 + resolution: "web3-eth-contract@npm:1.10.3" dependencies: - cross-fetch: "npm:^4.0.0" - web3-errors: "npm:^1.3.0" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.1" - checksum: 10/812b05d1e0dd8b6c5005bdcfe3c5fbddfe6cdd082bd2654dfe171ad98c3b7ff85b0bab371c70366d2bace2cf45fbf7d2f087b4cb281dbfa12372b902b8138eeb + "@types/bn.js": "npm:^5.1.1" + web3-core: "npm:1.10.3" + web3-core-helpers: "npm:1.10.3" + web3-core-method: "npm:1.10.3" + web3-core-promievent: "npm:1.10.3" + web3-core-subscriptions: "npm:1.10.3" + web3-eth-abi: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/53e09738e8cf5f4c41538a927ea298ad27666ed879065104b69f1db8d2a020d0bb932088b8d0c3da98e41cfeab30451fa1e728b05205c5f6ec3386019642d572 languageName: node linkType: hard -"web3-providers-ipc@npm:^4.0.7": - version: 4.0.7 - resolution: "web3-providers-ipc@npm:4.0.7" +"web3-eth-ens@npm:1.10.3": + version: 1.10.3 + resolution: "web3-eth-ens@npm:1.10.3" dependencies: - web3-errors: "npm:^1.1.3" - web3-types: "npm:^1.3.0" - web3-utils: "npm:^4.0.7" - checksum: 10/b953818479f5d9c7b748e10977430fd7e377696f9160ae19b1917c0317e89671c4be824c06723b6fda190258927160fcec0e8e7c1aa87a5f0344008ef7649cda + content-hash: "npm:^2.5.2" + eth-ens-namehash: "npm:2.0.8" + web3-core: "npm:1.10.3" + web3-core-helpers: "npm:1.10.3" + web3-core-promievent: "npm:1.10.3" + web3-eth-abi: "npm:1.10.3" + web3-eth-contract: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/5bb7cc1bbba7b6519feccba2d1193d58eda8c7c52bb1392c29c884555c383b5b2bea6a23afd0be7afeaddce767a243f12552b89016c073ae080ee3d32cc3ba42 languageName: node linkType: hard -"web3-providers-ws@npm:^4.0.8": - version: 4.0.8 - resolution: "web3-providers-ws@npm:4.0.8" +"web3-eth-iban@npm:1.10.3": + version: 1.10.3 + resolution: "web3-eth-iban@npm:1.10.3" dependencies: - "@types/ws": "npm:8.5.3" - isomorphic-ws: "npm:^5.0.0" - web3-errors: "npm:^1.2.0" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.1" - ws: "npm:^8.17.1" - checksum: 10/9b9fa96fa1fc9455fb1b632de50f542d2589710002ea2cb0cd6a5c1ed9f72960d80ce219ac66b038ea6d0a767056fe653aa258a1c084aa78d5745870cc2703b4 + bn.js: "npm:^5.2.1" + web3-utils: "npm:1.10.3" + checksum: 10/ad711fc182cbe883a9987b1c496ebedfe32fcae438ac3ac6e5ac0bdea7a622db8f4fb16f18fb5ed94519dda21050e022a7c05d539a6e72de52d6672f614b2bb0 languageName: node linkType: hard -"web3-rpc-methods@npm:^1.3.0": - version: 1.3.0 - resolution: "web3-rpc-methods@npm:1.3.0" +"web3-eth-personal@npm:1.10.3": + version: 1.10.3 + resolution: "web3-eth-personal@npm:1.10.3" dependencies: - web3-core: "npm:^4.4.0" - web3-types: "npm:^1.6.0" - web3-validator: "npm:^2.0.6" - checksum: 10/8c134b1f2ae1cf94d5c452c53fe699d5951c22c62ea82084559db06722a5f0db2047be4209172ff90432c42f70cf8081fea0ea85a024e4cbcd0e037efd9acfa8 + "@types/node": "npm:^12.12.6" + web3-core: "npm:1.10.3" + web3-core-helpers: "npm:1.10.3" + web3-core-method: "npm:1.10.3" + web3-net: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/47c67687eccea6e906561a18da305d69f5d4384c854cee984aded3534651628265dcfe4ed693910dd1b84e91108b5dc96a715a085e3bb1618fb54143f56b743e languageName: node linkType: hard -"web3-rpc-providers@npm:^1.0.0-rc.2": - version: 1.0.0-rc.2 - resolution: "web3-rpc-providers@npm:1.0.0-rc.2" +"web3-eth@npm:1.10.3": + version: 1.10.3 + resolution: "web3-eth@npm:1.10.3" dependencies: - web3-errors: "npm:^1.3.0" - web3-providers-http: "npm:^4.2.0" - web3-providers-ws: "npm:^4.0.8" - web3-types: "npm:^1.7.0" - web3-utils: "npm:^4.3.1" - web3-validator: "npm:^2.0.6" - checksum: 10/8f1fb9a798cec61f245e6e13b796f1b43231d7bd5eb0db8b5b636b4e2facc75ee1453541237f057292ec7ecdb56ba284c29734cd17ea010c27c5580d6edea787 + web3-core: "npm:1.10.3" + web3-core-helpers: "npm:1.10.3" + web3-core-method: "npm:1.10.3" + web3-core-subscriptions: "npm:1.10.3" + web3-eth-abi: "npm:1.10.3" + web3-eth-accounts: "npm:1.10.3" + web3-eth-contract: "npm:1.10.3" + web3-eth-ens: "npm:1.10.3" + web3-eth-iban: "npm:1.10.3" + web3-eth-personal: "npm:1.10.3" + web3-net: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/7d5557c5853786de06d8183c0c2dbaee80979fbc3bd6ee65cef0e07b9d88f58677e0e0cff624ec2b433097a9f365c616a57231fa250719de4da1cf557ae0481a languageName: node linkType: hard -"web3-types@npm:^1.3.0, web3-types@npm:^1.6.0, web3-types@npm:^1.7.0, web3-types@npm:^1.8.0, web3-types@npm:^1.8.1": - version: 1.8.1 - resolution: "web3-types@npm:1.8.1" - checksum: 10/e64f7e59806e1875e34a1daaa34e98043fcaebfd2fc96ab9948789129e8da73e812de62f63cf32c347c202d6ba40121f87516b183bb7074f27331fc7f90a46d9 +"web3-net@npm:1.10.3": + version: 1.10.3 + resolution: "web3-net@npm:1.10.3" + dependencies: + web3-core: "npm:1.10.3" + web3-core-method: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/35ab560f51d5fa4d241ef514c0d7894b187a76ce7a73b03046281348e0ed2080eb20b8acb263ceb66b4e7874ecd4016833a83c24eae39fd4179cb53674c2b840 languageName: node linkType: hard -"web3-utils@npm:^4.0.7, web3-utils@npm:^4.3.0, web3-utils@npm:^4.3.1, web3-utils@npm:^4.3.2": - version: 4.3.2 - resolution: "web3-utils@npm:4.3.2" +"web3-providers-http@npm:1.10.3": + version: 1.10.3 + resolution: "web3-providers-http@npm:1.10.3" + dependencies: + abortcontroller-polyfill: "npm:^1.7.5" + cross-fetch: "npm:^4.0.0" + es6-promise: "npm:^4.2.8" + web3-core-helpers: "npm:1.10.3" + checksum: 10/78d475e6aceb265956bcda07b57c8005f95805be12373907ba00dd4ef32f4d6ff77c8db3f7a05d75e01b71ef3401a10fe5389dfb7419a0c49e19278e8ded7a25 + languageName: node + linkType: hard + +"web3-providers-ipc@npm:1.10.3": + version: 1.10.3 + resolution: "web3-providers-ipc@npm:1.10.3" + dependencies: + oboe: "npm:2.1.5" + web3-core-helpers: "npm:1.10.3" + checksum: 10/2038d69831eb0fb63f06023b5a3ab307ba0337caead0e0bb0aee3279bfcebec586cd50602565ed98c9e1e16fb99a5b2e57b8aa980e0685bfb35bfb99b9cf4859 + languageName: node + linkType: hard + +"web3-providers-ws@npm:1.10.3": + version: 1.10.3 + resolution: "web3-providers-ws@npm:1.10.3" + dependencies: + eventemitter3: "npm:4.0.4" + web3-core-helpers: "npm:1.10.3" + websocket: "npm:^1.0.32" + checksum: 10/0fbf9be16939d5defbd9e9addae9718e119098e3c3d5ea0b6e54f9e3be5145731f7d1750a8e8f61a577608ca4b5f99a48a324bb7d7432ec62402f14d7a87ebe5 + languageName: node + linkType: hard + +"web3-shh@npm:1.10.3": + version: 1.10.3 + resolution: "web3-shh@npm:1.10.3" + dependencies: + web3-core: "npm:1.10.3" + web3-core-method: "npm:1.10.3" + web3-core-subscriptions: "npm:1.10.3" + web3-net: "npm:1.10.3" + checksum: 10/0697f7ee54e65f27daa237d396fb8c375088e9de1693bf3fffcc05a98cf06ee4a66813971e594d56023023d0559538bd5ef89273e44243bb16c52e614a51eeb7 + languageName: node + linkType: hard + +"web3-types@npm:^1.6.0, web3-types@npm:^1.7.0": + version: 1.7.0 + resolution: "web3-types@npm:1.7.0" + checksum: 10/fcd5d7a9a94579fcd01fa86dfa70e6afb269f66a7ce60e6786849e64ff6e4a107f1c25cb2784343a48952ac36d4bf3093a73b75de6ebcc971308e6b44abb211f + languageName: node + linkType: hard + +"web3-utils@npm:1.10.3": + version: 1.10.3 + resolution: "web3-utils@npm:1.10.3" + dependencies: + "@ethereumjs/util": "npm:^8.1.0" + bn.js: "npm:^5.2.1" + ethereum-bloom-filters: "npm:^1.0.6" + ethereum-cryptography: "npm:^2.1.2" + ethjs-unit: "npm:0.1.6" + number-to-bn: "npm:1.7.0" + randombytes: "npm:^2.1.0" + utf8: "npm:3.0.0" + checksum: 10/7303919fbea2be4a720eb7688a51edb84f993e481bf08ac482c0e3a8f100300ce9a1b51b2775a8356fd397aa2a64fa016d9621d9ced05bdbfe1013d6b5ea90ef + languageName: node + linkType: hard + +"web3-utils@npm:^4.3.1": + version: 4.3.1 + resolution: "web3-utils@npm:4.3.1" dependencies: ethereum-cryptography: "npm:^2.0.0" eventemitter3: "npm:^5.0.1" - web3-errors: "npm:^1.3.0" - web3-types: "npm:^1.8.1" + web3-errors: "npm:^1.2.0" + web3-types: "npm:^1.7.0" web3-validator: "npm:^2.0.6" - checksum: 10/3fff4418782b0fb05587c9150daedbad90a9ebadd1e3b115a71a72fea885ce10341054758087e47ab81f3cc67da812eaf9077f05e07a872e63d27299f285a81a + checksum: 10/88e39a6d43b756e965226b25ddc54855f26a7c13f6240b99fb521e1bae35a20a24f637f09fd0f4ef5d3f5a9e46b7f843bb5fd7ac2c9f99cfe18bb71817390f6e languageName: node linkType: hard -"web3-validator@npm:^2.0.3, web3-validator@npm:^2.0.6": +"web3-validator@npm:^2.0.6": version: 2.0.6 resolution: "web3-validator@npm:2.0.6" dependencies: @@ -42180,28 +41562,18 @@ __metadata: languageName: node linkType: hard -"web3@npm:^4.14.0": - version: 4.14.0 - resolution: "web3@npm:4.14.0" - dependencies: - web3-core: "npm:^4.7.0" - web3-errors: "npm:^1.3.0" - web3-eth: "npm:^4.10.0" - web3-eth-abi: "npm:^4.3.0" - web3-eth-accounts: "npm:^4.2.1" - web3-eth-contract: "npm:^4.7.0" - web3-eth-ens: "npm:^4.4.0" - web3-eth-iban: "npm:^4.0.7" - web3-eth-personal: "npm:^4.1.0" - web3-net: "npm:^4.1.0" - web3-providers-http: "npm:^4.2.0" - web3-providers-ws: "npm:^4.0.8" - web3-rpc-methods: "npm:^1.3.0" - web3-rpc-providers: "npm:^1.0.0-rc.2" - web3-types: "npm:^1.8.1" - web3-utils: "npm:^4.3.2" - web3-validator: "npm:^2.0.6" - checksum: 10/cd8db8ace62c73b7c9ae4a1e1eaec99d8c107295e75e1e6fe770c52bcce919ef17c1d84b835d33c595ac72972207f23ae5cbdcb5382656709cc91db82437fc07 +"web3@npm:^1.9.0": + version: 1.10.3 + resolution: "web3@npm:1.10.3" + dependencies: + web3-bzz: "npm:1.10.3" + web3-core: "npm:1.10.3" + web3-eth: "npm:1.10.3" + web3-eth-personal: "npm:1.10.3" + web3-net: "npm:1.10.3" + web3-shh: "npm:1.10.3" + web3-utils: "npm:1.10.3" + checksum: 10/6087dc7efaed48ba8f9f944bdf0ac223e99ccb5f132fda791a314f8ce531b1a182e4274c8ee8a0191ae3203e70a762f52eea7e038ee2822719a849f4ec4c9e22 languageName: node linkType: hard @@ -42561,6 +41933,20 @@ __metadata: languageName: node linkType: hard +"websocket@npm:^1.0.32": + version: 1.0.34 + resolution: "websocket@npm:1.0.34" + dependencies: + bufferutil: "npm:^4.0.1" + debug: "npm:^2.2.0" + es5-ext: "npm:^0.10.50" + typedarray-to-buffer: "npm:^3.1.5" + utf-8-validate: "npm:^5.0.2" + yaeti: "npm:^0.0.6" + checksum: 10/b72e3dcc3fa92b4a4511f0df89b25feed6ab06979cb9e522d2736f09855f4bf7588d826773b9405fcf3f05698200eb55ba9da7ef333584653d4912a5d3b13c18 + languageName: node + linkType: hard + "whatwg-encoding@npm:^2.0.0": version: 2.0.0 resolution: "whatwg-encoding@npm:2.0.0" @@ -42665,38 +42051,6 @@ __metadata: languageName: node linkType: hard -"which-builtin-type@npm:^1.1.3": - version: 1.1.3 - resolution: "which-builtin-type@npm:1.1.3" - dependencies: - function.prototype.name: "npm:^1.1.5" - has-tostringtag: "npm:^1.0.0" - is-async-function: "npm:^2.0.0" - is-date-object: "npm:^1.0.5" - is-finalizationregistry: "npm:^1.0.2" - is-generator-function: "npm:^1.0.10" - is-regex: "npm:^1.1.4" - is-weakref: "npm:^1.0.2" - isarray: "npm:^2.0.5" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.9" - checksum: 10/d7823c4a6aa4fc8183eb572edd9f9ee2751e5f3ba2ccd5b298cc163f720df0f02ee1a5291d18ca8a41d48144ef40007ff6a64e6f5e7c506527086c7513a5f673 - languageName: node - linkType: hard - -"which-collection@npm:^1.0.1": - version: 1.0.1 - resolution: "which-collection@npm:1.0.1" - dependencies: - is-map: "npm:^2.0.1" - is-set: "npm:^2.0.1" - is-weakmap: "npm:^2.0.1" - is-weakset: "npm:^2.0.1" - checksum: 10/85c95fcf92df7972ce66bed879e53d9dc752a30ef08e1ca4696df56bcf1c302e3b9965a39b04a20fa280a997fad6c170eb0b4d62435569b7f6c0bc7be910572b - languageName: node - linkType: hard - "which-module@npm:^2.0.0": version: 2.0.0 resolution: "which-module@npm:2.0.0" @@ -42704,7 +42058,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: @@ -42887,6 +42241,17 @@ __metadata: languageName: node linkType: hard +"ws@npm:^3.0.0": + version: 3.3.3 + resolution: "ws@npm:3.3.3" + dependencies: + async-limiter: "npm:~1.0.0" + safe-buffer: "npm:~5.1.0" + ultron: "npm:~1.1.0" + checksum: 10/4b4a7e5d11025e399d82a7471bfb4818d563c892f5d953c2de937d262bd8e8acc8b340220001c01f8392574fccbc2df153d6031e285b8b38441187ea0c2cfd72 + languageName: node + linkType: hard + "ws@npm:^6.1.0, ws@npm:^6.2.2, ws@npm:^6.2.3": version: 6.2.3 resolution: "ws@npm:6.2.3" @@ -42896,7 +42261,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7, ws@npm:^7.0.0, ws@npm:^7.2.0, ws@npm:^7.3.1, ws@npm:^7.5.10, ws@npm:^7.5.3": +"ws@npm:^7, ws@npm:^7.0.0, ws@npm:^7.2.0, ws@npm:^7.3.1, ws@npm:^7.4.5, ws@npm:^7.5.10, ws@npm:^7.5.3": version: 7.5.10 resolution: "ws@npm:7.5.10" peerDependencies: @@ -42911,7 +42276,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.11.0, ws@npm:^8.12.1, ws@npm:^8.16.0, ws@npm:^8.17.1, ws@npm:^8.18.0, ws@npm:^8.2.3, ws@npm:^8.5.0": +"ws@npm:^8.11.0, ws@npm:^8.12.1, ws@npm:^8.16.0, ws@npm:^8.18.0, ws@npm:^8.2.3, ws@npm:^8.5.0": version: 8.18.0 resolution: "ws@npm:8.18.0" peerDependencies: @@ -42951,6 +42316,42 @@ __metadata: languageName: node linkType: hard +"xhr-request-promise@npm:^0.1.2": + version: 0.1.3 + resolution: "xhr-request-promise@npm:0.1.3" + dependencies: + xhr-request: "npm:^1.1.0" + checksum: 10/49ec3474884858faa55349894b1879c872422a24485097c8b71ba9046027d27f1d54eb61dfdb9d72e78892c7371d22d9cc6a4e101b6767bb4df89a0b6d739f85 + languageName: node + linkType: hard + +"xhr-request@npm:^1.0.1, xhr-request@npm:^1.1.0": + version: 1.1.0 + resolution: "xhr-request@npm:1.1.0" + dependencies: + buffer-to-arraybuffer: "npm:^0.0.5" + object-assign: "npm:^4.1.1" + query-string: "npm:^5.0.1" + simple-get: "npm:^2.7.0" + timed-out: "npm:^4.0.1" + url-set-query: "npm:^1.0.0" + xhr: "npm:^2.0.4" + checksum: 10/531c5e1e47d2e680c1ae1296af7fa375d752cd83c3fa1f9bd9e82fc4fb305ce8e7aaf266256e82bbd34e2a4891ec535bcc4e9f8db2691ab64bb3b6ff40296b9a + languageName: node + linkType: hard + +"xhr@npm:^2.0.4, xhr@npm:^2.3.3": + version: 2.6.0 + resolution: "xhr@npm:2.6.0" + dependencies: + global: "npm:~4.4.0" + is-function: "npm:^1.0.1" + parse-headers: "npm:^2.0.0" + xtend: "npm:^4.0.0" + checksum: 10/31f34aba708955008c87bcd21482be6afc7ff8adc28090e633b1d3f8d3e8e93150bac47b262738b046d7729023a884b655d55cf34e9d14d5850a1275ab49fb37 + languageName: node + linkType: hard + "xml-name-validator@npm:^4.0.0": version: 4.0.0 resolution: "xml-name-validator@npm:4.0.0" @@ -43062,6 +42463,13 @@ __metadata: languageName: node linkType: hard +"yaeti@npm:^0.0.6": + version: 0.0.6 + resolution: "yaeti@npm:0.0.6" + checksum: 10/6db12c152f7c363b80071086a3ebf5032e03332604eeda988872be50d6c8469e1f13316175544fa320f72edad696c2d83843ad0ff370659045c1a68bcecfcfea + languageName: node + linkType: hard + "yallist@npm:^2.1.2": version: 2.1.2 resolution: "yallist@npm:2.1.2" @@ -43069,7 +42477,7 @@ __metadata: languageName: node linkType: hard -"yallist@npm:^3.0.2": +"yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1": version: 3.1.1 resolution: "yallist@npm:3.1.1" checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb @@ -43097,7 +42505,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.0.0, yaml@npm:^2.2.1, yaml@npm:^2.2.2, yaml@npm:^2.3.4": +"yaml@npm:^2.2.1, yaml@npm:^2.2.2, yaml@npm:^2.3.4": version: 2.4.1 resolution: "yaml@npm:2.4.1" bin: From e788ace47b14fcbd330c07c6996e352547043e06 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Thu, 31 Oct 2024 13:51:33 +0100 Subject: [PATCH 04/29] chore: re-introduce ESLint for the monorepo chore: re-introduce ESLint for the monorepo fix: config --- eslint.config.mjs | 230 +++ package.json | 320 +-- packages/blockchain-link-utils/.eslintrc.js | 5 - .../blockchain-link-utils/eslint.config.mjs | 15 + packages/blockchain-link/.eslintrc.js | 7 - packages/blockchain-link/eslint.config.mjs | 12 + packages/coinjoin/.eslintrc.js | 6 - packages/coinjoin/eslint.config.mjs | 8 + .../webextension-mv2/.eslintrc.js | 7 - .../webextension-mv2/eslint.config.mjs | 14 + packages/connect-explorer/.eslintrc.js | 19 - packages/connect-explorer/eslint.config.mjs | 37 + packages/connect-explorer/package.json | 1 + packages/connect-web/.eslintrc.js | 6 - packages/connect-web/eslint.config.mjs | 8 + packages/connect-webextension/.eslintrc.js | 5 - .../connect-webextension/eslint.config.mjs | 7 + packages/connect/.eslintrc.js | 9 - packages/connect/eslint.config.mjs | 11 + packages/protobuf/.eslintrc.js | 6 - packages/protobuf/eslint.config.mjs | 8 + packages/schema-utils/.eslintrc.js | 7 - packages/schema-utils/eslint.config.mjs | 20 + packages/suite/.eslintrc.js | 5 - packages/suite/eslint.config.mjs | 15 + packages/transport-test/.eslintrc.js | 6 - packages/transport-test/eslint.config.mjs | 8 + packages/utils/.eslintrc.js | 7 - packages/utils/eslint.config.mjs | 18 + packages/utxo-lib/.eslintrc.js | 8 - packages/utxo-lib/eslint.config.mjs | 10 + scripts/eslint.config.mjs | 10 + suite-native/app/app.config.ts | 1 - suite-native/icons/src/PizzaIcon.tsx | 1 - suite-native/react-native-graph/.eslintrc.js | 11 - .../react-native-graph/eslint.config.mjs | 14 + testjs | 358 ++++ yarn.lock | 1801 ++++++++++++++++- 38 files changed, 2742 insertions(+), 299 deletions(-) create mode 100644 eslint.config.mjs delete mode 100644 packages/blockchain-link-utils/.eslintrc.js create mode 100644 packages/blockchain-link-utils/eslint.config.mjs delete mode 100644 packages/blockchain-link/.eslintrc.js create mode 100644 packages/blockchain-link/eslint.config.mjs delete mode 100644 packages/coinjoin/.eslintrc.js create mode 100644 packages/coinjoin/eslint.config.mjs delete mode 100644 packages/connect-examples/webextension-mv2/.eslintrc.js create mode 100644 packages/connect-examples/webextension-mv2/eslint.config.mjs delete mode 100644 packages/connect-explorer/.eslintrc.js create mode 100644 packages/connect-explorer/eslint.config.mjs delete mode 100644 packages/connect-web/.eslintrc.js create mode 100644 packages/connect-web/eslint.config.mjs delete mode 100644 packages/connect-webextension/.eslintrc.js create mode 100644 packages/connect-webextension/eslint.config.mjs delete mode 100644 packages/connect/.eslintrc.js create mode 100644 packages/connect/eslint.config.mjs delete mode 100644 packages/protobuf/.eslintrc.js create mode 100644 packages/protobuf/eslint.config.mjs delete mode 100644 packages/schema-utils/.eslintrc.js create mode 100644 packages/schema-utils/eslint.config.mjs delete mode 100644 packages/suite/.eslintrc.js create mode 100644 packages/suite/eslint.config.mjs delete mode 100644 packages/transport-test/.eslintrc.js create mode 100644 packages/transport-test/eslint.config.mjs delete mode 100644 packages/utils/.eslintrc.js create mode 100644 packages/utils/eslint.config.mjs delete mode 100644 packages/utxo-lib/.eslintrc.js create mode 100644 packages/utxo-lib/eslint.config.mjs create mode 100644 scripts/eslint.config.mjs delete mode 100644 suite-native/react-native-graph/.eslintrc.js create mode 100644 suite-native/react-native-graph/eslint.config.mjs create mode 100644 testjs diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000000..1d20611f54f --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,230 @@ +import path from 'path'; +import { fileURLToPath } from 'url'; + +import globals from 'globals'; +import pluginJs from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import pluginReact from 'eslint-plugin-react'; +import pluginJest from 'eslint-plugin-jest'; +import pluginReactHooks from 'eslint-plugin-react-hooks'; +import pluginImport from 'eslint-plugin-import'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +export default [ + { + ignores: [ + '**/.nx/*', + '**/lib/*', + '**/libDev/*', + '**/dist/*', + '**/coverage/*', + '**/build/*', + '**/build-electron/*', + '**/node_modules/*', + '**/public/*', + 'packages/suite-data/files/*', + 'packages/protobuf/scripts/protobuf-patches/*', + 'packages/address-validator', + 'packages/connect-examples', + '**/ci/', + 'eslint-local-rules/*', + ], + }, + { files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, + { languageOptions: { globals: globals.browser } }, + { + languageOptions: { + globals: { + ...globals.serviceworker, + ...globals.browser, + }, + }, + }, + + // JS + pluginJs.configs.recommended, + { + rules: { + // Offs + 'no-undef': 'off', // Todo: write description + + // Additional rules + 'no-console': ['error', { allow: ['warn', 'error'] }], + 'require-await': ['error'], + }, + }, + { + files: ['**/*.js'], // Usually config files + rules: { + 'no-console': 'off', + }, + }, + + // React + pluginReact.configs.flat.recommended, + { + languageOptions: { + ...pluginReact.configs.flat.recommended.languageOptions, + }, + settings: { react: { version: 'detect' } }, + rules: { + // Offs + 'react/react-in-jsx-scope': 'off', // We are not importing React in every file + 'react/prop-types': 'off', // This rule is not needed when using TypeScript + 'react/display-name': 'off', // This is annoying for stuff like `forwardRef`. Todo: reconsider + 'no-prototype-builtins': 'off', // Todo: just temporary, reconsider to remove it + }, + }, + + // React Hooks + { + plugins: { 'react-hooks': pluginReactHooks }, + rules: pluginReactHooks.configs.recommended.rules, + }, + + // Typescript + ...tseslint.configs.recommended, + { + rules: { + // Offs + '@typescript-eslint/no-require-imports': 'off', // We just use require a lot (mostly for dynamic imports) + '@typescript-eslint/no-explicit-any': 'off', // Todo: write description + '@typescript-eslint/ban-ts-comment': 'off', // Todo: just temporary, reconsider to remove it + '@typescript-eslint/no-empty-object-type': 'off', // Todo: we shall solve this, this is bad practice + + // Additional rules + '@typescript-eslint/no-unused-vars': [ + 'error', + { + vars: 'all', + args: 'none', + ignoreRestSiblings: true, + varsIgnorePattern: '^_', + }, + ], + '@typescript-eslint/no-shadow': [ + 'error', + { + builtinGlobals: true, + allow: [ + '_', + 'error', + 'resolve', + 'reject', + 'fetch', + + // Todo: all below are magic, I have no idea why they are triggered + 'Text', + 'navigation', + 'Screen', + 'screen', + 'top', + 'Image', + 'event', + 'Event', + 'alert', + 'model', + 'StyleSheet', + 'Crypto', + 'Keyboard', + 'name', + 'Clipboard', + 'Storage', + 'status', + 'Notification', + 'PermissionStatus', + 'length', + 'close', + 'path', + ], + }, + ], + '@typescript-eslint/no-use-before-define': ['error'], + }, + }, + + // Import + pluginImport.flatConfigs.recommended, + { + settings: { + 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], + 'import/resolver': { + node: { + paths: [path.resolve(__dirname, 'eslint-rules')], + }, + }, + }, + rules: { + // Offs + 'import/no-unresolved': 'off', // Does not work with Babel react-native to react-native-web + 'import/no-default-export': 'error', + 'import/no-anonymous-default-export': [ + 'error', + { + allowArray: true, + allowLiteral: true, + allowObject: true, + }, + ], + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: [ + '**/*fixtures*/**', + '**/*.test.{tsx,ts,js}', + '**/blockchain-link/tests/**', + '**/blockchain-link/webpack/**', + '**/suite-desktop-core/**', + '**/*e2e/**', + '**/suite/src/support/tests/**', + '**/suite-data/**', + '**/*.stories.*', + '**/*webpack.config*', + '**/webpack/**', + ], + + includeTypes: true, + }, + ], + }, + }, + + // Tests + pluginJest.configs['flat/recommended'], + { + rules: { + 'jest/valid-title': 'off', // This rule does not use Typescript and produces false positives + 'jest/valid-describe-callback': 'off', // This rule does not use Typescript and produces false positives + 'jest/no-disabled-tests': 'off', // Well, what can I say... ¯\_(ツ)_/¯ We skip tests sometimes. + 'jest/no-focused-tests': 'off', // Same as above, but // Todo: shall be easy to get rid of this + 'jest/no-conditional-expect': 'off', // Todo: we shall solve this, this is bad practice + }, + }, + // { + // files: ['**/*.test.*', '**/__tests__/**/*'], + // rules: { + // 'import/no-extraneous-dependencies': 'off', + // 'import/no-unresolved': 'off', + // 'import/no-default-export': 'off', + // }, + // }, + + // Suite Native E2E tests + { + files: ['suite-native/app/e2e/tests/**'], + rules: { + 'jest/expect-expect': 'off', + }, + }, + + // ESLint config + { + files: ['**/eslint.config.mjs'], + rules: { + 'import/no-default-export': 'off', + 'import/no-extraneous-dependencies': 'off', + }, + }, +]; diff --git a/package.json b/package.json index ec68e76f827..e4d73f48ec3 100644 --- a/package.json +++ b/package.json @@ -1,160 +1,168 @@ { - "name": "trezor-suite", - "version": "1.0.0", - "private": true, - "repository": "https://github.com/trezor/trezor-suite.git", - "license": "SEE LICENSE IN LICENSE.md", - "engines": { - "node": "18", - "yarn": ">=4" + "name": "trezor-suite", + "version": "1.0.0", + "private": true, + "repository": "https://github.com/trezor/trezor-suite.git", + "license": "SEE LICENSE IN LICENSE.md", + "engines": { + "node": "18", + "yarn": ">=4" + }, + "workspaces": { + "packages": [ + "packages/*", + "packages/connect-examples/*", + "suite-native/*", + "suite-common/*", + "scripts" + ] + }, + "scripts": { + "_______ Hooks _______": "Yarn hooks.", + "postinstall": "yarn run patch-package", + "_______ Library Scripts #####": "Some libraries have their own build scripts.", + "build:libs": "yarn nx run-many --skip-nx-cache --target=build:lib", + "suite:build:web": "yarn workspace @trezor/suite-web build", + "_______ Start Scripts _______": "Here are standalone scripts for running individual applications for development.", + "suite:dev": "yarn workspace @trezor/suite-web dev", + "suite:dev:desktop": "yarn workspace @trezor/suite-desktop dev", + "native:start": "yarn workspace @suite-native/app start", + "_______ Testing _______": "Testing, linting, type checking...", + "type-check": "yarn nx run-many --target=type-check", + "type-check:force": "rimraf -rf -- **/libDev && yarn type-check", + "test:unit": "yarn nx run-many --target=test:unit", + "lint:js": "eslint . --cache --cache-strategy content --flag unstable_config_lookup_from_file", + "lint:styles": "yarn nx run-many --target=lint:styles", + "lint": "yarn lint:styles && yarn lint:js", + "lint-staged": "npx lint-staged", + "lint:shellcheck": "./scripts/shellcheck.sh", + "_______ Global Scripts _______": "Shared scripts for running in all workspaces", + "g:eslint": "cd $INIT_CWD && eslint --report-unused-disable-directives --cache --ignore-path ../../.gitignore", + "g:jest": "cd $INIT_CWD && jest", + "g:prettier": "cd $INIT_CWD && prettier", + "g:rimraf": "cd $INIT_CWD && rimraf", + "g:tsc": "cd $INIT_CWD && tsc", + "g:tsx": "cd $INIT_CWD && tsx", + "g:depcheck": "cd $INIT_CWD && depcheck", + "_______ Nx testing _______": "Nx wrapped commands for testing, linting, type checking...", + "nx:build:libs": "yarn nx affected --target=build:lib", + "nx:type-check": "yarn nx affected --target=type-check", + "nx:test-unit": "yarn nx affected --target=test:unit", + "nx:lint:js": "yarn nx affected --target=lint:js", + "nx:lint:styles": "yarn nx affected --target=lint:styles", + "nx:format": "yarn nx format:check", + "_______ Commands _______": "Useful commands and scripts.", + "patch": "yarn patch-package", + "update-project-references": "yarn tsx ./scripts/updateProjectReferences.ts", + "verify-project-references": "yarn update-project-references --test", + "check-workspace-resolutions": "yarn tsx ./scripts/check-workspace-resolutions.ts", + "generate-package": "yarn tsx ./scripts/generatePackage.js", + "deps": "rimraf **/node_modules && yarn", + "depcheck": "yarn nx affected --target=depcheck", + "list-outdated": "./scripts/list-outdated-dependencies/list-outdated-dependencies.sh", + "message-system-sign-config": "yarn workspace @suite-common/message-system sign-config", + "format": "yarn nx format:write", + "format:all": "yarn prettier --write \"**/*.{js,ts,tsx,mdx,md,html,json,yml,yaml}\"", + "format:verify": "yarn prettier --check \"**/*.{js,ts,tsx,mdx,md,html,json}\"", + "update-submodules": "./scripts/update-submodules.sh", + "update-coins": "./scripts/update-coins.sh", + "update-models": "./scripts/update-models.sh", + "update-protobuf": "./scripts/update-protobuf.sh", + "update-coinjoin-middleware": "yarn workspace @trezor/suite-data update-coinjoin-middleware", + "prepare-release": "./scripts/prepare-release.sh", + "native:android": "yarn workspace @suite-native/app android", + "native:ios": "yarn workspace @suite-native/app ios", + "native:prebuild": "yarn workspace @suite-native/app prebuild", + "native:prebuild:clean": "yarn workspace @suite-native/app prebuild:clean", + "native:adhoc": "yarn workspace @suite-native/app build:adhoc", + "native:reverse-ports": "yarn workspace @suite-native/app reverse-ports", + "_______ Aliases _______": "Aliases for longer commands which we often have to run manually. Names don't have to be pretty or make total sense.", + "refs": "yarn update-project-references", + "types": "yarn type-check", + "messages": "yarn message-system-sign-config", + "validate": "yarn verify-project-references && yarn lint:js && yarn nx:lint:styles && yarn nx:build:libs && yarn nx:type-check && yarn nx:test-unit && yarn check-workspace-resolutions && yarn depcheck", + "a": "yarn native:android", + "ios": "yarn native:ios", + "p": "yarn native:prebuild", + "ports": "yarn native:reverse-ports", + "s": "yarn native:start" + }, + "lint-staged": { + "packages/**/*.{ts,tsx}": [ + "eslint --fix", + "git add" + ], + "packages/{suite,suite-web,suite-desktop-ui,connect-explorer,connect-popup,connect-ui,components,product-components}/**/*.{ts,tsx}": [ + "stylelint --fix", + "git add" + ] + }, + "resolutions": { + "typescript": "5.5.4", + "react-native": "0.75.2", + "prettier": "3.2.5", + "type-fest": "4.24.0", + "bcrypto": "5.4.0", + "react": "18.2.0", + "electron": "32.1.2", + "@types/node": "20.12.7", + "@types/react": "18.2.55", + "bn.js": "5.2.1" + }, + "devDependencies": { + "@babel/cli": "^7.23.9", + "@babel/core": "^7.23.9", + "@babel/node": "^7.23.9", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-decorators": "^7.23.9", + "@babel/plugin-transform-runtime": "^7.23.9", + "@babel/preset-env": "^7.23.9", + "@babel/preset-react": "^7.24.7", + "@babel/preset-typescript": "^7.24.7", + "@babel/runtime": "^7.23.9", + "@eslint/js": "^9.13.0", + "@suite-common/wallet-types": "workspace:*", + "@types/jest": "29.5.12", + "@types/node": "20.12.7", + "@types/prettier": "^3.0.0", + "@types/semver": "^7.5.6", + "@types/tar": "^6.1.11", + "babel-jest": "29.7.0", + "depcheck": "^1.4.7", + "eslint": "^9.13.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.8.3", + "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react-hooks": "^5.0.0", + "globals": "^15.11.0", + "jest": "29.7.0", + "jest-environment-jsdom": "29.7.0", + "jest-expo": "^50.0.2", + "metro-react-native-babel-preset": "0.77.0", + "nx": "^18.0.3", + "patch-package": "8.0.0", + "prettier": "^3.3.2", + "rimraf": "^6.0.1", + "semver": "^7.6.3", + "tar": "^7.0.1", + "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0", + "tslib": "^2.6.2", + "tsx": "^4.16.3", + "typescript": "5.5.4", + "typescript-eslint": "^8.12.2", + "version-bump-prompt": "^6.1.0" + }, + "dependenciesMeta": { + "core-js-pure": { + "built": false }, - "workspaces": { - "packages": [ - "packages/*", - "packages/connect-examples/*", - "suite-native/*", - "suite-common/*", - "scripts" - ] + "electron": { + "built": true }, - "scripts": { - "_______ Hooks _______": "Yarn hooks.", - "postinstall": "yarn run patch-package", - "_______ Library Scripts #####": "Some libraries have their own build scripts.", - "build:libs": "yarn nx run-many --skip-nx-cache --target=build:lib", - "suite:build:web": "yarn workspace @trezor/suite-web build", - "_______ Start Scripts _______": "Here are standalone scripts for running individual applications for development.", - "suite:dev": "yarn workspace @trezor/suite-web dev", - "suite:dev:desktop": "yarn workspace @trezor/suite-desktop dev", - "native:start": "yarn workspace @suite-native/app start", - "_______ Testing _______": "Testing, linting, type checking...", - "type-check": "yarn nx run-many --target=type-check", - "type-check:force": "rimraf -rf -- **/libDev && yarn type-check", - "test:unit": "yarn nx run-many --target=test:unit", - "lint:js": "eslint . --cache --cache-strategy content --ignore-path .gitignore", - "lint:styles": "yarn nx run-many --target=lint:styles", - "lint": "yarn lint:styles && yarn lint:js", - "lint-staged": "npx lint-staged", - "lint:shellcheck": "./scripts/shellcheck.sh", - "_______ Global Scripts _______": "Shared scripts for running in all workspaces", - "g:eslint": "cd $INIT_CWD && eslint --report-unused-disable-directives --cache --ignore-path ../../.gitignore", - "g:jest": "cd $INIT_CWD && jest", - "g:prettier": "cd $INIT_CWD && prettier", - "g:rimraf": "cd $INIT_CWD && rimraf", - "g:tsc": "cd $INIT_CWD && tsc", - "g:tsx": "cd $INIT_CWD && tsx", - "g:depcheck": "cd $INIT_CWD && depcheck", - "_______ Nx testing _______": "Nx wrapped commands for testing, linting, type checking...", - "nx:build:libs": "yarn nx affected --target=build:lib", - "nx:type-check": "yarn nx affected --target=type-check", - "nx:test-unit": "yarn nx affected --target=test:unit", - "nx:lint:js": "yarn nx affected --target=lint:js", - "nx:lint:styles": "yarn nx affected --target=lint:styles", - "nx:format": "yarn nx format:check", - "_______ Commands _______": "Useful commands and scripts.", - "patch": "yarn patch-package", - "update-project-references": "yarn tsx ./scripts/updateProjectReferences.ts", - "verify-project-references": "yarn update-project-references --test", - "check-workspace-resolutions": "yarn tsx ./scripts/check-workspace-resolutions.ts", - "generate-package": "yarn tsx ./scripts/generatePackage.js", - "deps": "rimraf **/node_modules && yarn", - "depcheck": "yarn nx affected --target=depcheck", - "list-outdated": "./scripts/list-outdated-dependencies/list-outdated-dependencies.sh", - "message-system-sign-config": "yarn workspace @suite-common/message-system sign-config", - "format": "yarn nx format:write", - "format:all": "yarn prettier --write \"**/*.{js,ts,tsx,mdx,md,html,json,yml,yaml}\"", - "format:verify": "yarn prettier --check \"**/*.{js,ts,tsx,mdx,md,html,json}\"", - "update-submodules": "./scripts/update-submodules.sh", - "update-coins": "./scripts/update-coins.sh", - "update-models": "./scripts/update-models.sh", - "update-protobuf": "./scripts/update-protobuf.sh", - "update-coinjoin-middleware": "yarn workspace @trezor/suite-data update-coinjoin-middleware", - "prepare-release": "./scripts/prepare-release.sh", - "native:android": "yarn workspace @suite-native/app android", - "native:ios": "yarn workspace @suite-native/app ios", - "native:prebuild": "yarn workspace @suite-native/app prebuild", - "native:prebuild:clean": "yarn workspace @suite-native/app prebuild:clean", - "native:adhoc": "yarn workspace @suite-native/app build:adhoc", - "native:reverse-ports": "yarn workspace @suite-native/app reverse-ports", - "_______ Aliases _______": "Aliases for longer commands which we often have to run manually. Names don't have to be pretty or make total sense.", - "refs": "yarn update-project-references", - "types": "yarn type-check", - "messages": "yarn message-system-sign-config", - "validate": "yarn verify-project-references && yarn lint:js && yarn nx:lint:styles && yarn nx:build:libs && yarn nx:type-check && yarn nx:test-unit && yarn check-workspace-resolutions && yarn depcheck", - "a": "yarn native:android", - "ios": "yarn native:ios", - "p": "yarn native:prebuild", - "ports": "yarn native:reverse-ports", - "s": "yarn native:start" - }, - "lint-staged": { - "packages/**/*.{ts,tsx}": [ - "eslint --fix", - "git add" - ], - "packages/{suite,suite-web,suite-desktop-ui,connect-explorer,connect-popup,connect-ui,components,product-components}/**/*.{ts,tsx}": [ - "stylelint --fix", - "git add" - ] - }, - "resolutions": { - "typescript": "5.5.4", - "react-native": "0.75.2", - "prettier": "3.2.5", - "type-fest": "4.24.0", - "bcrypto": "5.4.0", - "react": "18.2.0", - "electron": "32.1.2", - "@types/node": "20.12.7", - "@types/react": "18.2.55", - "bn.js": "5.2.1" - }, - "devDependencies": { - "@babel/cli": "^7.23.9", - "@babel/core": "^7.23.9", - "@babel/node": "^7.23.9", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-decorators": "^7.23.9", - "@babel/plugin-transform-runtime": "^7.23.9", - "@babel/preset-env": "^7.23.9", - "@babel/preset-react": "^7.24.7", - "@babel/preset-typescript": "^7.24.7", - "@babel/runtime": "^7.23.9", - "@suite-common/wallet-types": "workspace:*", - "@types/jest": "29.5.12", - "@types/node": "20.12.7", - "@types/prettier": "^3.0.0", - "@types/semver": "^7.5.6", - "@types/tar": "^6.1.11", - "babel-jest": "29.7.0", - "depcheck": "^1.4.7", - "jest": "29.7.0", - "jest-environment-jsdom": "29.7.0", - "jest-expo": "^50.0.2", - "metro-react-native-babel-preset": "0.77.0", - "nx": "^18.0.3", - "patch-package": "8.0.0", - "prettier": "^3.3.2", - "rimraf": "^6.0.1", - "semver": "^7.6.3", - "tar": "^7.0.1", - "ts-node": "^10.9.2", - "tsconfig-paths": "^4.2.0", - "tslib": "^2.6.2", - "tsx": "^4.16.3", - "typescript": "5.5.4", - "version-bump-prompt": "^6.1.0" - }, - "dependenciesMeta": { - "core-js-pure": { - "built": false - }, - "electron": { - "built": true - }, - "trezor-suite": { - "built": true - } - }, - "packageManager": "yarn@4.2.2" + "trezor-suite": { + "built": true + } + }, + "packageManager": "yarn@4.2.2" } diff --git a/packages/blockchain-link-utils/.eslintrc.js b/packages/blockchain-link-utils/.eslintrc.js deleted file mode 100644 index d5e6c09c159..00000000000 --- a/packages/blockchain-link-utils/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - rules: { - 'import/no-extraneous-dependencies': ['error', { includeTypes: true }], - }, -}; diff --git a/packages/blockchain-link-utils/eslint.config.mjs b/packages/blockchain-link-utils/eslint.config.mjs new file mode 100644 index 00000000000..4efc2b99057 --- /dev/null +++ b/packages/blockchain-link-utils/eslint.config.mjs @@ -0,0 +1,15 @@ +import parentConfig from '../../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + includeTypes: true, + }, + ], + }, + }, +]; diff --git a/packages/blockchain-link/.eslintrc.js b/packages/blockchain-link/.eslintrc.js deleted file mode 100644 index ee0d328e90a..00000000000 --- a/packages/blockchain-link/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - rules: { - camelcase: 'off', - 'no-underscore-dangle': 'off', - 'no-console': 'warn', - }, -}; diff --git a/packages/blockchain-link/eslint.config.mjs b/packages/blockchain-link/eslint.config.mjs new file mode 100644 index 00000000000..114000d983a --- /dev/null +++ b/packages/blockchain-link/eslint.config.mjs @@ -0,0 +1,12 @@ +import parentConfig from '../../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + rules: { + camelcase: 'off', + 'no-underscore-dangle': 'off', + 'no-console': 'warn', + }, + }, +]; diff --git a/packages/coinjoin/.eslintrc.js b/packages/coinjoin/.eslintrc.js deleted file mode 100644 index adfdb637ac9..00000000000 --- a/packages/coinjoin/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - rules: { - 'no-bitwise': 'off', - 'no-console': 'warn', - }, -}; diff --git a/packages/coinjoin/eslint.config.mjs b/packages/coinjoin/eslint.config.mjs new file mode 100644 index 00000000000..1a51da58fea --- /dev/null +++ b/packages/coinjoin/eslint.config.mjs @@ -0,0 +1,8 @@ +export default [ + { + rules: { + 'no-bitwise': 'off', + 'no-console': 'warn', + }, + }, +]; diff --git a/packages/connect-examples/webextension-mv2/.eslintrc.js b/packages/connect-examples/webextension-mv2/.eslintrc.js deleted file mode 100644 index f9cfed3318c..00000000000 --- a/packages/connect-examples/webextension-mv2/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - rules: { - 'no-underscore-dangle': 'off', // underscore is used - camelcase: 'off', // camelcase is used - }, - ignorePatterns: ['**/vendor*/'], -}; diff --git a/packages/connect-examples/webextension-mv2/eslint.config.mjs b/packages/connect-examples/webextension-mv2/eslint.config.mjs new file mode 100644 index 00000000000..66235afbc61 --- /dev/null +++ b/packages/connect-examples/webextension-mv2/eslint.config.mjs @@ -0,0 +1,14 @@ +import parentConfig from '../../../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + ignores: ['**/vendor*/'], + }, + { + rules: { + 'no-underscore-dangle': 'off', + camelcase: 'off', + }, + }, +]; diff --git a/packages/connect-explorer/.eslintrc.js b/packages/connect-explorer/.eslintrc.js deleted file mode 100644 index ead35152e93..00000000000 --- a/packages/connect-explorer/.eslintrc.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - rules: { - 'jsx-a11y/click-events-have-key-events': 'off', - 'jsx-a11y/no-static-element-interactions': 'off', - 'import/no-default-export': 'off', - '@typescript-eslint/no-restricted-imports': 'off', - '@typescript-eslint/no-shadow': 'off', - 'no-console': 'off', - 'no-restricted-syntax': 'off', - 'react/jsx-filename-extension': [ - 'error', - { - extensions: ['.tsx', '.mdx'], - }, - ], - 'local-rules/no-override-ds-component': 'off', // To not show errors in *.mdx example files - }, - extends: ['plugin:mdx/recommended'], -}; diff --git a/packages/connect-explorer/eslint.config.mjs b/packages/connect-explorer/eslint.config.mjs new file mode 100644 index 00000000000..8e9fce6b754 --- /dev/null +++ b/packages/connect-explorer/eslint.config.mjs @@ -0,0 +1,37 @@ +import * as mdx from 'eslint-plugin-mdx'; +import parentConfig from '../../eslint.config.mjs'; + +export default [ + ...parentConfig, + // Mdx + { + ...mdx.flat, + rules: { + 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/no-static-element-interactions': 'off', + 'import/no-default-export': 'off', + 'no-console': 'off', + 'no-restricted-syntax': 'off', + }, + }, + + // Typescript + { + rules: { + '@typescript-eslint/no-restricted-imports': 'off', + '@typescript-eslint/no-shadow': 'off', + }, + }, + + // React + { + rules: { + 'react/jsx-filename-extension': [ + 'error', + { + extensions: ['.tsx', '.mdx'], + }, + ], + }, + }, +]; diff --git a/packages/connect-explorer/package.json b/packages/connect-explorer/package.json index 8a0cf74fa25..306af433770 100644 --- a/packages/connect-explorer/package.json +++ b/packages/connect-explorer/package.json @@ -52,6 +52,7 @@ "babel-plugin-styled-components": "^2.1.4", "concurrently": "^8.2.2", "copy-webpack-plugin": "^12.0.2", + "eslint-plugin-mdx": "^3.1.5", "html-webpack-plugin": "^5.6.0", "rimraf": "^6.0.1", "tsx": "^4.16.3", diff --git a/packages/connect-web/.eslintrc.js b/packages/connect-web/.eslintrc.js deleted file mode 100644 index a4fa9fb2181..00000000000 --- a/packages/connect-web/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - rules: { - 'no-underscore-dangle': 'off', // underscore is used - camelcase: 'off', // camelcase is used - }, -}; diff --git a/packages/connect-web/eslint.config.mjs b/packages/connect-web/eslint.config.mjs new file mode 100644 index 00000000000..142c21d6e61 --- /dev/null +++ b/packages/connect-web/eslint.config.mjs @@ -0,0 +1,8 @@ +export default [ + { + rules: { + 'no-underscore-dangle': 'off', // underscore is used + camelcase: 'off', // camelcase is used + }, + }, +]; diff --git a/packages/connect-webextension/.eslintrc.js b/packages/connect-webextension/.eslintrc.js deleted file mode 100644 index e67123643c6..00000000000 --- a/packages/connect-webextension/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - rules: { - 'no-underscore-dangle': 'off', // underscore is used - }, -}; diff --git a/packages/connect-webextension/eslint.config.mjs b/packages/connect-webextension/eslint.config.mjs new file mode 100644 index 00000000000..52c5d3fa3cb --- /dev/null +++ b/packages/connect-webextension/eslint.config.mjs @@ -0,0 +1,7 @@ +export default [ + { + rules: { + 'no-underscore-dangle': 'off', // underscore is used + }, + }, +]; diff --git a/packages/connect/.eslintrc.js b/packages/connect/.eslintrc.js deleted file mode 100644 index 0de74deae0e..00000000000 --- a/packages/connect/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - rules: { - 'no-bitwise': 'off', // airbnb-base: used in hardending - 'no-underscore-dangle': 'off', // underscore is used - camelcase: 'off', // camelcase is used - 'no-console': 'warn', - 'no-await-in-loop': 'off', // used in legacy trezor-connect codebase - }, -}; diff --git a/packages/connect/eslint.config.mjs b/packages/connect/eslint.config.mjs new file mode 100644 index 00000000000..53d612be09f --- /dev/null +++ b/packages/connect/eslint.config.mjs @@ -0,0 +1,11 @@ +export default [ + { + rules: { + 'no-bitwise': 'off', // airbnb-base: used in hardending + 'no-underscore-dangle': 'off', // underscore is used + camelcase: 'off', // camelcase is used + 'no-console': 'warn', + 'no-await-in-loop': 'off', // used in legacy trezor-connect codebase + }, + }, +]; diff --git a/packages/protobuf/.eslintrc.js b/packages/protobuf/.eslintrc.js deleted file mode 100644 index 2c3cec6f758..00000000000 --- a/packages/protobuf/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - rules: { - '@typescript-eslint/ban-types': 'off', // allow {} in protobuf.d.ts - '@typescript-eslint/no-shadow': 'off', - }, -}; diff --git a/packages/protobuf/eslint.config.mjs b/packages/protobuf/eslint.config.mjs new file mode 100644 index 00000000000..a2592911074 --- /dev/null +++ b/packages/protobuf/eslint.config.mjs @@ -0,0 +1,8 @@ +export default [ + { + rules: { + '@typescript-eslint/ban-types': 'off', // allow {} in protobuf.d.ts + '@typescript-eslint/no-shadow': 'off', + }, + }, +]; diff --git a/packages/schema-utils/.eslintrc.js b/packages/schema-utils/.eslintrc.js deleted file mode 100644 index 7e4917ac7e6..00000000000 --- a/packages/schema-utils/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - rules: { - 'no-console': 'warn', - 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], - }, - ignorePatterns: ['**/__snapshots__/**'], -}; diff --git a/packages/schema-utils/eslint.config.mjs b/packages/schema-utils/eslint.config.mjs new file mode 100644 index 00000000000..539dd365804 --- /dev/null +++ b/packages/schema-utils/eslint.config.mjs @@ -0,0 +1,20 @@ +import parentConfig from '../../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + ignores: ['**/__snapshots__/**/*'], + }, + { + rules: { + 'no-console': 'warn', + + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: true, + }, + ], + }, + }, +]; diff --git a/packages/suite/.eslintrc.js b/packages/suite/.eslintrc.js deleted file mode 100644 index b6bc898b654..00000000000 --- a/packages/suite/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - rules: { - 'react/style-prop-object': ['error', { allow: ['FormattedNumber'] }], - }, -}; diff --git a/packages/suite/eslint.config.mjs b/packages/suite/eslint.config.mjs new file mode 100644 index 00000000000..3a4c4fa4828 --- /dev/null +++ b/packages/suite/eslint.config.mjs @@ -0,0 +1,15 @@ +import parentConfig from '../../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + rules: { + 'react/style-prop-object': [ + 'error', + { + allow: ['FormattedNumber'], + }, + ], + }, + }, +]; diff --git a/packages/transport-test/.eslintrc.js b/packages/transport-test/.eslintrc.js deleted file mode 100644 index 8878677817c..00000000000 --- a/packages/transport-test/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - rules: { - 'no-nested-ternary': 'off', // useful in tests.. - 'no-console': 'off', - }, -}; diff --git a/packages/transport-test/eslint.config.mjs b/packages/transport-test/eslint.config.mjs new file mode 100644 index 00000000000..79ddeb25b50 --- /dev/null +++ b/packages/transport-test/eslint.config.mjs @@ -0,0 +1,8 @@ +export default [ + { + rules: { + 'no-nested-ternary': 'off', // useful in tests... + 'no-console': 'off', + }, + }, +]; diff --git a/packages/utils/.eslintrc.js b/packages/utils/.eslintrc.js deleted file mode 100644 index a638e65130e..00000000000 --- a/packages/utils/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - rules: { - 'no-console': 'warn', - 'import/no-default-export': 'error', - 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], - }, -}; diff --git a/packages/utils/eslint.config.mjs b/packages/utils/eslint.config.mjs new file mode 100644 index 00000000000..6d7fc984d0d --- /dev/null +++ b/packages/utils/eslint.config.mjs @@ -0,0 +1,18 @@ +import parentConfig from '../../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + rules: { + 'no-console': 'warn', + 'import/no-default-export': 'error', + + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: true, + }, + ], + }, + }, +]; diff --git a/packages/utxo-lib/.eslintrc.js b/packages/utxo-lib/.eslintrc.js deleted file mode 100644 index 30905e37a2b..00000000000 --- a/packages/utxo-lib/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - rules: { - 'no-bitwise': 'off', // airbnb-base: used in hardending - 'prefer-object-spread': 'off', // prefer Object.assign - 'no-underscore-dangle': 'off', // underscore is used - 'no-console': 'warn', - }, -}; diff --git a/packages/utxo-lib/eslint.config.mjs b/packages/utxo-lib/eslint.config.mjs new file mode 100644 index 00000000000..94c66899596 --- /dev/null +++ b/packages/utxo-lib/eslint.config.mjs @@ -0,0 +1,10 @@ +export default [ + { + rules: { + 'no-bitwise': 'off', // airbnb-base: used in hardending + 'prefer-object-spread': 'off', // prefer Object.assign + 'no-underscore-dangle': 'off', // underscore is used + 'no-console': 'warn', + }, + }, +]; diff --git a/scripts/eslint.config.mjs b/scripts/eslint.config.mjs new file mode 100644 index 00000000000..ad0dc28f5de --- /dev/null +++ b/scripts/eslint.config.mjs @@ -0,0 +1,10 @@ +import parentConfig from '../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + rules: { + 'no-console': 'off', + }, + }, +]; diff --git a/suite-native/app/app.config.ts b/suite-native/app/app.config.ts index de575ab1e4a..c13477ed7a8 100644 --- a/suite-native/app/app.config.ts +++ b/suite-native/app/app.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ /* eslint-disable import/no-default-export */ /* eslint-disable import/no-anonymous-default-export */ import { ExpoConfig, ConfigContext } from 'expo/config'; diff --git a/suite-native/icons/src/PizzaIcon.tsx b/suite-native/icons/src/PizzaIcon.tsx index b2d14713121..27c5856af2c 100644 --- a/suite-native/icons/src/PizzaIcon.tsx +++ b/suite-native/icons/src/PizzaIcon.tsx @@ -1,4 +1,3 @@ -/* eslint-disable global-require */ import { Easing, SharedValue, useDerivedValue, withTiming } from 'react-native-reanimated'; import { useState } from 'react'; diff --git a/suite-native/react-native-graph/.eslintrc.js b/suite-native/react-native-graph/.eslintrc.js deleted file mode 100644 index 7714a6b28bf..00000000000 --- a/suite-native/react-native-graph/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - // lot of rules are disabled because this is lib is copy pasted form source and use different code style - rules: { - // components here are from Skia which uses style in different way - 'react/style-prop-object': 'off', - '@typescript-eslint/no-use-before-define': 'off', - 'no-continue': 'off', - 'no-restricted-properties': 'off', - '@typescript-eslint/no-shadow': 'off', - }, -}; diff --git a/suite-native/react-native-graph/eslint.config.mjs b/suite-native/react-native-graph/eslint.config.mjs new file mode 100644 index 00000000000..1f1d8a168cf --- /dev/null +++ b/suite-native/react-native-graph/eslint.config.mjs @@ -0,0 +1,14 @@ +import parentConfig from '../../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + rules: { + 'react/style-prop-object': 'off', + '@typescript-eslint/no-use-before-define': 'off', + 'no-continue': 'off', + 'no-restricted-properties': 'off', + '@typescript-eslint/no-shadow': 'off', + }, + }, +]; diff --git a/testjs b/testjs new file mode 100644 index 00000000000..978f5ea1e41 --- /dev/null +++ b/testjs @@ -0,0 +1,358 @@ +import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"; +import _import from "eslint-plugin-import"; +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import reactHooks from "eslint-plugin-react-hooks"; +import jest from "eslint-plugin-jest"; +import chaiFriendly from "eslint-plugin-chai-friendly"; +import react from "eslint-plugin-react"; +import localRules from "eslint-plugin-local-rules"; +import globals from "globals"; +import tsParser from "@typescript-eslint/parser"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +export default [{ + ignores: [ + + ], +}, ...fixupConfigRules(compat.extends( + "plugin:@typescript-eslint/recommended", + "plugin:react/recommended", + "plugin:import/typescript", + "plugin:react-hooks/recommended", +)), { + plugins: { + import: fixupPluginRules(_import), + "@typescript-eslint": fixupPluginRules(typescriptEslint), + "react-hooks": fixupPluginRules(reactHooks), + jest, + "chai-friendly": chaiFriendly, + react: fixupPluginRules(react), + "local-rules": localRules, + }, + + languageOptions: { + globals: { + ...globals.jest, + ...jest.environments.globals.globals, + }, + + parser: tsParser, + ecmaVersion: "latest", + sourceType: "module", + + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + }, + + settings: { + react: { + version: "detect", + }, + + "import/ignore": ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"], + + "import/resolver": { + node: { + paths: ["/home/user/workspace/trezor/trezor-suite/eslint-rules"], + }, + }, + }, + + rules: { + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-require-imports": "off", + "@typescript-eslint/prefer-ts-expect-error": "error", + "@typescript-eslint/explicit-function-return-type": "off", + + "func-style": ["error", "declaration", { + allowArrowFunctions: true, + }], + + "react/jsx-filename-extension": ["error", { + extensions: [".tsx"], + }], + + "import/order": [1, { + groups: [["builtin", "external"], "internal", ["sibling", "parent"]], + + pathGroups: [{ + pattern: "react*", + group: "external", + position: "before", + }, { + pattern: "@trezor/**", + group: "internal", + }, { + pattern: "@suite-native/**", + group: "internal", + }, { + pattern: "@suite-common/**", + group: "internal", + }, { + pattern: "src/**", + group: "internal", + position: "after", + }], + + pathGroupsExcludedImportTypes: ["internal", "react"], + "newlines-between": "always", + }], + + "import/no-extraneous-dependencies": ["error", { + devDependencies: [ + "**/*fixtures*/**", + "**/*.test.{tsx,ts,js}", + "**/blockchain-link/tests/**", + "**/blockchain-link/webpack/**", + "**/suite-desktop-core/**", + "**/*e2e/**", + "**/suite/src/support/tests/**", + "**/suite-data/**", + "**/*.stories.*", + "**/*webpack.config*", + "**/webpack/**", + ], + + includeTypes: true, + }], + + "default-case": "off", + "import/prefer-default-export": "off", + "import/no-named-as-default": "off", + "no-nested-ternary": "error", + "import/no-unresolved": "off", + "import/extensions": "off", + "import/no-cycle": "off", + + "import/no-anonymous-default-export": ["error", { + allowArray: true, + allowLiteral: true, + allowObject: true, + }], + + "react/prop-types": "off", + "react/no-multi-comp": "off", + "react/no-unescaped-entities": "off", + + "react/jsx-curly-brace-presence": ["warn", { + props: "never", + children: "never", + }], + + "class-methods-use-this": "off", + "lines-between-class-members": "off", + "no-param-reassign": "off", + "no-plusplus": "off", + "no-return-assign": "off", + "consistent-return": "off", + + "no-console": ["error", { + allow: ["warn", "error"], + }], + + "no-undef": "off", + "react/jsx-no-undef": "off", + "react/react-in-jsx-scope": "off", + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "error", + "@typescript-eslint/explicit-member-accessibility": "off", + "@typescript-eslint/no-explicit-any": "off", + "react/destructuring-assignment": "off", + "func-names": "off", + "react/require-default-props": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/triple-slash-reference": "off", + "react/jsx-props-no-spreading": "off", + "@typescript-eslint/ban-ts-ignore": "off", + "@typescript-eslint/no-empty-function": "off", + "no-useless-constructor": "off", + "@typescript-eslint/no-useless-constructor": "error", + "no-dupe-class-members": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "no-use-before-define": "off", + "@typescript-eslint/no-use-before-define": ["error"], + "require-await": ["error"], + "react/display-name": "off", + "react/jsx-key": "warn", + "react/prefer-stateless-function": "off", + "react/no-deprecated": "off", + "react/no-direct-mutation-state": "off", + "react/require-render-return": "off", + "react/no-is-mounted": "off", + "react/jsx-indent": "off", + + "prefer-destructuring": ["error", { + VariableDeclarator: { + array: false, + object: true, + }, + + AssignmentExpression: { + array: false, + object: false, + }, + }, { + enforceForRenamedProperties: false, + }], + + "handle-callback-err": "error", + "no-mixed-requires": "error", + "no-new-require": "error", + "no-path-concat": "error", + "no-process-exit": "off", + "no-restricted-modules": "error", + "no-sync": "off", + "eol-last": "error", + "import/no-default-export": "error", + "no-label-var": "error", + "no-shadow": "off", + + "@typescript-eslint/no-shadow": ["error", { + builtinGlobals: true, + allow: ["_", "error", "resolve", "reject", "fetch"], + }], + + "no-shadow-restricted-names": "error", + "no-undefined": "off", + "no-undef-init": "error", + "no-unused-vars": "off", + "no-unused-expressions": 0, + "prefer-const": "off", + "chai-friendly/no-unused-expressions": 2, + + "@typescript-eslint/no-unused-vars": ["error", { + vars: "all", + args: "none", + ignoreRestSiblings: true, + varsIgnorePattern: "^_", + }], + + "@typescript-eslint/no-restricted-imports": ["error", { + paths: [{ + name: ".", + }, { + name: "..", + }, { + name: "../..", + }], + + patterns: ["@trezor/*/lib", "@trezor/*/lib/**"], + }], + + "no-restricted-syntax": ["error", { + message: "Please don't use createAsyncThunk. Use createThunk from @suite-common/redux-utils instead.", + selector: "CallExpression[callee.name='createAsyncThunk']", + }, { + message: "Please don't use getState directly. Always use strongly typed selector, because geState is typed as \"any\" and it's dangerous to use it directly.", + selector: "MemberExpression[property.type=\"Identifier\"]:matches([object.callee.name=\"getState\"])", + }, { + message: "Do not assign \"getState\" directly. Always use strongly typed selector, because geState is typed as \"any\" and it's dangerous to use it directly.", + selector: "VariableDeclarator[init.type='CallExpression']:matches([init.callee.name='getState'])", + }, { + message: "Please don't use \"state\" directly because it's typed as \"any\". Always use it only as parameter for strongly typed selector function.", + selector: "CallExpression[callee.name='useSelector'] MemberExpression[object.name='state']:matches([property.type='Identifier'])", + }], + + "object-shorthand": ["error", "always", { + ignoreConstructors: false, + avoidQuotes: true, + }], + + "constructor-super": "error", + "no-duplicate-imports": "off", + + "no-useless-rename": ["error", { + ignoreDestructuring: false, + ignoreImport: false, + ignoreExport: false, + }], + + "prefer-numeric-literals": "error", + + "padding-line-between-statements": ["error", { + blankLine: "always", + prev: "*", + next: "return", + }], + + "local-rules/no-override-ds-component": ["error", { + packageName: "@trezor/product-components", + }], + }, +}, { + files: ["**/*.js"], + + rules: { + "@typescript-eslint/no-var-requires": "off", + "no-console": "off", + }, +}, { + files: [ + "packages/analytics/**/*", + "packages/blockchain-link/**/*", + "packages/components/**/*", + "packages/product-components/**/*", + "packages/connect/**/*", + "packages/connect-common/**/*", + "packages/connect-explorer/**/*", + "packages/connect-web/**/*", + "packages/connect-popup/**/*", + "packages/connect-iframe/**/*", + "packages/connect-examples/**/*", + "packages/connect-plugin-ethereum/**/*", + "packages/connect-plugin-stellar/**/*", + "packages/request-manager/**/*", + "packages/suite/**/*", + "packages/suite-build/**/*", + "packages/suite-data/**/*", + "packages/suite-desktop-api/**/*", + "packages/suite-storage/**/*", + "packages/suite-web/**/*", + "packages/transport/**/*", + "packages/utxo-lib/**/*", + "scripts/**/*", + "docs/**/*", + ], + + rules: { + "@typescript-eslint/no-shadow": "off", + "import/no-default-export": "off", + "import/order": "off", + "@typescript-eslint/no-unused-vars": "off", + "no-console": "off", + "react/jsx-no-undef": "off", + "no-catch-shadow": "off", + "@typescript-eslint/no-restricted-imports": "off", + "no-restricted-syntax": "off", + }, +}, { + files: ["suite-native/**/*"], + + rules: { + "@typescript-eslint/no-var-requires": "off", + "global-require": "off", + }, +}, { + files: ["**/*.test.*", "**/__tests__/**/*"], + + rules: { + "import/no-extraneous-dependencies": "off", + "import/no-unresolved": "off", + "import/no-default-export": "off", + }, +}]; diff --git a/yarn.lock b/yarn.lock index 25c5b7c0494..119f4740b9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -107,6 +107,17 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.21.4": + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.25.9" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/db2c2122af79d31ca916755331bb4bac96feb2b334cdaca5097a6b467fdd41963b89b14b6836a14f083de7ff887fc78fa1b3c10b14e743d33e12dbfe5ee3d223 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.23.5, @babel/compat-data@npm:^7.25.2": version: 7.25.4 resolution: "@babel/compat-data@npm:7.25.4" @@ -407,6 +418,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-validator-identifier@npm:7.25.9" + checksum: 10/3f9b649be0c2fd457fa1957b694b4e69532a668866b8a0d81eabfa34ba16dbf3107b39e0e7144c55c3c652bf773ec816af8df4a61273a2bb4eb3145ca9cf478e + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.22.15, @babel/helper-validator-option@npm:^7.23.5, @babel/helper-validator-option@npm:^7.24.7, @babel/helper-validator-option@npm:^7.24.8": version: 7.24.8 resolution: "@babel/helper-validator-option@npm:7.24.8" @@ -3318,6 +3336,82 @@ __metadata: languageName: node linkType: hard +"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": + version: 4.4.1 + resolution: "@eslint-community/eslint-utils@npm:4.4.1" + dependencies: + eslint-visitor-keys: "npm:^3.4.3" + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: 10/ae92a11412674329b4bd38422518601ec9ceae28e251104d1cad83715da9d38e321f68c817c39b64e66d0af7d98df6f9a10ad2dc638911254b47fb8932df00ef + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.11.0": + version: 4.12.1 + resolution: "@eslint-community/regexpp@npm:4.12.1" + checksum: 10/c08f1dd7dd18fbb60bdd0d85820656d1374dd898af9be7f82cb00451313402a22d5e30569c150315b4385907cdbca78c22389b2a72ab78883b3173be317620cc + languageName: node + linkType: hard + +"@eslint/config-array@npm:^0.18.0": + version: 0.18.0 + resolution: "@eslint/config-array@npm:0.18.0" + dependencies: + "@eslint/object-schema": "npm:^2.1.4" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 10/60ccad1eb4806710b085cd739568ec7afd289ee5af6ca0383f0876f9fe375559ef525f7b3f86bdb3f961493de952f2cf3ab4aa4a6ccaef0ae3cd688267cabcb3 + languageName: node + linkType: hard + +"@eslint/core@npm:^0.7.0": + version: 0.7.0 + resolution: "@eslint/core@npm:0.7.0" + checksum: 10/69227f33fddd9b402b7b0830732a6e84cae77d202cb5b56f0dbcc462882e07d00e80216b796cf2f243f5b775af3ef27545a0c439d78e66122eab71da4773b81c + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^3.1.0": + version: 3.1.0 + resolution: "@eslint/eslintrc@npm:3.1.0" + dependencies: + ajv: "npm:^6.12.4" + debug: "npm:^4.3.2" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" + ignore: "npm:^5.2.0" + import-fresh: "npm:^3.2.1" + js-yaml: "npm:^4.1.0" + minimatch: "npm:^3.1.2" + strip-json-comments: "npm:^3.1.1" + checksum: 10/02bf892d1397e1029209dea685e9f4f87baf643315df2a632b5f121ec7e8548a3b34f428a007234fa82772218fa8a3ac2d10328637b9ce63b7f8344035b74db3 + languageName: node + linkType: hard + +"@eslint/js@npm:9.13.0, @eslint/js@npm:^9.13.0": + version: 9.13.0 + resolution: "@eslint/js@npm:9.13.0" + checksum: 10/aa7a4c45044a6cf6e14666ecc0b56ad41c80f022bd4718620b4a7e3d892111312f4e4ac4787fd11b3bf5abdb6ff9a95fdae7e73ef790528f150d86e9be1754a2 + languageName: node + linkType: hard + +"@eslint/object-schema@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/object-schema@npm:2.1.4" + checksum: 10/221e8d9f281c605948cd6e030874aacce83fe097f8f9c1964787037bccf08e82b7aa9eff1850a30fffac43f1d76555727ec22a2af479d91e268e89d1e035131e + languageName: node + linkType: hard + +"@eslint/plugin-kit@npm:^0.2.0": + version: 0.2.2 + resolution: "@eslint/plugin-kit@npm:0.2.2" + dependencies: + levn: "npm:^0.4.1" + checksum: 10/19ce7b8c991c7d17269044d64cd1f8e207b5ddf31290de65950cdaf4c78387467759ad0ca275708c11b85d90e649faf65618255ad310a532ef6dea7fe6326bf1 + languageName: node + linkType: hard + "@ethereumjs/common@npm:2.6.5, @ethereumjs/common@npm:^2.6.4": version: 2.6.5 resolution: "@ethereumjs/common@npm:2.6.5" @@ -4536,6 +4630,37 @@ __metadata: languageName: node linkType: hard +"@humanfs/core@npm:^0.19.1": + version: 0.19.1 + resolution: "@humanfs/core@npm:0.19.1" + checksum: 10/270d936be483ab5921702623bc74ce394bf12abbf57d9145a69e8a0d1c87eb1c768bd2d93af16c5705041e257e6d9cc7529311f63a1349f3678abc776fc28523 + languageName: node + linkType: hard + +"@humanfs/node@npm:^0.16.5": + version: 0.16.6 + resolution: "@humanfs/node@npm:0.16.6" + dependencies: + "@humanfs/core": "npm:^0.19.1" + "@humanwhocodes/retry": "npm:^0.3.0" + checksum: 10/6d43c6727463772d05610aa05c83dab2bfbe78291022ee7a92cb50999910b8c720c76cc312822e2dea2b497aa1b3fef5fe9f68803fc45c9d4ed105874a65e339 + languageName: node + linkType: hard + +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 10/e993950e346331e5a32eefb27948ecdee2a2c4ab3f072b8f566cd213ef485dd50a3ca497050608db91006f5479e43f91a439aef68d2a313bd3ded06909c7c5b3 + languageName: node + linkType: hard + +"@humanwhocodes/retry@npm:^0.3.0, @humanwhocodes/retry@npm:^0.3.1": + version: 0.3.1 + resolution: "@humanwhocodes/retry@npm:0.3.1" + checksum: 10/eb457f699529de7f07649679ec9e0353055eebe443c2efe71c6dd950258892475a038e13c6a8c5e13ed1fb538cdd0a8794faa96b24b6ffc4c87fb1fc9f70ad7f + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -5461,6 +5586,22 @@ __metadata: languageName: node linkType: hard +"@npmcli/config@npm:^8.0.0": + version: 8.3.4 + resolution: "@npmcli/config@npm:8.3.4" + dependencies: + "@npmcli/map-workspaces": "npm:^3.0.2" + "@npmcli/package-json": "npm:^5.1.1" + ci-info: "npm:^4.0.0" + ini: "npm:^4.1.2" + nopt: "npm:^7.2.1" + proc-log: "npm:^4.2.0" + semver: "npm:^7.3.5" + walk-up-path: "npm:^3.0.1" + checksum: 10/ffe9cc1792aeeb54285f9e9e13d8e91a6b8965ab4f314fac998b3cd4e16eab548b839429a4475d1dd74d59cd8c82f4dd864e31c8b4641449c7b03eddc1306948 + languageName: node + linkType: hard + "@npmcli/fs@npm:^2.1.0": version: 2.1.2 resolution: "@npmcli/fs@npm:2.1.2" @@ -5480,6 +5621,35 @@ __metadata: languageName: node linkType: hard +"@npmcli/git@npm:^5.0.0": + version: 5.0.8 + resolution: "@npmcli/git@npm:5.0.8" + dependencies: + "@npmcli/promise-spawn": "npm:^7.0.0" + ini: "npm:^4.1.3" + lru-cache: "npm:^10.0.1" + npm-pick-manifest: "npm:^9.0.0" + proc-log: "npm:^4.0.0" + promise-inflight: "npm:^1.0.1" + promise-retry: "npm:^2.0.1" + semver: "npm:^7.3.5" + which: "npm:^4.0.0" + checksum: 10/e6f94175fb9dde13d84849b29b32ffb4c4df968822cc85df2aebfca13bf8ca76f33b1d281911f5bcddc95bccba2f9e795669c736a38de4d9c76efb5047ffb4fb + languageName: node + linkType: hard + +"@npmcli/map-workspaces@npm:^3.0.2": + version: 3.0.6 + resolution: "@npmcli/map-workspaces@npm:3.0.6" + dependencies: + "@npmcli/name-from-folder": "npm:^2.0.0" + glob: "npm:^10.2.2" + minimatch: "npm:^9.0.0" + read-package-json-fast: "npm:^3.0.0" + checksum: 10/b364b155991a4ff85db5ea5b9f809ab65936350fc36fe1e51d5ab8cd479bba57e69f02e17215c0e2126e383074c2987c268d8e589aacd26c9962e028f4da98f2 + languageName: node + linkType: hard + "@npmcli/move-file@npm:^2.0.0": version: 2.0.1 resolution: "@npmcli/move-file@npm:2.0.1" @@ -5490,6 +5660,37 @@ __metadata: languageName: node linkType: hard +"@npmcli/name-from-folder@npm:^2.0.0": + version: 2.0.0 + resolution: "@npmcli/name-from-folder@npm:2.0.0" + checksum: 10/75beb40373f916cfcf7327958b3ab920ab4e32d24217197927dd1c76a325c7645695011fce9cb2a8f93616f8b74946e84eebe3830303e11ed9d400dae623a99b + languageName: node + linkType: hard + +"@npmcli/package-json@npm:^5.1.1": + version: 5.2.1 + resolution: "@npmcli/package-json@npm:5.2.1" + dependencies: + "@npmcli/git": "npm:^5.0.0" + glob: "npm:^10.2.2" + hosted-git-info: "npm:^7.0.0" + json-parse-even-better-errors: "npm:^3.0.0" + normalize-package-data: "npm:^6.0.0" + proc-log: "npm:^4.0.0" + semver: "npm:^7.5.3" + checksum: 10/304a819b93f79a6e0e56cb371961a66d2db72142e310d545ecbbbe4d917025a30601aa8e63a5f0cc28f0fe281c116bdaf79b334619b105a1d027a2b769ecd137 + languageName: node + linkType: hard + +"@npmcli/promise-spawn@npm:^7.0.0": + version: 7.0.2 + resolution: "@npmcli/promise-spawn@npm:7.0.2" + dependencies: + which: "npm:^4.0.0" + checksum: 10/94cbbbeeb20342026c3b68fc8eb09e1600b7645d4e509f2588ef5ea7cff977eb01e628cc8e014595d04a6af4b4bc5c467c950a8135920f39f7c7b57fba43f4e9 + languageName: node + linkType: hard + "@nrwl/tao@npm:18.0.3": version: 18.0.3 resolution: "@nrwl/tao@npm:18.0.3" @@ -5874,6 +6075,13 @@ __metadata: languageName: node linkType: hard +"@pkgr/core@npm:^0.1.0": + version: 0.1.1 + resolution: "@pkgr/core@npm:0.1.1" + checksum: 10/6f25fd2e3008f259c77207ac9915b02f1628420403b2630c92a07ff963129238c9262afc9e84344c7a23b5cc1f3965e2cd17e3798219f5fd78a63d144d3cceba + languageName: node + linkType: hard + "@playwright/browser-chromium@npm:^1.46.1": version: 1.46.1 resolution: "@playwright/browser-chromium@npm:1.46.1" @@ -7565,6 +7773,13 @@ __metadata: languageName: node linkType: hard +"@rtsao/scc@npm:^1.1.0": + version: 1.1.0 + resolution: "@rtsao/scc@npm:1.1.0" + checksum: 10/17d04adf404e04c1e61391ed97bca5117d4c2767a76ae3e879390d6dec7b317fcae68afbf9e98badee075d0b64fa60f287729c4942021b4d19cd01db77385c01 + languageName: node + linkType: hard + "@sagold/json-pointer@npm:^5.1.1, @sagold/json-pointer@npm:^5.1.2": version: 5.1.2 resolution: "@sagold/json-pointer@npm:5.1.2" @@ -11321,6 +11536,7 @@ __metadata: codemirror-json5: "npm:^1.0.3" concurrently: "npm:^8.2.2" copy-webpack-plugin: "npm:^12.0.2" + eslint-plugin-mdx: "npm:^3.1.5" html-webpack-plugin: "npm:^5.6.0" json5: "npm:^2.2.3" next: "npm:^14.2.6" @@ -12542,6 +12758,15 @@ __metadata: languageName: node linkType: hard +"@types/concat-stream@npm:^2.0.0": + version: 2.0.3 + resolution: "@types/concat-stream@npm:2.0.3" + dependencies: + "@types/node": "npm:*" + checksum: 10/e829fde246528665b31a9b8f64c369ffc66aa2a1337d2bab1d38f4d4145701480af7c67e877dd09a7fa97fcbaa0f3baa816ed1b3e71c3ad430930acd37f4eb1f + languageName: node + linkType: hard + "@types/connect-history-api-fallback@npm:*, @types/connect-history-api-fallback@npm:^1.5.4": version: 1.5.4 resolution: "@types/connect-history-api-fallback@npm:1.5.4" @@ -12782,7 +13007,7 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:*, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.5": +"@types/estree@npm:*, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.5, @types/estree@npm:^1.0.6": version: 1.0.6 resolution: "@types/estree@npm:1.0.6" checksum: 10/9d35d475095199c23e05b431bcdd1f6fec7380612aed068b14b2a08aa70494de8a9026765a5a91b1073f636fb0368f6d8973f518a31391d519e20c59388ed88d @@ -13009,6 +13234,13 @@ __metadata: languageName: node linkType: hard +"@types/is-empty@npm:^1.0.0": + version: 1.2.3 + resolution: "@types/is-empty@npm:1.2.3" + checksum: 10/b22065de5978dacacb6b7401df03e94b9688a3ce07c7faab1bab5e943adbdd6455b190963079bb0aae12c8e56980e54c49bc6902a5805741b82fb4f7335b0c44 + languageName: node + linkType: hard + "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.4 resolution: "@types/istanbul-lib-coverage@npm:2.0.4" @@ -13069,7 +13301,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:^7.0.11, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.6, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": +"@types/json-schema@npm:^7.0.11, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.6, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 10/1a3c3e06236e4c4aab89499c428d585527ce50c24fe8259e8b3926d3df4cfbbbcf306cfc73ddfb66cbafc973116efd15967020b0f738f63e09e64c7d260519e7 @@ -13083,6 +13315,13 @@ __metadata: languageName: node linkType: hard +"@types/json5@npm:^0.0.29": + version: 0.0.29 + resolution: "@types/json5@npm:0.0.29" + checksum: 10/4e5aed58cabb2bbf6f725da13421aa50a49abb6bc17bfab6c31b8774b073fa7b50d557c61f961a09a85f6056151190f8ac95f13f5b48136ba5841f7d4484ec56 + languageName: node + linkType: hard + "@types/jsonfile@npm:*": version: 6.1.1 resolution: "@types/jsonfile@npm:6.1.1" @@ -13683,6 +13922,13 @@ __metadata: languageName: node linkType: hard +"@types/supports-color@npm:^8.0.0": + version: 8.1.3 + resolution: "@types/supports-color@npm:8.1.3" + checksum: 10/f5a3ca4aa94ac9d45beae8aa06dcba45e6d56b77999707a2708b54a9b042f84c68e619b10ef6e4b6f447f801824adebb9ed4d7a82c0b5d5d7bf29d5ff34d53a9 + languageName: node + linkType: hard + "@types/tar@npm:^6.1.11": version: 6.1.11 resolution: "@types/tar@npm:6.1.11" @@ -13721,6 +13967,13 @@ __metadata: languageName: node linkType: hard +"@types/unist@npm:^2.0.2": + version: 2.0.11 + resolution: "@types/unist@npm:2.0.11" + checksum: 10/6d436e832bc35c6dde9f056ac515ebf2b3384a1d7f63679d12358766f9b313368077402e9c1126a14d827f10370a5485e628bf61aa91117cf4fc882423191a4e + languageName: node + linkType: hard + "@types/use-sync-external-store@npm:^0.0.3": version: 0.0.3 resolution: "@types/use-sync-external-store@npm:0.0.3" @@ -13865,6 +14118,122 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/eslint-plugin@npm:8.12.2": + version: 8.12.2 + resolution: "@typescript-eslint/eslint-plugin@npm:8.12.2" + dependencies: + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:8.12.2" + "@typescript-eslint/type-utils": "npm:8.12.2" + "@typescript-eslint/utils": "npm:8.12.2" + "@typescript-eslint/visitor-keys": "npm:8.12.2" + graphemer: "npm:^1.4.0" + ignore: "npm:^5.3.1" + natural-compare: "npm:^1.4.0" + ts-api-utils: "npm:^1.3.0" + peerDependencies: + "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/3ba36240bdb1f278050bbde377d858e67511bf1de31a1ab9d99c5b560204e7d448c33d1487cd5eba9bfb823abff2eccf4532f42065cadad6772b68f91006ddc2 + languageName: node + linkType: hard + +"@typescript-eslint/parser@npm:8.12.2": + version: 8.12.2 + resolution: "@typescript-eslint/parser@npm:8.12.2" + dependencies: + "@typescript-eslint/scope-manager": "npm:8.12.2" + "@typescript-eslint/types": "npm:8.12.2" + "@typescript-eslint/typescript-estree": "npm:8.12.2" + "@typescript-eslint/visitor-keys": "npm:8.12.2" + debug: "npm:^4.3.4" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/257cfbe13bd1a3a2c83e0b3fd2d441a51181ffd57f2e98112217668383fc28de995bfca6d7c4d2c04c6347ee6a376fe1d87eb6ce60d7383cda1044626d794185 + languageName: node + linkType: hard + +"@typescript-eslint/scope-manager@npm:8.12.2": + version: 8.12.2 + resolution: "@typescript-eslint/scope-manager@npm:8.12.2" + dependencies: + "@typescript-eslint/types": "npm:8.12.2" + "@typescript-eslint/visitor-keys": "npm:8.12.2" + checksum: 10/a2cd6ad4b31f4d0ca6f94c4df8a94bdee762abd556686817ab4143d80a27506f43fbf96769b44e698d573784a464bfd78e0cbc17ac61c36a868e02311c754ce1 + languageName: node + linkType: hard + +"@typescript-eslint/type-utils@npm:8.12.2": + version: 8.12.2 + resolution: "@typescript-eslint/type-utils@npm:8.12.2" + dependencies: + "@typescript-eslint/typescript-estree": "npm:8.12.2" + "@typescript-eslint/utils": "npm:8.12.2" + debug: "npm:^4.3.4" + ts-api-utils: "npm:^1.3.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/3563ff938a3a9afa341ef2e38974147a1655c46328f0dcd1c46c3999428efd7f4b9c4b57018122a898be7b23c532b88b0b2baa14d9f6338da8efc8488bb24f96 + languageName: node + linkType: hard + +"@typescript-eslint/types@npm:8.12.2": + version: 8.12.2 + resolution: "@typescript-eslint/types@npm:8.12.2" + checksum: 10/57981e5fa45b03a0398ffb82418fdb716f476aa0b9c17d96edeb7fd3e3f4a720466868af7c2a02ddca65c27e70bfaff50c523b2a570582c4645a2702e17dc94a + languageName: node + linkType: hard + +"@typescript-eslint/typescript-estree@npm:8.12.2": + version: 8.12.2 + resolution: "@typescript-eslint/typescript-estree@npm:8.12.2" + dependencies: + "@typescript-eslint/types": "npm:8.12.2" + "@typescript-eslint/visitor-keys": "npm:8.12.2" + debug: "npm:^4.3.4" + fast-glob: "npm:^3.3.2" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/9995929ec4b66afa53d52c16f5cecd7c9aa45994f943c41e9ec91fe178593e83d9049ff056fe2638c3cf7da01476861eff0dc3cb76c314cc130458d3f828930d + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:8.12.2, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0": + version: 8.12.2 + resolution: "@typescript-eslint/utils@npm:8.12.2" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.4.0" + "@typescript-eslint/scope-manager": "npm:8.12.2" + "@typescript-eslint/types": "npm:8.12.2" + "@typescript-eslint/typescript-estree": "npm:8.12.2" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + checksum: 10/4588866ca43314692a0e685d8936c470dca4e6d119a4a1adefbc2fd54682ff081bc21d60bf4e8077d3668aa680bada851b88566264d09c92a840fe2e4feb331b + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:8.12.2": + version: 8.12.2 + resolution: "@typescript-eslint/visitor-keys@npm:8.12.2" + dependencies: + "@typescript-eslint/types": "npm:8.12.2" + eslint-visitor-keys: "npm:^3.4.3" + checksum: 10/42795ad1c71520a367e2b53c3511b6cf922dcee05d61f6b0ec56b71c0b89a58889e0c3282b1bb13befc69df07204d0e4e053436d0c2b808460ce310b58a2a92e + languageName: node + linkType: hard + "@uiw/codemirror-extensions-basic-setup@npm:4.23.0": version: 4.23.0 resolution: "@uiw/codemirror-extensions-basic-setup@npm:4.23.0" @@ -14403,6 +14772,13 @@ __metadata: languageName: node linkType: hard +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -14500,6 +14876,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.14.0": + version: 8.14.0 + resolution: "acorn@npm:8.14.0" + bin: + acorn: bin/acorn + checksum: 10/6df29c35556782ca9e632db461a7f97947772c6c1d5438a81f0c873a3da3a792487e83e404d1c6c25f70513e91aa18745f6eafb1fcc3a43ecd1920b21dd173d2 + languageName: node + linkType: hard + "address@npm:^1.0.1": version: 1.2.1 resolution: "address@npm:1.2.1" @@ -14597,7 +14982,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.0, ajv@npm:^6.12.3, ajv@npm:^6.12.5": +"ajv@npm:^6.10.0, ajv@npm:^6.12.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -14993,6 +15378,20 @@ __metadata: languageName: node linkType: hard +"array-includes@npm:^3.1.6, array-includes@npm:^3.1.8": + version: 3.1.8 + resolution: "array-includes@npm:3.1.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.4" + is-string: "npm:^1.0.7" + checksum: 10/290b206c9451f181fb2b1f79a3bf1c0b66bb259791290ffbada760c79b284eef6f5ae2aeb4bcff450ebc9690edd25732c4c73a3c2b340fcc0f4563aed83bf488 + languageName: node + linkType: hard + "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -15000,6 +15399,58 @@ __metadata: languageName: node linkType: hard +"array.prototype.findlast@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.findlast@npm:1.2.5" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/7dffcc665aa965718ad6de7e17ac50df0c5e38798c0a5bf9340cf24feb8594df6ec6f3fcbe714c1577728a1b18b5704b15669474b27bceeca91ef06ce2a23c31 + languageName: node + linkType: hard + +"array.prototype.findlastindex@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.findlastindex@npm:1.2.5" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/7c5c821f357cd53ab6cc305de8086430dd8d7a2485db87b13f843e868055e9582b1fd338f02338f67fc3a1603ceaf9610dd2a470b0b506f9d18934780f95b246 + languageName: node + linkType: hard + +"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flat@npm:1.3.2" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-shim-unscopables: "npm:^1.0.0" + checksum: 10/d9d2f6f27584de92ec7995bc931103e6de722cd2498bdbfc4cba814fc3e52f056050a93be883018811f7c0a35875f5056584a0e940603a5e5934f0279896aebe + languageName: node + linkType: hard + +"array.prototype.flatmap@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flatmap@npm:1.3.2" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-shim-unscopables: "npm:^1.0.0" + checksum: 10/33f20006686e0cbe844fde7fd290971e8366c6c5e3380681c2df15738b1df766dd02c7784034aeeb3b037f65c496ee54de665388288edb323a2008bb550f77ea + languageName: node + linkType: hard + "array.prototype.reduce@npm:^1.0.4": version: 1.0.4 resolution: "array.prototype.reduce@npm:1.0.4" @@ -15013,6 +15464,19 @@ __metadata: languageName: node linkType: hard +"array.prototype.tosorted@npm:^1.1.4": + version: 1.1.4 + resolution: "array.prototype.tosorted@npm:1.1.4" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.3" + es-errors: "npm:^1.3.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/874694e5d50e138894ff5b853e639c29b0aa42bbd355acda8e8e9cd337f1c80565f21edc15e8c727fa4c0877fd9d8783c575809e440cc4d2d19acaa048bf967d + languageName: node + linkType: hard + "arraybuffer.prototype.slice@npm:^1.0.3": version: 1.0.3 resolution: "arraybuffer.prototype.slice@npm:1.0.3" @@ -16940,6 +17404,13 @@ __metadata: languageName: node linkType: hard +"character-entities-legacy@npm:^1.0.0": + version: 1.1.4 + resolution: "character-entities-legacy@npm:1.1.4" + checksum: 10/fe03a82c154414da3a0c8ab3188e4237ec68006cbcd681cf23c7cfb9502a0e76cd30ab69a2e50857ca10d984d57de3b307680fff5328ccd427f400e559c3a811 + languageName: node + linkType: hard + "character-entities-legacy@npm:^3.0.0": version: 3.0.0 resolution: "character-entities-legacy@npm:3.0.0" @@ -16947,6 +17418,13 @@ __metadata: languageName: node linkType: hard +"character-entities@npm:^1.0.0": + version: 1.2.4 + resolution: "character-entities@npm:1.2.4" + checksum: 10/7c11641c48d1891aaba7bc800d4500804d91a28f46d64e88c001c38e6ab2e7eae28873a77ae16e6c55d24cac35ddfbb15efe56c3012b86684a3c4e95c70216b7 + languageName: node + linkType: hard + "character-entities@npm:^2.0.0": version: 2.0.2 resolution: "character-entities@npm:2.0.2" @@ -16954,6 +17432,13 @@ __metadata: languageName: node linkType: hard +"character-reference-invalid@npm:^1.0.0": + version: 1.1.4 + resolution: "character-reference-invalid@npm:1.1.4" + checksum: 10/812ebc5e6e8d08fd2fa5245ae78c1e1a4bea4692e93749d256a135c4a442daf931ca18e067cc61ff4a58a419eae52677126a0bc4f05a511290427d60d3057805 + languageName: node + linkType: hard + "character-reference-invalid@npm:^2.0.0": version: 2.0.1 resolution: "character-reference-invalid@npm:2.0.1" @@ -17098,6 +17583,13 @@ __metadata: languageName: node linkType: hard +"ci-info@npm:^4.0.0": + version: 4.0.0 + resolution: "ci-info@npm:4.0.0" + checksum: 10/c983bb7ff1b06648f4a47432201abbd58291147d8ab5043dbb5c03e1a0e3fb2347f40d29b66a3044f28ffeb5dade01ac35aa6bd4e7464a44d9a49a3d7532415a + languageName: node + linkType: hard + "cids@npm:^0.7.1": version: 0.7.5 resolution: "cids@npm:0.7.5" @@ -17687,6 +18179,18 @@ __metadata: languageName: node linkType: hard +"concat-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "concat-stream@npm:2.0.0" + dependencies: + buffer-from: "npm:^1.0.0" + inherits: "npm:^2.0.3" + readable-stream: "npm:^3.0.2" + typedarray: "npm:^0.0.6" + checksum: 10/250e576d0617e7c58e1c4b2dd6fe69560f316d2c962a409f9f3aac794018499ddb31948b1e4296f217008e124cd5d526432097745157fe504b5d9f3dc469eadb + languageName: node + linkType: hard + "concurrently@npm:^8.0.0, concurrently@npm:^8.2.2": version: 8.2.2 resolution: "concurrently@npm:8.2.2" @@ -18195,7 +18699,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -19193,7 +19697,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.1.0": +"debug@npm:^3.1.0, debug@npm:^3.2.7": version: 3.2.7 resolution: "debug@npm:3.2.7" dependencies: @@ -19327,7 +19831,7 @@ __metadata: languageName: node linkType: hard -"deep-is@npm:~0.1.3": +"deep-is@npm:^0.1.3, deep-is@npm:~0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" checksum: 10/ec12d074aef5ae5e81fa470b9317c313142c9e8e2afe3f8efa124db309720db96d1d222b82b84c834e5f87e7a614b44a4684b6683583118b87c833b3be40d4d8 @@ -19869,6 +20373,15 @@ __metadata: languageName: node linkType: hard +"doctrine@npm:^2.1.0": + version: 2.1.0 + resolution: "doctrine@npm:2.1.0" + dependencies: + esutils: "npm:^2.0.2" + checksum: 10/555684f77e791b17173ea86e2eea45ef26c22219cb64670669c4f4bebd26dbc95cd90ec1f4159e9349a6bb9eb892ce4dde8cd0139e77bedd8bf4518238618474 + languageName: node + linkType: hard + "doctrine@npm:^3.0.0": version: 3.0.0 resolution: "doctrine@npm:3.0.0" @@ -20345,6 +20858,13 @@ __metadata: languageName: node linkType: hard +"emoji-regex@npm:^10.2.1": + version: 10.4.0 + resolution: "emoji-regex@npm:10.4.0" + checksum: 10/76bb92c5bcf0b6980d37e535156231e4a9d0aa6ab3b9f5eabf7690231d5aa5d5b8e516f36e6804cbdd0f1c23dfef2a60c40ab7bb8aedd890584281a565b97c50 + languageName: node + linkType: hard + "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -20511,7 +21031,7 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.3.1": +"error-ex@npm:^1.3.1, error-ex@npm:^1.3.2": version: 1.3.2 resolution: "error-ex@npm:1.3.2" dependencies: @@ -20539,7 +21059,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.19.2, es-abstract@npm:^1.20.1, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0": +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.19.2, es-abstract@npm:^1.20.1, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": version: 1.23.3 resolution: "es-abstract@npm:1.23.3" dependencies: @@ -20616,6 +21136,28 @@ __metadata: languageName: node linkType: hard +"es-iterator-helpers@npm:^1.1.0": + version: 1.1.0 + resolution: "es-iterator-helpers@npm:1.1.0" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.3" + es-errors: "npm:^1.3.0" + es-set-tostringtag: "npm:^2.0.3" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.4" + globalthis: "npm:^1.0.4" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.0.3" + has-symbols: "npm:^1.0.3" + internal-slot: "npm:^1.0.7" + iterator.prototype: "npm:^1.1.3" + safe-array-concat: "npm:^1.1.2" + checksum: 10/7aa8f17934abbebeb8cd3ba5135c1f107c568470f4c4b798f457f3d0039caaece1f9d7addbe1fc01079ea2f2ce8f922b736ee914c37ea99dbef22c86b006d338 + languageName: node + linkType: hard + "es-module-lexer@npm:^1.2.1, es-module-lexer@npm:^1.4.1": version: 1.4.1 resolution: "es-module-lexer@npm:1.4.1" @@ -20643,6 +21185,15 @@ __metadata: languageName: node linkType: hard +"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": + version: 1.0.2 + resolution: "es-shim-unscopables@npm:1.0.2" + dependencies: + hasown: "npm:^2.0.0" + checksum: 10/6d3bf91f658a27cc7217cd32b407a0d714393a84d125ad576319b9e83a893bea165cf41270c29e9ceaa56d3cf41608945d7e2a2c31fd51c0009b0c31402b91c7 + languageName: node + linkType: hard + "es-to-primitive@npm:^1.2.1": version: 1.2.1 resolution: "es-to-primitive@npm:1.2.1" @@ -21185,6 +21736,166 @@ __metadata: languageName: node linkType: hard +"eslint-import-resolver-node@npm:^0.3.9": + version: 0.3.9 + resolution: "eslint-import-resolver-node@npm:0.3.9" + dependencies: + debug: "npm:^3.2.7" + is-core-module: "npm:^2.13.0" + resolve: "npm:^1.22.4" + checksum: 10/d52e08e1d96cf630957272e4f2644dcfb531e49dcfd1edd2e07e43369eb2ec7a7d4423d417beee613201206ff2efa4eb9a582b5825ee28802fc7c71fcd53ca83 + languageName: node + linkType: hard + +"eslint-mdx@npm:^3.1.5": + version: 3.1.5 + resolution: "eslint-mdx@npm:3.1.5" + dependencies: + acorn: "npm:^8.11.3" + acorn-jsx: "npm:^5.3.2" + espree: "npm:^9.6.1" + estree-util-visit: "npm:^2.0.0" + remark-mdx: "npm:^3.0.0" + remark-parse: "npm:^11.0.0" + remark-stringify: "npm:^11.0.0" + synckit: "npm:^0.9.0" + tslib: "npm:^2.6.2" + unified: "npm:^11.0.4" + unified-engine: "npm:^11.2.0" + unist-util-visit: "npm:^5.0.0" + uvu: "npm:^0.5.6" + vfile: "npm:^6.0.1" + peerDependencies: + eslint: ">=8.0.0" + checksum: 10/8218476bf4dde702d7d0bd846163f407fef2c44de5315e08206cb025734f73a29baae7588f32e0c6745ea56bf10fe495ee6efc240083b79b47565b0bcb3096cb + languageName: node + linkType: hard + +"eslint-module-utils@npm:^2.12.0": + version: 2.12.0 + resolution: "eslint-module-utils@npm:2.12.0" + dependencies: + debug: "npm:^3.2.7" + peerDependenciesMeta: + eslint: + optional: true + checksum: 10/dd27791147eca17366afcb83f47d6825b6ce164abb256681e5de4ec1d7e87d8605641eb869298a0dbc70665e2446dbcc2f40d3e1631a9475dd64dd23d4ca5dee + languageName: node + linkType: hard + +"eslint-plugin-import@npm:^2.31.0": + version: 2.31.0 + resolution: "eslint-plugin-import@npm:2.31.0" + dependencies: + "@rtsao/scc": "npm:^1.1.0" + array-includes: "npm:^3.1.8" + array.prototype.findlastindex: "npm:^1.2.5" + array.prototype.flat: "npm:^1.3.2" + array.prototype.flatmap: "npm:^1.3.2" + debug: "npm:^3.2.7" + doctrine: "npm:^2.1.0" + eslint-import-resolver-node: "npm:^0.3.9" + eslint-module-utils: "npm:^2.12.0" + hasown: "npm:^2.0.2" + is-core-module: "npm:^2.15.1" + is-glob: "npm:^4.0.3" + minimatch: "npm:^3.1.2" + object.fromentries: "npm:^2.0.8" + object.groupby: "npm:^1.0.3" + object.values: "npm:^1.2.0" + semver: "npm:^6.3.1" + string.prototype.trimend: "npm:^1.0.8" + tsconfig-paths: "npm:^3.15.0" + peerDependencies: + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + checksum: 10/6b76bd009ac2db0615d9019699d18e2a51a86cb8c1d0855a35fb1b418be23b40239e6debdc6e8c92c59f1468ed0ea8d7b85c817117a113d5cc225be8a02ad31c + languageName: node + linkType: hard + +"eslint-plugin-jest@npm:^28.8.3": + version: 28.8.3 + resolution: "eslint-plugin-jest@npm:28.8.3" + dependencies: + "@typescript-eslint/utils": "npm:^6.0.0 || ^7.0.0 || ^8.0.0" + peerDependencies: + "@typescript-eslint/eslint-plugin": ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + jest: "*" + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + jest: + optional: true + checksum: 10/3f1798c61e143981eefcfb2fbc4b2e5b329378ebaafdec6485f443c79ee0d3304e9409e8ea8ce089ac15abb4e700d8d838e0a1da29feb528d77a2b3cce6989ec + languageName: node + linkType: hard + +"eslint-plugin-markdown@npm:^3.0.1": + version: 3.0.1 + resolution: "eslint-plugin-markdown@npm:3.0.1" + dependencies: + mdast-util-from-markdown: "npm:^0.8.5" + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 10/1408ccd48f6358dfc528a0fe7abc1f468c913144c74392cc3ed4926ed6556e7c87524a0a1b8a40174135e872979d213d05dcd3edc90a3ad555f12feb31c3c87d + languageName: node + linkType: hard + +"eslint-plugin-mdx@npm:^3.1.5": + version: 3.1.5 + resolution: "eslint-plugin-mdx@npm:3.1.5" + dependencies: + eslint-mdx: "npm:^3.1.5" + eslint-plugin-markdown: "npm:^3.0.1" + remark-mdx: "npm:^3.0.0" + remark-parse: "npm:^11.0.0" + remark-stringify: "npm:^11.0.0" + tslib: "npm:^2.6.2" + unified: "npm:^11.0.4" + vfile: "npm:^6.0.1" + peerDependencies: + eslint: ">=8.0.0" + checksum: 10/56c4cffb0e7931ed5200084878367f9ee2fc7c1c910509dbea32f227ff911b1451b36b7500bf393ef9b7ca67c8ca7825bbd0e6694bb35360c0182c974581fa80 + languageName: node + linkType: hard + +"eslint-plugin-react-hooks@npm:^5.0.0": + version: 5.0.0 + resolution: "eslint-plugin-react-hooks@npm:5.0.0" + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + checksum: 10/b762789832806b6981e2d910994e72aa7a85136fe0880572334b26cf1274ba37bd3b1365e77d2c2f92465337c4a65c84ef647bc499d33b86fc1110f2df7ef1bb + languageName: node + linkType: hard + +"eslint-plugin-react@npm:^7.37.2": + version: 7.37.2 + resolution: "eslint-plugin-react@npm:7.37.2" + dependencies: + array-includes: "npm:^3.1.8" + array.prototype.findlast: "npm:^1.2.5" + array.prototype.flatmap: "npm:^1.3.2" + array.prototype.tosorted: "npm:^1.1.4" + doctrine: "npm:^2.1.0" + es-iterator-helpers: "npm:^1.1.0" + estraverse: "npm:^5.3.0" + hasown: "npm:^2.0.2" + jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" + minimatch: "npm:^3.1.2" + object.entries: "npm:^1.1.8" + object.fromentries: "npm:^2.0.8" + object.values: "npm:^1.2.0" + prop-types: "npm:^15.8.1" + resolve: "npm:^2.0.0-next.5" + semver: "npm:^6.3.1" + string.prototype.matchall: "npm:^4.0.11" + string.prototype.repeat: "npm:^1.0.0" + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + checksum: 10/df2f7ab198018d3378f305a8a5ceceebc9bd31f019fc7567a2ef9c77789dc8a6a2c3c3957f8b0805f26c11c02f9f86c972e02cd0eda12f4d0370526c11f8a9a3 + languageName: node + linkType: hard + "eslint-scope@npm:5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" @@ -21195,13 +21906,80 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.4.1": +"eslint-scope@npm:^8.1.0": + version: 8.2.0 + resolution: "eslint-scope@npm:8.2.0" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 10/cd9ab60d5a68f3a0fcac04d1cff5a7383d0f331964d5f1c446259123caec5b3ccc542284d07846e4f4d1389da77750821cc9a6e1ce18558c674977351666f9a6 + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b languageName: node linkType: hard +"eslint-visitor-keys@npm:^4.1.0, eslint-visitor-keys@npm:^4.2.0": + version: 4.2.0 + resolution: "eslint-visitor-keys@npm:4.2.0" + checksum: 10/9651b3356b01760e586b4c631c5268c0e1a85236e3292bf754f0472f465bf9a856c0ddc261fceace155334118c0151778effafbab981413dbf9288349343fa25 + languageName: node + linkType: hard + +"eslint@npm:^9.13.0": + version: 9.13.0 + resolution: "eslint@npm:9.13.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.11.0" + "@eslint/config-array": "npm:^0.18.0" + "@eslint/core": "npm:^0.7.0" + "@eslint/eslintrc": "npm:^3.1.0" + "@eslint/js": "npm:9.13.0" + "@eslint/plugin-kit": "npm:^0.2.0" + "@humanfs/node": "npm:^0.16.5" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@humanwhocodes/retry": "npm:^0.3.1" + "@types/estree": "npm:^1.0.6" + "@types/json-schema": "npm:^7.0.15" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.2" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.1.0" + eslint-visitor-keys: "npm:^4.1.0" + espree: "npm:^10.2.0" + esquery: "npm:^1.5.0" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + text-table: "npm:^0.2.0" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true + bin: + eslint: bin/eslint.js + checksum: 10/4342cc24a8d73581676f1b4959c2ddac18ed169731d9c55b708d2eacfc066ed5bdbc2c3c129e1f70142f0704bc25884a1a9ae580e15be5921f9c7f7d0f3ebe68 + languageName: node + linkType: hard + "esm@npm:^3.2.25": version: 3.2.25 resolution: "esm@npm:3.2.25" @@ -21221,7 +21999,18 @@ __metadata: languageName: node linkType: hard -"espree@npm:^9.0.0": +"espree@npm:^10.0.1, espree@npm:^10.2.0": + version: 10.3.0 + resolution: "espree@npm:10.3.0" + dependencies: + acorn: "npm:^8.14.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.2.0" + checksum: 10/3412d44d4204c9e29d6b5dd0277400cfa0cd68495dc09eae1b9ce79d0c8985c1c5cc09cb9ba32a1cd963f48a49b0c46bdb7736afe395a300aa6bb1c0d86837e8 + languageName: node + linkType: hard + +"espree@npm:^9.0.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" dependencies: @@ -21252,6 +22041,15 @@ __metadata: languageName: node linkType: hard +"esquery@npm:^1.5.0": + version: 1.6.0 + resolution: "esquery@npm:1.6.0" + dependencies: + estraverse: "npm:^5.1.0" + checksum: 10/c587fb8ec9ed83f2b1bc97cf2f6854cc30bf784a79d62ba08c6e358bf22280d69aee12827521cf38e69ae9761d23fb7fde593ce315610f85655c139d99b05e5a + languageName: node + linkType: hard + "esrecurse@npm:^4.3.0": version: 4.3.0 resolution: "esrecurse@npm:4.3.0" @@ -21268,7 +22066,7 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" checksum: 10/37cbe6e9a68014d34dbdc039f90d0baf72436809d02edffcc06ba3c2a12eb298048f877511353b130153e532aac8d68ba78430c0dd2f44806ebc7c014b01585e @@ -21316,6 +22114,13 @@ __metadata: languageName: node linkType: hard +"estree-util-is-identifier-name@npm:^3.0.0": + version: 3.0.0 + resolution: "estree-util-is-identifier-name@npm:3.0.0" + checksum: 10/cdc9187614fdb269d714eddfdf72c270a79daa9ed51e259bb78527983be6dcc68da6a914ccc41175b662194c67fbd2a1cd262f85fac1eef7111cfddfaf6f77f8 + languageName: node + linkType: hard + "estree-util-to-js@npm:^1.1.0": version: 1.2.0 resolution: "estree-util-to-js@npm:1.2.0" @@ -21346,6 +22151,16 @@ __metadata: languageName: node linkType: hard +"estree-util-visit@npm:^2.0.0": + version: 2.0.0 + resolution: "estree-util-visit@npm:2.0.0" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/unist": "npm:^3.0.0" + checksum: 10/e3c39d34c8b42fc2067dfa64d460f754b43cca4b573b031a5e5bb185e02c4efc753353197815bbb094b8149a781ab76f18116bec8056b5ff375162e68bffa0bd + languageName: node + linkType: hard + "estree-walker@npm:^2.0.2": version: 2.0.2 resolution: "estree-walker@npm:2.0.2" @@ -23834,7 +24649,21 @@ __metadata: languageName: node linkType: hard -"globalthis@npm:^1.0.1, globalthis@npm:^1.0.3": +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 10/03939c8af95c6df5014b137cac83aa909090c3a3985caef06ee9a5a669790877af8698ab38007e4c0186873adc14c0b13764acc754b16a754c216cc56aa5f021 + languageName: node + linkType: hard + +"globals@npm:^15.11.0": + version: 15.11.0 + resolution: "globals@npm:15.11.0" + checksum: 10/14009ef1906ac929d930ed1c896a47159e7d11b4d201901ca5f3827766519191a3f5fb45124de43c4511fee04018704e7ed5a097fb37d23abf39523d1d41c85f + languageName: node + linkType: hard + +"globalthis@npm:^1.0.1, globalthis@npm:^1.0.3, globalthis@npm:^1.0.4": version: 1.0.4 resolution: "globalthis@npm:1.0.4" dependencies: @@ -23990,6 +24819,13 @@ __metadata: languageName: node linkType: hard +"graphemer@npm:^1.4.0": + version: 1.4.0 + resolution: "graphemer@npm:1.4.0" + checksum: 10/6dd60dba97007b21e3a829fab3f771803cc1292977fe610e240ea72afd67e5690ac9eeaafc4a99710e78962e5936ab5a460787c2a1180f1cb0ccfac37d29f897 + languageName: node + linkType: hard + "graphql-tag@npm:^2.10.1": version: 2.12.6 resolution: "graphql-tag@npm:2.12.6" @@ -24658,6 +25494,15 @@ __metadata: languageName: node linkType: hard +"hosted-git-info@npm:^7.0.0": + version: 7.0.2 + resolution: "hosted-git-info@npm:7.0.2" + dependencies: + lru-cache: "npm:^10.0.1" + checksum: 10/8f085df8a4a637d995f357f48b1e3f6fc1f9f92e82b33fb406415b5741834ed431a510a09141071001e8deea2eee43ce72786463e2aa5e5a70db8648c0eedeab + languageName: node + linkType: hard + "hpack.js@npm:^2.1.6": version: 2.1.6 resolution: "hpack.js@npm:2.1.6" @@ -25102,7 +25947,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.0.4, ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.0, ignore@npm:^5.3.1": +"ignore@npm:^5.0.0, ignore@npm:^5.0.4, ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.0, ignore@npm:^5.3.1": version: 5.3.2 resolution: "ignore@npm:5.3.2" checksum: 10/cceb6a457000f8f6a50e1196429750d782afce5680dd878aa4221bd79972d68b3a55b4b1458fc682be978f4d3c6a249046aa0880637367216444ab7b014cfc98 @@ -25180,6 +26025,13 @@ __metadata: languageName: node linkType: hard +"import-meta-resolve@npm:^4.0.0": + version: 4.1.0 + resolution: "import-meta-resolve@npm:4.1.0" + checksum: 10/40162f67eb406c8d5d49266206ef12ff07b54f5fad8cfd806db9efe3a055958e9969be51d6efaf82e34b8bea6758113dcc17bb79ff148292a4badcabc3472f22 + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -25246,6 +26098,13 @@ __metadata: languageName: node linkType: hard +"ini@npm:^4.1.2, ini@npm:^4.1.3": + version: 4.1.3 + resolution: "ini@npm:4.1.3" + checksum: 10/f536b414d1442e5b233429e2b56efcdb354109b2d65ddd489e5939d8f0f5ad23c88aa2b19c92987249d0dd63ba8192e9aeb1a02b0459549c5a9ff31acd729a5d + languageName: node + linkType: hard + "inline-style-parser@npm:0.1.1": version: 0.1.1 resolution: "inline-style-parser@npm:0.1.1" @@ -25435,6 +26294,13 @@ __metadata: languageName: node linkType: hard +"is-alphabetical@npm:^1.0.0": + version: 1.0.4 + resolution: "is-alphabetical@npm:1.0.4" + checksum: 10/6508cce44fd348f06705d377b260974f4ce68c74000e7da4045f0d919e568226dc3ce9685c5a2af272195384df6930f748ce9213fc9f399b5d31b362c66312cb + languageName: node + linkType: hard + "is-alphabetical@npm:^2.0.0": version: 2.0.1 resolution: "is-alphabetical@npm:2.0.1" @@ -25442,6 +26308,16 @@ __metadata: languageName: node linkType: hard +"is-alphanumerical@npm:^1.0.0": + version: 1.0.4 + resolution: "is-alphanumerical@npm:1.0.4" + dependencies: + is-alphabetical: "npm:^1.0.0" + is-decimal: "npm:^1.0.0" + checksum: 10/e2e491acc16fcf5b363f7c726f666a9538dba0a043665740feb45bba1652457a73441e7c5179c6768a638ed396db3437e9905f403644ec7c468fb41f4813d03f + languageName: node + linkType: hard + "is-alphanumerical@npm:^2.0.0": version: 2.0.1 resolution: "is-alphanumerical@npm:2.0.1" @@ -25486,6 +26362,15 @@ __metadata: languageName: node linkType: hard +"is-async-function@npm:^2.0.0": + version: 2.0.0 + resolution: "is-async-function@npm:2.0.0" + dependencies: + has-tostringtag: "npm:^1.0.0" + checksum: 10/2cf336fbf8cba3badcf526aa3d10384c30bab32615ac4831b74492eb4e843ccb7d8439a119c27f84bcf217d72024e611b1373f870f433b48f3fa57d3d1b863f1 + languageName: node + linkType: hard + "is-bigint@npm:^1.0.1": version: 1.0.4 resolution: "is-bigint@npm:1.0.4" @@ -25555,7 +26440,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.0": +"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1": version: 2.15.1 resolution: "is-core-module@npm:2.15.1" dependencies: @@ -25573,7 +26458,7 @@ __metadata: languageName: node linkType: hard -"is-date-object@npm:^1.0.1": +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" dependencies: @@ -25582,6 +26467,13 @@ __metadata: languageName: node linkType: hard +"is-decimal@npm:^1.0.0": + version: 1.0.4 + resolution: "is-decimal@npm:1.0.4" + checksum: 10/ed483a387517856dc395c68403a10201fddcc1b63dc56513fbe2fe86ab38766120090ecdbfed89223d84ca8b1cd28b0641b93cb6597b6e8f4c097a7c24e3fb96 + languageName: node + linkType: hard + "is-decimal@npm:^2.0.0": version: 2.0.1 resolution: "is-decimal@npm:2.0.1" @@ -25621,6 +26513,13 @@ __metadata: languageName: node linkType: hard +"is-empty@npm:^1.0.0": + version: 1.2.0 + resolution: "is-empty@npm:1.2.0" + checksum: 10/dc80e0a8ad5439d98d128d126fe69e5dcd6b474e29753107bcfe82fc7d628c9da618d48bb24878a7891f231696405ad0a854dfe3cfc955c23d24e80d9e252e62 + languageName: node + linkType: hard + "is-extendable@npm:^0.1.0": version: 0.1.1 resolution: "is-extendable@npm:0.1.1" @@ -25642,6 +26541,15 @@ __metadata: languageName: node linkType: hard +"is-finalizationregistry@npm:^1.0.2": + version: 1.0.2 + resolution: "is-finalizationregistry@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.2" + checksum: 10/1b8e9e1bf2075e862315ef9d38ce6d39c43ca9d81d46f73b34473506992f4b0fbaadb47ec9b420a5e76afe3f564d9f1f0d9b552ef272cc2395e0f21d743c9c29 + languageName: node + linkType: hard + "is-fullwidth-code-point@npm:^2.0.0": version: 2.0.0 resolution: "is-fullwidth-code-point@npm:2.0.0" @@ -25670,7 +26578,7 @@ __metadata: languageName: node linkType: hard -"is-generator-function@npm:^1.0.7": +"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7": version: 1.0.10 resolution: "is-generator-function@npm:1.0.10" dependencies: @@ -25688,7 +26596,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -25711,6 +26619,13 @@ __metadata: languageName: node linkType: hard +"is-hexadecimal@npm:^1.0.0": + version: 1.0.4 + resolution: "is-hexadecimal@npm:1.0.4" + checksum: 10/a452e047587b6069332d83130f54d30da4faf2f2ebaa2ce6d073c27b5703d030d58ed9e0b729c8e4e5b52c6f1dab26781bb77b7bc6c7805f14f320e328ff8cd5 + languageName: node + linkType: hard + "is-hexadecimal@npm:^2.0.0": version: 2.0.1 resolution: "is-hexadecimal@npm:2.0.1" @@ -25762,6 +26677,13 @@ __metadata: languageName: node linkType: hard +"is-map@npm:^2.0.3": + version: 2.0.3 + resolution: "is-map@npm:2.0.3" + checksum: 10/8de7b41715b08bcb0e5edb0fb9384b80d2d5bcd10e142188f33247d19ff078abaf8e9b6f858e2302d8d05376a26a55cd23a3c9f8ab93292b02fcd2cc9e4e92bb + languageName: node + linkType: hard + "is-nan@npm:^1.3.2": version: 1.3.2 resolution: "is-nan@npm:1.3.2" @@ -25914,6 +26836,13 @@ __metadata: languageName: node linkType: hard +"is-set@npm:^2.0.3": + version: 2.0.3 + resolution: "is-set@npm:2.0.3" + checksum: 10/5685df33f0a4a6098a98c72d94d67cad81b2bc72f1fb2091f3d9283c4a1c582123cd709145b02a9745f0ce6b41e3e43f1c944496d1d74d4ea43358be61308669 + languageName: node + linkType: hard + "is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": version: 1.0.3 resolution: "is-shared-array-buffer@npm:1.0.3" @@ -26003,6 +26932,13 @@ __metadata: languageName: node linkType: hard +"is-weakmap@npm:^2.0.2": + version: 2.0.2 + resolution: "is-weakmap@npm:2.0.2" + checksum: 10/a7b7e23206c542dcf2fa0abc483142731788771527e90e7e24f658c0833a0d91948a4f7b30d78f7a65255a48512e41a0288b778ba7fc396137515c12e201fd11 + languageName: node + linkType: hard + "is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" @@ -26012,6 +26948,16 @@ __metadata: languageName: node linkType: hard +"is-weakset@npm:^2.0.3": + version: 2.0.3 + resolution: "is-weakset@npm:2.0.3" + dependencies: + call-bind: "npm:^1.0.7" + get-intrinsic: "npm:^1.2.4" + checksum: 10/40159582ff1b44fc40085f631baf19f56479b05af2faede65b4e6a0b6acab745c13fd070e35b475aafd8a1ee50879ba5a3f1265125b46bebdb446b6be1f62165 + languageName: node + linkType: hard + "is-windows@npm:^1.0.1": version: 1.0.2 resolution: "is-windows@npm:1.0.2" @@ -26086,6 +27032,13 @@ __metadata: languageName: node linkType: hard +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + "isobject@npm:^3.0.1": version: 3.0.1 resolution: "isobject@npm:3.0.1" @@ -26200,6 +27153,19 @@ __metadata: languageName: node linkType: hard +"iterator.prototype@npm:^1.1.3": + version: 1.1.3 + resolution: "iterator.prototype@npm:1.1.3" + dependencies: + define-properties: "npm:^1.2.1" + get-intrinsic: "npm:^1.2.1" + has-symbols: "npm:^1.0.3" + reflect.getprototypeof: "npm:^1.0.4" + set-function-name: "npm:^2.0.1" + checksum: 10/1a2a508d3baac121b76c834404ff552d1bb96a173b1d74ff947b2c5763840c0b1e5be01be7e2183a19b08e99e38729812668ff1f23b35f6655a366017bc32519 + languageName: node + linkType: hard + "iterm2-version@npm:^4.1.0": version: 4.2.0 resolution: "iterm2-version@npm:4.2.0" @@ -27285,6 +28251,13 @@ __metadata: languageName: node linkType: hard +"json-parse-even-better-errors@npm:^3.0.0": + version: 3.0.2 + resolution: "json-parse-even-better-errors@npm:3.0.2" + checksum: 10/6f04ea6c9ccb783630a59297959247e921cc90b917b8351197ca7fd058fccc7079268fd9362be21ba876fc26aa5039369dd0a2280aae49aae425784794a94927 + languageName: node + linkType: hard + "json-schema-deref-sync@npm:^0.13.0": version: 0.13.0 resolution: "json-schema-deref-sync@npm:0.13.0" @@ -27368,6 +28341,13 @@ __metadata: languageName: node linkType: hard +"json-stable-stringify-without-jsonify@npm:^1.0.1": + version: 1.0.1 + resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" + checksum: 10/12786c2e2f22c27439e6db0532ba321f1d0617c27ad8cb1c352a0e9249a50182fd1ba8b52a18899291604b0c32eafa8afd09e51203f19109a0537f68db2b652d + languageName: node + linkType: hard + "json-stable-stringify@npm:^1.0.2, json-stable-stringify@npm:^1.1.1": version: 1.1.1 resolution: "json-stable-stringify@npm:1.1.1" @@ -27387,6 +28367,17 @@ __metadata: languageName: node linkType: hard +"json5@npm:^1.0.2": + version: 1.0.2 + resolution: "json5@npm:1.0.2" + dependencies: + minimist: "npm:^1.2.0" + bin: + json5: lib/cli.js + checksum: 10/a78d812dbbd5642c4f637dd130954acfd231b074965871c3e28a5bbd571f099d623ecf9161f1960c4ddf68e0cc98dee8bebfdb94a71ad4551f85a1afc94b63f6 + languageName: node + linkType: hard + "json5@npm:^2.1.2, json5@npm:^2.2.1, json5@npm:^2.2.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" @@ -27519,6 +28510,18 @@ __metadata: languageName: node linkType: hard +"jsx-ast-utils@npm:^2.4.1 || ^3.0.0": + version: 3.3.5 + resolution: "jsx-ast-utils@npm:3.3.5" + dependencies: + array-includes: "npm:^3.1.6" + array.prototype.flat: "npm:^1.3.1" + object.assign: "npm:^4.1.4" + object.values: "npm:^1.1.6" + checksum: 10/b61d44613687dfe4cc8ad4b4fbf3711bf26c60b8d5ed1f494d723e0808415c59b24a7c0ed8ab10736a40ff84eef38cbbfb68b395e05d31117b44ffc59d31edfc + languageName: node + linkType: hard + "jwa@npm:^1.4.1": version: 1.4.1 resolution: "jwa@npm:1.4.1" @@ -27919,6 +28922,16 @@ __metadata: languageName: node linkType: hard +"levn@npm:^0.4.1": + version: 0.4.1 + resolution: "levn@npm:0.4.1" + dependencies: + prelude-ls: "npm:^1.2.1" + type-check: "npm:~0.4.0" + checksum: 10/2e4720ff79f21ae08d42374b0a5c2f664c5be8b6c8f565bb4e1315c96ed3a8acaa9de788ffed82d7f2378cf36958573de07ef92336cb5255ed74d08b8318c9ee + languageName: node + linkType: hard + "levn@npm:~0.3.0": version: 0.3.0 resolution: "levn@npm:0.3.0" @@ -28191,7 +29204,7 @@ __metadata: languageName: node linkType: hard -"lines-and-columns@npm:~2.0.3": +"lines-and-columns@npm:^2.0.3, lines-and-columns@npm:~2.0.3": version: 2.0.4 resolution: "lines-and-columns@npm:2.0.4" checksum: 10/81ac2f943f5428a46bd4ea2561c74ba674a107d8e6cc70cd317d16892a36ff3ba0dc6e599aca8b6f8668d26c85288394c6edf7a40e985ca843acab3701b80d4c @@ -28228,6 +29241,16 @@ __metadata: languageName: node linkType: hard +"load-plugin@npm:^6.0.0": + version: 6.0.3 + resolution: "load-plugin@npm:6.0.3" + dependencies: + "@npmcli/config": "npm:^8.0.0" + import-meta-resolve: "npm:^4.0.0" + checksum: 10/b348f8751508020e9344b29178f7032647f1a1c9614356d6b993c06589cfb08306deb76f560cfe3fce21c976b2378f0206d581b6d1d2563abf550e4468608adc + languageName: node + linkType: hard + "loader-runner@npm:^4.2.0": version: 4.3.0 resolution: "loader-runner@npm:4.3.0" @@ -28943,6 +29966,19 @@ __metadata: languageName: node linkType: hard +"mdast-util-from-markdown@npm:^0.8.5": + version: 0.8.5 + resolution: "mdast-util-from-markdown@npm:0.8.5" + dependencies: + "@types/mdast": "npm:^3.0.0" + mdast-util-to-string: "npm:^2.0.0" + micromark: "npm:~2.11.0" + parse-entities: "npm:^2.0.0" + unist-util-stringify-position: "npm:^2.0.0" + checksum: 10/f42166eb7a3c2a8cf17dffd868a6dfdab6a77d4e4c8f35d7c3d63247a16ddfeae45a59d9f5fa5eacc48d76d82d18cb0157961d03d1732bc616f9ddf3bb450984 + languageName: node + linkType: hard + "mdast-util-from-markdown@npm:^1.0.0, mdast-util-from-markdown@npm:^1.1.0, mdast-util-from-markdown@npm:^1.3.0": version: 1.3.1 resolution: "mdast-util-from-markdown@npm:1.3.1" @@ -29154,6 +30190,20 @@ __metadata: languageName: node linkType: hard +"mdast-util-mdx-expression@npm:^2.0.0": + version: 2.0.1 + resolution: "mdast-util-mdx-expression@npm:2.0.1" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/70e860f8ee22c4f478449942750055d649d4380bf43b235d0710af510189d285fb057e401d20b59596d9789f4e270fce08ca892dc849676f9e3383b991d52485 + languageName: node + linkType: hard + "mdast-util-mdx-jsx@npm:^2.0.0": version: 2.1.4 resolution: "mdast-util-mdx-jsx@npm:2.1.4" @@ -29174,6 +30224,26 @@ __metadata: languageName: node linkType: hard +"mdast-util-mdx-jsx@npm:^3.0.0": + version: 3.1.3 + resolution: "mdast-util-mdx-jsx@npm:3.1.3" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + "@types/unist": "npm:^3.0.0" + ccount: "npm:^2.0.0" + devlop: "npm:^1.1.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + parse-entities: "npm:^4.0.0" + stringify-entities: "npm:^4.0.0" + unist-util-stringify-position: "npm:^4.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/6c14f271f1380fd512038247f45887b7aa71bbf4acd8881651a317b61706b114f2582f62f7777d0eacd42c4a7b979802825c2a2fd8bb7c46a1ab931ccb1ddf3e + languageName: node + linkType: hard + "mdast-util-mdx@npm:^2.0.0": version: 2.0.1 resolution: "mdast-util-mdx@npm:2.0.1" @@ -29187,6 +30257,19 @@ __metadata: languageName: node linkType: hard +"mdast-util-mdx@npm:^3.0.0": + version: 3.0.0 + resolution: "mdast-util-mdx@npm:3.0.0" + dependencies: + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-mdx-expression: "npm:^2.0.0" + mdast-util-mdx-jsx: "npm:^3.0.0" + mdast-util-mdxjs-esm: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/547d928f0d1e60d9087cd8ad301cdf2e1d14b094d2662a00292874b923bcb59323bdad3a29804c7f323ad78f4d3954361bfdaf4a9be765c4e6fe47a815df50c2 + languageName: node + linkType: hard + "mdast-util-mdxjs-esm@npm:^1.0.0": version: 1.3.1 resolution: "mdast-util-mdxjs-esm@npm:1.3.1" @@ -29200,6 +30283,20 @@ __metadata: languageName: node linkType: hard +"mdast-util-mdxjs-esm@npm:^2.0.0": + version: 2.0.1 + resolution: "mdast-util-mdxjs-esm@npm:2.0.1" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + devlop: "npm:^1.0.0" + mdast-util-from-markdown: "npm:^2.0.0" + mdast-util-to-markdown: "npm:^2.0.0" + checksum: 10/05474226e163a3f407fccb5780b0d8585a95e548e5da4a85227df43f281b940c7941a9a9d4af1be4f885fe554731647addb057a728e87aa1f503ff9cc72c9163 + languageName: node + linkType: hard + "mdast-util-phrasing@npm:^3.0.0": version: 3.0.1 resolution: "mdast-util-phrasing@npm:3.0.1" @@ -29284,6 +30381,13 @@ __metadata: languageName: node linkType: hard +"mdast-util-to-string@npm:^2.0.0": + version: 2.0.0 + resolution: "mdast-util-to-string@npm:2.0.0" + checksum: 10/0b2113ada10e002fbccb014170506dabe2f2ddacaacbe4bc1045c33f986652c5a162732a2c057c5335cdb58419e2ad23e368e5be226855d4d4e280b81c4e9ec2 + languageName: node + linkType: hard + "mdast-util-to-string@npm:^3.0.0, mdast-util-to-string@npm:^3.1.0": version: 3.2.0 resolution: "mdast-util-to-string@npm:3.2.0" @@ -30036,6 +31140,22 @@ __metadata: languageName: node linkType: hard +"micromark-extension-mdx-expression@npm:^3.0.0": + version: 3.0.0 + resolution: "micromark-extension-mdx-expression@npm:3.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-factory-mdx-expression: "npm:^2.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-events-to-acorn: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/a5592160319d4617362f6b72a6fc44b5570466afa07419d44bcfdd9398a77a5693d7c5f8da7b3ff4682edf6209d4781835f5d2e3166fdf6bba37db456fd2d091 + languageName: node + linkType: hard + "micromark-extension-mdx-jsx@npm:^1.0.0": version: 1.0.5 resolution: "micromark-extension-mdx-jsx@npm:1.0.5" @@ -30054,6 +31174,25 @@ __metadata: languageName: node linkType: hard +"micromark-extension-mdx-jsx@npm:^3.0.0": + version: 3.0.1 + resolution: "micromark-extension-mdx-jsx@npm:3.0.1" + dependencies: + "@types/acorn": "npm:^4.0.0" + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + estree-util-is-identifier-name: "npm:^3.0.0" + micromark-factory-mdx-expression: "npm:^2.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-events-to-acorn: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/2cc0277d91c3c85d52e88755d17d021b5eab6fa03a578a9965f9d3d2c184dbc1accce63e7f8437a092ceeb602840ef451d4dce6dc9e8c13df0bc76e741080a89 + languageName: node + linkType: hard + "micromark-extension-mdx-md@npm:^1.0.0": version: 1.0.1 resolution: "micromark-extension-mdx-md@npm:1.0.1" @@ -30063,6 +31202,15 @@ __metadata: languageName: node linkType: hard +"micromark-extension-mdx-md@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-extension-mdx-md@npm:2.0.0" + dependencies: + micromark-util-types: "npm:^2.0.0" + checksum: 10/8b364a69b23196075258143c8c19fa58d7d5a91f6811ec0f881b75cf024a4869994be29f84f4d281147275c5a104af8b6a7fcd98abd8fde9f5b534a1acb254e8 + languageName: node + linkType: hard + "micromark-extension-mdxjs-esm@npm:^1.0.0": version: 1.0.5 resolution: "micromark-extension-mdxjs-esm@npm:1.0.5" @@ -30080,6 +31228,23 @@ __metadata: languageName: node linkType: hard +"micromark-extension-mdxjs-esm@npm:^3.0.0": + version: 3.0.0 + resolution: "micromark-extension-mdxjs-esm@npm:3.0.0" + dependencies: + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-core-commonmark: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-events-to-acorn: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + unist-util-position-from-estree: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/f2e0977f9a65284b0c765d1175d55ec5d1928dae3ae90f65cc36f293cda152a97fe2007977aaf5595b1bc02298b34c96e8ce8b647c9c647c75f1ea53e92d14d2 + languageName: node + linkType: hard + "micromark-extension-mdxjs@npm:^1.0.0": version: 1.0.1 resolution: "micromark-extension-mdxjs@npm:1.0.1" @@ -30096,6 +31261,22 @@ __metadata: languageName: node linkType: hard +"micromark-extension-mdxjs@npm:^3.0.0": + version: 3.0.0 + resolution: "micromark-extension-mdxjs@npm:3.0.0" + dependencies: + acorn: "npm:^8.0.0" + acorn-jsx: "npm:^5.0.0" + micromark-extension-mdx-expression: "npm:^3.0.0" + micromark-extension-mdx-jsx: "npm:^3.0.0" + micromark-extension-mdx-md: "npm:^2.0.0" + micromark-extension-mdxjs-esm: "npm:^3.0.0" + micromark-util-combine-extensions: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/66e0df7b2db05b9c88796600e354e0753594f06760abfddcac706afcd5754586c9085adb89e15447ce1450e6a5f2fa66a75f6da394e0eceb919e9c364475593e + languageName: node + linkType: hard + "micromark-factory-destination@npm:^1.0.0": version: 1.1.0 resolution: "micromark-factory-destination@npm:1.1.0" @@ -30158,6 +31339,23 @@ __metadata: languageName: node linkType: hard +"micromark-factory-mdx-expression@npm:^2.0.0": + version: 2.0.2 + resolution: "micromark-factory-mdx-expression@npm:2.0.2" + dependencies: + "@types/estree": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-factory-space: "npm:^2.0.0" + micromark-util-character: "npm:^2.0.0" + micromark-util-events-to-acorn: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + unist-util-position-from-estree: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/d5285fa98018f14a058c7cd4a961aacedd2d3c4f4fddd4c58c16f1e640d1284a8f581f4d00fa3e18c06ed302ce23bca23f6a01edd66064c23c9057e65385a62d + languageName: node + linkType: hard + "micromark-factory-space@npm:^1.0.0": version: 1.1.0 resolution: "micromark-factory-space@npm:1.1.0" @@ -30378,6 +31576,22 @@ __metadata: languageName: node linkType: hard +"micromark-util-events-to-acorn@npm:^2.0.0": + version: 2.0.2 + resolution: "micromark-util-events-to-acorn@npm:2.0.2" + dependencies: + "@types/acorn": "npm:^4.0.0" + "@types/estree": "npm:^1.0.0" + "@types/unist": "npm:^3.0.0" + devlop: "npm:^1.0.0" + estree-util-visit: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/475367e716c4d24f2a57464a7f2c8aa507ae36c05b7767fd652895525f3f0a1179ea3219cabccc0f3038bb5e4f9cce5390d530dc56decaa5f1786bda42739810 + languageName: node + linkType: hard + "micromark-util-html-tag-name@npm:^1.0.0": version: 1.2.0 resolution: "micromark-util-html-tag-name@npm:1.2.0" @@ -30552,6 +31766,16 @@ __metadata: languageName: node linkType: hard +"micromark@npm:~2.11.0": + version: 2.11.4 + resolution: "micromark@npm:2.11.4" + dependencies: + debug: "npm:^4.0.0" + parse-entities: "npm:^2.0.0" + checksum: 10/cd3bcbc4c113c74d0897e7787103eb9c92c86974b0af1f87d2079b34f1543511a1e72face3f80c1d47c6614c2eaf860d94eee8c06f80dc48bc2441691576364b + languageName: node + linkType: hard + "micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": version: 4.0.5 resolution: "micromatch@npm:4.0.5" @@ -30690,7 +31914,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:2 || 3, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1": +"minimatch@npm:2 || 3, minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -30735,7 +31959,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.0, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -31740,6 +32964,17 @@ __metadata: languageName: node linkType: hard +"nopt@npm:^7.2.1": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae + languageName: node + linkType: hard + "normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" @@ -31752,6 +32987,17 @@ __metadata: languageName: node linkType: hard +"normalize-package-data@npm:^6.0.0": + version: 6.0.2 + resolution: "normalize-package-data@npm:6.0.2" + dependencies: + hosted-git-info: "npm:^7.0.0" + semver: "npm:^7.3.5" + validate-npm-package-license: "npm:^3.0.4" + checksum: 10/7c4216a2426aa76c0197f8372f06b23a0484d62b3518fb5c0f6ebccb16376bdfab29ceba96f95c75f60506473198f1337fe337b945c8df0541fe32b8049ab4c9 + languageName: node + linkType: hard + "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" @@ -31773,6 +33019,34 @@ __metadata: languageName: node linkType: hard +"npm-install-checks@npm:^6.0.0": + version: 6.3.0 + resolution: "npm-install-checks@npm:6.3.0" + dependencies: + semver: "npm:^7.1.1" + checksum: 10/6c20dadb878a0d2f1f777405217b6b63af1299d0b43e556af9363ee6eefaa98a17dfb7b612a473a473e96faf7e789c58b221e0d8ffdc1d34903c4f71618df3b4 + languageName: node + linkType: hard + +"npm-normalize-package-bin@npm:^3.0.0": + version: 3.0.1 + resolution: "npm-normalize-package-bin@npm:3.0.1" + checksum: 10/de416d720ab22137a36292ff8a333af499ea0933ef2320a8c6f56a73b0f0448227fec4db5c890d702e26d21d04f271415eab6580b5546456861cc0c19498a4bf + languageName: node + linkType: hard + +"npm-package-arg@npm:^11.0.0": + version: 11.0.3 + resolution: "npm-package-arg@npm:11.0.3" + dependencies: + hosted-git-info: "npm:^7.0.0" + proc-log: "npm:^4.0.0" + semver: "npm:^7.3.5" + validate-npm-package-name: "npm:^5.0.0" + checksum: 10/bacc863907edf98940286edc2fd80327901c1e8b34426d538cdc708ed66bc6567f06d742d838eaf35db6804347bb4ba56ca9cef032c4b52743b33e7a22a2678e + languageName: node + linkType: hard + "npm-package-arg@npm:^7.0.0": version: 7.0.0 resolution: "npm-package-arg@npm:7.0.0" @@ -31785,6 +33059,18 @@ __metadata: languageName: node linkType: hard +"npm-pick-manifest@npm:^9.0.0": + version: 9.1.0 + resolution: "npm-pick-manifest@npm:9.1.0" + dependencies: + npm-install-checks: "npm:^6.0.0" + npm-normalize-package-bin: "npm:^3.0.0" + npm-package-arg: "npm:^11.0.0" + semver: "npm:^7.3.5" + checksum: 10/e759e4fe4076da9169cf522964a80bbc096d50cd24c8c44b50b44706c4479bd9d9d018fbdb76c6ea0c6037e012e07c6c917a1ecaa7ae1a1169cddfae1c0f24b6 + languageName: node + linkType: hard + "npm-run-path@npm:^2.0.0": version: 2.0.2 resolution: "npm-run-path@npm:2.0.2" @@ -32014,6 +33300,29 @@ __metadata: languageName: node linkType: hard +"object.entries@npm:^1.1.8": + version: 1.1.8 + resolution: "object.entries@npm:1.1.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10/2301918fbd1ee697cf6ff7cd94f060c738c0a7d92b22fd24c7c250e9b593642c9707ad2c44d339303c1439c5967d8964251cdfc855f7f6ec55db2dd79e8dc2a7 + languageName: node + linkType: hard + +"object.fromentries@npm:^2.0.8": + version: 2.0.8 + resolution: "object.fromentries@npm:2.0.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + checksum: 10/5b2e80f7af1778b885e3d06aeb335dcc86965e39464671adb7167ab06ac3b0f5dd2e637a90d8ebd7426d69c6f135a4753ba3dd7d0fe2a7030cf718dcb910fd92 + languageName: node + linkType: hard + "object.getownpropertydescriptors@npm:^2.0.3": version: 2.1.4 resolution: "object.getownpropertydescriptors@npm:2.1.4" @@ -32026,6 +33335,28 @@ __metadata: languageName: node linkType: hard +"object.groupby@npm:^1.0.3": + version: 1.0.3 + resolution: "object.groupby@npm:1.0.3" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + checksum: 10/44cb86dd2c660434be65f7585c54b62f0425b0c96b5c948d2756be253ef06737da7e68d7106e35506ce4a44d16aa85a413d11c5034eb7ce5579ec28752eb42d0 + languageName: node + linkType: hard + +"object.values@npm:^1.1.6, object.values@npm:^1.2.0": + version: 1.2.0 + resolution: "object.values@npm:1.2.0" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10/db2e498019c354428c5dd30d02980d920ac365b155fce4dcf63eb9433f98ccf0f72624309e182ce7cc227c95e45d474e1d483418e60de2293dd23fa3ebe34903 + languageName: node + linkType: hard + "objectorarray@npm:^1.0.5": version: 1.0.5 resolution: "objectorarray@npm:1.0.5" @@ -32223,6 +33554,20 @@ __metadata: languageName: node linkType: hard +"optionator@npm:^0.9.3": + version: 0.9.4 + resolution: "optionator@npm:0.9.4" + dependencies: + deep-is: "npm:^0.1.3" + fast-levenshtein: "npm:^2.0.6" + levn: "npm:^0.4.1" + prelude-ls: "npm:^1.2.1" + type-check: "npm:^0.4.0" + word-wrap: "npm:^1.2.5" + checksum: 10/a8398559c60aef88d7f353a4f98dcdff6090a4e70f874c827302bf1213d9106a1c4d5fcb68dacb1feb3c30a04c4102f41047aa55d4c576b863d6fc876e001af6 + languageName: node + linkType: hard + "ora@npm:3.4.0, ora@npm:^3.4.0": version: 3.4.0 resolution: "ora@npm:3.4.0" @@ -32519,6 +33864,20 @@ __metadata: languageName: node linkType: hard +"parse-entities@npm:^2.0.0": + version: 2.0.0 + resolution: "parse-entities@npm:2.0.0" + dependencies: + character-entities: "npm:^1.0.0" + character-entities-legacy: "npm:^1.0.0" + character-reference-invalid: "npm:^1.0.0" + is-alphanumerical: "npm:^1.0.0" + is-decimal: "npm:^1.0.0" + is-hexadecimal: "npm:^1.0.0" + checksum: 10/feb46b516722474797d72331421f3e62856750cfb4f70ba098b36447bf0b169e819cc4fdee53e022874d5f0c81b605d86e1912b9842a70e59a54de2fee81589d + languageName: node + linkType: hard + "parse-entities@npm:^4.0.0": version: 4.0.1 resolution: "parse-entities@npm:4.0.1" @@ -32564,6 +33923,19 @@ __metadata: languageName: node linkType: hard +"parse-json@npm:^7.0.0": + version: 7.1.1 + resolution: "parse-json@npm:7.1.1" + dependencies: + "@babel/code-frame": "npm:^7.21.4" + error-ex: "npm:^1.3.2" + json-parse-even-better-errors: "npm:^3.0.0" + lines-and-columns: "npm:^2.0.3" + type-fest: "npm:^3.8.0" + checksum: 10/187275c7ac097dcfb3c7420bca2399caa4da33bcd5d5aac3604bda0e2b8eee4df61cc26aa0d79fab97f0d67bf42d41d332baa9f9f56ad27636ad785f1ae639e5 + languageName: node + linkType: hard + "parse-ms@npm:^2.1.0": version: 2.1.0 resolution: "parse-ms@npm:2.1.0" @@ -33761,6 +35133,13 @@ __metadata: languageName: node linkType: hard +"prelude-ls@npm:^1.2.1": + version: 1.2.1 + resolution: "prelude-ls@npm:1.2.1" + checksum: 10/0b9d2c76801ca652a7f64892dd37b7e3fab149a37d2424920099bf894acccc62abb4424af2155ab36dea8744843060a2d8ddc983518d0b1e22265a22324b72ed + languageName: node + linkType: hard + "prelude-ls@npm:~1.1.2": version: 1.1.2 resolution: "prelude-ls@npm:1.1.2" @@ -33844,6 +35223,13 @@ __metadata: languageName: node linkType: hard +"proc-log@npm:^4.0.0, proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a + languageName: node + linkType: hard + "process-nextick-args@npm:~2.0.0": version: 2.0.1 resolution: "process-nextick-args@npm:2.0.1" @@ -35280,6 +36666,16 @@ __metadata: languageName: node linkType: hard +"read-package-json-fast@npm:^3.0.0": + version: 3.0.2 + resolution: "read-package-json-fast@npm:3.0.2" + dependencies: + json-parse-even-better-errors: "npm:^3.0.0" + npm-normalize-package-bin: "npm:^3.0.0" + checksum: 10/8d406869f045f1d76e2a99865a8fd1c1af9c1dc06200b94d2b07eef87ed734b22703a8d72e1cd36ea36cc48e22020bdd187f88243c7dd0563f72114d38c17072 + languageName: node + linkType: hard + "read-pkg-up@npm:^7.0.1": version: 7.0.1 resolution: "read-pkg-up@npm:7.0.1" @@ -35318,7 +36714,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": +"readable-stream@npm:^3.0.2, readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -35568,6 +36964,21 @@ __metadata: languageName: node linkType: hard +"reflect.getprototypeof@npm:^1.0.4": + version: 1.0.6 + resolution: "reflect.getprototypeof@npm:1.0.6" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.1" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + globalthis: "npm:^1.0.3" + which-builtin-type: "npm:^1.1.3" + checksum: 10/518f6457e4bb470c9b317d239c62d4b4a05678b7eae4f1c3f4332fad379b3ea6d2d8999bfad448547fdba8fb77e4725cfe8c6440d0168ff387f16b4f19f759ad + languageName: node + linkType: hard + "regenerate-unicode-properties@npm:^10.1.0": version: 10.1.0 resolution: "regenerate-unicode-properties@npm:10.1.0" @@ -35784,6 +37195,16 @@ __metadata: languageName: node linkType: hard +"remark-mdx@npm:^3.0.0": + version: 3.1.0 + resolution: "remark-mdx@npm:3.1.0" + dependencies: + mdast-util-mdx: "npm:^3.0.0" + micromark-extension-mdxjs: "npm:^3.0.0" + checksum: 10/9a0a1ba9433f0a9a13ec6b9b185244cb431d3205cc0034ff474b60a13b76095870b8cb6a466cfacf35199ee98e92413fec86fbeb75de3ec3d7bb8f486efc7484 + languageName: node + linkType: hard + "remark-parse@npm:^10.0.0": version: 10.0.2 resolution: "remark-parse@npm:10.0.2" @@ -36089,7 +37510,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.3, resolve@npm:^1.9.0": +"resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.3, resolve@npm:^1.22.4, resolve@npm:^1.9.0": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -36102,6 +37523,19 @@ __metadata: languageName: node linkType: hard +"resolve@npm:^2.0.0-next.5": + version: 2.0.0-next.5 + resolution: "resolve@npm:2.0.0-next.5" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/2d6fd28699f901744368e6f2032b4268b4c7b9185fd8beb64f68c93ac6b22e52ae13560ceefc96241a665b985edf9ffd393ae26d2946a7d3a07b7007b7d51e79 + languageName: node + linkType: hard + "resolve@npm:~1.7.1": version: 1.7.1 resolution: "resolve@npm:1.7.1" @@ -36118,7 +37552,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.5#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.9.0#optional!builtin": +"resolve@patch:resolve@npm%3A^1.1.5#optional!builtin, resolve@patch:resolve@npm%3A^1.1.6#optional!builtin, resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.3#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin, resolve@patch:resolve@npm%3A^1.9.0#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -36131,6 +37565,19 @@ __metadata: languageName: node linkType: hard +"resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin": + version: 2.0.0-next.5 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/05fa778de9d0347c8b889eb7a18f1f06bf0f801b0eb4610b4871a4b2f22e220900cf0ad525e94f990bb8d8921c07754ab2122c0c225ab4cdcea98f36e64fa4c2 + languageName: node + linkType: hard + "resolve@patch:resolve@npm%3A~1.7.1#optional!builtin": version: 1.7.1 resolution: "resolve@patch:resolve@npm%3A1.7.1#optional!builtin::version=1.7.1&hash=3bafbf" @@ -36806,7 +38253,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.1.2, semver@npm:^7.1.3, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.3": +"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.1.3, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.3": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -36959,7 +38406,7 @@ __metadata: languageName: node linkType: hard -"set-function-name@npm:^2.0.2": +"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": version: 2.0.2 resolution: "set-function-name@npm:2.0.2" dependencies: @@ -38024,6 +39471,47 @@ __metadata: languageName: node linkType: hard +"string-width@npm:^6.0.0": + version: 6.1.0 + resolution: "string-width@npm:6.1.0" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^10.2.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/8aefb456a230c8d7fe254049b1b2d62603da1a3b6c7fc9f3332f6779583cc1c72653f9b6e4cd0c1c92befee1565d4a0a7542d09ba4ceb6d96af02fbd8425bb03 + languageName: node + linkType: hard + +"string.prototype.matchall@npm:^4.0.11": + version: 4.0.11 + resolution: "string.prototype.matchall@npm:4.0.11" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.4" + gopd: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + internal-slot: "npm:^1.0.7" + regexp.prototype.flags: "npm:^1.5.2" + set-function-name: "npm:^2.0.2" + side-channel: "npm:^1.0.6" + checksum: 10/a902ff4500f909f2a08e55cc5ab1ffbbc905f603b36837674370ee3921058edd0392147e15891910db62a2f31ace2adaf065eaa3bc6e9810bdbc8ca48e05a7b5 + languageName: node + linkType: hard + +"string.prototype.repeat@npm:^1.0.0": + version: 1.0.0 + resolution: "string.prototype.repeat@npm:1.0.0" + dependencies: + define-properties: "npm:^1.1.3" + es-abstract: "npm:^1.17.5" + checksum: 10/4b1bd91b75fa8fdf0541625184ebe80e445a465ce4253c19c3bccd633898005dadae0f74b85ae72662a53aafb8035bf48f8f5c0755aec09bc106a7f13959d05e + languageName: node + linkType: hard + "string.prototype.trim@npm:^1.2.9": version: 1.2.9 resolution: "string.prototype.trim@npm:1.2.9" @@ -38517,6 +40005,13 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:^9.0.0": + version: 9.4.0 + resolution: "supports-color@npm:9.4.0" + checksum: 10/cb8ff8daeaf1db642156f69a9aa545b6c01dd9c4def4f90a49f46cbf24be0c245d392fcf37acd119cd1819b99dad2cc9b7e3260813f64bcfd7f5b18b5a1eefb8 + languageName: node + linkType: hard + "supports-hyperlinks@npm:^2.0.0": version: 2.3.0 resolution: "supports-hyperlinks@npm:2.3.0" @@ -38674,6 +40169,16 @@ __metadata: languageName: node linkType: hard +"synckit@npm:^0.9.0": + version: 0.9.2 + resolution: "synckit@npm:0.9.2" + dependencies: + "@pkgr/core": "npm:^0.1.0" + tslib: "npm:^2.6.2" + checksum: 10/d45c4288be9c0232343650643892a7edafb79152c0c08d7ae5d33ca2c296b67a0e15f8cb5c9153969612c4ea5cd5686297542384aab977db23cfa6653fe02027 + languageName: node + linkType: hard + "systeminformation@npm:^5.23.5": version: 5.23.5 resolution: "systeminformation@npm:5.23.5" @@ -39443,6 +40948,7 @@ __metadata: "@babel/preset-react": "npm:^7.24.7" "@babel/preset-typescript": "npm:^7.24.7" "@babel/runtime": "npm:^7.23.9" + "@eslint/js": "npm:^9.13.0" "@suite-common/wallet-types": "workspace:*" "@types/jest": "npm:29.5.12" "@types/node": "npm:20.12.7" @@ -39451,6 +40957,12 @@ __metadata: "@types/tar": "npm:^6.1.11" babel-jest: "npm:29.7.0" depcheck: "npm:^1.4.7" + eslint: "npm:^9.13.0" + eslint-plugin-import: "npm:^2.31.0" + eslint-plugin-jest: "npm:^28.8.3" + eslint-plugin-react: "npm:^7.37.2" + eslint-plugin-react-hooks: "npm:^5.0.0" + globals: "npm:^15.11.0" jest: "npm:29.7.0" jest-environment-jsdom: "npm:29.7.0" jest-expo: "npm:^50.0.2" @@ -39466,6 +40978,7 @@ __metadata: tslib: "npm:^2.6.2" tsx: "npm:^4.16.3" typescript: "npm:5.5.4" + typescript-eslint: "npm:^8.12.2" version-bump-prompt: "npm:^6.1.0" dependenciesMeta: core-js-pure: @@ -39500,6 +41013,15 @@ __metadata: languageName: node linkType: hard +"ts-api-utils@npm:^1.3.0": + version: 1.3.0 + resolution: "ts-api-utils@npm:1.3.0" + peerDependencies: + typescript: ">=4.2.0" + checksum: 10/3ee44faa24410cd649b5c864e068d438aa437ef64e9e4a66a41646a6d3024d3097a695eeb3fb26ee364705d3cb9653a65756d009e6a53badb6066a5f447bf7ed + languageName: node + linkType: hard + "ts-dedent@npm:^2.0.0, ts-dedent@npm:^2.2.0": version: 2.2.0 resolution: "ts-dedent@npm:2.2.0" @@ -39627,6 +41149,18 @@ __metadata: languageName: node linkType: hard +"tsconfig-paths@npm:^3.15.0": + version: 3.15.0 + resolution: "tsconfig-paths@npm:3.15.0" + dependencies: + "@types/json5": "npm:^0.0.29" + json5: "npm:^1.0.2" + minimist: "npm:^1.2.6" + strip-bom: "npm:^3.0.0" + checksum: 10/2041beaedc6c271fc3bedd12e0da0cc553e65d030d4ff26044b771fac5752d0460944c0b5e680f670c2868c95c664a256cec960ae528888db6ded83524e33a14 + languageName: node + linkType: hard + "tsconfig-paths@npm:^4.1.2, tsconfig-paths@npm:^4.2.0": version: 4.2.0 resolution: "tsconfig-paths@npm:4.2.0" @@ -39756,6 +41290,15 @@ __metadata: languageName: node linkType: hard +"type-check@npm:^0.4.0, type-check@npm:~0.4.0": + version: 0.4.0 + resolution: "type-check@npm:0.4.0" + dependencies: + prelude-ls: "npm:^1.2.1" + checksum: 10/14687776479d048e3c1dbfe58a2409e00367810d6960c0f619b33793271ff2a27f81b52461f14a162f1f89a9b1d8da1b237fc7c99b0e1fdcec28ec63a86b1fec + languageName: node + linkType: hard + "type-check@npm:~0.3.2": version: 0.3.2 resolution: "type-check@npm:0.3.2" @@ -39878,6 +41421,20 @@ __metadata: languageName: node linkType: hard +"typescript-eslint@npm:^8.12.2": + version: 8.12.2 + resolution: "typescript-eslint@npm:8.12.2" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:8.12.2" + "@typescript-eslint/parser": "npm:8.12.2" + "@typescript-eslint/utils": "npm:8.12.2" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/2f479c5d2369aa6e40b1957ae75178c584e62e90d2f0e7434274ec23bb8fee69c6c8832eea39628b60a1511f1db80802aef6687636e80126b01af4748f3be816 + languageName: node + linkType: hard + "typescript-styled-plugin@npm:^0.18.3": version: 0.18.3 resolution: "typescript-styled-plugin@npm:0.18.3" @@ -40085,6 +41642,35 @@ __metadata: languageName: node linkType: hard +"unified-engine@npm:^11.2.0": + version: 11.2.1 + resolution: "unified-engine@npm:11.2.1" + dependencies: + "@types/concat-stream": "npm:^2.0.0" + "@types/debug": "npm:^4.0.0" + "@types/is-empty": "npm:^1.0.0" + "@types/node": "npm:^20.0.0" + "@types/unist": "npm:^3.0.0" + concat-stream: "npm:^2.0.0" + debug: "npm:^4.0.0" + extend: "npm:^3.0.0" + glob: "npm:^10.0.0" + ignore: "npm:^5.0.0" + is-empty: "npm:^1.0.0" + is-plain-obj: "npm:^4.0.0" + load-plugin: "npm:^6.0.0" + parse-json: "npm:^7.0.0" + trough: "npm:^2.0.0" + unist-util-inspect: "npm:^8.0.0" + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + vfile-reporter: "npm:^8.0.0" + vfile-statistics: "npm:^3.0.0" + yaml: "npm:^2.0.0" + checksum: 10/9428a5673d30cf81a45c32fa3909f1529d81214b6bcf0ab56f8205ee00a5481320f50e926935eaa5e1dcb9e36b3c8d797a665fe05b2a98f388fdaa07dcb7714f + languageName: node + linkType: hard + "unified@npm:^10.0.0": version: 10.1.2 resolution: "unified@npm:10.1.2" @@ -40115,6 +41701,21 @@ __metadata: languageName: node linkType: hard +"unified@npm:^11.0.4": + version: 11.0.5 + resolution: "unified@npm:11.0.5" + dependencies: + "@types/unist": "npm:^3.0.0" + bail: "npm:^2.0.0" + devlop: "npm:^1.0.0" + extend: "npm:^3.0.0" + is-plain-obj: "npm:^4.0.0" + trough: "npm:^2.0.0" + vfile: "npm:^6.0.0" + checksum: 10/d9e6e88900a075f391b6bbf06f34062d41fa6257798110d1647753cfc2c6a6e2c1d016434e8ee35706c50485f9fb9ae4707a6a4790bd8dc461ec7e7315ed908b + languageName: node + linkType: hard + "unique-filename@npm:^2.0.0": version: 2.0.1 resolution: "unique-filename@npm:2.0.1" @@ -40186,6 +41787,15 @@ __metadata: languageName: node linkType: hard +"unist-util-inspect@npm:^8.0.0": + version: 8.1.0 + resolution: "unist-util-inspect@npm:8.1.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/f1d14b2fdf184b08de55e215b67ccce9be59b81ccb72b01295538b1642b2087f093b6e98bd830727dd5d69074dcdce3c471469a2ec8bd0aa4063b1270b23e86f + languageName: node + linkType: hard + "unist-util-is@npm:^5.0.0": version: 5.2.1 resolution: "unist-util-is@npm:5.2.1" @@ -40213,6 +41823,15 @@ __metadata: languageName: node linkType: hard +"unist-util-position-from-estree@npm:^2.0.0": + version: 2.0.0 + resolution: "unist-util-position-from-estree@npm:2.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/d3b3048a5727c2367f64ef6dcc5b20c4717215ef8b1372ff9a7c426297c5d1e5776409938acd01531213e2cd2543218d16e73f9f862f318e9496e2c73bb18354 + languageName: node + linkType: hard + "unist-util-position@npm:^4.0.0": version: 4.0.4 resolution: "unist-util-position@npm:4.0.4" @@ -40262,6 +41881,15 @@ __metadata: languageName: node linkType: hard +"unist-util-stringify-position@npm:^2.0.0": + version: 2.0.3 + resolution: "unist-util-stringify-position@npm:2.0.3" + dependencies: + "@types/unist": "npm:^2.0.2" + checksum: 10/affbfd151f0df055ce0dddf443fc41353ab3870cdba6b3805865bd6a41ce22d9d8e65be0ed8839a8731d05b61421d2df9fd8c35b67adf86040bf4b1f8a04a42c + languageName: node + linkType: hard + "unist-util-stringify-position@npm:^3.0.0": version: 3.0.3 resolution: "unist-util-stringify-position@npm:3.0.3" @@ -40691,7 +42319,7 @@ __metadata: languageName: node linkType: hard -"uvu@npm:^0.5.0": +"uvu@npm:^0.5.0, uvu@npm:^0.5.6": version: 0.5.6 resolution: "uvu@npm:0.5.6" dependencies: @@ -40739,7 +42367,7 @@ __metadata: languageName: node linkType: hard -"validate-npm-package-license@npm:^3.0.1": +"validate-npm-package-license@npm:^3.0.1, validate-npm-package-license@npm:^3.0.4": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4" dependencies: @@ -40758,6 +42386,13 @@ __metadata: languageName: node linkType: hard +"validate-npm-package-name@npm:^5.0.0": + version: 5.0.1 + resolution: "validate-npm-package-name@npm:5.0.1" + checksum: 10/0d583a1af23aeffea7748742cf22b6802458736fb8b60323ba5949763824d46f796474b0e1b9206beb716f9d75269e19dbd7795d6b038b29d561be95dd827381 + languageName: node + linkType: hard + "value-equal@npm:^1.0.1": version: 1.0.1 resolution: "value-equal@npm:1.0.1" @@ -40872,6 +42507,42 @@ __metadata: languageName: node linkType: hard +"vfile-reporter@npm:^8.0.0": + version: 8.1.1 + resolution: "vfile-reporter@npm:8.1.1" + dependencies: + "@types/supports-color": "npm:^8.0.0" + string-width: "npm:^6.0.0" + supports-color: "npm:^9.0.0" + unist-util-stringify-position: "npm:^4.0.0" + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + vfile-sort: "npm:^4.0.0" + vfile-statistics: "npm:^3.0.0" + checksum: 10/caeb1b59d3798d9c098d84da68047e8fa5fb3a245c66dc4a653d16ac1cec5bc8023ef5c529d426a21fed8dafab902ede6adea22958fbcbdc1cb999f44b783f50 + languageName: node + linkType: hard + +"vfile-sort@npm:^4.0.0": + version: 4.0.0 + resolution: "vfile-sort@npm:4.0.0" + dependencies: + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/2d60298ccf30b6f1068560660985670ad3345cfa1f85f1feb66f0d9b74b847a81af94db26fc798e98a09eed58ea4502c7bbd69c969e26848f5badcdb90d28bc8 + languageName: node + linkType: hard + +"vfile-statistics@npm:^3.0.0": + version: 3.0.0 + resolution: "vfile-statistics@npm:3.0.0" + dependencies: + vfile: "npm:^6.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/0dbbc8adeb73bb24b5f723e947122e1ae7b6bd0c5ff3fd1ae0ef4a3066f74be00425102c95aa4eaa0f529ba05237255fe8342af76661b0ba6aee3f4c16ca135f + languageName: node + linkType: hard + "vfile@npm:^5.0.0, vfile@npm:^5.3.0": version: 5.3.7 resolution: "vfile@npm:5.3.7" @@ -40895,6 +42566,16 @@ __metadata: languageName: node linkType: hard +"vfile@npm:^6.0.1": + version: 6.0.3 + resolution: "vfile@npm:6.0.3" + dependencies: + "@types/unist": "npm:^3.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/a5a85293c9eb8787aa42e180edaef00c13199a493d6ed82fecf13ab29a68526850788e22434d77808ea6b17a74e03ff899b9b4711df5b9eee75afcddd7c2e1fb + languageName: node + linkType: hard + "victory-vendor@npm:^36.6.8": version: 36.6.8 resolution: "victory-vendor@npm:36.6.8" @@ -41185,6 +42866,13 @@ __metadata: languageName: node linkType: hard +"walk-up-path@npm:^3.0.1": + version: 3.0.1 + resolution: "walk-up-path@npm:3.0.1" + checksum: 10/9ffca02fe30fb65f6db531260582988c5e766f4c739cf86a6109380a7f791236b5d0b92b1dce37a6f73e22dca6bc9d93bf3700413e16251b2bd6bbd1ca2be316 + languageName: node + linkType: hard + "walker@npm:^1.0.7, walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -42051,6 +43739,38 @@ __metadata: languageName: node linkType: hard +"which-builtin-type@npm:^1.1.3": + version: 1.1.4 + resolution: "which-builtin-type@npm:1.1.4" + dependencies: + function.prototype.name: "npm:^1.1.6" + has-tostringtag: "npm:^1.0.2" + is-async-function: "npm:^2.0.0" + is-date-object: "npm:^1.0.5" + is-finalizationregistry: "npm:^1.0.2" + is-generator-function: "npm:^1.0.10" + is-regex: "npm:^1.1.4" + is-weakref: "npm:^1.0.2" + isarray: "npm:^2.0.5" + which-boxed-primitive: "npm:^1.0.2" + which-collection: "npm:^1.0.2" + which-typed-array: "npm:^1.1.15" + checksum: 10/c0cdb9b004e7a326f4ce54c75b19658a3bec73601a71dd7e2d9538accb3e781b546b589c3f306caf5e7429ac1c8019028d5e662e2860f03603354105b8247c83 + languageName: node + linkType: hard + +"which-collection@npm:^1.0.2": + version: 1.0.2 + resolution: "which-collection@npm:1.0.2" + dependencies: + is-map: "npm:^2.0.3" + is-set: "npm:^2.0.3" + is-weakmap: "npm:^2.0.2" + is-weakset: "npm:^2.0.3" + checksum: 10/674bf659b9bcfe4055f08634b48a8588e879161b9fefed57e9ec4ff5601e4d50a05ccd76cf10f698ef5873784e5df3223336d56c7ce88e13bcf52ebe582fc8d7 + languageName: node + linkType: hard + "which-module@npm:^2.0.0": version: 2.0.0 resolution: "which-module@npm:2.0.0" @@ -42093,6 +43813,17 @@ __metadata: languageName: node linkType: hard +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + "why-is-node-running@npm:^2.2.2": version: 2.2.2 resolution: "why-is-node-running@npm:2.2.2" @@ -42144,6 +43875,13 @@ __metadata: languageName: node linkType: hard +"word-wrap@npm:^1.2.5": + version: 1.2.5 + resolution: "word-wrap@npm:1.2.5" + checksum: 10/1ec6f6089f205f83037be10d0c4b34c9183b0b63fca0834a5b3cee55dd321429d73d40bb44c8fc8471b5203d6e8f8275717f49a8ff4b2b0ab41d7e1b563e0854 + languageName: node + linkType: hard + "word-wrap@npm:~1.2.3": version: 1.2.4 resolution: "word-wrap@npm:1.2.4" @@ -42505,6 +44243,15 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.0.0": + version: 2.6.0 + resolution: "yaml@npm:2.6.0" + bin: + yaml: bin.mjs + checksum: 10/f4369f667c7626c216ea81b5840fe9b530cdae4cff2d84d166ec1239e54bf332dbfac4a71bf60d121f8e85e175364a4e280a520292269b6cf9d074368309adf9 + languageName: node + linkType: hard + "yaml@npm:^2.2.1, yaml@npm:^2.2.2, yaml@npm:^2.3.4": version: 2.4.1 resolution: "yaml@npm:2.4.1" From d66afbe1b80c15e6537982eed97a6b74e578b63f Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Thu, 31 Oct 2024 17:25:44 +0100 Subject: [PATCH 05/29] chore: fix code style chore: fix different code issues --- packages/suite/src/actions/suite/__tests__/initAction.test.ts | 1 - packages/utxo-lib/tests/payments.test.ts | 1 - .../message-system/src/__tests__/messageSystemActions.test.ts | 1 - .../redux-utils/src/tests/createActionWithExtraDeps.test.ts | 1 + suite-common/suite-utils/src/__tests__/build.test.ts | 1 - suite-common/test-utils/src/mocks.ts | 1 - suite-common/token-definitions/scripts/utils/sign.ts | 1 - 7 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/suite/src/actions/suite/__tests__/initAction.test.ts b/packages/suite/src/actions/suite/__tests__/initAction.test.ts index 9f024da2a3b..f17265543d8 100644 --- a/packages/suite/src/actions/suite/__tests__/initAction.test.ts +++ b/packages/suite/src/actions/suite/__tests__/initAction.test.ts @@ -260,7 +260,6 @@ describe('Suite init action', () => { const store = initStore(getInitialState(options.initialRun)); if (options?.initialPath) { - // eslint-disable-next-line @typescript-eslint/no-var-requires require('src/support/history').default.location.pathname = options.initialPath; } diff --git a/packages/utxo-lib/tests/payments.test.ts b/packages/utxo-lib/tests/payments.test.ts index fa6dde97ff6..4122328bf22 100644 --- a/packages/utxo-lib/tests/payments.test.ts +++ b/packages/utxo-lib/tests/payments.test.ts @@ -20,7 +20,6 @@ import * as utils from './payments.utils'; ).forEach(p => { describe(p, () => { const fn: PaymentCreator = PAYMENTS[p]; - // eslint-disable-next-line @typescript-eslint/no-var-requires const { fixtures } = require(`./__fixtures__/payments/${p}`); fixtures.valid.forEach((f: any) => { diff --git a/suite-common/message-system/src/__tests__/messageSystemActions.test.ts b/suite-common/message-system/src/__tests__/messageSystemActions.test.ts index 86affe6db95..f2ebf1451db 100644 --- a/suite-common/message-system/src/__tests__/messageSystemActions.test.ts +++ b/suite-common/message-system/src/__tests__/messageSystemActions.test.ts @@ -31,7 +31,6 @@ const initStore = (preloadedState: State) => { }; jest.mock('../../files/config.v1.ts', () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires const { validJwsWithSequence10 } = require('../__fixtures__/messageSystemActions'); return { diff --git a/suite-common/redux-utils/src/tests/createActionWithExtraDeps.test.ts b/suite-common/redux-utils/src/tests/createActionWithExtraDeps.test.ts index 75beadeeaea..78e5ca78dc2 100644 --- a/suite-common/redux-utils/src/tests/createActionWithExtraDeps.test.ts +++ b/suite-common/redux-utils/src/tests/createActionWithExtraDeps.test.ts @@ -75,6 +75,7 @@ describe('createActionWithExtraDeps', () => { expect(dummyAction.match({ type: 'dummyAction' })).toEqual(true); }); + // eslint-disable-next-line jest/expect-expect it('has correct types', () => { const store = initStore(); diff --git a/suite-common/suite-utils/src/__tests__/build.test.ts b/suite-common/suite-utils/src/__tests__/build.test.ts index 89c843ddc43..f7bf25bd1a4 100644 --- a/suite-common/suite-utils/src/__tests__/build.test.ts +++ b/suite-common/suite-utils/src/__tests__/build.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ const OLD_ENV = { ...process.env }; describe('build', () => { diff --git a/suite-common/test-utils/src/mocks.ts b/suite-common/test-utils/src/mocks.ts index 75f764d7086..210ad6055fd 100644 --- a/suite-common/test-utils/src/mocks.ts +++ b/suite-common/test-utils/src/mocks.ts @@ -606,7 +606,6 @@ type MockTrezorConnect = jest.Mocked & { }; const getTrezorConnectMock = () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires const pkg = require('@trezor/connect'); return { diff --git a/suite-common/token-definitions/scripts/utils/sign.ts b/suite-common/token-definitions/scripts/utils/sign.ts index ce25f93fd11..e98997266bf 100644 --- a/suite-common/token-definitions/scripts/utils/sign.ts +++ b/suite-common/token-definitions/scripts/utils/sign.ts @@ -1,6 +1,5 @@ /* eslint-disable no-console */ -// eslint-disable-next-line import/no-extraneous-dependencies import * as jws from 'jws'; import { JWS_SIGN_ALGORITHM } from '../../src/tokenDefinitionsConstants'; From 668a7aa2d2737d9f6ae84e4a01f17c930c3a00b5 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Fri, 1 Nov 2024 12:21:28 +0100 Subject: [PATCH 06/29] fix: format --- eslint.config.mjs | 51 +- package.json | 328 +-- packages/coinjoin/eslint.config.mjs | 3 + packages/connect-explorer/src/pages/_app.tsx | 2 +- packages/connect-web/eslint.config.mjs | 4 + .../connect-webextension/eslint.config.mjs | 3 + packages/connect/eslint.config.mjs | 8 + .../src/api/ethereum/ethereumDefinitions.ts | 2 +- packages/connect/src/core/AbstractMethod.ts | 2 +- .../ConfirmOnDeviceContent.tsx | 2 +- .../RotateDeviceImage/RotateDeviceImage.tsx | 2 +- packages/protobuf/eslint.config.mjs | 3 + .../actions/wallet/coinjoinClientActions.ts | 2 +- .../coinmarket/coinmarketCommonActions.ts | 2 +- .../src/components/suite/AccountLabel.tsx | 2 +- .../PageNames/AccountName/AccountDetails.tsx | 2 +- .../AccountTypeDescription.tsx | 4 +- .../instructionSteps.tsx | 2 +- .../suite/src/components/wallet/Fees/Fees.tsx | 2 +- .../utils/wallet/exportTransactionsUtils.ts | 2 +- .../AssetsView/AssetTable/AssetRow.tsx | 2 +- .../views/settings/SettingsDebug/Backends.tsx | 2 +- .../SwitchDevice/DeviceItem/DeviceItem.tsx | 2 +- .../CoinmarketForm/CoinmarketFormOffer.tsx | 2 +- .../src/views/wallet/send/Outputs/Address.tsx | 2 +- .../SkeletonTransactionItem.tsx | 1 + packages/transport-test/eslint.config.mjs | 3 + packages/transport/eslint.config.mjs | 11 + .../src/websocket-client.ts | 1 + packages/utxo-lib/eslint.config.mjs | 4 + packages/utxo-lib/src/networks.ts | 3 +- .../tests/__fixtures__/bufferutils.ts | 2 +- .../tests/createActionWithExtraDeps.test.ts | 1 - .../withAndroidMainActivityAttributes.js | 1 - .../app/plugins/withGradleProperties.js | 1 - .../app/plugins/withRemoveXcodeLocalEnv.js | 1 - suite-native/discovery/src/discoveryThunks.ts | 2 +- yarn.lock | 1785 ++++------------- 38 files changed, 660 insertions(+), 1594 deletions(-) create mode 100644 packages/transport/eslint.config.mjs diff --git a/eslint.config.mjs b/eslint.config.mjs index 1d20611f54f..239155c2b73 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -105,40 +105,10 @@ export default [ }, ], '@typescript-eslint/no-shadow': [ - 'error', + 'off', { - builtinGlobals: true, - allow: [ - '_', - 'error', - 'resolve', - 'reject', - 'fetch', - - // Todo: all below are magic, I have no idea why they are triggered - 'Text', - 'navigation', - 'Screen', - 'screen', - 'top', - 'Image', - 'event', - 'Event', - 'alert', - 'model', - 'StyleSheet', - 'Crypto', - 'Keyboard', - 'name', - 'Clipboard', - 'Storage', - 'status', - 'Notification', - 'PermissionStatus', - 'length', - 'close', - 'path', - ], + builtinGlobals: false, + allow: ['_', 'error', 'resolve', 'reject', 'fetch'], }, ], '@typescript-eslint/no-use-before-define': ['error'], @@ -200,22 +170,13 @@ export default [ 'jest/no-disabled-tests': 'off', // Well, what can I say... ¯\_(ツ)_/¯ We skip tests sometimes. 'jest/no-focused-tests': 'off', // Same as above, but // Todo: shall be easy to get rid of this 'jest/no-conditional-expect': 'off', // Todo: we shall solve this, this is bad practice + 'jest/expect-expect': 'off', // Todo: we have test with no assertions, this may be legit but it needs to be checked }, }, - // { - // files: ['**/*.test.*', '**/__tests__/**/*'], - // rules: { - // 'import/no-extraneous-dependencies': 'off', - // 'import/no-unresolved': 'off', - // 'import/no-default-export': 'off', - // }, - // }, - - // Suite Native E2E tests { - files: ['suite-native/app/e2e/tests/**'], + files: ['**/__fixtures__/**/*'], rules: { - 'jest/expect-expect': 'off', + 'import/no-default-export': 'off', // Todo: we have many default exports in fixtures, we shall get rid of them }, }, diff --git a/package.json b/package.json index e4d73f48ec3..caeeabdf3b1 100644 --- a/package.json +++ b/package.json @@ -1,168 +1,168 @@ { - "name": "trezor-suite", - "version": "1.0.0", - "private": true, - "repository": "https://github.com/trezor/trezor-suite.git", - "license": "SEE LICENSE IN LICENSE.md", - "engines": { - "node": "18", - "yarn": ">=4" - }, - "workspaces": { - "packages": [ - "packages/*", - "packages/connect-examples/*", - "suite-native/*", - "suite-common/*", - "scripts" - ] - }, - "scripts": { - "_______ Hooks _______": "Yarn hooks.", - "postinstall": "yarn run patch-package", - "_______ Library Scripts #####": "Some libraries have their own build scripts.", - "build:libs": "yarn nx run-many --skip-nx-cache --target=build:lib", - "suite:build:web": "yarn workspace @trezor/suite-web build", - "_______ Start Scripts _______": "Here are standalone scripts for running individual applications for development.", - "suite:dev": "yarn workspace @trezor/suite-web dev", - "suite:dev:desktop": "yarn workspace @trezor/suite-desktop dev", - "native:start": "yarn workspace @suite-native/app start", - "_______ Testing _______": "Testing, linting, type checking...", - "type-check": "yarn nx run-many --target=type-check", - "type-check:force": "rimraf -rf -- **/libDev && yarn type-check", - "test:unit": "yarn nx run-many --target=test:unit", - "lint:js": "eslint . --cache --cache-strategy content --flag unstable_config_lookup_from_file", - "lint:styles": "yarn nx run-many --target=lint:styles", - "lint": "yarn lint:styles && yarn lint:js", - "lint-staged": "npx lint-staged", - "lint:shellcheck": "./scripts/shellcheck.sh", - "_______ Global Scripts _______": "Shared scripts for running in all workspaces", - "g:eslint": "cd $INIT_CWD && eslint --report-unused-disable-directives --cache --ignore-path ../../.gitignore", - "g:jest": "cd $INIT_CWD && jest", - "g:prettier": "cd $INIT_CWD && prettier", - "g:rimraf": "cd $INIT_CWD && rimraf", - "g:tsc": "cd $INIT_CWD && tsc", - "g:tsx": "cd $INIT_CWD && tsx", - "g:depcheck": "cd $INIT_CWD && depcheck", - "_______ Nx testing _______": "Nx wrapped commands for testing, linting, type checking...", - "nx:build:libs": "yarn nx affected --target=build:lib", - "nx:type-check": "yarn nx affected --target=type-check", - "nx:test-unit": "yarn nx affected --target=test:unit", - "nx:lint:js": "yarn nx affected --target=lint:js", - "nx:lint:styles": "yarn nx affected --target=lint:styles", - "nx:format": "yarn nx format:check", - "_______ Commands _______": "Useful commands and scripts.", - "patch": "yarn patch-package", - "update-project-references": "yarn tsx ./scripts/updateProjectReferences.ts", - "verify-project-references": "yarn update-project-references --test", - "check-workspace-resolutions": "yarn tsx ./scripts/check-workspace-resolutions.ts", - "generate-package": "yarn tsx ./scripts/generatePackage.js", - "deps": "rimraf **/node_modules && yarn", - "depcheck": "yarn nx affected --target=depcheck", - "list-outdated": "./scripts/list-outdated-dependencies/list-outdated-dependencies.sh", - "message-system-sign-config": "yarn workspace @suite-common/message-system sign-config", - "format": "yarn nx format:write", - "format:all": "yarn prettier --write \"**/*.{js,ts,tsx,mdx,md,html,json,yml,yaml}\"", - "format:verify": "yarn prettier --check \"**/*.{js,ts,tsx,mdx,md,html,json}\"", - "update-submodules": "./scripts/update-submodules.sh", - "update-coins": "./scripts/update-coins.sh", - "update-models": "./scripts/update-models.sh", - "update-protobuf": "./scripts/update-protobuf.sh", - "update-coinjoin-middleware": "yarn workspace @trezor/suite-data update-coinjoin-middleware", - "prepare-release": "./scripts/prepare-release.sh", - "native:android": "yarn workspace @suite-native/app android", - "native:ios": "yarn workspace @suite-native/app ios", - "native:prebuild": "yarn workspace @suite-native/app prebuild", - "native:prebuild:clean": "yarn workspace @suite-native/app prebuild:clean", - "native:adhoc": "yarn workspace @suite-native/app build:adhoc", - "native:reverse-ports": "yarn workspace @suite-native/app reverse-ports", - "_______ Aliases _______": "Aliases for longer commands which we often have to run manually. Names don't have to be pretty or make total sense.", - "refs": "yarn update-project-references", - "types": "yarn type-check", - "messages": "yarn message-system-sign-config", - "validate": "yarn verify-project-references && yarn lint:js && yarn nx:lint:styles && yarn nx:build:libs && yarn nx:type-check && yarn nx:test-unit && yarn check-workspace-resolutions && yarn depcheck", - "a": "yarn native:android", - "ios": "yarn native:ios", - "p": "yarn native:prebuild", - "ports": "yarn native:reverse-ports", - "s": "yarn native:start" - }, - "lint-staged": { - "packages/**/*.{ts,tsx}": [ - "eslint --fix", - "git add" - ], - "packages/{suite,suite-web,suite-desktop-ui,connect-explorer,connect-popup,connect-ui,components,product-components}/**/*.{ts,tsx}": [ - "stylelint --fix", - "git add" - ] - }, - "resolutions": { - "typescript": "5.5.4", - "react-native": "0.75.2", - "prettier": "3.2.5", - "type-fest": "4.24.0", - "bcrypto": "5.4.0", - "react": "18.2.0", - "electron": "32.1.2", - "@types/node": "20.12.7", - "@types/react": "18.2.55", - "bn.js": "5.2.1" - }, - "devDependencies": { - "@babel/cli": "^7.23.9", - "@babel/core": "^7.23.9", - "@babel/node": "^7.23.9", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-decorators": "^7.23.9", - "@babel/plugin-transform-runtime": "^7.23.9", - "@babel/preset-env": "^7.23.9", - "@babel/preset-react": "^7.24.7", - "@babel/preset-typescript": "^7.24.7", - "@babel/runtime": "^7.23.9", - "@eslint/js": "^9.13.0", - "@suite-common/wallet-types": "workspace:*", - "@types/jest": "29.5.12", - "@types/node": "20.12.7", - "@types/prettier": "^3.0.0", - "@types/semver": "^7.5.6", - "@types/tar": "^6.1.11", - "babel-jest": "29.7.0", - "depcheck": "^1.4.7", - "eslint": "^9.13.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jest": "^28.8.3", - "eslint-plugin-react": "^7.37.2", - "eslint-plugin-react-hooks": "^5.0.0", - "globals": "^15.11.0", - "jest": "29.7.0", - "jest-environment-jsdom": "29.7.0", - "jest-expo": "^50.0.2", - "metro-react-native-babel-preset": "0.77.0", - "nx": "^18.0.3", - "patch-package": "8.0.0", - "prettier": "^3.3.2", - "rimraf": "^6.0.1", - "semver": "^7.6.3", - "tar": "^7.0.1", - "ts-node": "^10.9.2", - "tsconfig-paths": "^4.2.0", - "tslib": "^2.6.2", - "tsx": "^4.16.3", - "typescript": "5.5.4", - "typescript-eslint": "^8.12.2", - "version-bump-prompt": "^6.1.0" - }, - "dependenciesMeta": { - "core-js-pure": { - "built": false + "name": "trezor-suite", + "version": "1.0.0", + "private": true, + "repository": "https://github.com/trezor/trezor-suite.git", + "license": "SEE LICENSE IN LICENSE.md", + "engines": { + "node": "18", + "yarn": ">=4" }, - "electron": { - "built": true + "workspaces": { + "packages": [ + "packages/*", + "packages/connect-examples/*", + "suite-native/*", + "suite-common/*", + "scripts" + ] }, - "trezor-suite": { - "built": true - } - }, - "packageManager": "yarn@4.2.2" + "scripts": { + "_______ Hooks _______": "Yarn hooks.", + "postinstall": "yarn run patch-package", + "_______ Library Scripts #####": "Some libraries have their own build scripts.", + "build:libs": "yarn nx run-many --skip-nx-cache --target=build:lib", + "suite:build:web": "yarn workspace @trezor/suite-web build", + "_______ Start Scripts _______": "Here are standalone scripts for running individual applications for development.", + "suite:dev": "yarn workspace @trezor/suite-web dev", + "suite:dev:desktop": "yarn workspace @trezor/suite-desktop dev", + "native:start": "yarn workspace @suite-native/app start", + "_______ Testing _______": "Testing, linting, type checking...", + "type-check": "yarn nx run-many --target=type-check", + "type-check:force": "rimraf -rf -- **/libDev && yarn type-check", + "test:unit": "yarn nx run-many --target=test:unit", + "lint:js": "eslint . --cache --cache-strategy content --flag unstable_config_lookup_from_file", + "lint:styles": "yarn nx run-many --target=lint:styles", + "lint": "yarn lint:styles && yarn lint:js", + "lint-staged": "npx lint-staged", + "lint:shellcheck": "./scripts/shellcheck.sh", + "_______ Global Scripts _______": "Shared scripts for running in all workspaces", + "g:eslint": "cd $INIT_CWD && eslint --report-unused-disable-directives --cache --ignore-path ../../.gitignore", + "g:jest": "cd $INIT_CWD && jest", + "g:prettier": "cd $INIT_CWD && prettier", + "g:rimraf": "cd $INIT_CWD && rimraf", + "g:tsc": "cd $INIT_CWD && tsc", + "g:tsx": "cd $INIT_CWD && tsx", + "g:depcheck": "cd $INIT_CWD && depcheck", + "_______ Nx testing _______": "Nx wrapped commands for testing, linting, type checking...", + "nx:build:libs": "yarn nx affected --target=build:lib", + "nx:type-check": "yarn nx affected --target=type-check", + "nx:test-unit": "yarn nx affected --target=test:unit", + "nx:lint:js": "yarn nx affected --target=lint:js", + "nx:lint:styles": "yarn nx affected --target=lint:styles", + "nx:format": "yarn nx format:check", + "_______ Commands _______": "Useful commands and scripts.", + "patch": "yarn patch-package", + "update-project-references": "yarn tsx ./scripts/updateProjectReferences.ts", + "verify-project-references": "yarn update-project-references --test", + "check-workspace-resolutions": "yarn tsx ./scripts/check-workspace-resolutions.ts", + "generate-package": "yarn tsx ./scripts/generatePackage.js", + "deps": "rimraf **/node_modules && yarn", + "depcheck": "yarn nx affected --target=depcheck", + "list-outdated": "./scripts/list-outdated-dependencies/list-outdated-dependencies.sh", + "message-system-sign-config": "yarn workspace @suite-common/message-system sign-config", + "format": "yarn nx format:write", + "format:all": "yarn prettier --write \"**/*.{js,ts,tsx,mdx,md,html,json,yml,yaml}\"", + "format:verify": "yarn prettier --check \"**/*.{js,ts,tsx,mdx,md,html,json}\"", + "update-submodules": "./scripts/update-submodules.sh", + "update-coins": "./scripts/update-coins.sh", + "update-models": "./scripts/update-models.sh", + "update-protobuf": "./scripts/update-protobuf.sh", + "update-coinjoin-middleware": "yarn workspace @trezor/suite-data update-coinjoin-middleware", + "prepare-release": "./scripts/prepare-release.sh", + "native:android": "yarn workspace @suite-native/app android", + "native:ios": "yarn workspace @suite-native/app ios", + "native:prebuild": "yarn workspace @suite-native/app prebuild", + "native:prebuild:clean": "yarn workspace @suite-native/app prebuild:clean", + "native:adhoc": "yarn workspace @suite-native/app build:adhoc", + "native:reverse-ports": "yarn workspace @suite-native/app reverse-ports", + "_______ Aliases _______": "Aliases for longer commands which we often have to run manually. Names don't have to be pretty or make total sense.", + "refs": "yarn update-project-references", + "types": "yarn type-check", + "messages": "yarn message-system-sign-config", + "validate": "yarn verify-project-references && yarn lint:js && yarn nx:lint:styles && yarn nx:build:libs && yarn nx:type-check && yarn nx:test-unit && yarn check-workspace-resolutions && yarn depcheck", + "a": "yarn native:android", + "ios": "yarn native:ios", + "p": "yarn native:prebuild", + "ports": "yarn native:reverse-ports", + "s": "yarn native:start" + }, + "lint-staged": { + "packages/**/*.{ts,tsx}": [ + "eslint --fix", + "git add" + ], + "packages/{suite,suite-web,suite-desktop-ui,connect-explorer,connect-popup,connect-ui,components,product-components}/**/*.{ts,tsx}": [ + "stylelint --fix", + "git add" + ] + }, + "resolutions": { + "typescript": "5.5.4", + "react-native": "0.75.2", + "prettier": "3.2.5", + "type-fest": "4.24.0", + "bcrypto": "5.4.0", + "react": "18.2.0", + "electron": "32.1.2", + "@types/node": "20.12.7", + "@types/react": "18.2.55", + "bn.js": "5.2.1" + }, + "devDependencies": { + "@babel/cli": "^7.23.9", + "@babel/core": "^7.23.9", + "@babel/node": "^7.23.9", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-decorators": "^7.23.9", + "@babel/plugin-transform-runtime": "^7.23.9", + "@babel/preset-env": "^7.23.9", + "@babel/preset-react": "^7.24.7", + "@babel/preset-typescript": "^7.24.7", + "@babel/runtime": "^7.23.9", + "@eslint/js": "^9.13.0", + "@suite-common/wallet-types": "workspace:*", + "@types/jest": "29.5.12", + "@types/node": "20.12.7", + "@types/prettier": "^3.0.0", + "@types/semver": "^7.5.6", + "@types/tar": "^6.1.11", + "babel-jest": "29.7.0", + "depcheck": "^1.4.7", + "eslint": "^9.13.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.8.3", + "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react-hooks": "^5.0.0", + "globals": "^15.11.0", + "jest": "29.7.0", + "jest-environment-jsdom": "29.7.0", + "jest-expo": "^50.0.2", + "metro-react-native-babel-preset": "0.77.0", + "nx": "^18.0.3", + "patch-package": "8.0.0", + "prettier": "^3.3.2", + "rimraf": "^6.0.1", + "semver": "^7.6.3", + "tar": "^7.0.1", + "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0", + "tslib": "^2.6.2", + "tsx": "^4.16.3", + "typescript": "5.5.4", + "typescript-eslint": "^8.12.2", + "version-bump-prompt": "^6.1.0" + }, + "dependenciesMeta": { + "core-js-pure": { + "built": false + }, + "electron": { + "built": true + }, + "trezor-suite": { + "built": true + } + }, + "packageManager": "yarn@4.2.2" } diff --git a/packages/coinjoin/eslint.config.mjs b/packages/coinjoin/eslint.config.mjs index 1a51da58fea..e8472d817a0 100644 --- a/packages/coinjoin/eslint.config.mjs +++ b/packages/coinjoin/eslint.config.mjs @@ -1,4 +1,7 @@ +import parentConfig from '../../eslint.config.mjs'; + export default [ + ...parentConfig, { rules: { 'no-bitwise': 'off', diff --git a/packages/connect-explorer/src/pages/_app.tsx b/packages/connect-explorer/src/pages/_app.tsx index ec5afa0166c..732673bbaae 100644 --- a/packages/connect-explorer/src/pages/_app.tsx +++ b/packages/connect-explorer/src/pages/_app.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react'; import { Provider } from 'react-redux'; -import { ThemeProvider as NextThemeProvider , useTheme } from 'next-themes'; +import { ThemeProvider as NextThemeProvider, useTheme } from 'next-themes'; import { ThemeProvider } from 'styled-components'; import type { AppProps } from 'next/app'; import Head from 'next/head'; diff --git a/packages/connect-web/eslint.config.mjs b/packages/connect-web/eslint.config.mjs index 142c21d6e61..1ab6a15aaf1 100644 --- a/packages/connect-web/eslint.config.mjs +++ b/packages/connect-web/eslint.config.mjs @@ -1,8 +1,12 @@ +import parentConfig from '../../eslint.config.mjs'; + export default [ + ...parentConfig, { rules: { 'no-underscore-dangle': 'off', // underscore is used camelcase: 'off', // camelcase is used + 'jest/valid-expect': 'off', // because of cypress tests }, }, ]; diff --git a/packages/connect-webextension/eslint.config.mjs b/packages/connect-webextension/eslint.config.mjs index 52c5d3fa3cb..86805a1a0c7 100644 --- a/packages/connect-webextension/eslint.config.mjs +++ b/packages/connect-webextension/eslint.config.mjs @@ -1,4 +1,7 @@ +import parentConfig from '../../eslint.config.mjs'; + export default [ + ...parentConfig, { rules: { 'no-underscore-dangle': 'off', // underscore is used diff --git a/packages/connect/eslint.config.mjs b/packages/connect/eslint.config.mjs index 53d612be09f..f6d992af468 100644 --- a/packages/connect/eslint.config.mjs +++ b/packages/connect/eslint.config.mjs @@ -1,4 +1,7 @@ +import parentConfig from '../../eslint.config.mjs'; + export default [ + ...parentConfig, { rules: { 'no-bitwise': 'off', // airbnb-base: used in hardending @@ -6,6 +9,11 @@ export default [ camelcase: 'off', // camelcase is used 'no-console': 'warn', 'no-await-in-loop': 'off', // used in legacy trezor-connect codebase + 'jest/no-jasmine-globals': 'off', // Because of the Karma tests that uses Jasmine + 'jest/no-standalone-expect': [ + 'error', + { additionalTestBlockFunctions: ['conditionalTest'] }, + ], }, }, ]; diff --git a/packages/connect/src/api/ethereum/ethereumDefinitions.ts b/packages/connect/src/api/ethereum/ethereumDefinitions.ts index 58d1e87f2ea..0601766d188 100644 --- a/packages/connect/src/api/ethereum/ethereumDefinitions.ts +++ b/packages/connect/src/api/ethereum/ethereumDefinitions.ts @@ -1,6 +1,6 @@ import fetch from 'cross-fetch'; -import { MessagesSchema , parseConfigure, decode as decodeProtobuf } from '@trezor/protobuf'; +import { MessagesSchema, parseConfigure, decode as decodeProtobuf } from '@trezor/protobuf'; import { trzd } from '@trezor/protocol'; import { DataManager } from '../../data/DataManager'; import { EthereumNetworkInfo } from '../../types'; diff --git a/packages/connect/src/core/AbstractMethod.ts b/packages/connect/src/core/AbstractMethod.ts index 66f25e217d8..a584336585c 100644 --- a/packages/connect/src/core/AbstractMethod.ts +++ b/packages/connect/src/core/AbstractMethod.ts @@ -1,6 +1,6 @@ import { storage } from '@trezor/connect-common'; import { versionUtils } from '@trezor/utils'; -import { NETWORK , ERRORS } from '../constants'; +import { NETWORK, ERRORS } from '../constants'; import { UI, DEVICE, diff --git a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx index 9b0d29c8189..a255793cb07 100644 --- a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx +++ b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx @@ -1,6 +1,6 @@ import { ReactNode } from 'react'; import styled, { css, useTheme } from 'styled-components'; -import { Icon , useElevation } from '@trezor/components'; +import { Icon, useElevation } from '@trezor/components'; import { DeviceModelInternal } from '@trezor/connect'; import { Elevation, diff --git a/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx b/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx index 9ae1740385f..3340ca80c65 100644 --- a/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx +++ b/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { DeviceAnimation , Image } from '@trezor/components'; +import { DeviceAnimation, Image } from '@trezor/components'; import { DeviceModelInternal } from '@trezor/connect'; import styled from 'styled-components'; diff --git a/packages/protobuf/eslint.config.mjs b/packages/protobuf/eslint.config.mjs index a2592911074..ebd7b3a94d9 100644 --- a/packages/protobuf/eslint.config.mjs +++ b/packages/protobuf/eslint.config.mjs @@ -1,4 +1,7 @@ +import parentConfig from '../../eslint.config.mjs'; + export default [ + ...parentConfig, { rules: { '@typescript-eslint/ban-types': 'off', // allow {} in protobuf.d.ts diff --git a/packages/suite/src/actions/wallet/coinjoinClientActions.ts b/packages/suite/src/actions/wallet/coinjoinClientActions.ts index 9379a8cf0fa..bc3ee929688 100644 --- a/packages/suite/src/actions/wallet/coinjoinClientActions.ts +++ b/packages/suite/src/actions/wallet/coinjoinClientActions.ts @@ -13,7 +13,7 @@ import { arrayDistinct, arrayToDictionary, promiseAllSequence } from '@trezor/ut import { getOsName } from '@trezor/env-utils'; import { selectAccountByKey, selectDevices } from '@suite-common/wallet-core'; import { getUtxoOutpoint } from '@suite-common/wallet-utils'; -import { Account , AddressDisplayOptions } from '@suite-common/wallet-types'; +import { Account, AddressDisplayOptions } from '@suite-common/wallet-types'; import { notificationsActions } from '@suite-common/toast-notifications'; import { getDeviceInstances } from '@suite-common/suite-utils'; diff --git a/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts b/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts index 24075501460..b50cfa972d1 100644 --- a/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts +++ b/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts @@ -8,7 +8,7 @@ import { hasNetworkFeatures, parseFormDraftKey, } from '@suite-common/wallet-utils'; -import { Output , AddressDisplayOptions } from '@suite-common/wallet-types/src'; +import { Output, AddressDisplayOptions } from '@suite-common/wallet-types/src'; import { confirmAddressOnDeviceThunk, selectDevice, diff --git a/packages/suite/src/components/suite/AccountLabel.tsx b/packages/suite/src/components/suite/AccountLabel.tsx index 6293972428c..c4d55ae4c56 100644 --- a/packages/suite/src/components/suite/AccountLabel.tsx +++ b/packages/suite/src/components/suite/AccountLabel.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components'; import { BadgeSize, Row, TOOLTIP_DELAY_LONG, TruncateWithTooltip } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { AccountType, NetworkSymbol , Bip43Path, NetworkType } from '@suite-common/wallet-config'; +import { AccountType, NetworkSymbol, Bip43Path, NetworkType } from '@suite-common/wallet-config'; import { AccountTypeBadge } from './AccountTypeBadge'; import { useDefaultAccountLabel } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx index 4a27996bf3a..522d1cf85da 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react'; import styled, { keyframes } from 'styled-components'; import { Account } from '@suite-common/wallet-types'; -import { spacingsPx, zIndices , typography } from '@trezor/theme'; +import { spacingsPx, zIndices, typography } from '@trezor/theme'; import { H2 } from '@trezor/components'; import { MetadataLabeling, diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx index b46cbbe00d0..57b76aa36e6 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx @@ -1,5 +1,5 @@ -import { Paragraph , Column } from '@trezor/components'; -import { Bip43PathTemplate , AccountType , NetworkType } from '@suite-common/wallet-config'; +import { Paragraph, Column } from '@trezor/components'; +import { Bip43PathTemplate, AccountType, NetworkType } from '@suite-common/wallet-config'; import { Translation } from 'src/components/suite'; import { getAccountTypeDesc, diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx index 3e6aae04f75..7a70242e4e5 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx @@ -1,4 +1,4 @@ -import { Row , Image, Text } from '@trezor/components'; +import { Row, Image, Text } from '@trezor/components'; import styled from 'styled-components'; import { borders, spacings, spacingsPx } from '@trezor/theme'; diff --git a/packages/suite/src/components/wallet/Fees/Fees.tsx b/packages/suite/src/components/wallet/Fees/Fees.tsx index d93d9ec7320..8ff975849d9 100644 --- a/packages/suite/src/components/wallet/Fees/Fees.tsx +++ b/packages/suite/src/components/wallet/Fees/Fees.tsx @@ -10,7 +10,7 @@ import { } from 'react-hook-form'; import { Icon, Paragraph, SelectBar, Tooltip, motionEasing, variables } from '@trezor/components'; import { - FormState , + FormState, FeeInfo, PrecomposedLevels, PrecomposedLevelsCardano, diff --git a/packages/suite/src/utils/wallet/exportTransactionsUtils.ts b/packages/suite/src/utils/wallet/exportTransactionsUtils.ts index ce997407fd6..cfcb4a4e281 100644 --- a/packages/suite/src/utils/wallet/exportTransactionsUtils.ts +++ b/packages/suite/src/utils/wallet/exportTransactionsUtils.ts @@ -4,7 +4,7 @@ import { fromWei } from 'web3-utils'; import { FiatCurrencyCode } from '@suite-common/suite-config'; import { trezorLogo } from '@suite-common/suite-constants'; -import { TokenDefinitions , getIsPhishingTransaction } from '@suite-common/token-definitions'; +import { TokenDefinitions, getIsPhishingTransaction } from '@suite-common/token-definitions'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { ExportFileType, diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx index a391f17fd0e..c86299783a2 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx @@ -1,7 +1,7 @@ import { memo } from 'react'; import { useTheme } from 'styled-components'; import { Network } from '@suite-common/wallet-config'; -import { Icon, Table, Row, IconButton, Column , Text } from '@trezor/components'; +import { Icon, Table, Row, IconButton, Column, Text } from '@trezor/components'; import { AmountUnitSwitchWrapper, CoinBalance, diff --git a/packages/suite/src/views/settings/SettingsDebug/Backends.tsx b/packages/suite/src/views/settings/SettingsDebug/Backends.tsx index 9329c750fbc..4d27709e2f8 100644 --- a/packages/suite/src/views/settings/SettingsDebug/Backends.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/Backends.tsx @@ -1,6 +1,6 @@ import styled from 'styled-components'; -import { networks , NetworkSymbol } from '@suite-common/wallet-config'; +import { networks, NetworkSymbol } from '@suite-common/wallet-config'; import { selectNetworkBlockchainInfo } from '@suite-common/wallet-core'; import { ConnectionStatus } from '@suite-common/wallet-types'; import { Button } from '@trezor/components'; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx index 9b2e467e6ab..0ce2f655961 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx @@ -2,7 +2,7 @@ import styled from 'styled-components'; import { variables, Column } from '@trezor/components'; import * as deviceUtils from '@suite-common/suite-utils'; -import { selectDevice, selectDeviceThunk , acquireDevice } from '@suite-common/wallet-core'; +import { selectDevice, selectDeviceThunk, acquireDevice } from '@suite-common/wallet-core'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { WalletInstance } from './WalletInstance'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx index d619a67a006..84b1fc16898 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx @@ -1,5 +1,5 @@ import { Button, TextButton, Row, Column, Paragraph } from '@trezor/components'; -import { CryptoId , ExchangeTrade } from 'invity-api'; +import { CryptoId, ExchangeTrade } from 'invity-api'; import { spacings } from '@trezor/theme'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { diff --git a/packages/suite/src/views/wallet/send/Outputs/Address.tsx b/packages/suite/src/views/wallet/send/Outputs/Address.tsx index 25ce04a5b69..762935f69fe 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Address.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Address.tsx @@ -17,7 +17,7 @@ import { notificationsActions } from '@suite-common/toast-notifications'; import { formInputsMaxLength } from '@suite-common/validators'; import type { Output } from '@suite-common/wallet-types'; import TrezorConnect from '@trezor/connect'; -import { useSelector , useDevice, useDispatch, useTranslation } from 'src/hooks/suite'; +import { useSelector, useDevice, useDispatch, useTranslation } from 'src/hooks/suite'; import { isAddressValid, isAddressDeprecated, diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/SkeletonTransactionItem.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/SkeletonTransactionItem.tsx index e0d4c4dd50a..99235a80653 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/SkeletonTransactionItem.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/SkeletonTransactionItem.tsx @@ -12,4 +12,5 @@ export const SkeletonTransactionItem = () => ( ); +// eslint-disable-next-line import/no-default-export export default SkeletonTransactionItem; diff --git a/packages/transport-test/eslint.config.mjs b/packages/transport-test/eslint.config.mjs index 79ddeb25b50..7c8bf742b26 100644 --- a/packages/transport-test/eslint.config.mjs +++ b/packages/transport-test/eslint.config.mjs @@ -1,4 +1,7 @@ +import parentConfig from '../../eslint.config.mjs'; + export default [ + ...parentConfig, { rules: { 'no-nested-ternary': 'off', // useful in tests... diff --git a/packages/transport/eslint.config.mjs b/packages/transport/eslint.config.mjs new file mode 100644 index 00000000000..9da5dba77c7 --- /dev/null +++ b/packages/transport/eslint.config.mjs @@ -0,0 +1,11 @@ +import parentConfig from '../../eslint.config.mjs'; + +export default [ + ...parentConfig, + { + rules: { + 'no-console': 'off', + '@typescript-eslint/no-unused-vars': 'off', + }, + }, +]; diff --git a/packages/trezor-user-env-link/src/websocket-client.ts b/packages/trezor-user-env-link/src/websocket-client.ts index 11705613234..d61e75f99be 100644 --- a/packages/trezor-user-env-link/src/websocket-client.ts +++ b/packages/trezor-user-env-link/src/websocket-client.ts @@ -268,6 +268,7 @@ export class WebsocketClient extends TypedEmitter { } waitForTrezorUserEnv() { + // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { // unfortunately, it can take incredibly long for trezor-user-env to start, we should // do something about it diff --git a/packages/utxo-lib/eslint.config.mjs b/packages/utxo-lib/eslint.config.mjs index 94c66899596..226ed15d01a 100644 --- a/packages/utxo-lib/eslint.config.mjs +++ b/packages/utxo-lib/eslint.config.mjs @@ -1,10 +1,14 @@ +import parentConfig from '../../eslint.config.mjs'; + export default [ + ...parentConfig, { rules: { 'no-bitwise': 'off', // airbnb-base: used in hardending 'prefer-object-spread': 'off', // prefer Object.assign 'no-underscore-dangle': 'off', // underscore is used 'no-console': 'warn', + '@typescript-eslint/no-unused-vars': 'off', }, }, ]; diff --git a/packages/utxo-lib/src/networks.ts b/packages/utxo-lib/src/networks.ts index 91a1d6394f2..91ceac2c89d 100644 --- a/packages/utxo-lib/src/networks.ts +++ b/packages/utxo-lib/src/networks.ts @@ -278,8 +278,9 @@ export function isNetworkType(type: NetworkTypes, network?: Network) { }, network, ); - } catch (e) { return false; + } catch (e) { + /* empty */ } return !!NETWORK_TYPES[type].find( diff --git a/packages/utxo-lib/tests/__fixtures__/bufferutils.ts b/packages/utxo-lib/tests/__fixtures__/bufferutils.ts index 3306805aab3..272aac0374d 100644 --- a/packages/utxo-lib/tests/__fixtures__/bufferutils.ts +++ b/packages/utxo-lib/tests/__fixtures__/bufferutils.ts @@ -96,7 +96,7 @@ export const fixtures = { exception: 'value out of range', hex64: '0100000000002000', hexVI: 'ff0100000000000020', - // eslint-disable-next-line @typescript-eslint/no-loss-of-precision + // eslint-disable-next-line no-loss-of-precision dec: 9007199254740993, }, ], diff --git a/suite-common/redux-utils/src/tests/createActionWithExtraDeps.test.ts b/suite-common/redux-utils/src/tests/createActionWithExtraDeps.test.ts index 78e5ca78dc2..75beadeeaea 100644 --- a/suite-common/redux-utils/src/tests/createActionWithExtraDeps.test.ts +++ b/suite-common/redux-utils/src/tests/createActionWithExtraDeps.test.ts @@ -75,7 +75,6 @@ describe('createActionWithExtraDeps', () => { expect(dummyAction.match({ type: 'dummyAction' })).toEqual(true); }); - // eslint-disable-next-line jest/expect-expect it('has correct types', () => { const store = initStore(); diff --git a/suite-native/app/plugins/withAndroidMainActivityAttributes.js b/suite-native/app/plugins/withAndroidMainActivityAttributes.js index 6b8d2128463..e1887bda388 100644 --- a/suite-native/app/plugins/withAndroidMainActivityAttributes.js +++ b/suite-native/app/plugins/withAndroidMainActivityAttributes.js @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-shadow */ const { withAndroidManifest } = require('expo/config-plugins'); function addAttributesToMainApplication(androidManifest, attributes) { diff --git a/suite-native/app/plugins/withGradleProperties.js b/suite-native/app/plugins/withGradleProperties.js index 3ee18e671f4..03a73c4020d 100644 --- a/suite-native/app/plugins/withGradleProperties.js +++ b/suite-native/app/plugins/withGradleProperties.js @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-shadow */ const { withGradleProperties } = require('expo/config-plugins'); const newGraddleProperties = []; diff --git a/suite-native/app/plugins/withRemoveXcodeLocalEnv.js b/suite-native/app/plugins/withRemoveXcodeLocalEnv.js index e976f7fb407..bec601496a0 100644 --- a/suite-native/app/plugins/withRemoveXcodeLocalEnv.js +++ b/suite-native/app/plugins/withRemoveXcodeLocalEnv.js @@ -2,7 +2,6 @@ * This plugin is used to replace generated .xcode.env.local file with .xcode.env file. * This is needed because the generated .xcode.env.local file for some reason contains wrong path to Node.js binary. */ -/* eslint-disable @typescript-eslint/no-shadow */ /* eslint-disable require-await */ const { withDangerousMod, withPlugins } = require('expo/config-plugins'); const fs = require('fs'); diff --git a/suite-native/discovery/src/discoveryThunks.ts b/suite-native/discovery/src/discoveryThunks.ts index 3bab457507c..091ebf61c41 100644 --- a/suite-native/discovery/src/discoveryThunks.ts +++ b/suite-native/discovery/src/discoveryThunks.ts @@ -1,6 +1,6 @@ import { A, G, pipe } from '@mobily/ts-belt'; -import { getWeakRandomId , isArrayMember } from '@trezor/utils'; +import { getWeakRandomId, isArrayMember } from '@trezor/utils'; import { createThunk } from '@suite-common/redux-utils'; import { accountsActions, diff --git a/yarn.lock b/yarn.lock index 119f4740b9c..9afe0cc32a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,13 @@ __metadata: languageName: node linkType: hard +"@adraffy/ens-normalize@npm:^1.8.8": + version: 1.11.0 + resolution: "@adraffy/ens-normalize@npm:1.11.0" + checksum: 10/abef75f21470ea43dd6071168e092d2d13e38067e349e76186c78838ae174a46c3e18ca50921d05bea6ec3203074147c9e271f8cb6531d1c2c0e146f3199ddcb + languageName: node + linkType: hard + "@alloc/quick-lru@npm:^5.2.0": version: 5.2.0 resolution: "@alloc/quick-lru@npm:5.2.0" @@ -3412,16 +3419,6 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:2.6.5, @ethereumjs/common@npm:^2.6.4": - version: 2.6.5 - resolution: "@ethereumjs/common@npm:2.6.5" - dependencies: - crc-32: "npm:^1.2.0" - ethereumjs-util: "npm:^7.1.5" - checksum: 10/e931e16cafc908b086492ca5fcbb1820fff3edfb83cfd4ae48002517b3be0d1f7622c750874b3b347c122d06372e133ddae44ac129b5ba141f68808a79430135 - languageName: node - linkType: hard - "@ethereumjs/common@npm:^3.2.0": version: 3.2.0 resolution: "@ethereumjs/common@npm:3.2.0" @@ -3432,12 +3429,12 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/common@npm:^4.3.0": - version: 4.3.0 - resolution: "@ethereumjs/common@npm:4.3.0" +"@ethereumjs/common@npm:^4.4.0": + version: 4.4.0 + resolution: "@ethereumjs/common@npm:4.4.0" dependencies: - "@ethereumjs/util": "npm:^9.0.3" - checksum: 10/90f7fe1ba6827b65cd25e9bb4adf07a117ea554a950bb364d5fd9873cb770d383addb0ad34839a91fbec22ebc25516c6fb7e70ae0198c78f933920bf39797a94 + "@ethereumjs/util": "npm:^9.1.0" + checksum: 10/dd5cc78575a762b367601f94d6af7e36cb3a5ecab45eec0c1259c433e755a16c867753aa88f331e3963791a18424ad0549682a3a6a0a160640fe846db6ce8014 languageName: node linkType: hard @@ -3459,16 +3456,6 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:3.5.2": - version: 3.5.2 - resolution: "@ethereumjs/tx@npm:3.5.2" - dependencies: - "@ethereumjs/common": "npm:^2.6.4" - ethereumjs-util: "npm:^7.1.5" - checksum: 10/891e12738206229ac428685536844f7765e8547ae794462b1e406399445bf1f6f918af6ebc33ee5fa4a1340f14f48871a579f11c0e1d7c142ba0dd525bae5df5 - languageName: node - linkType: hard - "@ethereumjs/tx@npm:^4.2.0": version: 4.2.0 resolution: "@ethereumjs/tx@npm:4.2.0" @@ -3481,15 +3468,15 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/tx@npm:^5.3.0": - version: 5.3.0 - resolution: "@ethereumjs/tx@npm:5.3.0" +"@ethereumjs/tx@npm:^5.4.0": + version: 5.4.0 + resolution: "@ethereumjs/tx@npm:5.4.0" dependencies: - "@ethereumjs/common": "npm:^4.3.0" + "@ethereumjs/common": "npm:^4.4.0" "@ethereumjs/rlp": "npm:^5.0.2" - "@ethereumjs/util": "npm:^9.0.3" - ethereum-cryptography: "npm:^2.1.3" - checksum: 10/4eb48e763d81ea0978648367d61c568c8d10f769c1ea7d32307ebe02299d4fa9fe5d7bf794ec1ee22e92edef6bfe1f459d5816e1c62d3f93602d931807ca488b + "@ethereumjs/util": "npm:^9.1.0" + ethereum-cryptography: "npm:^2.2.1" + checksum: 10/8d2c0a69ab37015f945f9de065cfb9f05e8e79179efeed725ea0a14760c3eb8ff900bcf915bb71ec29fe2f753db35d1b78a15ac4ddec489e87c995dec1ba6e85 languageName: node linkType: hard @@ -3504,232 +3491,19 @@ __metadata: languageName: node linkType: hard -"@ethereumjs/util@npm:^9.0.3": - version: 9.0.3 - resolution: "@ethereumjs/util@npm:9.0.3" +"@ethereumjs/util@npm:^9.1.0": + version: 9.1.0 + resolution: "@ethereumjs/util@npm:9.1.0" dependencies: "@ethereumjs/rlp": "npm:^5.0.2" - ethereum-cryptography: "npm:^2.1.3" - checksum: 10/d9c313a0672e0b4842ba80e2f413ccd5302c3942dc4ed718d6e3faab89c4eeeaaeb6661e9275679c22b83b1cb6502ea772e1c837d105b6a9faf5957a59bc3e4c + ethereum-cryptography: "npm:^2.2.1" + checksum: 10/4e22c4081c63eebb808eccd54f7f91cd3407f4cac192da5f30a0d6983fe07d51f25e6a9d08624f1376e604bb7dce574aafcf0fbf0becf42f62687c11e710ac41 languageName: node linkType: hard -"@ethersproject/abi@npm:^5.6.3": - version: 5.7.0 - resolution: "@ethersproject/abi@npm:5.7.0" - dependencies: - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/hash": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10/6ed002cbc61a7e21bc0182702345659c1984f6f8e6bad166e43aee76ea8f74766dd0f6236574a868e1b4600af27972bf25b973fae7877ae8da3afa90d3965cac - languageName: node - linkType: hard - -"@ethersproject/abstract-provider@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/abstract-provider@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/networks": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/transactions": "npm:^5.7.0" - "@ethersproject/web": "npm:^5.7.0" - checksum: 10/c03e413a812486002525f4036bf2cb90e77a19b98fa3d16279e28e0a05520a1085690fac2ee9f94b7931b9a803249ff8a8bbb26ff8dee52196a6ef7a3fc5edc5 - languageName: node - linkType: hard - -"@ethersproject/abstract-signer@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/abstract-signer@npm:5.7.0" - dependencies: - "@ethersproject/abstract-provider": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - checksum: 10/0a6ffade0a947c9ba617048334e1346838f394d1d0a5307ac435a0c63ed1033b247e25ffb0cd6880d7dcf5459581f52f67e3804ebba42ff462050f1e4321ba0c - languageName: node - linkType: hard - -"@ethersproject/address@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/address@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/rlp": "npm:^5.7.0" - checksum: 10/1ac4f3693622ed9fbbd7e966a941ec1eba0d9445e6e8154b1daf8e93b8f62ad91853d1de5facf4c27b41e6f1e47b94a317a2492ba595bee1841fd3030c3e9a27 - languageName: node - linkType: hard - -"@ethersproject/base64@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/base64@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - checksum: 10/7105105f401e1c681e61db1e9da1b5960d8c5fbd262bbcacc99d61dbb9674a9db1181bb31903d98609f10e8a0eb64c850475f3b040d67dea953e2b0ac6380e96 - languageName: node - linkType: hard - -"@ethersproject/bignumber@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/bignumber@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - bn.js: "npm:^5.2.1" - checksum: 10/09cffa18a9f0730856b57c14c345bd68ba451159417e5aff684a8808011cd03b27b7c465d423370333a7d1c9a621392fc74f064a3b02c9edc49ebe497da6d45d - languageName: node - linkType: hard - -"@ethersproject/bytes@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/bytes@npm:5.7.0" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/8b3ffedb68c1a82cfb875e9738361409cc33e2dcb1286b6ccfdc4dd8dd0317f7eacc8937b736c467d213dffc44b469690fe1a951e901953d5a90c5af2b675ae4 - languageName: node - linkType: hard - -"@ethersproject/constants@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/constants@npm:5.7.0" - dependencies: - "@ethersproject/bignumber": "npm:^5.7.0" - checksum: 10/6d4b1355747cce837b3e76ec3bde70e4732736f23b04f196f706ebfa5d4d9c2be50904a390d4d40ce77803b98d03d16a9b6898418e04ba63491933ce08c4ba8a - languageName: node - linkType: hard - -"@ethersproject/hash@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/hash@npm:5.7.0" - dependencies: - "@ethersproject/abstract-signer": "npm:^5.7.0" - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/base64": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10/d83de3f3a1b99b404a2e7bb503f5cdd90c66a97a32cce1d36b09bb8e3fb7205b96e30ad28e2b9f30083beea6269b157d0c6e3425052bb17c0a35fddfdd1c72a3 - languageName: node - linkType: hard - -"@ethersproject/keccak256@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/keccak256@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - js-sha3: "npm:0.8.0" - checksum: 10/ff70950d82203aab29ccda2553422cbac2e7a0c15c986bd20a69b13606ed8bb6e4fdd7b67b8d3b27d4f841e8222cbaccd33ed34be29f866fec7308f96ed244c6 - languageName: node - linkType: hard - -"@ethersproject/logger@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/logger@npm:5.7.0" - checksum: 10/683a939f467ae7510deedc23d7611d0932c3046137f5ffb92ba1e3c8cd9cf2fbbaa676b660c248441a0fa9143783137c46d6e6d17d676188dd5a6ef0b72dd091 - languageName: node - linkType: hard - -"@ethersproject/networks@npm:^5.7.0": - version: 5.7.1 - resolution: "@ethersproject/networks@npm:5.7.1" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/5265d0b4b72ef91af57be804b44507f4943038d609699764d8a69157ed381e30fe22ebf63630ed8e530ceb220f15d69dae8cda2e5023ccd793285c9d5882e599 - languageName: node - linkType: hard - -"@ethersproject/properties@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/properties@npm:5.7.0" - dependencies: - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/f8401a161940aa1c32695115a20c65357877002a6f7dc13ab1600064bf54d7b825b4db49de8dc8da69efcbb0c9f34f8813e1540427e63e262ab841c1bf6c1c1e - languageName: node - linkType: hard - -"@ethersproject/rlp@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/rlp@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/3b8c5279f7654794d5874569f5598ae6a880e19e6616013a31e26c35c5f586851593a6e85c05ed7b391fbc74a1ea8612dd4d867daefe701bf4e8fcf2ab2f29b9 - languageName: node - linkType: hard - -"@ethersproject/signing-key@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/signing-key@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - bn.js: "npm:^5.2.1" - elliptic: "npm:6.5.4" - hash.js: "npm:1.1.7" - checksum: 10/ff2f79ded86232b139e7538e4aaa294c6022a7aaa8c95a6379dd7b7c10a6d363685c6967c816f98f609581cf01f0a5943c667af89a154a00bcfe093a8c7f3ce7 - languageName: node - linkType: hard - -"@ethersproject/strings@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/strings@npm:5.7.0" - dependencies: - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - checksum: 10/24191bf30e98d434a9fba2f522784f65162d6712bc3e1ccc98ed85c5da5884cfdb5a1376b7695374655a7b95ec1f5fdbeef5afc7d0ea77ffeb78047e9b791fa5 - languageName: node - linkType: hard - -"@ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": - version: 5.7.0 - resolution: "@ethersproject/transactions@npm:5.7.0" - dependencies: - "@ethersproject/address": "npm:^5.7.0" - "@ethersproject/bignumber": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/constants": "npm:^5.7.0" - "@ethersproject/keccak256": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/rlp": "npm:^5.7.0" - "@ethersproject/signing-key": "npm:^5.7.0" - checksum: 10/d809e9d40020004b7de9e34bf39c50377dce8ed417cdf001bfabc81ecb1b7d1e0c808fdca0a339ea05e1b380648eaf336fe70f137904df2d3c3135a38190a5af - languageName: node - linkType: hard - -"@ethersproject/web@npm:^5.7.0": - version: 5.7.1 - resolution: "@ethersproject/web@npm:5.7.1" - dependencies: - "@ethersproject/base64": "npm:^5.7.0" - "@ethersproject/bytes": "npm:^5.7.0" - "@ethersproject/logger": "npm:^5.7.0" - "@ethersproject/properties": "npm:^5.7.0" - "@ethersproject/strings": "npm:^5.7.0" - checksum: 10/c83b6b3ac40573ddb67b1750bb4cf21ded7d8555be5e53a97c0f34964622fd88de9220a90a118434bae164a2bff3acbdc5ecb990517b5f6dc32bdad7adf604c2 - languageName: node - linkType: hard - -"@everstake/wallet-sdk@npm:^0.3.49": - version: 0.3.49 - resolution: "@everstake/wallet-sdk@npm:0.3.49" +"@everstake/wallet-sdk@npm:^0.3.66": + version: 0.3.66 + resolution: "@everstake/wallet-sdk@npm:0.3.66" dependencies: "@cosmjs/stargate": "npm:^0.30.1" "@mysten/sui.js": "npm:^0.46.1" @@ -3740,8 +3514,8 @@ __metadata: bignumber.js: "npm:^9.1.2" bip39: "npm:^3.1.0" bs58: "npm:^5.0.0" - web3: "npm:^1.9.0" - checksum: 10/75791291d9bbf417746c5794b8f3e3cfdaeace05a46d2861adcf725eaaab08fbd9c501c1a62918da98ebbd41d0f8e61d9cd8f6085a60426f09238e7e3a14b4e5 + web3: "npm:^4.14.0" + checksum: 10/035e4ac89b5d2d48c4731382e4bf03bc3b6c7e66a5c72a58629f3528eb8b6c6ad91f0eae392e6cdcd5b601d3b72d73f1b94cb8266c64267546a9ebda7189cf3d languageName: node linkType: hard @@ -4538,9 +4312,9 @@ __metadata: languageName: node linkType: hard -"@gorhom/bottom-sheet@npm:5.0.1": - version: 5.0.1 - resolution: "@gorhom/bottom-sheet@npm:5.0.1" +"@gorhom/bottom-sheet@npm:5.0.5": + version: 5.0.5 + resolution: "@gorhom/bottom-sheet@npm:5.0.5" dependencies: "@gorhom/portal": "npm:1.0.14" invariant: "npm:^2.2.4" @@ -4556,7 +4330,7 @@ __metadata: optional: true "@types/react-native": optional: true - checksum: 10/61134493ac61f96a5bc7aae20f4a6465f19138d7d2d36129d2285022ee52fe02648d7706212b17d5e1c6acdf0d0a5ee0124884b44a34eb468406e89a86c6102c + checksum: 10/4c972e5c4459dce02858c4b5af691e412e8075e1cbfe049ae7d308746173ba27c3802d867eb54a94a804987d3d9e78f5886dc5a3f4163fb19ca2a91b4ad44864 languageName: node linkType: hard @@ -5248,9 +5022,9 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-sig-util@npm:^7.0.3": - version: 7.0.3 - resolution: "@metamask/eth-sig-util@npm:7.0.3" +"@metamask/eth-sig-util@npm:^8.0.0": + version: 8.0.0 + resolution: "@metamask/eth-sig-util@npm:8.0.0" dependencies: "@ethereumjs/util": "npm:^8.1.0" "@metamask/abi-utils": "npm:^2.0.4" @@ -5258,7 +5032,7 @@ __metadata: "@scure/base": "npm:~1.1.3" ethereum-cryptography: "npm:^2.1.2" tweetnacl: "npm:^1.0.3" - checksum: 10/a71b28607b0815d609cf27ab2d8535393d0a7e7f2c6b7a23d92669b770c664c14e2f539129351147339172b0bb865bb977e7cfb30624870eedab5d7ab700beff + checksum: 10/5de92bc59df31bcf417ecbdfd2b47f15c21b29454f45108513c55d9c005b7cb51373e9d254bd97533603ab7c7758fdf8fc5159612f366b05f92ebe5beb6d75d8 languageName: node linkType: hard @@ -5536,7 +5310,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.1.0, @noble/curves@npm:^1.4.2": +"@noble/curves@npm:1.4.2, @noble/curves@npm:^1.1.0, @noble/curves@npm:^1.4.2, @noble/curves@npm:~1.4.0": version: 1.4.2 resolution: "@noble/curves@npm:1.4.2" dependencies: @@ -5552,7 +5326,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1, @noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.2.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.3.2, @noble/hashes@npm:^1.4.0": +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1, @noble/hashes@npm:^1.0.0, @noble/hashes@npm:^1.2.0, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.3.2, @noble/hashes@npm:^1.4.0, @noble/hashes@npm:~1.4.0": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: 10/e156e65794c473794c52fa9d06baf1eb20903d0d96719530f523cc4450f6c721a957c544796e6efd0197b2296e7cd70efeb312f861465e17940a3e3c7e0febc6 @@ -7804,6 +7578,13 @@ __metadata: languageName: node linkType: hard +"@scure/base@npm:~1.1.6": + version: 1.1.9 + resolution: "@scure/base@npm:1.1.9" + checksum: 10/f0ab7f687bbcdee2a01377fe3cd808bf63977999672751295b6a92625d5322f4754a96d40f6bd579bc367aad48ecf8a4e6d0390e70296e6ded1076f52adb16bb + languageName: node + linkType: hard + "@scure/bip32@npm:1.3.3, @scure/bip32@npm:^1.3.1": version: 1.3.3 resolution: "@scure/bip32@npm:1.3.3" @@ -7815,6 +7596,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:1.4.0": + version: 1.4.0 + resolution: "@scure/bip32@npm:1.4.0" + dependencies: + "@noble/curves": "npm:~1.4.0" + "@noble/hashes": "npm:~1.4.0" + "@scure/base": "npm:~1.1.6" + checksum: 10/6cd5062d902564d9e970597ec8b1adacb415b2eadfbb95aee1a1a0480a52eb0de4d294d3753aa8b48548064c9795ed108d348a31a8ce3fc88785377bb12c63b9 + languageName: node + linkType: hard + "@scure/bip39@npm:1.2.1": version: 1.2.1 resolution: "@scure/bip39@npm:1.2.1" @@ -7835,6 +7627,16 @@ __metadata: languageName: node linkType: hard +"@scure/bip39@npm:1.3.0": + version: 1.3.0 + resolution: "@scure/bip39@npm:1.3.0" + dependencies: + "@noble/hashes": "npm:~1.4.0" + "@scure/base": "npm:~1.1.6" + checksum: 10/7d71fd58153de22fe8cd65b525f6958a80487bc9d0fbc32c71c328aeafe41fa259f989d2f1e0fa4fdfeaf83b8fcf9310d52ed9862987e46c2f2bfb9dd8cf9fc1 + languageName: node + linkType: hard + "@segment/loosely-validate-event@npm:^2.0.0": version: 2.0.0 resolution: "@segment/loosely-validate-event@npm:2.0.0" @@ -8376,7 +8178,7 @@ __metadata: languageName: node linkType: hard -"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.6.0": +"@sindresorhus/is@npm:^4.0.0": version: 4.6.0 resolution: "@sindresorhus/is@npm:4.6.0" checksum: 10/e7f36ed72abfcd5e0355f7423a72918b9748bb1ef370a59f3e5ad8d40b728b85d63b272f65f63eec1faf417cda89dcb0aeebe94015647b6054659c1442fe5ce0 @@ -8424,7 +8226,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.75.0, @solana/web3.js@npm:^1.95.0": +"@solana/web3.js@npm:^1.75.0": version: 1.95.0 resolution: "@solana/web3.js@npm:1.95.0" dependencies: @@ -8447,18 +8249,41 @@ __metadata: languageName: node linkType: hard -"@stellar/js-xdr@npm:^3.1.1": - version: 3.1.1 - resolution: "@stellar/js-xdr@npm:3.1.1" - checksum: 10/3bc8ee3f1611b55938ef0249b7a90b3d689177d45b4c8c24c5562b8fe32372148f7544a0aab67776f4c7b95aef8cb0f97606b86ec800bb087302ff404cb8ccbc +"@solana/web3.js@npm:^1.95.4": + version: 1.95.4 + resolution: "@solana/web3.js@npm:1.95.4" + dependencies: + "@babel/runtime": "npm:^7.25.0" + "@noble/curves": "npm:^1.4.2" + "@noble/hashes": "npm:^1.4.0" + "@solana/buffer-layout": "npm:^4.0.1" + agentkeepalive: "npm:^4.5.0" + bigint-buffer: "npm:^1.1.5" + bn.js: "npm:^5.2.1" + borsh: "npm:^0.7.0" + bs58: "npm:^4.0.1" + buffer: "npm:6.0.3" + fast-stable-stringify: "npm:^1.0.0" + jayson: "npm:^4.1.1" + node-fetch: "npm:^2.7.0" + rpc-websockets: "npm:^9.0.2" + superstruct: "npm:^2.0.2" + checksum: 10/353e04ac1110035ff108f16af4029c7a98f71cce841d45877c9bc4a354cdc58a051681603c92289b81e3dc5ef6b1567c6f866e4ba56a434db145e38a5a41d276 languageName: node linkType: hard -"@stellar/stellar-base@npm:^12.0.1": - version: 12.0.1 - resolution: "@stellar/stellar-base@npm:12.0.1" +"@stellar/js-xdr@npm:^3.1.2": + version: 3.1.2 + resolution: "@stellar/js-xdr@npm:3.1.2" + checksum: 10/96b5c52088bb2f2cc11a04ee1766ceb9431bdb0195058b9bc8d60cd1459772c2be6a9aa1bf69ba8b7589cfaf71beef96890e60d7fd7de0332c11ae1917f95440 + languageName: node + linkType: hard + +"@stellar/stellar-base@npm:^12.1.1": + version: 12.1.1 + resolution: "@stellar/stellar-base@npm:12.1.1" dependencies: - "@stellar/js-xdr": "npm:^3.1.1" + "@stellar/js-xdr": "npm:^3.1.2" base32.js: "npm:^0.1.0" bignumber.js: "npm:^9.1.2" buffer: "npm:^6.0.3" @@ -8468,22 +8293,22 @@ __metadata: dependenciesMeta: sodium-native: optional: true - checksum: 10/5185ef4a747ac6c037efc82b784fd3f41e0aaccd17ed6adb63b460e2938c29a9ef6d8f9d082fcc14420b6385ec08c55fc59ced34776a0bcab859f9bc31be72f2 + checksum: 10/6376f8c61a4299d5951acd0ed84b36e4c8dafeb0fab339acd314f9639c99a5059cce666410e8d2a825ea0daf4c19b91b504814eb1a5af40ba7c425f0124326e3 languageName: node linkType: hard -"@stellar/stellar-sdk@npm:^12.1.0": - version: 12.1.0 - resolution: "@stellar/stellar-sdk@npm:12.1.0" +"@stellar/stellar-sdk@npm:^12.1.3": + version: 12.3.0 + resolution: "@stellar/stellar-sdk@npm:12.3.0" dependencies: - "@stellar/stellar-base": "npm:^12.0.1" - axios: "npm:^1.7.2" + "@stellar/stellar-base": "npm:^12.1.1" + axios: "npm:^1.7.7" bignumber.js: "npm:^9.1.2" eventsource: "npm:^2.0.2" randombytes: "npm:^2.1.0" toml: "npm:^3.0.0" urijs: "npm:^1.19.1" - checksum: 10/bb4455261320f9718d415eca9cfc2228edabbc28c4fd768fe23a5abc64254600c9c4db13a2f7dd417991222805e8ab77df63ab5504b44f325b5c5a5c958dde96 + checksum: 10/47a609172e583d462785bf5f865c33dee8b59e9828cfc2056c22d867121aeba76b5464ec0e871dc0b6656a9d8252e3efeea96878db3e558b2249dfe60e0cd9b5 languageName: node linkType: hard @@ -9592,7 +9417,7 @@ __metadata: dependencies: "@mobily/ts-belt": "npm:^3.13.1" "@solana/buffer-layout": "npm:^4.0.1" - "@solana/web3.js": "npm:^1.95.0" + "@solana/web3.js": "npm:^1.95.4" "@suite-common/fiat-services": "workspace:*" "@suite-common/metadata-types": "workspace:*" "@suite-common/suite-config": "workspace:*" @@ -9691,7 +9516,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@babel/plugin-transform-export-namespace-from": "npm:^7.23.4" "@config-plugins/detox": "npm:^8.0.0" - "@gorhom/bottom-sheet": "npm:5.0.1" + "@gorhom/bottom-sheet": "npm:5.0.5" "@mobily/ts-belt": "npm:^3.13.1" "@react-native-community/netinfo": "npm:11.3.2" "@react-native/babel-preset": "npm:^0.75.2" @@ -9839,7 +9664,7 @@ __metadata: version: 0.0.0-use.local resolution: "@suite-native/atoms@workspace:suite-native/atoms" dependencies: - "@gorhom/bottom-sheet": "npm:5.0.1" + "@gorhom/bottom-sheet": "npm:5.0.5" "@mobily/ts-belt": "npm:^3.13.1" "@shopify/flash-list": "npm:1.7.1" "@shopify/react-native-skia": "npm:1.3.11" @@ -11137,15 +10962,6 @@ __metadata: languageName: node linkType: hard -"@szmarczak/http-timer@npm:^5.0.1": - version: 5.0.1 - resolution: "@szmarczak/http-timer@npm:5.0.1" - dependencies: - defer-to-connect: "npm:^2.0.1" - checksum: 10/fc9cb993e808806692e4a3337c90ece0ec00c89f4b67e3652a356b89730da98bc824273a6d67ca84d5f33cd85f317dcd5ce39d8cc0a2f060145a608a7cb8ce92 - languageName: node - linkType: hard - "@tailwindcss/nesting@npm:^0.0.0-insiders.565cd3e": version: 0.0.0-insiders.565cd3e resolution: "@tailwindcss/nesting@npm:0.0.0-insiders.565cd3e" @@ -11321,7 +11137,7 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/blockchain-link-types@workspace:packages/blockchain-link-types" dependencies: - "@solana/web3.js": "npm:^1.95.0" + "@solana/web3.js": "npm:^1.95.4" "@trezor/type-utils": "workspace:*" "@trezor/utxo-lib": "workspace:*" tsx: "npm:^4.16.3" @@ -11335,7 +11151,7 @@ __metadata: resolution: "@trezor/blockchain-link-utils@workspace:packages/blockchain-link-utils" dependencies: "@mobily/ts-belt": "npm:^3.13.1" - "@solana/web3.js": "npm:^1.95.0" + "@solana/web3.js": "npm:^1.95.4" "@trezor/blockchain-link-types": "workspace:*" "@trezor/env-utils": "workspace:*" "@trezor/type-utils": "workspace:*" @@ -11351,7 +11167,7 @@ __metadata: resolution: "@trezor/blockchain-link@workspace:packages/blockchain-link" dependencies: "@solana/buffer-layout": "npm:^4.0.1" - "@solana/web3.js": "npm:^1.95.0" + "@solana/web3.js": "npm:^1.95.4" "@trezor/blockchain-link-types": "workspace:*" "@trezor/blockchain-link-utils": "workspace:*" "@trezor/e2e-utils": "workspace:*" @@ -11601,9 +11417,9 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/connect-plugin-ethereum@workspace:packages/connect-plugin-ethereum" dependencies: - "@metamask/eth-sig-util": "npm:^7.0.3" + "@metamask/eth-sig-util": "npm:^8.0.0" peerDependencies: - "@metamask/eth-sig-util": ^7.0.3 + "@metamask/eth-sig-util": ^8.0.0 tslib: ^2.6.2 languageName: unknown linkType: soft @@ -11612,10 +11428,10 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/connect-plugin-stellar@workspace:packages/connect-plugin-stellar" dependencies: - "@stellar/stellar-sdk": "npm:^12.1.0" + "@stellar/stellar-sdk": "npm:^12.1.3" "@trezor/utils": "workspace:*" peerDependencies: - "@stellar/stellar-sdk": ^12.1.0 + "@stellar/stellar-sdk": ^12.1.3 "@trezor/connect": 9.x.x tslib: ^2.6.2 languageName: unknown @@ -11759,8 +11575,8 @@ __metadata: resolution: "@trezor/connect@workspace:packages/connect" dependencies: "@babel/preset-typescript": "npm:^7.24.7" - "@ethereumjs/common": "npm:^4.3.0" - "@ethereumjs/tx": "npm:^5.3.0" + "@ethereumjs/common": "npm:^4.4.0" + "@ethereumjs/tx": "npm:^5.4.0" "@fivebinaries/coin-selection": "npm:2.2.1" "@trezor/blockchain-link": "workspace:*" "@trezor/blockchain-link-types": "workspace:*" @@ -12245,7 +12061,7 @@ __metadata: resolution: "@trezor/suite@workspace:packages/suite" dependencies: "@crowdin/cli": "npm:^4.0.0" - "@everstake/wallet-sdk": "npm:^0.3.49" + "@everstake/wallet-sdk": "npm:^0.3.66" "@floating-ui/react": "npm:^0.26.9" "@formatjs/cli": "npm:^6.2.7" "@formatjs/intl": "npm:2.10.0" @@ -12254,7 +12070,7 @@ __metadata: "@reduxjs/toolkit": "npm:1.9.5" "@sentry/core": "npm:^7.100.1" "@solana/buffer-layout": "npm:^4.0.1" - "@solana/web3.js": "npm:^1.95.0" + "@solana/web3.js": "npm:^1.95.4" "@suite-common/analytics": "workspace:*" "@suite-common/assets": "workspace:*" "@suite-common/connect-init": "workspace:*" @@ -12503,9 +12319,11 @@ __metadata: dependencies: "@trezor/utils": "workspace:*" "@types/bchaddrjs": "npm:^0.4.3" + "@types/bn.js": "npm:^5.1.6" "@types/bs58": "npm:^4.0.4" "@types/bs58check": "npm:^2.1.2" "@types/create-hmac": "npm:^1.1.3" + "@types/events": "npm:^3.0.3" "@types/wif": "npm:^2.0.5" bchaddrjs: "npm:^0.5.2" bech32: "npm:^2.0.0" @@ -12656,12 +12474,12 @@ __metadata: languageName: node linkType: hard -"@types/bn.js@npm:^5.1.0, @types/bn.js@npm:^5.1.1": - version: 5.1.5 - resolution: "@types/bn.js@npm:5.1.5" +"@types/bn.js@npm:^5.1.6": + version: 5.1.6 + resolution: "@types/bn.js@npm:5.1.6" dependencies: "@types/node": "npm:*" - checksum: 10/9719330c86aeae0a6a447c974cf0f853ba3660ede20de61f435b03d699e30e6d8b35bf71a8dc9fdc8317784438e83177644ba068ed653d0ae0106e1ecbfe289e + checksum: 10/db565b5a2af59b09459d74441153bf23a0e80f1fb2d070330786054e7ce1a7285dc40afcd8f289426c61a83166bdd70814f70e2d439744686aac5d3ea75daf13 languageName: node linkType: hard @@ -12720,7 +12538,7 @@ __metadata: languageName: node linkType: hard -"@types/cacheable-request@npm:^6.0.1, @types/cacheable-request@npm:^6.0.2": +"@types/cacheable-request@npm:^6.0.1": version: 6.0.3 resolution: "@types/cacheable-request@npm:6.0.3" dependencies: @@ -13028,6 +12846,13 @@ __metadata: languageName: node linkType: hard +"@types/events@npm:^3.0.3": + version: 3.0.3 + resolution: "@types/events@npm:3.0.3" + checksum: 10/50af9312fab001fd6bd4bb3ff65830f940877e6778de140a92481a0d9bf5f4853d44ec758a8800ef60e0598ac43ed1b5688116a3c65906ae54e989278d6c7c82 + languageName: node + linkType: hard + "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33": version: 4.17.35 resolution: "@types/express-serve-static-core@npm:4.17.35" @@ -13597,15 +13422,6 @@ __metadata: languageName: node linkType: hard -"@types/pbkdf2@npm:^3.0.0": - version: 3.1.0 - resolution: "@types/pbkdf2@npm:3.1.0" - dependencies: - "@types/node": "npm:*" - checksum: 10/d15024b1957c21cf3b8887329d9bd8dfde754cf13a09d76ae25f1391cfc62bb8b8d7b760773c5dbaa748172fba8b3e0c3dbe962af6ccbd69b76df12a48dfba40 - languageName: node - linkType: hard - "@types/pdfkit@npm:*": version: 0.12.6 resolution: "@types/pdfkit@npm:0.12.6" @@ -13832,15 +13648,6 @@ __metadata: languageName: node linkType: hard -"@types/secp256k1@npm:^4.0.1": - version: 4.0.3 - resolution: "@types/secp256k1@npm:4.0.3" - dependencies: - "@types/node": "npm:*" - checksum: 10/aa8176f3fb9a9f37189592425cb6bfec4ffcf3dc397f2bfd8e3acd06be25f5213cbc0df01f541c7cc955b906a61befd5c1092d46adc62e489970bfebf4409e1d - languageName: node - linkType: hard - "@types/semver@npm:^7.3.4, @types/semver@npm:^7.5.6, @types/semver@npm:^7.5.8": version: 7.5.8 resolution: "@types/semver@npm:7.5.8" @@ -14059,6 +13866,15 @@ __metadata: languageName: node linkType: hard +"@types/ws@npm:8.5.3": + version: 8.5.3 + resolution: "@types/ws@npm:8.5.3" + dependencies: + "@types/node": "npm:*" + checksum: 10/08aac698ce6480b532d8311f790a8744ae489ccdd98f374cfe4b8245855439825c64b031abcbba4f30fb280da6cc2b02a4e261e16341d058ffaeecaa24ba2bd3 + languageName: node + linkType: hard + "@types/ws@npm:^7.2.0, @types/ws@npm:^7.4.4": version: 7.4.7 resolution: "@types/ws@npm:7.4.7" @@ -14779,6 +14595,19 @@ __metadata: languageName: node linkType: hard +"abitype@npm:0.7.1": + version: 0.7.1 + resolution: "abitype@npm:0.7.1" + peerDependencies: + typescript: ">=4.9.4" + zod: ^3 >=3.19.1 + peerDependenciesMeta: + zod: + optional: true + checksum: 10/deee4a18c9c7218ab2e5e57e07e4cb3e2f3e785657be364d098ab0587cd552c4fbb41e1bdddbc6fa52387f51ebd181461fe70a13127cc77091655775fdfb18fe + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -14788,13 +14617,6 @@ __metadata: languageName: node linkType: hard -"abortcontroller-polyfill@npm:^1.7.5": - version: 1.7.5 - resolution: "abortcontroller-polyfill@npm:1.7.5" - checksum: 10/aac398f7fc076235fe731adaffd2c319fe6c1527af8ca561890242d5396351350e0705726478778dc90326a69a4c044890c156fe867cba7f3ffeb670f8665a51 - languageName: node - linkType: hard - "accepts@npm:^1.3.5, accepts@npm:^1.3.7, accepts@npm:^1.3.8, accepts@npm:~1.3.4, accepts@npm:~1.3.5, accepts@npm:~1.3.7, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" @@ -14982,7 +14804,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": +"ajv@npm:^6.10.0, ajv@npm:^6.12.0, ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -15753,7 +15575,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.3.5, axios@npm:^1.6.0, axios@npm:^1.6.1, axios@npm:^1.6.7, axios@npm:^1.7.2": +"axios@npm:^1.3.5, axios@npm:^1.6.0, axios@npm:^1.6.1, axios@npm:^1.6.7": version: 1.7.2 resolution: "axios@npm:1.7.2" dependencies: @@ -15764,6 +15586,17 @@ __metadata: languageName: node linkType: hard +"axios@npm:^1.7.7": + version: 1.7.7 + resolution: "axios@npm:1.7.7" + dependencies: + follow-redirects: "npm:^1.15.6" + form-data: "npm:^4.0.0" + proxy-from-env: "npm:^1.1.0" + checksum: 10/7f875ea13b9298cd7b40fd09985209f7a38d38321f1118c701520939de2f113c4ba137832fe8e3f811f99a38e12c8225481011023209a77b0c0641270e20cde1 + languageName: node + linkType: hard + "b4a@npm:^1.6.4": version: 1.6.6 resolution: "b4a@npm:1.6.6" @@ -16057,7 +15890,7 @@ __metadata: languageName: node linkType: hard -"base-x@npm:3.0.9, base-x@npm:^3.0.2, base-x@npm:^3.0.6, base-x@npm:^3.0.8": +"base-x@npm:3.0.9, base-x@npm:^3.0.2, base-x@npm:^3.0.6": version: 3.0.9 resolution: "base-x@npm:3.0.9" dependencies: @@ -16302,7 +16135,7 @@ __metadata: languageName: node linkType: hard -"blakejs@npm:^1.1.0, blakejs@npm:^1.2.1": +"blakejs@npm:^1.2.1": version: 1.2.1 resolution: "blakejs@npm:1.2.1" checksum: 10/0638b1bd058b21892633929c43005aa6a4cc4b2ac5b338a146c3c076622f1b360795bd7a4d1f077c9b01863ed2df0c1504a81c5b520d164179120434847e6cd7 @@ -16332,7 +16165,7 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:^3.5.0, bluebird@npm:^3.5.4, bluebird@npm:^3.5.5, bluebird@npm:^3.7.2": +"bluebird@npm:^3.5.4, bluebird@npm:^3.5.5, bluebird@npm:^3.7.2": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 10/007c7bad22c5d799c8dd49c85b47d012a1fe3045be57447721e6afbd1d5be43237af1db62e26cb9b0d9ba812d2e4ca3bac82f6d7e016b6b88de06ee25ceb96e7 @@ -16346,7 +16179,7 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.3, body-parser@npm:^1.16.0, body-parser@npm:^1.19.0": +"body-parser@npm:1.20.3, body-parser@npm:^1.19.0": version: 1.20.3 resolution: "body-parser@npm:1.20.3" dependencies: @@ -16537,7 +16370,7 @@ __metadata: languageName: node linkType: hard -"browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": +"browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4": version: 1.2.0 resolution: "browserify-aes@npm:1.2.0" dependencies: @@ -16687,7 +16520,7 @@ __metadata: languageName: node linkType: hard -"bs58check@npm:2.1.2, bs58check@npm:^2.1.2": +"bs58check@npm:2.1.2": version: 2.1.2 resolution: "bs58check@npm:2.1.2" dependencies: @@ -16783,13 +16616,6 @@ __metadata: languageName: node linkType: hard -"buffer-to-arraybuffer@npm:^0.0.5": - version: 0.0.5 - resolution: "buffer-to-arraybuffer@npm:0.0.5" - checksum: 10/df16190b3bf0ecdf70e761514ecc8dbb9b8310e7c2882c800dc6d2d06859b9c85baa67f4cad53aaf9f0cbdd936f4b1c09f549eed8ae33c1c1258d7b6b1648cde - languageName: node - linkType: hard - "buffer-xor@npm:^1.0.3": version: 1.0.3 resolution: "buffer-xor@npm:1.0.3" @@ -16828,7 +16654,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.0.5, buffer@npm:^5.1.0, buffer@npm:^5.4.3, buffer@npm:^5.5.0, buffer@npm:^5.6.0": +"buffer@npm:^5.1.0, buffer@npm:^5.4.3, buffer@npm:^5.5.0, buffer@npm:^5.6.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -17092,13 +16918,6 @@ __metadata: languageName: node linkType: hard -"cacheable-lookup@npm:^6.0.4": - version: 6.1.0 - resolution: "cacheable-lookup@npm:6.1.0" - checksum: 10/9b37d31fba27ff244254294814dfdad69e3d257cb283932f58823141de5043a46d35339fa81ec40fdbb5d76d1578324258995f41a4fd37ed05d4e9b54823802e - languageName: node - linkType: hard - "cacheable-request@npm:^7.0.2": version: 7.0.2 resolution: "cacheable-request@npm:7.0.2" @@ -17506,7 +17325,7 @@ __metadata: languageName: node linkType: hard -"chownr@npm:^1.1.1, chownr@npm:^1.1.4": +"chownr@npm:^1.1.1": version: 1.1.4 resolution: "chownr@npm:1.1.4" checksum: 10/115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d @@ -17590,19 +17409,6 @@ __metadata: languageName: node linkType: hard -"cids@npm:^0.7.1": - version: 0.7.5 - resolution: "cids@npm:0.7.5" - dependencies: - buffer: "npm:^5.5.0" - class-is: "npm:^1.1.0" - multibase: "npm:~0.6.0" - multicodec: "npm:^1.0.0" - multihashes: "npm:~0.4.15" - checksum: 10/b916b0787e238dd9f84fb5e155333cadf07fd7ad34ea8dbd47f98bb618eecc9c70760767c0966d0eae73050c4fa6080fdc387e515565b009d2126253c7775fac - languageName: node - linkType: hard - "cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": version: 1.0.4 resolution: "cipher-base@npm:1.0.4" @@ -17620,13 +17426,6 @@ __metadata: languageName: node linkType: hard -"class-is@npm:^1.1.0": - version: 1.1.0 - resolution: "class-is@npm:1.1.0" - checksum: 10/8147a3e4ce86eb103d78621d665b87e8e33fcb3f54932fdca894b8222820903b43b2f6b4335d8822104702a5dc904c8f187127fdea4e7d48d905488b35c9e6a7 - languageName: node - linkType: hard - "classnames@npm:^2.2.6": version: 2.3.2 resolution: "classnames@npm:2.3.2" @@ -18358,17 +18157,6 @@ __metadata: languageName: node linkType: hard -"content-hash@npm:^2.5.2": - version: 2.5.2 - resolution: "content-hash@npm:2.5.2" - dependencies: - cids: "npm:^0.7.1" - multicodec: "npm:^0.5.5" - multihashes: "npm:^0.4.15" - checksum: 10/7c5d05052aecead40a1bbdd251468a6cc9bf4c48b361b4f138d60e6d876dc3028da6142031578ddc42e44e0024f91cc01b7a539bdb0bf7187e36bec15052e02d - languageName: node - linkType: hard - "content-type@npm:^1.0.4, content-type@npm:^1.0.5, content-type@npm:~1.0.4, content-type@npm:~1.0.5": version: 1.0.5 resolution: "content-type@npm:1.0.5" @@ -18490,7 +18278,7 @@ __metadata: languageName: node linkType: hard -"cors@npm:^2.8.1, cors@npm:^2.8.5, cors@npm:~2.8.5": +"cors@npm:^2.8.5, cors@npm:~2.8.5": version: 2.8.5 resolution: "cors@npm:2.8.5" dependencies: @@ -18561,7 +18349,7 @@ __metadata: languageName: node linkType: hard -"crc-32@npm:^1.2.0": +"crc-32@npm:^1.2.0, crc-32@npm:^1.2.2": version: 1.2.2 resolution: "crc-32@npm:1.2.2" bin: @@ -19743,22 +19531,13 @@ __metadata: languageName: node linkType: hard -"decode-uri-component@npm:^0.2.0, decode-uri-component@npm:^0.2.2": +"decode-uri-component@npm:^0.2.2": version: 0.2.2 resolution: "decode-uri-component@npm:0.2.2" checksum: 10/17a0e5fa400bf9ea84432226e252aa7b5e72793e16bf80b907c99b46a799aeacc139ec20ea57121e50c7bd875a1a4365928f884e92abf02e21a5a13790a0f33e languageName: node linkType: hard -"decompress-response@npm:^3.3.0": - version: 3.3.0 - resolution: "decompress-response@npm:3.3.0" - dependencies: - mimic-response: "npm:^1.0.0" - checksum: 10/952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 - languageName: node - linkType: hard - "decompress-response@npm:^6.0.0": version: 6.0.0 resolution: "decompress-response@npm:6.0.0" @@ -19907,7 +19686,7 @@ __metadata: languageName: node linkType: hard -"defer-to-connect@npm:^2.0.0, defer-to-connect@npm:^2.0.1": +"defer-to-connect@npm:^2.0.0": version: 2.0.1 resolution: "defer-to-connect@npm:2.0.1" checksum: 10/8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b @@ -20451,13 +20230,6 @@ __metadata: languageName: node linkType: hard -"dom-walk@npm:^0.1.0": - version: 0.1.2 - resolution: "dom-walk@npm:0.1.2" - checksum: 10/19eb0ce9c6de39d5e231530685248545d9cd2bd97b2cb3486e0bfc0f2a393a9addddfd5557463a932b52fdfcf68ad2a619020cd2c74a5fe46fbecaa8e80872f3 - languageName: node - linkType: hard - "domain-browser@npm:^1.1.1": version: 1.2.0 resolution: "domain-browser@npm:1.2.0" @@ -20811,22 +20583,7 @@ __metadata: languageName: node linkType: hard -"elliptic@npm:6.5.4": - version: 6.5.4 - resolution: "elliptic@npm:6.5.4" - dependencies: - bn.js: "npm:^4.11.9" - brorand: "npm:^1.1.0" - hash.js: "npm:^1.0.0" - hmac-drbg: "npm:^1.0.1" - inherits: "npm:^2.0.4" - minimalistic-assert: "npm:^1.0.1" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10/2cd7ff4b69720dbb2ca1ca650b2cf889d1df60c96d4a99d331931e4fe21e45a7f3b8074e86618ca7e56366c4b6258007f234f9d61d9b0c87bbbc8ea990b99e94 - languageName: node - linkType: hard - -"elliptic@npm:^6.4.0, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4, elliptic@npm:^6.5.7": +"elliptic@npm:^6.4.0, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4": version: 6.5.7 resolution: "elliptic@npm:6.5.7" dependencies: @@ -22198,41 +21955,6 @@ __metadata: languageName: node linkType: hard -"eth-ens-namehash@npm:2.0.8": - version: 2.0.8 - resolution: "eth-ens-namehash@npm:2.0.8" - dependencies: - idna-uts46-hx: "npm:^2.3.1" - js-sha3: "npm:^0.5.7" - checksum: 10/098c04378b0b998191b4bcd2f1a59be976946bbb80cea7bc2a6d1df3a035e061b2fd120b16bf41558c4beb2dd846433742058b091b20195e4b0e1fc64b67979f - languageName: node - linkType: hard - -"eth-lib@npm:0.2.8": - version: 0.2.8 - resolution: "eth-lib@npm:0.2.8" - dependencies: - bn.js: "npm:^4.11.6" - elliptic: "npm:^6.4.0" - xhr-request-promise: "npm:^0.1.2" - checksum: 10/85a6f1673c7106252864fdf6c86973d6bfdf454b238ee8d07d8f642599fa9f390129b6fbd060742a5be7c197be924951535a0c0ebb3e912cfd9f2130b64f74ce - languageName: node - linkType: hard - -"eth-lib@npm:^0.1.26": - version: 0.1.29 - resolution: "eth-lib@npm:0.1.29" - dependencies: - bn.js: "npm:^4.11.6" - elliptic: "npm:^6.4.0" - nano-json-stream-parser: "npm:^0.1.2" - servify: "npm:^0.1.12" - ws: "npm:^3.0.0" - xhr-request-promise: "npm:^0.1.2" - checksum: 10/ee4fcd8400fad0b637c25bd0a4483a54c986b78ac6c4d7fd2a5df12b41468abfa50a66684e315e16894b870d2fcf5d2273a81f429f89c460b275bf4477365f60 - languageName: node - linkType: hard - "eth-phishing-detect@npm:^1.2.0": version: 1.2.0 resolution: "eth-phishing-detect@npm:1.2.0" @@ -22242,39 +21964,7 @@ __metadata: languageName: node linkType: hard -"ethereum-bloom-filters@npm:^1.0.6": - version: 1.0.10 - resolution: "ethereum-bloom-filters@npm:1.0.10" - dependencies: - js-sha3: "npm:^0.8.0" - checksum: 10/dc4191c5d810db864ace106886f340b541bf03f1ad3249459ac630cab9c191f1e45c03e935887cca903cca884326e3ac97acfef0a083c7e1a004108f5991f9ba - languageName: node - linkType: hard - -"ethereum-cryptography@npm:^0.1.3": - version: 0.1.3 - resolution: "ethereum-cryptography@npm:0.1.3" - dependencies: - "@types/pbkdf2": "npm:^3.0.0" - "@types/secp256k1": "npm:^4.0.1" - blakejs: "npm:^1.1.0" - browserify-aes: "npm:^1.2.0" - bs58check: "npm:^2.1.2" - create-hash: "npm:^1.2.0" - create-hmac: "npm:^1.1.7" - hash.js: "npm:^1.1.7" - keccak: "npm:^3.0.0" - pbkdf2: "npm:^3.0.17" - randombytes: "npm:^2.1.0" - safe-buffer: "npm:^5.1.2" - scrypt-js: "npm:^3.0.0" - secp256k1: "npm:^4.0.1" - setimmediate: "npm:^1.0.5" - checksum: 10/975e476782746acd97d5b37366801ae622a52fb31e5d83f600804be230a61ef7b9d289dcecd9c308fb441967caf3a6e3768dd7c8add6441fcc60c398175d5a96 - languageName: node - linkType: hard - -"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2, ethereum-cryptography@npm:^2.1.3": +"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": version: 2.1.3 resolution: "ethereum-cryptography@npm:2.1.3" dependencies: @@ -22286,26 +21976,15 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.1.5": - version: 7.1.5 - resolution: "ethereumjs-util@npm:7.1.5" - dependencies: - "@types/bn.js": "npm:^5.1.0" - bn.js: "npm:^5.1.2" - create-hash: "npm:^1.1.2" - ethereum-cryptography: "npm:^0.1.3" - rlp: "npm:^2.2.4" - checksum: 10/f28fc1ebb8f35bf9e418f76f51be737d94d603b912c3e014c4e87cd45ccd1b10bdfef764c8f152574b57e9faa260a18773cbc110f9e0a754d6b3730699e54dc9 - languageName: node - linkType: hard - -"ethjs-unit@npm:0.1.6": - version: 0.1.6 - resolution: "ethjs-unit@npm:0.1.6" +"ethereum-cryptography@npm:^2.2.1": + version: 2.2.1 + resolution: "ethereum-cryptography@npm:2.2.1" dependencies: - bn.js: "npm:4.11.6" - number-to-bn: "npm:1.7.0" - checksum: 10/35086cb671806992ec36d5dd43ab67e68ad7a9237e42c0e963f9081c88e40147cda86c1a258b0a3180bf2b7bc1960e607c5bcaefdb2196e0f3564acf73276189 + "@noble/curves": "npm:1.4.2" + "@noble/hashes": "npm:1.4.0" + "@scure/bip32": "npm:1.4.0" + "@scure/bip39": "npm:1.3.0" + checksum: 10/ab123bbfe843500ac2d645ce9edc4bc814962ffb598db6bf8bf01fbecac656e6c81ff4cf2472f1734844bbcbad2bf658d8b699cb7248d768e0f06ae13ecf43b8 languageName: node linkType: hard @@ -22340,13 +22019,6 @@ __metadata: languageName: node linkType: hard -"eventemitter3@npm:4.0.4": - version: 4.0.4 - resolution: "eventemitter3@npm:4.0.4" - checksum: 10/6a85beb36d7ff2363de71aa19a17c24ecde7a92f706347891befc5901793e41ac847ce9c04c96dc0f5095384890cc737e64f21ed334e75c523d2352056fc6a9e - languageName: node - linkType: hard - "eventemitter3@npm:^4.0.0, eventemitter3@npm:^4.0.1, eventemitter3@npm:^4.0.4": version: 4.0.7 resolution: "eventemitter3@npm:4.0.7" @@ -22975,7 +22647,7 @@ __metadata: languageName: node linkType: hard -"express@npm:^4.14.0, express@npm:^4.17.3, express@npm:^4.18.2, express@npm:^4.21.0": +"express@npm:^4.17.3, express@npm:^4.18.2, express@npm:^4.21.0": version: 4.21.0 resolution: "express@npm:4.21.0" dependencies: @@ -23846,13 +23518,6 @@ __metadata: languageName: node linkType: hard -"form-data-encoder@npm:1.7.1": - version: 1.7.1 - resolution: "form-data-encoder@npm:1.7.1" - checksum: 10/1abc9059d991b105ba4122a36f9b5c17fd0af77ce8fa59a826a5b9ce56d616807e7780963616dd7e7906ec7aa1ba28cfb7c9defd9747ad10484e039a2b946cca - languageName: node - linkType: hard - "form-data@npm:4.0.0, form-data@npm:^4.0.0": version: 4.0.0 resolution: "form-data@npm:4.0.0" @@ -23997,17 +23662,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^4.0.2": - version: 4.0.3 - resolution: "fs-extra@npm:4.0.3" - dependencies: - graceful-fs: "npm:^4.1.2" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10/c1ab28ac6b19a1e37f9c0fb3a233b7333bd4d12ea2a514b5469ba956f022fa0e2aefa3b351d1117b80ed45495bb779427c8f64727c150bb1599c2ce9ab3b42ac - languageName: node - linkType: hard - "fs-extra@npm:^7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" @@ -24042,15 +23696,6 @@ __metadata: languageName: node linkType: hard -"fs-minipass@npm:^1.2.7": - version: 1.2.7 - resolution: "fs-minipass@npm:1.2.7" - dependencies: - minipass: "npm:^2.6.0" - checksum: 10/6a2d39963eaad748164530ffab49606d0f3462c7867748521af3b7039d13689be533636d50a04e8ba6bd327d4d2e899d0907f8830d1161fe2db467d59cc46dc3 - languageName: node - linkType: hard - "fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -24632,16 +24277,6 @@ __metadata: languageName: node linkType: hard -"global@npm:~4.4.0": - version: 4.4.0 - resolution: "global@npm:4.4.0" - dependencies: - min-document: "npm:^2.19.0" - process: "npm:^0.11.10" - checksum: 10/9c057557c8f5a5bcfbeb9378ba4fe2255d04679452be504608dd5f13b54edf79f7be1db1031ea06a4ec6edd3b9f5f17d2d172fb47e6c69dae57fd84b7e72b77f - languageName: node - linkType: hard - "globals@npm:^11.1.0": version: 11.12.0 resolution: "globals@npm:11.12.0" @@ -24772,27 +24407,6 @@ __metadata: languageName: node linkType: hard -"got@npm:12.1.0": - version: 12.1.0 - resolution: "got@npm:12.1.0" - dependencies: - "@sindresorhus/is": "npm:^4.6.0" - "@szmarczak/http-timer": "npm:^5.0.1" - "@types/cacheable-request": "npm:^6.0.2" - "@types/responselike": "npm:^1.0.0" - cacheable-lookup: "npm:^6.0.4" - cacheable-request: "npm:^7.0.2" - decompress-response: "npm:^6.0.0" - form-data-encoder: "npm:1.7.1" - get-stream: "npm:^6.0.1" - http2-wrapper: "npm:^2.1.10" - lowercase-keys: "npm:^3.0.0" - p-cancelable: "npm:^3.0.0" - responselike: "npm:^2.0.0" - checksum: 10/d1dab1884b14d1f59d10005ee3834faf6d9b43530c7faf603c176d35dceb2b8e0e2e01b9e0d4fc320409ac1b4d958196ff928dc6df0ddd0a3e7a254aa9edfd45 - languageName: node - linkType: hard - "got@npm:^11.7.0, got@npm:^11.8.5, got@npm:^11.8.6": version: 11.8.6 resolution: "got@npm:11.8.6" @@ -24913,23 +24527,6 @@ __metadata: languageName: node linkType: hard -"har-schema@npm:^2.0.0": - version: 2.0.0 - resolution: "har-schema@npm:2.0.0" - checksum: 10/d8946348f333fb09e2bf24cc4c67eabb47c8e1d1aa1c14184c7ffec1140a49ec8aa78aa93677ae452d71d5fc0fdeec20f0c8c1237291fc2bcb3f502a5d204f9b - languageName: node - linkType: hard - -"har-validator@npm:~5.1.3": - version: 5.1.5 - resolution: "har-validator@npm:5.1.5" - dependencies: - ajv: "npm:^6.12.3" - har-schema: "npm:^2.0.0" - checksum: 10/b998a7269ca560d7f219eedc53e2c664cd87d487e428ae854a6af4573fc94f182fe9d2e3b92ab968249baec7ebaf9ead69cf975c931dc2ab282ec182ee988280 - languageName: node - linkType: hard - "has-ansi@npm:^2.0.0": version: 2.0.0 resolution: "has-ansi@npm:2.0.0" @@ -25037,7 +24634,7 @@ __metadata: languageName: node linkType: hard -"hash.js@npm:1.1.7, hash.js@npm:^1.0.0, hash.js@npm:^1.0.3, hash.js@npm:^1.1.7": +"hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": version: 1.1.7 resolution: "hash.js@npm:1.1.7" dependencies: @@ -25687,13 +25284,6 @@ __metadata: languageName: node linkType: hard -"http-https@npm:^1.0.0": - version: 1.0.0 - resolution: "http-https@npm:1.0.0" - checksum: 10/fd3c0802982b1e951a03206690271dacb641b39b80d1820e95095db923d8f63cc7f0df1259969400c8487787a2a46f7b33383c0427ec780a78131b153741b144 - languageName: node - linkType: hard - "http-parser-js@npm:>=0.5.1": version: 0.5.8 resolution: "http-parser-js@npm:0.5.8" @@ -25764,17 +25354,6 @@ __metadata: languageName: node linkType: hard -"http-signature@npm:~1.2.0": - version: 1.2.0 - resolution: "http-signature@npm:1.2.0" - dependencies: - assert-plus: "npm:^1.0.0" - jsprim: "npm:^1.2.2" - sshpk: "npm:^1.7.0" - checksum: 10/2ff7112e6b0d8f08b382dfe705078c655501f2ddd76cf589d108445a9dd388a0a9be928c37108261519a7f53e6bbd1651048d74057b804807cce1ec49e87a95b - languageName: node - linkType: hard - "http-signature@npm:~1.3.6": version: 1.3.6 resolution: "http-signature@npm:1.3.6" @@ -25796,16 +25375,6 @@ __metadata: languageName: node linkType: hard -"http2-wrapper@npm:^2.1.10": - version: 2.2.1 - resolution: "http2-wrapper@npm:2.2.1" - dependencies: - quick-lru: "npm:^5.1.1" - resolve-alpn: "npm:^1.2.0" - checksum: 10/e7a5ac6548318e83fc0399cd832cdff6bbf902b165d211cad47a56ee732922e0aa1107246dd884b12532a1c4649d27c4d44f2480911c65202e93c90bde8fa29d - languageName: node - linkType: hard - "https-browserify@npm:^1.0.0": version: 1.0.0 resolution: "https-browserify@npm:1.0.0" @@ -25931,15 +25500,6 @@ __metadata: languageName: node linkType: hard -"idna-uts46-hx@npm:^2.3.1": - version: 2.3.1 - resolution: "idna-uts46-hx@npm:2.3.1" - dependencies: - punycode: "npm:2.1.0" - checksum: 10/5cb65dbc375d42ce9b38dab6e2a7f41b8c059f9a88d236bc9ca32084485f5f22fec11ea5b4e6b61239448148443c3f825fddaa5f298d22e12ecfe845de71a807 - languageName: node - linkType: hard - "ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" @@ -26564,13 +26124,6 @@ __metadata: languageName: node linkType: hard -"is-function@npm:^1.0.1": - version: 1.0.2 - resolution: "is-function@npm:1.0.2" - checksum: 10/7d564562e07b4b51359547d3ccc10fb93bb392fd1b8177ae2601ee4982a0ece86d952323fc172a9000743a3971f09689495ab78a1d49a9b14fc97a7e28521dc0 - languageName: node - linkType: hard - "is-generator-fn@npm:^2.0.0": version: 2.1.0 resolution: "is-generator-fn@npm:2.1.0" @@ -26612,13 +26165,6 @@ __metadata: languageName: node linkType: hard -"is-hex-prefixed@npm:1.0.0": - version: 1.0.0 - resolution: "is-hex-prefixed@npm:1.0.0" - checksum: 10/5ac58e6e528fb029cc43140f6eeb380fad23d0041cc23154b87f7c9a1b728bcf05909974e47248fd0b7fcc11ba33cf7e58d64804883056fabd23e2b898be41de - languageName: node - linkType: hard - "is-hexadecimal@npm:^1.0.0": version: 1.0.4 resolution: "is-hexadecimal@npm:1.0.4" @@ -26909,7 +26455,7 @@ __metadata: languageName: node linkType: hard -"is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": +"is-typedarray@npm:~1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c @@ -27245,6 +26791,28 @@ __metadata: languageName: node linkType: hard +"jayson@npm:^4.1.1": + version: 4.1.2 + resolution: "jayson@npm:4.1.2" + dependencies: + "@types/connect": "npm:^3.4.33" + "@types/node": "npm:^12.12.54" + "@types/ws": "npm:^7.4.4" + JSONStream: "npm:^1.3.5" + commander: "npm:^2.20.3" + delay: "npm:^5.0.0" + es6-promisify: "npm:^5.0.0" + eyes: "npm:^0.1.8" + isomorphic-ws: "npm:^4.0.1" + json-stringify-safe: "npm:^5.0.1" + uuid: "npm:^8.3.2" + ws: "npm:^7.5.10" + bin: + jayson: bin/jayson.js + checksum: 10/7ad5e80e11ef39b7382509d046546883d2595998aa245768b342bcc0a63843e011e16f02a023d5a78fb74df788b5f97c1e850568fc1b90c138fa4772cc55572c + languageName: node + linkType: hard + "jest-canvas-mock@npm:^2.5.2": version: 2.5.2 resolution: "jest-canvas-mock@npm:2.5.2" @@ -27953,20 +27521,6 @@ __metadata: languageName: node linkType: hard -"js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": - version: 0.8.0 - resolution: "js-sha3@npm:0.8.0" - checksum: 10/a49ac6d3a6bfd7091472a28ab82a94c7fb8544cc584ee1906486536ba1cb4073a166f8c7bb2b0565eade23c5b3a7b8f7816231e0309ab5c549b737632377a20c - languageName: node - linkType: hard - -"js-sha3@npm:^0.5.7": - version: 0.5.7 - resolution: "js-sha3@npm:0.5.7" - checksum: 10/32885c7edb50fca04017bacada8e5315c072d21d3d35e071e9640fc5577e200076a4718e0b2f33d86ab704accb68d2ade44f1e2ca424cc73a5929b9129dab948 - languageName: node - linkType: hard - "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -28472,18 +28026,6 @@ __metadata: languageName: node linkType: hard -"jsprim@npm:^1.2.2": - version: 1.4.2 - resolution: "jsprim@npm:1.4.2" - dependencies: - assert-plus: "npm:1.0.0" - extsprintf: "npm:1.3.0" - json-schema: "npm:0.4.0" - verror: "npm:1.10.0" - checksum: 10/df2bf234eab1b5078d01bcbff3553d50a243f7b5c10a169745efeda6344d62798bd1d85bcca6a8446f3b5d0495e989db45f9de8dae219f0f9796e70e0c776089 - languageName: node - linkType: hard - "jsprim@npm:^2.0.2": version: 2.0.2 resolution: "jsprim@npm:2.0.2" @@ -28669,18 +28211,6 @@ __metadata: languageName: node linkType: hard -"keccak@npm:^3.0.0": - version: 3.0.2 - resolution: "keccak@npm:3.0.2" - dependencies: - node-addon-api: "npm:^2.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.0" - readable-stream: "npm:^3.6.0" - checksum: 10/03f8d513040562f90ae892765431de29de0abf329dec40f1ef8b17eae634d56e283a7aeec5ae62e6ef96b9e8d1601329f2ef5c30a9d6c7baa6062d0f78d11b58 - languageName: node - linkType: hard - "keyboardevent-from-electron-accelerator@npm:^2.0.0": version: 2.0.0 resolution: "keyboardevent-from-electron-accelerator@npm:2.0.0" @@ -29622,13 +29152,6 @@ __metadata: languageName: node linkType: hard -"lowercase-keys@npm:^3.0.0": - version: 3.0.0 - resolution: "lowercase-keys@npm:3.0.0" - checksum: 10/67a3f81409af969bc0c4ca0e76cd7d16adb1e25aa1c197229587eaf8671275c8c067cd421795dbca4c81be0098e4c426a086a05e30de8a9c587b7a13c0c7ccc5 - languageName: node - linkType: hard - "lru-cache@npm:^10.0.0, lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -31805,7 +31328,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:^2.1.16, mime-types@npm:^2.1.18, mime-types@npm:^2.1.25, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.18, mime-types@npm:^2.1.25, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -31874,15 +31397,6 @@ __metadata: languageName: node linkType: hard -"min-document@npm:^2.19.0": - version: 2.19.0 - resolution: "min-document@npm:2.19.0" - dependencies: - dom-walk: "npm:^0.1.0" - checksum: 10/4e45a0686c81cc04509989235dc6107e2678a59bb48ce017d3c546d7d9a18d782e341103e66c78081dd04544704e2196e529905c41c2550bca069b69f95f07c8 - languageName: node - linkType: hard - "min-indent@npm:^1.0.1": version: 1.0.1 resolution: "min-indent@npm:1.0.1" @@ -32035,16 +31549,6 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^2.6.0, minipass@npm:^2.9.0": - version: 2.9.0 - resolution: "minipass@npm:2.9.0" - dependencies: - safe-buffer: "npm:^5.1.2" - yallist: "npm:^3.0.0" - checksum: 10/fdd1a77996c184991f8d2ce7c5b3979bec624e2a3225e2e1e140c4038fd65873d7eb90fb29779f8733735a8827b2686f283871a0c74c908f4f7694c56fa8dadf - languageName: node - linkType: hard - "minipass@npm:^3.0.0, minipass@npm:^3.1.1, minipass@npm:^3.1.6": version: 3.3.6 resolution: "minipass@npm:3.3.6" @@ -32075,15 +31579,6 @@ __metadata: languageName: node linkType: hard -"minizlib@npm:^1.3.3": - version: 1.3.3 - resolution: "minizlib@npm:1.3.3" - dependencies: - minipass: "npm:^2.9.0" - checksum: 10/9c2c47e5687d7f896431a9b5585988ef72f848b56c6a974c9489534e8f619388d500d986ef82e1c13aedd46f3a0e81b6a88110cb1b27de7524cc8dabe8885e17 - languageName: node - linkType: hard - "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -32111,24 +31606,6 @@ __metadata: languageName: node linkType: hard -"mkdirp-promise@npm:^5.0.1": - version: 5.0.1 - resolution: "mkdirp-promise@npm:5.0.1" - dependencies: - mkdirp: "npm:*" - checksum: 10/31ddc9478216adf6d6bee9ea7ce9ccfe90356d9fcd1dfb18128eac075390b4161356d64c3a7b0a75f9de01a90aadd990a0ec8c7434036563985c4b853a053ee2 - languageName: node - linkType: hard - -"mkdirp@npm:*, mkdirp@npm:^3.0.1": - version: 3.0.1 - resolution: "mkdirp@npm:3.0.1" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10/16fd79c28645759505914561e249b9a1f5fe3362279ad95487a4501e4467abeb714fd35b95307326b8fd03f3c7719065ef11a6f97b7285d7888306d1bd2232ba - languageName: node - linkType: hard - "mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.4, mkdirp@npm:^0.5.5, mkdirp@npm:~0.5.1": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" @@ -32149,6 +31626,15 @@ __metadata: languageName: node linkType: hard +"mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 10/16fd79c28645759505914561e249b9a1f5fe3362279ad95487a4501e4467abeb714fd35b95307326b8fd03f3c7719065ef11a6f97b7285d7888306d1bd2232ba + languageName: node + linkType: hard + "mlly@npm:^1.2.0, mlly@npm:^1.4.0": version: 1.6.1 resolution: "mlly@npm:1.6.1" @@ -32161,13 +31647,6 @@ __metadata: languageName: node linkType: hard -"mock-fs@npm:^4.1.0": - version: 4.14.0 - resolution: "mock-fs@npm:4.14.0" - checksum: 10/20facbc85bb62df02dbfc946b354fcdd8b2b2aeafef4986adab18dc9a23efccb34ce49d4dac22aaed1a24420fc50c53d77e90984cc888bcce314e18e0e21872a - languageName: node - linkType: hard - "moment@npm:^2.19.3": version: 2.30.1 resolution: "moment@npm:2.30.1" @@ -32246,26 +31725,6 @@ __metadata: languageName: node linkType: hard -"multibase@npm:^0.7.0": - version: 0.7.0 - resolution: "multibase@npm:0.7.0" - dependencies: - base-x: "npm:^3.0.8" - buffer: "npm:^5.5.0" - checksum: 10/a5cbbf00b8aa61bcb92a706e210d8f258e8413cff2893584fedbc316c98bf2a44b8f648b57c124ddfaa29750c3b686ee5ba973cb8da84a896c19d63101b09445 - languageName: node - linkType: hard - -"multibase@npm:~0.6.0": - version: 0.6.1 - resolution: "multibase@npm:0.6.1" - dependencies: - base-x: "npm:^3.0.8" - buffer: "npm:^5.5.0" - checksum: 10/c9e3bf20dc1b109019b94b14a76731ea0a6b0e654a4ef627ba154bfc2b8602ac43b160c44d8245d18cd6a9ed971826efb204230f22b929c8b3e72da13dbc1859 - languageName: node - linkType: hard - "multicast-dns@npm:^7.2.5": version: 7.2.5 resolution: "multicast-dns@npm:7.2.5" @@ -32278,36 +31737,6 @@ __metadata: languageName: node linkType: hard -"multicodec@npm:^0.5.5": - version: 0.5.7 - resolution: "multicodec@npm:0.5.7" - dependencies: - varint: "npm:^5.0.0" - checksum: 10/b61bbf04e1bfff180f77693661b8111bf94f65580abc455e6d83d2240c227d8c2e8af99ca93b6c02500c5da43d16e2b028dbbec1b376a85145a774f542d9ca2c - languageName: node - linkType: hard - -"multicodec@npm:^1.0.0": - version: 1.0.4 - resolution: "multicodec@npm:1.0.4" - dependencies: - buffer: "npm:^5.6.0" - varint: "npm:^5.0.0" - checksum: 10/3a78ac54d3715e6b095a1805f63b4c4e7d5bb4642445691c0c4e6442cad9f97823469634e73ee362ba748596570db1050d69d5cc74a88928b1e9658916cdfbcd - languageName: node - linkType: hard - -"multihashes@npm:^0.4.15, multihashes@npm:~0.4.15": - version: 0.4.21 - resolution: "multihashes@npm:0.4.21" - dependencies: - buffer: "npm:^5.5.0" - multibase: "npm:^0.7.0" - varint: "npm:^5.0.0" - checksum: 10/a482d9ba7ed0ad41db22ca589f228e4b7a30207a229a64dfc9888796752314fca00a8d03025fe40d6d73965bbb246f54b73626c5a235463e30c06c7bf7a8785f - languageName: node - linkType: hard - "multimatch@npm:^5.0.0": version: 5.0.0 resolution: "multimatch@npm:5.0.0" @@ -32405,13 +31834,6 @@ __metadata: languageName: node linkType: hard -"nano-json-stream-parser@npm:^0.1.2": - version: 0.1.2 - resolution: "nano-json-stream-parser@npm:0.1.2" - checksum: 10/00a3ce63d3b66220def9fd6c26cd495100efd155e7bda54a11f1dfd185ba6750d5ce266076e0f229bad3f5ef892e2017f24da012669f146b404a8e47a44568ec - languageName: node - linkType: hard - "nanoid@npm:^3.1.23, nanoid@npm:^3.1.3, nanoid@npm:^3.3.1, nanoid@npm:^3.3.4, nanoid@npm:^3.3.6, nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" @@ -32716,15 +32138,6 @@ __metadata: languageName: node linkType: hard -"node-addon-api@npm:^2.0.0": - version: 2.0.2 - resolution: "node-addon-api@npm:2.0.2" - dependencies: - node-gyp: "npm:latest" - checksum: 10/e4ce4daac5b2fefa6b94491b86979a9c12d9cceba571d2c6df1eb5859f9da68e5dc198f128798e1785a88aafee6e11f4992dcccd4bf86bec90973927d158bd60 - languageName: node - linkType: hard - "node-addon-api@npm:^3.0.0": version: 3.2.1 resolution: "node-addon-api@npm:3.2.1" @@ -32734,15 +32147,6 @@ __metadata: languageName: node linkType: hard -"node-addon-api@npm:^5.0.0": - version: 5.1.0 - resolution: "node-addon-api@npm:5.1.0" - dependencies: - node-gyp: "npm:latest" - checksum: 10/595f59ffb4630564f587c502119cbd980d302e482781021f3b479f5fc7e41cf8f2f7280fdc2795f32d148e4f3259bd15043c52d4a3442796aa6f1ae97b959636 - languageName: node - linkType: hard - "node-addon-api@npm:^6.1.0": version: 6.1.0 resolution: "node-addon-api@npm:6.1.0" @@ -32817,7 +32221,7 @@ __metadata: languageName: node linkType: hard -"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.2.2, node-gyp-build@npm:^4.3.0, node-gyp-build@npm:^4.5.0, node-gyp-build@npm:^4.8.0": +"node-gyp-build@npm:^4.2.2, node-gyp-build@npm:^4.3.0, node-gyp-build@npm:^4.5.0, node-gyp-build@npm:^4.8.0": version: 4.8.1 resolution: "node-gyp-build@npm:4.8.1" bin: @@ -33133,16 +32537,6 @@ __metadata: languageName: node linkType: hard -"number-to-bn@npm:1.7.0": - version: 1.7.0 - resolution: "number-to-bn@npm:1.7.0" - dependencies: - bn.js: "npm:4.11.6" - strip-hex-prefix: "npm:1.0.0" - checksum: 10/702e8f00b6b90abd23f711056005179c3bd5ce3b063c47d468250f63ab3b9b4b82e27bff3b4642a9e71e06c717d5ed359873501746df0a64c3db1fa6d704e704 - languageName: node - linkType: hard - "nwsapi@npm:^2.2.2": version: 2.2.7 resolution: "nwsapi@npm:2.2.7" @@ -33234,13 +32628,6 @@ __metadata: languageName: node linkType: hard -"oauth-sign@npm:~0.9.0": - version: 0.9.0 - resolution: "oauth-sign@npm:0.9.0" - checksum: 10/1809a366d258f41fdf4ab5310cff3d1e15f96b187503bc7333cef4351de7bd0f52cb269bc95800f1fae5fb04dd886287df1471985fd67e8484729fdbcf857119 - languageName: node - linkType: hard - "ob1@npm:0.80.11": version: 0.80.11 resolution: "ob1@npm:0.80.11" @@ -33371,15 +32758,6 @@ __metadata: languageName: node linkType: hard -"oboe@npm:2.1.5": - version: 2.1.5 - resolution: "oboe@npm:2.1.5" - dependencies: - http-https: "npm:^1.0.0" - checksum: 10/451d0c28b45f518fc86d4689075cf74c7fea92fb09e2f994dd1208e5c5516a6958f9dc476714b61c62c959a3e7e0db8a69999c59ff63777c7a8af24fbddd0848 - languageName: node - linkType: hard - "obuf@npm:^1.0.0, obuf@npm:^1.1.2": version: 1.1.2 resolution: "obuf@npm:1.1.2" @@ -33660,13 +33038,6 @@ __metadata: languageName: node linkType: hard -"p-cancelable@npm:^3.0.0": - version: 3.0.0 - resolution: "p-cancelable@npm:3.0.0" - checksum: 10/a5eab7cf5ac5de83222a014eccdbfde65ecfb22005ee9bc242041f0b4441e07fac7629432c82f48868aa0f8413fe0df6c6067c16f76bf9217cd8dc651923c93d - languageName: node - linkType: hard - "p-debounce@npm:^2.1.0": version: 2.1.0 resolution: "p-debounce@npm:2.1.0" @@ -33894,13 +33265,6 @@ __metadata: languageName: node linkType: hard -"parse-headers@npm:^2.0.0": - version: 2.0.5 - resolution: "parse-headers@npm:2.0.5" - checksum: 10/210b13bc0f99cf6f1183896f01de164797ac35b2720c9f1c82a3e2ceab256f87b9048e8e16a14cfd1b75448771f8379cd564bd1674a179ab0168c90005d4981b - languageName: node - linkType: hard - "parse-json@npm:^4.0.0": version: 4.0.0 resolution: "parse-json@npm:4.0.0" @@ -34186,7 +33550,7 @@ __metadata: languageName: node linkType: hard -"pbkdf2@npm:^3.0.17, pbkdf2@npm:^3.0.3": +"pbkdf2@npm:^3.0.3": version: 3.1.2 resolution: "pbkdf2@npm:3.1.2" dependencies: @@ -35467,7 +34831,7 @@ __metadata: languageName: node linkType: hard -"psl@npm:^1.1.28, psl@npm:^1.1.33": +"psl@npm:^1.1.33": version: 1.9.0 resolution: "psl@npm:1.9.0" checksum: 10/d07879d4bfd0ac74796306a8e5a36a93cfb9c4f4e8ee8e63fbb909066c192fe1008cd8f12abd8ba2f62ca28247949a20c8fb32e1d18831d9e71285a1569720f9 @@ -35533,13 +34897,6 @@ __metadata: languageName: node linkType: hard -"punycode@npm:2.1.0": - version: 2.1.0 - resolution: "punycode@npm:2.1.0" - checksum: 10/012f9443fe56baf485db702d0d07cef7d89c0670ce1ac4da8fb8b5bd3677e42a8f5d2b35f595ffa31ba843661c9c6766f2feb1e1e3393e1ff1033120d0f94d60 - languageName: node - linkType: hard - "punycode@npm:^1.2.4": version: 1.4.1 resolution: "punycode@npm:1.4.1" @@ -35638,24 +34995,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:~6.5.2": - version: 6.5.3 - resolution: "qs@npm:6.5.3" - checksum: 10/485c990fba7ad17671e16c92715fb064c1600337738f5d140024eb33a49fbc1ed31890d3db850117c760caeb9c9cc9f4ba22a15c20dd119968e41e3d3fe60b28 - languageName: node - linkType: hard - -"query-string@npm:^5.0.1": - version: 5.1.1 - resolution: "query-string@npm:5.1.1" - dependencies: - decode-uri-component: "npm:^0.2.0" - object-assign: "npm:^4.1.0" - strict-uri-encode: "npm:^1.0.0" - checksum: 10/8834591ed02c324ac10397094c2ae84a3d3460477ef30acd5efe03b1afbf15102ccc0829ab78cc58ecb12f70afeb7a1f81e604487a9ad4859742bb14748e98cc - languageName: node - linkType: hard - "query-string@npm:^7.1.3": version: 7.1.3 resolution: "query-string@npm:7.1.3" @@ -37312,34 +36651,6 @@ __metadata: languageName: node linkType: hard -"request@npm:^2.79.0": - version: 2.88.2 - resolution: "request@npm:2.88.2" - dependencies: - aws-sign2: "npm:~0.7.0" - aws4: "npm:^1.8.0" - caseless: "npm:~0.12.0" - combined-stream: "npm:~1.0.6" - extend: "npm:~3.0.2" - forever-agent: "npm:~0.6.1" - form-data: "npm:~2.3.2" - har-validator: "npm:~5.1.3" - http-signature: "npm:~1.2.0" - is-typedarray: "npm:~1.0.0" - isstream: "npm:~0.1.2" - json-stringify-safe: "npm:~5.0.1" - mime-types: "npm:~2.1.19" - oauth-sign: "npm:~0.9.0" - performance-now: "npm:^2.1.0" - qs: "npm:~6.5.2" - safe-buffer: "npm:^5.1.2" - tough-cookie: "npm:~2.5.0" - tunnel-agent: "npm:^0.6.0" - uuid: "npm:^3.3.2" - checksum: 10/005b8b237b56f1571cfd4ecc09772adaa2e82dcb884fc14ea2bb25e23dbf7c2009f9929e0b6d3fd5802e33ed8ee705a3b594c8f9467c1458cd973872bf89db8e - languageName: node - linkType: hard - "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -37425,7 +36736,7 @@ __metadata: languageName: node linkType: hard -"resolve-alpn@npm:^1.0.0, resolve-alpn@npm:^1.2.0": +"resolve-alpn@npm:^1.0.0": version: 1.2.1 resolution: "resolve-alpn@npm:1.2.1" checksum: 10/744e87888f0b6fa0b256ab454ca0b9c0b80808715e2ef1f3672773665c92a941f6181194e30ccae4a8cd0adbe0d955d3f133102636d2ee0cca0119fec0bc9aec @@ -37794,17 +37105,6 @@ __metadata: languageName: node linkType: hard -"rlp@npm:^2.2.4": - version: 2.2.7 - resolution: "rlp@npm:2.2.7" - dependencies: - bn.js: "npm:^5.2.0" - bin: - rlp: bin/rlp - checksum: 10/cf1919a2dc99f336191b3363b76299db567c192b7ee3c6f5c722728c34f65577883c9c88eeb7a1bfcbc26693c8a4f1fb0662e79ee86f0c98dd258d6987303498 - languageName: node - linkType: hard - "roarr@npm:^2.15.3": version: 2.15.4 resolution: "roarr@npm:2.15.4" @@ -38164,13 +37464,6 @@ __metadata: languageName: node linkType: hard -"scrypt-js@npm:^3.0.0, scrypt-js@npm:^3.0.1": - version: 3.0.1 - resolution: "scrypt-js@npm:3.0.1" - checksum: 10/2f8aa72b7f76a6f9c446bbec5670f80d47497bccce98474203d89b5667717223eeb04a50492ae685ed7adc5a060fc2d8f9fd988f8f7ebdaf3341967f3aeff116 - languageName: node - linkType: hard - "sdp@npm:^2.12.0, sdp@npm:^2.6.0": version: 2.12.0 resolution: "sdp@npm:2.12.0" @@ -38178,18 +37471,6 @@ __metadata: languageName: node linkType: hard -"secp256k1@npm:^4.0.1": - version: 4.0.4 - resolution: "secp256k1@npm:4.0.4" - dependencies: - elliptic: "npm:^6.5.7" - node-addon-api: "npm:^5.0.0" - node-gyp: "npm:latest" - node-gyp-build: "npm:^4.2.0" - checksum: 10/45000f348c853df7c1e2b67c48efb062ae78c0620ab1a5cfb02fa20d3aad39c641f4e7a18b3de3b54a7c0cc1e0addeb8ecd9d88bc332e92df17a92b60c36122a - languageName: node - linkType: hard - "section-matter@npm:^1.0.0": version: 1.0.0 resolution: "section-matter@npm:1.0.0" @@ -38365,19 +37646,6 @@ __metadata: languageName: node linkType: hard -"servify@npm:^0.1.12": - version: 0.1.12 - resolution: "servify@npm:0.1.12" - dependencies: - body-parser: "npm:^1.16.0" - cors: "npm:^2.8.1" - express: "npm:^4.14.0" - request: "npm:^2.79.0" - xhr: "npm:^2.3.3" - checksum: 10/d61b145034aa26c143d7081a56c544aceff256eead27a5894b6785346254438d2b387ac7411bf664024d258779a00dc6c5d9da65f8d60382dac23a8cba0b0d9e - languageName: node - linkType: hard - "set-blocking@npm:^2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -38620,17 +37888,6 @@ __metadata: languageName: node linkType: hard -"simple-get@npm:^2.7.0": - version: 2.8.2 - resolution: "simple-get@npm:2.8.2" - dependencies: - decompress-response: "npm:^3.3.0" - once: "npm:^1.3.1" - simple-concat: "npm:^1.0.0" - checksum: 10/b827672695bbe504217311c47c6a106358babcfbf3d69c8d67ad56da40c2ed05185eec12538dfe3637e1cf0441bcd5931b022a84dc7f8f2d84969d595f7f7fda - languageName: node - linkType: hard - "simple-get@npm:^4.0.0, simple-get@npm:^4.0.1": version: 4.0.1 resolution: "simple-get@npm:4.0.1" @@ -39103,7 +38360,7 @@ __metadata: languageName: node linkType: hard -"sshpk@npm:^1.14.1, sshpk@npm:^1.7.0": +"sshpk@npm:^1.14.1": version: 1.18.0 resolution: "sshpk@npm:1.18.0" dependencies: @@ -39408,13 +38665,6 @@ __metadata: languageName: node linkType: hard -"strict-uri-encode@npm:^1.0.0": - version: 1.1.0 - resolution: "strict-uri-encode@npm:1.1.0" - checksum: 10/9466d371f7b36768d43f7803f26137657559e4c8b0161fb9e320efb8edba3ae22f8e99d4b0d91da023b05a13f62ec5412c3f4f764b5788fac11d1fea93720bb3 - languageName: node - linkType: hard - "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -39652,15 +38902,6 @@ __metadata: languageName: node linkType: hard -"strip-hex-prefix@npm:1.0.0": - version: 1.0.0 - resolution: "strip-hex-prefix@npm:1.0.0" - dependencies: - is-hex-prefixed: "npm:1.0.0" - checksum: 10/4cafe7caee1d281d3694d14920fd5d3c11adf09371cef7e2ccedd5b83efd9e9bd2219b5d6ce6e809df6e0f437dc9d30db1192116580875698aad164a6d6b285b - languageName: node - linkType: hard - "strip-indent@npm:^4.0.0": version: 4.0.0 resolution: "strip-indent@npm:4.0.0" @@ -40107,25 +39348,6 @@ __metadata: languageName: node linkType: hard -"swarm-js@npm:^0.1.40": - version: 0.1.42 - resolution: "swarm-js@npm:0.1.42" - dependencies: - bluebird: "npm:^3.5.0" - buffer: "npm:^5.0.5" - eth-lib: "npm:^0.1.26" - fs-extra: "npm:^4.0.2" - got: "npm:^11.8.5" - mime-types: "npm:^2.1.16" - mkdirp-promise: "npm:^5.0.1" - mock-fs: "npm:^4.1.0" - setimmediate: "npm:^1.0.5" - tar: "npm:^4.0.2" - xhr-request: "npm:^1.0.1" - checksum: 10/341bcfef6daadc1904ea87b1781f10dc99ec14e33c9a9041e43e9617dcc3b7d632230e1baf2fafecb8e10e63c2e4eeb7cce7c85592dc0cf0dde935f49c77050b - languageName: node - linkType: hard - "swc-loader@npm:^0.2.3": version: 0.2.3 resolution: "swc-loader@npm:0.2.3" @@ -40302,21 +39524,6 @@ __metadata: languageName: node linkType: hard -"tar@npm:^4.0.2": - version: 4.4.19 - resolution: "tar@npm:4.4.19" - dependencies: - chownr: "npm:^1.1.4" - fs-minipass: "npm:^1.2.7" - minipass: "npm:^2.9.0" - minizlib: "npm:^1.3.3" - mkdirp: "npm:^0.5.5" - safe-buffer: "npm:^5.2.1" - yallist: "npm:^3.1.1" - checksum: 10/2715b5964578424ba5164632905a85e5a98c8dffeba657860aafa3a771b2602e6fd2a350bca891d78b8bda8cab5c53134c683ed2269b9925533477a24722e73b - languageName: node - linkType: hard - "tar@npm:^6.0.5, tar@npm:^6.1.11, tar@npm:^6.1.12, tar@npm:^6.1.13, tar@npm:^6.1.2, tar@npm:^6.2.0": version: 6.2.1 resolution: "tar@npm:6.2.1" @@ -40621,13 +39828,6 @@ __metadata: languageName: node linkType: hard -"timed-out@npm:^4.0.1": - version: 4.0.1 - resolution: "timed-out@npm:4.0.1" - checksum: 10/d52648e5fc0ebb0cae1633737a1db1b7cb464d5d43d754bd120ddebd8067a1b8f42146c250d8cfb9952183b7b0f341a99fc71b59c52d659218afae293165004f - languageName: node - linkType: hard - "timers-browserify@npm:^2.0.4": version: 2.0.12 resolution: "timers-browserify@npm:2.0.12" @@ -40856,16 +40056,6 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:~2.5.0": - version: 2.5.0 - resolution: "tough-cookie@npm:2.5.0" - dependencies: - psl: "npm:^1.1.28" - punycode: "npm:^2.1.1" - checksum: 10/024cb13a4d1fe9af57f4323dff765dd9b217cc2a69be77e3b8a1ca45600aa33a097b6ad949f225d885e904f4bd3ceccef104741ef202d8378e6ca78e850ff82f - languageName: node - linkType: hard - "tr46@npm:^2.1.0": version: 2.1.0 resolution: "tr46@npm:2.1.0" @@ -41398,15 +40588,6 @@ __metadata: languageName: node linkType: hard -"typedarray-to-buffer@npm:^3.1.5": - version: 3.1.5 - resolution: "typedarray-to-buffer@npm:3.1.5" - dependencies: - is-typedarray: "npm:^1.0.0" - checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c - languageName: node - linkType: hard - "typedarray@npm:^0.0.6": version: 0.0.6 resolution: "typedarray@npm:0.0.6" @@ -41544,13 +40725,6 @@ __metadata: languageName: node linkType: hard -"ultron@npm:~1.1.0": - version: 1.1.1 - resolution: "ultron@npm:1.1.1" - checksum: 10/7cc6e8e98a2c62c87ab25a79a274f90492f13f5cf7c622dbda1ec85913e207aed392c26e76ed6250c4f05f842571b05dcce1f8ad0f5ecded64a99002b1fdf6e5 - languageName: node - linkType: hard - "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -42096,13 +41270,6 @@ __metadata: languageName: node linkType: hard -"url-set-query@npm:^1.0.0": - version: 1.0.0 - resolution: "url-set-query@npm:1.0.0" - checksum: 10/a6e4d1ac5c3e7db8644655a2774b9462d8d95ec7abae341ff53d4a3d03adc2dabc38650dc757659fcbce4859372bbea4a896ac842dd5b54cc22aae087ba35664 - languageName: node - linkType: hard - "url@npm:^0.11.0": version: 0.11.0 resolution: "url@npm:0.11.0" @@ -42215,13 +41382,6 @@ __metadata: languageName: node linkType: hard -"utf8@npm:3.0.0": - version: 3.0.0 - resolution: "utf8@npm:3.0.0" - checksum: 10/31d19c4faacbb65b09ebc1c21c32b20bdb0919c6f6773cee5001b99bb83f8e503e7233c08fc71ebb34f7cfebd95cec3243b81d90176097aa2f286cccb4ce866e - languageName: node - linkType: hard - "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -42283,7 +41443,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^3.0.1, uuid@npm:^3.3.2": +"uuid@npm:^3.0.1": version: 3.4.0 resolution: "uuid@npm:3.4.0" bin: @@ -42400,13 +41560,6 @@ __metadata: languageName: node linkType: hard -"varint@npm:^5.0.0": - version: 5.0.2 - resolution: "varint@npm:5.0.2" - checksum: 10/e1a66bf9a6cea96d1f13259170d4d41b845833acf3a9df990ea1e760d279bd70d5b1f4c002a50197efd2168a2fd43eb0b808444600fd4d23651e8d42fe90eb05 - languageName: node - linkType: hard - "varuint-bitcoin@npm:2.0.0": version: 2.0.0 resolution: "varuint-bitcoin@npm:2.0.0" @@ -42951,253 +42104,228 @@ __metadata: languageName: node linkType: hard -"web3-bzz@npm:1.10.3": - version: 1.10.3 - resolution: "web3-bzz@npm:1.10.3" - dependencies: - "@types/node": "npm:^12.12.6" - got: "npm:12.1.0" - swarm-js: "npm:^0.1.40" - checksum: 10/c3985e345c3149238189497b5df0b0d6a7f290f67782d4f77c733c17f0ed85ac063d9d2e1cc4c4592d668ba5ae333c6bab94cbd7c78f7f3553c1a10d478d90a6 - languageName: node - linkType: hard - -"web3-core-helpers@npm:1.10.3": - version: 1.10.3 - resolution: "web3-core-helpers@npm:1.10.3" - dependencies: - web3-eth-iban: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/4ec48d8ab81f3fcaabdab028e40aa958d08abc5bbd48f37b9cfba48ccc0f9e7a556754960b524199fb333688e71c073281dc78639e2944d17b2c57fc6ecf744d - languageName: node - linkType: hard - -"web3-core-method@npm:1.10.3": - version: 1.10.3 - resolution: "web3-core-method@npm:1.10.3" - dependencies: - "@ethersproject/transactions": "npm:^5.6.2" - web3-core-helpers: "npm:1.10.3" - web3-core-promievent: "npm:1.10.3" - web3-core-subscriptions: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/cd201944b4158ba0e267e02f1c2c043a79d29aa54c2e59e3abdef8b4145e5fd4c3b2839f1bd6a5cea705178919fb19039ecdaeae185ad13d9aa05aeb734bf8c5 - languageName: node - linkType: hard - -"web3-core-promievent@npm:1.10.3": - version: 1.10.3 - resolution: "web3-core-promievent@npm:1.10.3" - dependencies: - eventemitter3: "npm:4.0.4" - checksum: 10/5406e3d84a4f02e301ddae7e560be7e83c0f5f87988e1b1efb141697d816bbba8e4ddd0d0160123745a43fa152a5b986135b16901639172490abee4f9e16d106 +"web3-core@npm:^4.4.0, web3-core@npm:^4.5.0, web3-core@npm:^4.5.1, web3-core@npm:^4.6.0, web3-core@npm:^4.7.0": + version: 4.7.0 + resolution: "web3-core@npm:4.7.0" + dependencies: + web3-errors: "npm:^1.3.0" + web3-eth-accounts: "npm:^4.2.1" + web3-eth-iban: "npm:^4.0.7" + web3-providers-http: "npm:^4.2.0" + web3-providers-ipc: "npm:^4.0.7" + web3-providers-ws: "npm:^4.0.8" + web3-types: "npm:^1.8.1" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + dependenciesMeta: + web3-providers-ipc: + optional: true + checksum: 10/76f740cff838f32e21992a2d263b770256562fe9cad5c7b6b220db9990b09b940ff7eb7261400dab971fc2a00bfb75ab4f89f9b5b67c4e70cac099072c177944 languageName: node linkType: hard -"web3-core-requestmanager@npm:1.10.3": - version: 1.10.3 - resolution: "web3-core-requestmanager@npm:1.10.3" +"web3-errors@npm:^1.1.3, web3-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "web3-errors@npm:1.3.0" dependencies: - util: "npm:^0.12.5" - web3-core-helpers: "npm:1.10.3" - web3-providers-http: "npm:1.10.3" - web3-providers-ipc: "npm:1.10.3" - web3-providers-ws: "npm:1.10.3" - checksum: 10/9ec5fe7f621fbab0fe9acab3fd115e46bf86d7b398306e261073b471205c0e1171c4e276ebbe8a0b49906b37677a21b8b1b6d5da83ef86ee7dd29ff87b09e0a6 + web3-types: "npm:^1.7.0" + checksum: 10/613b01013b697dcaaad0ff9cfac8c4c69557fb0ffbc9efe86ac3eaf5179c6f18687fdcd2e53faf0a2c3ee68409491171968eb2017444cb14ffa74663ff77556f languageName: node linkType: hard -"web3-core-subscriptions@npm:1.10.3": - version: 1.10.3 - resolution: "web3-core-subscriptions@npm:1.10.3" +"web3-errors@npm:^1.2.0": + version: 1.2.0 + resolution: "web3-errors@npm:1.2.0" dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.3" - checksum: 10/202d54cba012999dad34b2711afca831e7a64d2a4ea9dbf6486cd1465df7df40b884760c1606b524cf30a403389ad19627fd99bcfee58058e3d5a080a5beef5d + web3-types: "npm:^1.6.0" + checksum: 10/99d0ecc4368c2969cc799ed4ef1b35f233dc3e7e0ccde713bcc850be4e75725ce175127342512504057ca48186266d6a053f129634f20ae23c405855a766d13d languageName: node linkType: hard -"web3-core@npm:1.10.3": - version: 1.10.3 - resolution: "web3-core@npm:1.10.3" +"web3-eth-abi@npm:^4.2.3, web3-eth-abi@npm:^4.3.0": + version: 4.3.0 + resolution: "web3-eth-abi@npm:4.3.0" dependencies: - "@types/bn.js": "npm:^5.1.1" - "@types/node": "npm:^12.12.6" - bignumber.js: "npm:^9.0.0" - web3-core-helpers: "npm:1.10.3" - web3-core-method: "npm:1.10.3" - web3-core-requestmanager: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/2e1db4570acadd94fa5206a1a92be094adc0b1e98f8b53c8d289395cc56d56ab587d259f508d24fb811f5d46330beac2c25e831628522d31589ec3fad94c6053 + abitype: "npm:0.7.1" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.8.1" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + checksum: 10/e490ad7142ae14c2def2b596551b54e83727af76a96ee4854e236cd19477028960eb944af258c42efc4646fc0b685ae4f3b3f2e0c4c75e15bfc346fc05c1ff6e languageName: node linkType: hard -"web3-errors@npm:^1.2.0": - version: 1.2.0 - resolution: "web3-errors@npm:1.2.0" +"web3-eth-accounts@npm:^4.2.1": + version: 4.2.1 + resolution: "web3-eth-accounts@npm:4.2.1" dependencies: - web3-types: "npm:^1.6.0" - checksum: 10/99d0ecc4368c2969cc799ed4ef1b35f233dc3e7e0ccde713bcc850be4e75725ce175127342512504057ca48186266d6a053f129634f20ae23c405855a766d13d + "@ethereumjs/rlp": "npm:^4.0.1" + crc-32: "npm:^1.2.2" + ethereum-cryptography: "npm:^2.0.0" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/a19a2bad97ed9cc7a82af6ce6acba906f3ed8829116bda1dcd72dd4ee7e31d332239f7464cfa89f053dffcef857fc284777474571e68878dbc2377057f9ea329 languageName: node linkType: hard -"web3-eth-abi@npm:1.10.3": - version: 1.10.3 - resolution: "web3-eth-abi@npm:1.10.3" +"web3-eth-contract@npm:^4.5.0, web3-eth-contract@npm:^4.7.0": + version: 4.7.0 + resolution: "web3-eth-contract@npm:4.7.0" dependencies: - "@ethersproject/abi": "npm:^5.6.3" - web3-utils: "npm:1.10.3" - checksum: 10/8b2ab1c381957102f367fa29300010a0cdedfd29017585d285c4bedf7eeae0a70801b135661c5bf977713b48ab424df107c0236dbe2387290adaa0750136067f + "@ethereumjs/rlp": "npm:^5.0.2" + web3-core: "npm:^4.5.1" + web3-errors: "npm:^1.3.0" + web3-eth: "npm:^4.8.2" + web3-eth-abi: "npm:^4.2.3" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/1ae62530fdf1389aa896af527c028e3c39ca16e2318e010d07e6b7d421abb8b1c6a6dbe834d3317098a29a6c8ad47f057d17e1c9602dc0060b689c331c3ce440 languageName: node linkType: hard -"web3-eth-accounts@npm:1.10.3": - version: 1.10.3 - resolution: "web3-eth-accounts@npm:1.10.3" +"web3-eth-ens@npm:^4.4.0": + version: 4.4.0 + resolution: "web3-eth-ens@npm:4.4.0" dependencies: - "@ethereumjs/common": "npm:2.6.5" - "@ethereumjs/tx": "npm:3.5.2" - "@ethereumjs/util": "npm:^8.1.0" - eth-lib: "npm:0.2.8" - scrypt-js: "npm:^3.0.1" - uuid: "npm:^9.0.0" - web3-core: "npm:1.10.3" - web3-core-helpers: "npm:1.10.3" - web3-core-method: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/ad534fe6b602d2f1c7317dc35e23a7a53951a52f4cd24b8b53a27d92bd8bedf8c61438a230dea06913224c20117e5b07fb849d8e437690b3765aaa11665759e8 + "@adraffy/ens-normalize": "npm:^1.8.8" + web3-core: "npm:^4.5.0" + web3-errors: "npm:^1.2.0" + web3-eth: "npm:^4.8.0" + web3-eth-contract: "npm:^4.5.0" + web3-net: "npm:^4.1.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.0" + web3-validator: "npm:^2.0.6" + checksum: 10/25a1535e095d8ffcbc0641041af69e42aa60ba2989477108a5678c42a06135df9134ccc6024c89c216cb3408848e3905ee178d5b12e3bb740e895ee6ee0bd2cf languageName: node linkType: hard -"web3-eth-contract@npm:1.10.3": - version: 1.10.3 - resolution: "web3-eth-contract@npm:1.10.3" +"web3-eth-iban@npm:^4.0.7": + version: 4.0.7 + resolution: "web3-eth-iban@npm:4.0.7" dependencies: - "@types/bn.js": "npm:^5.1.1" - web3-core: "npm:1.10.3" - web3-core-helpers: "npm:1.10.3" - web3-core-method: "npm:1.10.3" - web3-core-promievent: "npm:1.10.3" - web3-core-subscriptions: "npm:1.10.3" - web3-eth-abi: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/53e09738e8cf5f4c41538a927ea298ad27666ed879065104b69f1db8d2a020d0bb932088b8d0c3da98e41cfeab30451fa1e728b05205c5f6ec3386019642d572 + web3-errors: "npm:^1.1.3" + web3-types: "npm:^1.3.0" + web3-utils: "npm:^4.0.7" + web3-validator: "npm:^2.0.3" + checksum: 10/9d7521b4d4aef3a0d697905c7859d8e4d7ce82234320beecba9b24d254592a7ccf0354f329289b4e11a816fcbe3eceb842c4c87678f5e8ec622c8351bc1b9170 languageName: node linkType: hard -"web3-eth-ens@npm:1.10.3": - version: 1.10.3 - resolution: "web3-eth-ens@npm:1.10.3" +"web3-eth-personal@npm:^4.1.0": + version: 4.1.0 + resolution: "web3-eth-personal@npm:4.1.0" dependencies: - content-hash: "npm:^2.5.2" - eth-ens-namehash: "npm:2.0.8" - web3-core: "npm:1.10.3" - web3-core-helpers: "npm:1.10.3" - web3-core-promievent: "npm:1.10.3" - web3-eth-abi: "npm:1.10.3" - web3-eth-contract: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/5bb7cc1bbba7b6519feccba2d1193d58eda8c7c52bb1392c29c884555c383b5b2bea6a23afd0be7afeaddce767a243f12552b89016c073ae080ee3d32cc3ba42 + web3-core: "npm:^4.6.0" + web3-eth: "npm:^4.9.0" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.8.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/a560b0ef1f28961101c47824aa6fc71722c4e581ef5ffc5b68cf1b7db0fd5804032239f872a167a589b3c0ebe223353b8112b38e247e1f5b5ac48991e12f853c languageName: node linkType: hard -"web3-eth-iban@npm:1.10.3": - version: 1.10.3 - resolution: "web3-eth-iban@npm:1.10.3" +"web3-eth@npm:^4.10.0, web3-eth@npm:^4.8.0, web3-eth@npm:^4.8.2, web3-eth@npm:^4.9.0": + version: 4.10.0 + resolution: "web3-eth@npm:4.10.0" dependencies: - bn.js: "npm:^5.2.1" - web3-utils: "npm:1.10.3" - checksum: 10/ad711fc182cbe883a9987b1c496ebedfe32fcae438ac3ac6e5ac0bdea7a622db8f4fb16f18fb5ed94519dda21050e022a7c05d539a6e72de52d6672f614b2bb0 + setimmediate: "npm:^1.0.5" + web3-core: "npm:^4.7.0" + web3-errors: "npm:^1.3.0" + web3-eth-abi: "npm:^4.3.0" + web3-eth-accounts: "npm:^4.2.1" + web3-net: "npm:^4.1.0" + web3-providers-ws: "npm:^4.0.8" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.8.1" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + checksum: 10/9dcbce05e160cde8148f2ad9919c56e0ad242beb05c2a013219a7d7ab697f5ca7e3c55089d27bdff50c28eebc36a9e1ae4b8b40c57432bdf5a200ace46d8cdc8 languageName: node linkType: hard -"web3-eth-personal@npm:1.10.3": - version: 1.10.3 - resolution: "web3-eth-personal@npm:1.10.3" +"web3-net@npm:^4.1.0": + version: 4.1.0 + resolution: "web3-net@npm:4.1.0" dependencies: - "@types/node": "npm:^12.12.6" - web3-core: "npm:1.10.3" - web3-core-helpers: "npm:1.10.3" - web3-core-method: "npm:1.10.3" - web3-net: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/47c67687eccea6e906561a18da305d69f5d4384c854cee984aded3534651628265dcfe4ed693910dd1b84e91108b5dc96a715a085e3bb1618fb54143f56b743e + web3-core: "npm:^4.4.0" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.6.0" + web3-utils: "npm:^4.3.0" + checksum: 10/2899ed28d9afda9f9faee6424752cb967dabf79128bce25321318e069a41571b9bd9477b480f290fd65f07cd6c0c641def0d72f31a730705112bd14c301f4e5e languageName: node linkType: hard -"web3-eth@npm:1.10.3": - version: 1.10.3 - resolution: "web3-eth@npm:1.10.3" +"web3-providers-http@npm:^4.2.0": + version: 4.2.0 + resolution: "web3-providers-http@npm:4.2.0" dependencies: - web3-core: "npm:1.10.3" - web3-core-helpers: "npm:1.10.3" - web3-core-method: "npm:1.10.3" - web3-core-subscriptions: "npm:1.10.3" - web3-eth-abi: "npm:1.10.3" - web3-eth-accounts: "npm:1.10.3" - web3-eth-contract: "npm:1.10.3" - web3-eth-ens: "npm:1.10.3" - web3-eth-iban: "npm:1.10.3" - web3-eth-personal: "npm:1.10.3" - web3-net: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/7d5557c5853786de06d8183c0c2dbaee80979fbc3bd6ee65cef0e07b9d88f58677e0e0cff624ec2b433097a9f365c616a57231fa250719de4da1cf557ae0481a + cross-fetch: "npm:^4.0.0" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + checksum: 10/812b05d1e0dd8b6c5005bdcfe3c5fbddfe6cdd082bd2654dfe171ad98c3b7ff85b0bab371c70366d2bace2cf45fbf7d2f087b4cb281dbfa12372b902b8138eeb languageName: node linkType: hard -"web3-net@npm:1.10.3": - version: 1.10.3 - resolution: "web3-net@npm:1.10.3" +"web3-providers-ipc@npm:^4.0.7": + version: 4.0.7 + resolution: "web3-providers-ipc@npm:4.0.7" dependencies: - web3-core: "npm:1.10.3" - web3-core-method: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/35ab560f51d5fa4d241ef514c0d7894b187a76ce7a73b03046281348e0ed2080eb20b8acb263ceb66b4e7874ecd4016833a83c24eae39fd4179cb53674c2b840 + web3-errors: "npm:^1.1.3" + web3-types: "npm:^1.3.0" + web3-utils: "npm:^4.0.7" + checksum: 10/b953818479f5d9c7b748e10977430fd7e377696f9160ae19b1917c0317e89671c4be824c06723b6fda190258927160fcec0e8e7c1aa87a5f0344008ef7649cda languageName: node linkType: hard -"web3-providers-http@npm:1.10.3": - version: 1.10.3 - resolution: "web3-providers-http@npm:1.10.3" +"web3-providers-ws@npm:^4.0.8": + version: 4.0.8 + resolution: "web3-providers-ws@npm:4.0.8" dependencies: - abortcontroller-polyfill: "npm:^1.7.5" - cross-fetch: "npm:^4.0.0" - es6-promise: "npm:^4.2.8" - web3-core-helpers: "npm:1.10.3" - checksum: 10/78d475e6aceb265956bcda07b57c8005f95805be12373907ba00dd4ef32f4d6ff77c8db3f7a05d75e01b71ef3401a10fe5389dfb7419a0c49e19278e8ded7a25 + "@types/ws": "npm:8.5.3" + isomorphic-ws: "npm:^5.0.0" + web3-errors: "npm:^1.2.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + ws: "npm:^8.17.1" + checksum: 10/9b9fa96fa1fc9455fb1b632de50f542d2589710002ea2cb0cd6a5c1ed9f72960d80ce219ac66b038ea6d0a767056fe653aa258a1c084aa78d5745870cc2703b4 languageName: node linkType: hard -"web3-providers-ipc@npm:1.10.3": - version: 1.10.3 - resolution: "web3-providers-ipc@npm:1.10.3" +"web3-rpc-methods@npm:^1.3.0": + version: 1.3.0 + resolution: "web3-rpc-methods@npm:1.3.0" dependencies: - oboe: "npm:2.1.5" - web3-core-helpers: "npm:1.10.3" - checksum: 10/2038d69831eb0fb63f06023b5a3ab307ba0337caead0e0bb0aee3279bfcebec586cd50602565ed98c9e1e16fb99a5b2e57b8aa980e0685bfb35bfb99b9cf4859 + web3-core: "npm:^4.4.0" + web3-types: "npm:^1.6.0" + web3-validator: "npm:^2.0.6" + checksum: 10/8c134b1f2ae1cf94d5c452c53fe699d5951c22c62ea82084559db06722a5f0db2047be4209172ff90432c42f70cf8081fea0ea85a024e4cbcd0e037efd9acfa8 languageName: node linkType: hard -"web3-providers-ws@npm:1.10.3": - version: 1.10.3 - resolution: "web3-providers-ws@npm:1.10.3" +"web3-rpc-providers@npm:^1.0.0-rc.2": + version: 1.0.0-rc.2 + resolution: "web3-rpc-providers@npm:1.0.0-rc.2" dependencies: - eventemitter3: "npm:4.0.4" - web3-core-helpers: "npm:1.10.3" - websocket: "npm:^1.0.32" - checksum: 10/0fbf9be16939d5defbd9e9addae9718e119098e3c3d5ea0b6e54f9e3be5145731f7d1750a8e8f61a577608ca4b5f99a48a324bb7d7432ec62402f14d7a87ebe5 + web3-errors: "npm:^1.3.0" + web3-providers-http: "npm:^4.2.0" + web3-providers-ws: "npm:^4.0.8" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/8f1fb9a798cec61f245e6e13b796f1b43231d7bd5eb0db8b5b636b4e2facc75ee1453541237f057292ec7ecdb56ba284c29734cd17ea010c27c5580d6edea787 languageName: node linkType: hard -"web3-shh@npm:1.10.3": - version: 1.10.3 - resolution: "web3-shh@npm:1.10.3" - dependencies: - web3-core: "npm:1.10.3" - web3-core-method: "npm:1.10.3" - web3-core-subscriptions: "npm:1.10.3" - web3-net: "npm:1.10.3" - checksum: 10/0697f7ee54e65f27daa237d396fb8c375088e9de1693bf3fffcc05a98cf06ee4a66813971e594d56023023d0559538bd5ef89273e44243bb16c52e614a51eeb7 +"web3-types@npm:^1.3.0, web3-types@npm:^1.8.0, web3-types@npm:^1.8.1": + version: 1.8.1 + resolution: "web3-types@npm:1.8.1" + checksum: 10/e64f7e59806e1875e34a1daaa34e98043fcaebfd2fc96ab9948789129e8da73e812de62f63cf32c347c202d6ba40121f87516b183bb7074f27331fc7f90a46d9 languageName: node linkType: hard @@ -43208,19 +42336,16 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:1.10.3": - version: 1.10.3 - resolution: "web3-utils@npm:1.10.3" +"web3-utils@npm:^4.0.7, web3-utils@npm:^4.3.0, web3-utils@npm:^4.3.2": + version: 4.3.2 + resolution: "web3-utils@npm:4.3.2" dependencies: - "@ethereumjs/util": "npm:^8.1.0" - bn.js: "npm:^5.2.1" - ethereum-bloom-filters: "npm:^1.0.6" - ethereum-cryptography: "npm:^2.1.2" - ethjs-unit: "npm:0.1.6" - number-to-bn: "npm:1.7.0" - randombytes: "npm:^2.1.0" - utf8: "npm:3.0.0" - checksum: 10/7303919fbea2be4a720eb7688a51edb84f993e481bf08ac482c0e3a8f100300ce9a1b51b2775a8356fd397aa2a64fa016d9621d9ced05bdbfe1013d6b5ea90ef + ethereum-cryptography: "npm:^2.0.0" + eventemitter3: "npm:^5.0.1" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.8.1" + web3-validator: "npm:^2.0.6" + checksum: 10/3fff4418782b0fb05587c9150daedbad90a9ebadd1e3b115a71a72fea885ce10341054758087e47ab81f3cc67da812eaf9077f05e07a872e63d27299f285a81a languageName: node linkType: hard @@ -43237,7 +42362,7 @@ __metadata: languageName: node linkType: hard -"web3-validator@npm:^2.0.6": +"web3-validator@npm:^2.0.3, web3-validator@npm:^2.0.6": version: 2.0.6 resolution: "web3-validator@npm:2.0.6" dependencies: @@ -43250,18 +42375,28 @@ __metadata: languageName: node linkType: hard -"web3@npm:^1.9.0": - version: 1.10.3 - resolution: "web3@npm:1.10.3" - dependencies: - web3-bzz: "npm:1.10.3" - web3-core: "npm:1.10.3" - web3-eth: "npm:1.10.3" - web3-eth-personal: "npm:1.10.3" - web3-net: "npm:1.10.3" - web3-shh: "npm:1.10.3" - web3-utils: "npm:1.10.3" - checksum: 10/6087dc7efaed48ba8f9f944bdf0ac223e99ccb5f132fda791a314f8ce531b1a182e4274c8ee8a0191ae3203e70a762f52eea7e038ee2822719a849f4ec4c9e22 +"web3@npm:^4.14.0": + version: 4.14.0 + resolution: "web3@npm:4.14.0" + dependencies: + web3-core: "npm:^4.7.0" + web3-errors: "npm:^1.3.0" + web3-eth: "npm:^4.10.0" + web3-eth-abi: "npm:^4.3.0" + web3-eth-accounts: "npm:^4.2.1" + web3-eth-contract: "npm:^4.7.0" + web3-eth-ens: "npm:^4.4.0" + web3-eth-iban: "npm:^4.0.7" + web3-eth-personal: "npm:^4.1.0" + web3-net: "npm:^4.1.0" + web3-providers-http: "npm:^4.2.0" + web3-providers-ws: "npm:^4.0.8" + web3-rpc-methods: "npm:^1.3.0" + web3-rpc-providers: "npm:^1.0.0-rc.2" + web3-types: "npm:^1.8.1" + web3-utils: "npm:^4.3.2" + web3-validator: "npm:^2.0.6" + checksum: 10/cd8db8ace62c73b7c9ae4a1e1eaec99d8c107295e75e1e6fe770c52bcce919ef17c1d84b835d33c595ac72972207f23ae5cbdcb5382656709cc91db82437fc07 languageName: node linkType: hard @@ -43621,20 +42756,6 @@ __metadata: languageName: node linkType: hard -"websocket@npm:^1.0.32": - version: 1.0.34 - resolution: "websocket@npm:1.0.34" - dependencies: - bufferutil: "npm:^4.0.1" - debug: "npm:^2.2.0" - es5-ext: "npm:^0.10.50" - typedarray-to-buffer: "npm:^3.1.5" - utf-8-validate: "npm:^5.0.2" - yaeti: "npm:^0.0.6" - checksum: 10/b72e3dcc3fa92b4a4511f0df89b25feed6ab06979cb9e522d2736f09855f4bf7588d826773b9405fcf3f05698200eb55ba9da7ef333584653d4912a5d3b13c18 - languageName: node - linkType: hard - "whatwg-encoding@npm:^2.0.0": version: 2.0.0 resolution: "whatwg-encoding@npm:2.0.0" @@ -43979,17 +43100,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:^3.0.0": - version: 3.3.3 - resolution: "ws@npm:3.3.3" - dependencies: - async-limiter: "npm:~1.0.0" - safe-buffer: "npm:~5.1.0" - ultron: "npm:~1.1.0" - checksum: 10/4b4a7e5d11025e399d82a7471bfb4818d563c892f5d953c2de937d262bd8e8acc8b340220001c01f8392574fccbc2df153d6031e285b8b38441187ea0c2cfd72 - languageName: node - linkType: hard - "ws@npm:^6.1.0, ws@npm:^6.2.2, ws@npm:^6.2.3": version: 6.2.3 resolution: "ws@npm:6.2.3" @@ -44014,7 +43124,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.11.0, ws@npm:^8.12.1, ws@npm:^8.16.0, ws@npm:^8.18.0, ws@npm:^8.2.3, ws@npm:^8.5.0": +"ws@npm:^8.11.0, ws@npm:^8.12.1, ws@npm:^8.16.0, ws@npm:^8.17.1, ws@npm:^8.18.0, ws@npm:^8.2.3, ws@npm:^8.5.0": version: 8.18.0 resolution: "ws@npm:8.18.0" peerDependencies: @@ -44054,42 +43164,6 @@ __metadata: languageName: node linkType: hard -"xhr-request-promise@npm:^0.1.2": - version: 0.1.3 - resolution: "xhr-request-promise@npm:0.1.3" - dependencies: - xhr-request: "npm:^1.1.0" - checksum: 10/49ec3474884858faa55349894b1879c872422a24485097c8b71ba9046027d27f1d54eb61dfdb9d72e78892c7371d22d9cc6a4e101b6767bb4df89a0b6d739f85 - languageName: node - linkType: hard - -"xhr-request@npm:^1.0.1, xhr-request@npm:^1.1.0": - version: 1.1.0 - resolution: "xhr-request@npm:1.1.0" - dependencies: - buffer-to-arraybuffer: "npm:^0.0.5" - object-assign: "npm:^4.1.1" - query-string: "npm:^5.0.1" - simple-get: "npm:^2.7.0" - timed-out: "npm:^4.0.1" - url-set-query: "npm:^1.0.0" - xhr: "npm:^2.0.4" - checksum: 10/531c5e1e47d2e680c1ae1296af7fa375d752cd83c3fa1f9bd9e82fc4fb305ce8e7aaf266256e82bbd34e2a4891ec535bcc4e9f8db2691ab64bb3b6ff40296b9a - languageName: node - linkType: hard - -"xhr@npm:^2.0.4, xhr@npm:^2.3.3": - version: 2.6.0 - resolution: "xhr@npm:2.6.0" - dependencies: - global: "npm:~4.4.0" - is-function: "npm:^1.0.1" - parse-headers: "npm:^2.0.0" - xtend: "npm:^4.0.0" - checksum: 10/31f34aba708955008c87bcd21482be6afc7ff8adc28090e633b1d3f8d3e8e93150bac47b262738b046d7729023a884b655d55cf34e9d14d5850a1275ab49fb37 - languageName: node - linkType: hard - "xml-name-validator@npm:^4.0.0": version: 4.0.0 resolution: "xml-name-validator@npm:4.0.0" @@ -44201,13 +43275,6 @@ __metadata: languageName: node linkType: hard -"yaeti@npm:^0.0.6": - version: 0.0.6 - resolution: "yaeti@npm:0.0.6" - checksum: 10/6db12c152f7c363b80071086a3ebf5032e03332604eeda988872be50d6c8469e1f13316175544fa320f72edad696c2d83843ad0ff370659045c1a68bcecfcfea - languageName: node - linkType: hard - "yallist@npm:^2.1.2": version: 2.1.2 resolution: "yallist@npm:2.1.2" @@ -44215,7 +43282,7 @@ __metadata: languageName: node linkType: hard -"yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1": +"yallist@npm:^3.0.2": version: 3.1.1 resolution: "yallist@npm:3.1.1" checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb From 096c3a34a455770767553790de6428c88315ba89 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Fri, 1 Nov 2024 13:54:34 +0100 Subject: [PATCH 07/29] chore: implement ESLint rulset as a package in the workspace --- eslint.config.mjs | 192 +--------- package.json | 8 +- .../blockchain-link-utils/eslint.config.mjs | 4 +- packages/blockchain-link-utils/package.json | 1 + packages/blockchain-link/eslint.config.mjs | 4 +- packages/blockchain-link/package.json | 1 + packages/coinjoin/eslint.config.mjs | 4 +- packages/coinjoin/package.json | 1 + .../webextension-mv2/eslint.config.mjs | 1 + packages/connect-explorer/eslint.config.mjs | 4 +- packages/connect-explorer/package.json | 1 + packages/connect-web/eslint.config.mjs | 4 +- packages/connect-web/package.json | 1 + .../connect-webextension/eslint.config.mjs | 4 +- packages/connect-webextension/package.json | 1 + packages/connect/eslint.config.mjs | 4 +- packages/connect/package.json | 1 + packages/eslint/package.json | 22 ++ packages/eslint/src/eslint.config.mjs | 62 +++ packages/eslint/src/importConfig.mjs | 54 +++ packages/eslint/src/index.mjs | 1 + packages/eslint/src/javascriptConfig.mjs | 21 + packages/eslint/src/jestConfig.mjs | 15 + packages/eslint/src/reactConfig.mjs | 26 ++ packages/eslint/src/typescriptConfig.mjs | 33 ++ packages/eslint/tsconfig.json | 5 + packages/protobuf/eslint.config.mjs | 4 +- packages/protobuf/package.json | 1 + packages/schema-utils/eslint.config.mjs | 4 +- packages/schema-utils/package.json | 1 + packages/suite/eslint.config.mjs | 4 +- packages/suite/package.json | 1 + packages/transport-test/eslint.config.mjs | 4 +- packages/transport-test/package.json | 1 + packages/transport/eslint.config.mjs | 4 +- packages/transport/package.json | 1 + packages/utils/eslint.config.mjs | 4 +- packages/utils/package.json | 1 + packages/utxo-lib/eslint.config.mjs | 4 +- packages/utxo-lib/package.json | 1 + scripts/eslint.config.mjs | 4 +- scripts/package.json | 1 + .../react-native-graph/eslint.config.mjs | 4 +- suite-native/react-native-graph/package.json | 3 + testjs | 358 ------------------ tsconfig.json | 1 + yarn.lock | 38 +- 47 files changed, 325 insertions(+), 594 deletions(-) create mode 100644 packages/eslint/package.json create mode 100644 packages/eslint/src/eslint.config.mjs create mode 100644 packages/eslint/src/importConfig.mjs create mode 100644 packages/eslint/src/index.mjs create mode 100644 packages/eslint/src/javascriptConfig.mjs create mode 100644 packages/eslint/src/jestConfig.mjs create mode 100644 packages/eslint/src/reactConfig.mjs create mode 100644 packages/eslint/src/typescriptConfig.mjs create mode 100644 packages/eslint/tsconfig.json delete mode 100644 testjs diff --git a/eslint.config.mjs b/eslint.config.mjs index 239155c2b73..55bd23181f4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,191 +1,3 @@ -import path from 'path'; -import { fileURLToPath } from 'url'; +import { eslint } from '@trezor/eslint'; -import globals from 'globals'; -import pluginJs from '@eslint/js'; -import tseslint from 'typescript-eslint'; -import pluginReact from 'eslint-plugin-react'; -import pluginJest from 'eslint-plugin-jest'; -import pluginReactHooks from 'eslint-plugin-react-hooks'; -import pluginImport from 'eslint-plugin-import'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - -export default [ - { - ignores: [ - '**/.nx/*', - '**/lib/*', - '**/libDev/*', - '**/dist/*', - '**/coverage/*', - '**/build/*', - '**/build-electron/*', - '**/node_modules/*', - '**/public/*', - 'packages/suite-data/files/*', - 'packages/protobuf/scripts/protobuf-patches/*', - 'packages/address-validator', - 'packages/connect-examples', - '**/ci/', - 'eslint-local-rules/*', - ], - }, - { files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, - { languageOptions: { globals: globals.browser } }, - { - languageOptions: { - globals: { - ...globals.serviceworker, - ...globals.browser, - }, - }, - }, - - // JS - pluginJs.configs.recommended, - { - rules: { - // Offs - 'no-undef': 'off', // Todo: write description - - // Additional rules - 'no-console': ['error', { allow: ['warn', 'error'] }], - 'require-await': ['error'], - }, - }, - { - files: ['**/*.js'], // Usually config files - rules: { - 'no-console': 'off', - }, - }, - - // React - pluginReact.configs.flat.recommended, - { - languageOptions: { - ...pluginReact.configs.flat.recommended.languageOptions, - }, - settings: { react: { version: 'detect' } }, - rules: { - // Offs - 'react/react-in-jsx-scope': 'off', // We are not importing React in every file - 'react/prop-types': 'off', // This rule is not needed when using TypeScript - 'react/display-name': 'off', // This is annoying for stuff like `forwardRef`. Todo: reconsider - 'no-prototype-builtins': 'off', // Todo: just temporary, reconsider to remove it - }, - }, - - // React Hooks - { - plugins: { 'react-hooks': pluginReactHooks }, - rules: pluginReactHooks.configs.recommended.rules, - }, - - // Typescript - ...tseslint.configs.recommended, - { - rules: { - // Offs - '@typescript-eslint/no-require-imports': 'off', // We just use require a lot (mostly for dynamic imports) - '@typescript-eslint/no-explicit-any': 'off', // Todo: write description - '@typescript-eslint/ban-ts-comment': 'off', // Todo: just temporary, reconsider to remove it - '@typescript-eslint/no-empty-object-type': 'off', // Todo: we shall solve this, this is bad practice - - // Additional rules - '@typescript-eslint/no-unused-vars': [ - 'error', - { - vars: 'all', - args: 'none', - ignoreRestSiblings: true, - varsIgnorePattern: '^_', - }, - ], - '@typescript-eslint/no-shadow': [ - 'off', - { - builtinGlobals: false, - allow: ['_', 'error', 'resolve', 'reject', 'fetch'], - }, - ], - '@typescript-eslint/no-use-before-define': ['error'], - }, - }, - - // Import - pluginImport.flatConfigs.recommended, - { - settings: { - 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], - 'import/resolver': { - node: { - paths: [path.resolve(__dirname, 'eslint-rules')], - }, - }, - }, - rules: { - // Offs - 'import/no-unresolved': 'off', // Does not work with Babel react-native to react-native-web - 'import/no-default-export': 'error', - 'import/no-anonymous-default-export': [ - 'error', - { - allowArray: true, - allowLiteral: true, - allowObject: true, - }, - ], - 'import/no-extraneous-dependencies': [ - 'error', - { - devDependencies: [ - '**/*fixtures*/**', - '**/*.test.{tsx,ts,js}', - '**/blockchain-link/tests/**', - '**/blockchain-link/webpack/**', - '**/suite-desktop-core/**', - '**/*e2e/**', - '**/suite/src/support/tests/**', - '**/suite-data/**', - '**/*.stories.*', - '**/*webpack.config*', - '**/webpack/**', - ], - - includeTypes: true, - }, - ], - }, - }, - - // Tests - pluginJest.configs['flat/recommended'], - { - rules: { - 'jest/valid-title': 'off', // This rule does not use Typescript and produces false positives - 'jest/valid-describe-callback': 'off', // This rule does not use Typescript and produces false positives - 'jest/no-disabled-tests': 'off', // Well, what can I say... ¯\_(ツ)_/¯ We skip tests sometimes. - 'jest/no-focused-tests': 'off', // Same as above, but // Todo: shall be easy to get rid of this - 'jest/no-conditional-expect': 'off', // Todo: we shall solve this, this is bad practice - 'jest/expect-expect': 'off', // Todo: we have test with no assertions, this may be legit but it needs to be checked - }, - }, - { - files: ['**/__fixtures__/**/*'], - rules: { - 'import/no-default-export': 'off', // Todo: we have many default exports in fixtures, we shall get rid of them - }, - }, - - // ESLint config - { - files: ['**/eslint.config.mjs'], - rules: { - 'import/no-default-export': 'off', - 'import/no-extraneous-dependencies': 'off', - }, - }, -]; +export default [...eslint]; diff --git a/package.json b/package.json index caeeabdf3b1..0ec671032c3 100644 --- a/package.json +++ b/package.json @@ -120,8 +120,8 @@ "@babel/preset-react": "^7.24.7", "@babel/preset-typescript": "^7.24.7", "@babel/runtime": "^7.23.9", - "@eslint/js": "^9.13.0", "@suite-common/wallet-types": "workspace:*", + "@trezor/eslint": "workspace:*", "@types/jest": "29.5.12", "@types/node": "20.12.7", "@types/prettier": "^3.0.0", @@ -129,11 +129,6 @@ "@types/tar": "^6.1.11", "babel-jest": "29.7.0", "depcheck": "^1.4.7", - "eslint": "^9.13.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jest": "^28.8.3", - "eslint-plugin-react": "^7.37.2", - "eslint-plugin-react-hooks": "^5.0.0", "globals": "^15.11.0", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", @@ -150,7 +145,6 @@ "tslib": "^2.6.2", "tsx": "^4.16.3", "typescript": "5.5.4", - "typescript-eslint": "^8.12.2", "version-bump-prompt": "^6.1.0" }, "dependenciesMeta": { diff --git a/packages/blockchain-link-utils/eslint.config.mjs b/packages/blockchain-link-utils/eslint.config.mjs index 4efc2b99057..eafc52e3d55 100644 --- a/packages/blockchain-link-utils/eslint.config.mjs +++ b/packages/blockchain-link-utils/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/blockchain-link-utils/package.json b/packages/blockchain-link-utils/package.json index 31b0403404b..f0b0e538566 100644 --- a/packages/blockchain-link-utils/package.json +++ b/packages/blockchain-link-utils/package.json @@ -28,6 +28,7 @@ }, "devDependencies": { "@trezor/blockchain-link-types": "workspace:*", + "@trezor/eslint": "workspace:*", "@trezor/type-utils": "workspace:*", "tsx": "^4.16.3" }, diff --git a/packages/blockchain-link/eslint.config.mjs b/packages/blockchain-link/eslint.config.mjs index 114000d983a..47c39cb5f9e 100644 --- a/packages/blockchain-link/eslint.config.mjs +++ b/packages/blockchain-link/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { camelcase: 'off', diff --git a/packages/blockchain-link/package.json b/packages/blockchain-link/package.json index 136ada20a48..335c24a1ba9 100644 --- a/packages/blockchain-link/package.json +++ b/packages/blockchain-link/package.json @@ -65,6 +65,7 @@ }, "devDependencies": { "@trezor/e2e-utils": "workspace:*", + "@trezor/eslint": "workspace:*", "@trezor/type-utils": "workspace:*", "fs-extra": "^11.2.0", "html-webpack-plugin": "^5.6.0", diff --git a/packages/coinjoin/eslint.config.mjs b/packages/coinjoin/eslint.config.mjs index e8472d817a0..6287357377b 100644 --- a/packages/coinjoin/eslint.config.mjs +++ b/packages/coinjoin/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-bitwise': 'off', diff --git a/packages/coinjoin/package.json b/packages/coinjoin/package.json index 01bcf8c24ea..d3a7ef9d164 100644 --- a/packages/coinjoin/package.json +++ b/packages/coinjoin/package.json @@ -29,6 +29,7 @@ "@trezor/blockchain-link": "workspace:*", "@trezor/blockchain-link-types": "workspace:*", "@trezor/blockchain-link-utils": "workspace:*", + "@trezor/eslint": "workspace:*", "@trezor/utils": "workspace:*", "@trezor/utxo-lib": "workspace:*", "cross-fetch": "^4.0.0", diff --git a/packages/connect-examples/webextension-mv2/eslint.config.mjs b/packages/connect-examples/webextension-mv2/eslint.config.mjs index 66235afbc61..3c0f12191bb 100644 --- a/packages/connect-examples/webextension-mv2/eslint.config.mjs +++ b/packages/connect-examples/webextension-mv2/eslint.config.mjs @@ -1,3 +1,4 @@ +// Todo: figure out the better way, if this would be package, we would use "@trezor/eslint": "workspace:*" in package.json import parentConfig from '../../../eslint.config.mjs'; export default [ diff --git a/packages/connect-explorer/eslint.config.mjs b/packages/connect-explorer/eslint.config.mjs index 8e9fce6b754..f1a19bc9c94 100644 --- a/packages/connect-explorer/eslint.config.mjs +++ b/packages/connect-explorer/eslint.config.mjs @@ -1,8 +1,8 @@ import * as mdx from 'eslint-plugin-mdx'; -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, // Mdx { ...mdx.flat, diff --git a/packages/connect-explorer/package.json b/packages/connect-explorer/package.json index 306af433770..eccd63b0fb0 100644 --- a/packages/connect-explorer/package.json +++ b/packages/connect-explorer/package.json @@ -48,6 +48,7 @@ "swr": "^2.2.5" }, "devDependencies": { + "@trezor/eslint": "workspace:*", "@types/redux-logger": "^3.0.11", "babel-plugin-styled-components": "^2.1.4", "concurrently": "^8.2.2", diff --git a/packages/connect-web/eslint.config.mjs b/packages/connect-web/eslint.config.mjs index 1ab6a15aaf1..f81636fa2d8 100644 --- a/packages/connect-web/eslint.config.mjs +++ b/packages/connect-web/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-underscore-dangle': 'off', // underscore is used diff --git a/packages/connect-web/package.json b/packages/connect-web/package.json index 1a0e2328a7b..fbbad02b0e2 100644 --- a/packages/connect-web/package.json +++ b/packages/connect-web/package.json @@ -53,6 +53,7 @@ "@playwright/browser-firefox": "^1.46.1", "@playwright/browser-webkit": "^1.46.1", "@playwright/test": "^1.46.1", + "@trezor/eslint": "workspace:*", "@types/chrome": "^0.0.278", "@types/w3c-web-usb": "^1.0.10", "babel-loader": "^9.1.3", diff --git a/packages/connect-webextension/eslint.config.mjs b/packages/connect-webextension/eslint.config.mjs index 86805a1a0c7..c7c90bb0220 100644 --- a/packages/connect-webextension/eslint.config.mjs +++ b/packages/connect-webextension/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-underscore-dangle': 'off', // underscore is used diff --git a/packages/connect-webextension/package.json b/packages/connect-webextension/package.json index c720bb2a5c1..cc51efdf6a6 100644 --- a/packages/connect-webextension/package.json +++ b/packages/connect-webextension/package.json @@ -46,6 +46,7 @@ }, "devDependencies": { "@babel/preset-typescript": "^7.24.7", + "@trezor/eslint": "workspace:*", "@trezor/node-utils": "workspace:*", "@trezor/trezor-user-env-link": "workspace:*", "@types/chrome": "^0.0.278", diff --git a/packages/connect/eslint.config.mjs b/packages/connect/eslint.config.mjs index f6d992af468..6d7abd12de2 100644 --- a/packages/connect/eslint.config.mjs +++ b/packages/connect/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-bitwise': 'off', // airbnb-base: used in hardending diff --git a/packages/connect/package.json b/packages/connect/package.json index c935d0010f2..48fe4e61a9f 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -89,6 +89,7 @@ "cross-fetch": "^4.0.0" }, "devDependencies": { + "@trezor/eslint": "workspace:*", "@trezor/trezor-user-env-link": "workspace:*", "@types/karma": "^6.3.8", "babel-loader": "^9.1.3", diff --git a/packages/eslint/package.json b/packages/eslint/package.json new file mode 100644 index 00000000000..c5b90b41eee --- /dev/null +++ b/packages/eslint/package.json @@ -0,0 +1,22 @@ +{ + "name": "@trezor/eslint", + "version": "1.0.0", + "license": "See LICENSE.md in repo root", + "private": true, + "sideEffects": false, + "main": "src/index.mjs", + "scripts": { + "depcheck": "yarn g:depcheck", + "type-check": "yarn g:tsc --build", + "lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'" + }, + "dependencies": { + "@eslint/js": "^9.13.0", + "eslint": "^9.13.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^28.8.3", + "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react-hooks": "^5.0.0", + "typescript-eslint": "^8.12.2" + } +} diff --git a/packages/eslint/src/eslint.config.mjs b/packages/eslint/src/eslint.config.mjs new file mode 100644 index 00000000000..aac1d5eaa99 --- /dev/null +++ b/packages/eslint/src/eslint.config.mjs @@ -0,0 +1,62 @@ +import globals from 'globals'; + +import { reactConfig } from './reactConfig.mjs'; +import { javascriptConfig } from './javascriptConfig.mjs'; +import { typescriptConfig } from './typescriptConfig.mjs'; +import { importConfig } from './importConfig.mjs'; +import { jestConfig } from './jestConfig.mjs'; + +export default [ + { + ignores: [ + '**/.nx/*', + '**/lib/*', + '**/libDev/*', + '**/dist/*', + '**/coverage/*', + '**/build/*', + '**/build-electron/*', + '**/node_modules/*', + '**/public/*', + 'packages/suite-data/files/*', + 'packages/protobuf/scripts/protobuf-patches/*', + 'packages/address-validator', + 'packages/connect-examples', + '**/ci/', + 'eslint-local-rules/*', + ], + }, + { files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, + { languageOptions: { globals: globals.browser } }, + { + languageOptions: { + globals: { + ...globals.serviceworker, + ...globals.browser, + }, + }, + }, + + ...reactConfig, + ...javascriptConfig, + ...typescriptConfig, + ...importConfig, + ...jestConfig, + + // Tests + { + files: ['**/__fixtures__/**/*'], + rules: { + 'import/no-default-export': 'off', // Todo: we have many default exports in fixtures, we shall get rid of them + }, + }, + + // ESLint config + { + files: ['eslint.config.mjs'], + rules: { + 'import/no-default-export': 'off', + 'import/no-extraneous-dependencies': 'off', + }, + }, +]; diff --git a/packages/eslint/src/importConfig.mjs b/packages/eslint/src/importConfig.mjs new file mode 100644 index 00000000000..403406e4985 --- /dev/null +++ b/packages/eslint/src/importConfig.mjs @@ -0,0 +1,54 @@ +import path from 'path'; +import { fileURLToPath } from 'url'; + +import pluginImport from 'eslint-plugin-import'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +export const importConfig = [ + pluginImport.flatConfigs.recommended, + { + settings: { + 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], + 'import/resolver': { + node: { + paths: [path.resolve(__dirname, 'eslint-rules')], + }, + }, + }, + rules: { + // Offs + 'import/no-unresolved': 'off', // Does not work with Babel react-native to react-native-web + 'import/no-default-export': 'error', + 'import/no-anonymous-default-export': [ + 'error', + { + allowArray: true, + allowLiteral: true, + allowObject: true, + }, + ], + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: [ + '**/*fixtures*/**', + '**/*.test.{tsx,ts,js}', + '**/blockchain-link/tests/**', + '**/blockchain-link/webpack/**', + '**/suite-desktop-core/**', + '**/*e2e/**', + '**/suite/src/support/tests/**', + '**/suite-data/**', + '**/*.stories.*', + '**/*webpack.config*', + '**/webpack/**', + ], + + includeTypes: true, + }, + ], + }, + }, +]; diff --git a/packages/eslint/src/index.mjs b/packages/eslint/src/index.mjs new file mode 100644 index 00000000000..e4e479ec166 --- /dev/null +++ b/packages/eslint/src/index.mjs @@ -0,0 +1 @@ +export { default as eslint } from './eslint.config.mjs'; diff --git a/packages/eslint/src/javascriptConfig.mjs b/packages/eslint/src/javascriptConfig.mjs new file mode 100644 index 00000000000..a9ede7e4216 --- /dev/null +++ b/packages/eslint/src/javascriptConfig.mjs @@ -0,0 +1,21 @@ +import pluginJs from '@eslint/js'; + +export const javascriptConfig = [ + pluginJs.configs.recommended, + { + rules: { + // Offs + 'no-undef': 'off', // Todo: write description + + // Additional rules + 'no-console': ['error', { allow: ['warn', 'error'] }], + 'require-await': ['error'], + }, + }, + { + files: ['**/*.js'], // Usually config files + rules: { + 'no-console': 'off', + }, + }, +]; diff --git a/packages/eslint/src/jestConfig.mjs b/packages/eslint/src/jestConfig.mjs new file mode 100644 index 00000000000..c46b6fb1204 --- /dev/null +++ b/packages/eslint/src/jestConfig.mjs @@ -0,0 +1,15 @@ +import pluginJest from 'eslint-plugin-jest'; + +export const jestConfig = [ + pluginJest.configs['flat/recommended'], + { + rules: { + 'jest/valid-title': 'off', // This rule does not use Typescript and produces false positives + 'jest/valid-describe-callback': 'off', // This rule does not use Typescript and produces false positives + 'jest/no-disabled-tests': 'off', // Well, what can I say... ¯\_(ツ)_/¯ We skip tests sometimes. + 'jest/no-focused-tests': 'off', // Same as above, but // Todo: shall be easy to get rid of this + 'jest/no-conditional-expect': 'off', // Todo: we shall solve this, this is bad practice + 'jest/expect-expect': 'off', // Todo: we have test with no assertions, this may be legit but it needs to be checked + }, + }, +]; diff --git a/packages/eslint/src/reactConfig.mjs b/packages/eslint/src/reactConfig.mjs new file mode 100644 index 00000000000..5dd2ce96b34 --- /dev/null +++ b/packages/eslint/src/reactConfig.mjs @@ -0,0 +1,26 @@ +import pluginReact from 'eslint-plugin-react'; +import pluginReactHooks from 'eslint-plugin-react-hooks'; + +export const reactConfig = [ + // React + pluginReact.configs.flat.recommended, + { + languageOptions: { + ...pluginReact.configs.flat.recommended.languageOptions, + }, + settings: { react: { version: 'detect' } }, + rules: { + // Offs + 'react/react-in-jsx-scope': 'off', // We are not importing React in every file + 'react/prop-types': 'off', // This rule is not needed when using TypeScript + 'react/display-name': 'off', // This is annoying for stuff like `forwardRef`. Todo: reconsider + 'no-prototype-builtins': 'off', // Todo: just temporary, reconsider to remove it + }, + }, + + // React Hooks + { + plugins: { 'react-hooks': pluginReactHooks }, + rules: pluginReactHooks.configs.recommended.rules, + }, +]; diff --git a/packages/eslint/src/typescriptConfig.mjs b/packages/eslint/src/typescriptConfig.mjs new file mode 100644 index 00000000000..c4c043c08ec --- /dev/null +++ b/packages/eslint/src/typescriptConfig.mjs @@ -0,0 +1,33 @@ +import tseslint from 'typescript-eslint'; + +export const typescriptConfig = [ + ...tseslint.configs.recommended, + { + rules: { + // Offs + '@typescript-eslint/no-require-imports': 'off', // We just use require a lot (mostly for dynamic imports) + '@typescript-eslint/no-explicit-any': 'off', // Todo: write description + '@typescript-eslint/ban-ts-comment': 'off', // Todo: just temporary, reconsider to remove it + '@typescript-eslint/no-empty-object-type': 'off', // Todo: we shall solve this, this is bad practice + + // Additional rules + '@typescript-eslint/no-unused-vars': [ + 'error', + { + vars: 'all', + args: 'none', + ignoreRestSiblings: true, + varsIgnorePattern: '^_', + }, + ], + '@typescript-eslint/no-shadow': [ + 'off', + { + builtinGlobals: false, + allow: ['_', 'error', 'resolve', 'reject', 'fetch'], + }, + ], + '@typescript-eslint/no-use-before-define': ['error'], + }, + }, +]; diff --git a/packages/eslint/tsconfig.json b/packages/eslint/tsconfig.json new file mode 100644 index 00000000000..c7ebe855e21 --- /dev/null +++ b/packages/eslint/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "outDir": "libDev" }, + "references": [] +} diff --git a/packages/protobuf/eslint.config.mjs b/packages/protobuf/eslint.config.mjs index ebd7b3a94d9..13a8cc58fb1 100644 --- a/packages/protobuf/eslint.config.mjs +++ b/packages/protobuf/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { '@typescript-eslint/ban-types': 'off', // allow {} in protobuf.d.ts diff --git a/packages/protobuf/package.json b/packages/protobuf/package.json index 5b674de8806..e801a200db2 100644 --- a/packages/protobuf/package.json +++ b/packages/protobuf/package.json @@ -39,6 +39,7 @@ "protobufjs": "7.4.0" }, "devDependencies": { + "@trezor/eslint": "workspace:*", "protobufjs-cli": "^1.1.3", "tsx": "^4.16.3" }, diff --git a/packages/schema-utils/eslint.config.mjs b/packages/schema-utils/eslint.config.mjs index 539dd365804..60ca5555023 100644 --- a/packages/schema-utils/eslint.config.mjs +++ b/packages/schema-utils/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { ignores: ['**/__snapshots__/**/*'], }, diff --git a/packages/schema-utils/package.json b/packages/schema-utils/package.json index c6d1b201844..6eb10a4a977 100644 --- a/packages/schema-utils/package.json +++ b/packages/schema-utils/package.json @@ -23,6 +23,7 @@ }, "devDependencies": { "@sinclair/typebox-codegen": "^0.10.4", + "@trezor/eslint": "workspace:*", "ts-node": "^10.9.2", "tsx": "^4.16.3" }, diff --git a/packages/suite/eslint.config.mjs b/packages/suite/eslint.config.mjs index 3a4c4fa4828..589e60b3319 100644 --- a/packages/suite/eslint.config.mjs +++ b/packages/suite/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'react/style-prop-object': [ diff --git a/packages/suite/package.json b/packages/suite/package.json index 58ce769ef36..87d57c7b3ff 100644 --- a/packages/suite/package.json +++ b/packages/suite/package.json @@ -68,6 +68,7 @@ "@trezor/device-utils": "workspace:*", "@trezor/dom-utils": "workspace:*", "@trezor/env-utils": "workspace:*", + "@trezor/eslint": "workspace:*", "@trezor/ipc-proxy": "workspace:*", "@trezor/product-components": "workspace:*", "@trezor/react-utils": "workspace:*", diff --git a/packages/transport-test/eslint.config.mjs b/packages/transport-test/eslint.config.mjs index 7c8bf742b26..0cf958eb52c 100644 --- a/packages/transport-test/eslint.config.mjs +++ b/packages/transport-test/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-nested-ternary': 'off', // useful in tests... diff --git a/packages/transport-test/package.json b/packages/transport-test/package.json index 63fd75331c5..018f1791e25 100644 --- a/packages/transport-test/package.json +++ b/packages/transport-test/package.json @@ -20,6 +20,7 @@ }, "devDependencies": { "@jest/types": "^29.6.3", + "@trezor/eslint": "workspace:*", "@trezor/protobuf": "workspace:*", "@trezor/transport": "workspace:*", "@trezor/transport-bridge": "workspace:*", diff --git a/packages/transport/eslint.config.mjs b/packages/transport/eslint.config.mjs index 9da5dba77c7..723658343d1 100644 --- a/packages/transport/eslint.config.mjs +++ b/packages/transport/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-console': 'off', diff --git a/packages/transport/package.json b/packages/transport/package.json index 2f8fd2556d2..057f8b924df 100644 --- a/packages/transport/package.json +++ b/packages/transport/package.json @@ -53,6 +53,7 @@ "devDependencies": { "@babel/preset-env": "^7.23.9", "@babel/preset-typescript": "^7.24.7", + "@trezor/eslint": "workspace:*", "@trezor/trezor-user-env-link": "workspace:*", "@types/bytebuffer": "^5.0.49", "@types/sharedworker": "^0.0.130", diff --git a/packages/utils/eslint.config.mjs b/packages/utils/eslint.config.mjs index 6d7fc984d0d..503cbe7f636 100644 --- a/packages/utils/eslint.config.mjs +++ b/packages/utils/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-console': 'warn', diff --git a/packages/utils/package.json b/packages/utils/package.json index 7495921356e..22439c339a2 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -34,6 +34,7 @@ "tslib": "^2.6.2" }, "devDependencies": { + "@trezor/eslint": "workspace:*", "tsx": "^4.16.3" }, "dependencies": { diff --git a/packages/utxo-lib/eslint.config.mjs b/packages/utxo-lib/eslint.config.mjs index 226ed15d01a..4979e7c8960 100644 --- a/packages/utxo-lib/eslint.config.mjs +++ b/packages/utxo-lib/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-bitwise': 'off', // airbnb-base: used in hardending diff --git a/packages/utxo-lib/package.json b/packages/utxo-lib/package.json index b08866b1775..5515a281dd4 100644 --- a/packages/utxo-lib/package.json +++ b/packages/utxo-lib/package.json @@ -58,6 +58,7 @@ "wif": "^5.0.0" }, "devDependencies": { + "@trezor/eslint": "workspace:*", "@types/bchaddrjs": "^0.4.3", "@types/bn.js": "^5.1.6", "@types/bs58": "^4.0.4", diff --git a/scripts/eslint.config.mjs b/scripts/eslint.config.mjs index ad0dc28f5de..4dc525a546f 100644 --- a/scripts/eslint.config.mjs +++ b/scripts/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'no-console': 'off', diff --git a/scripts/package.json b/scripts/package.json index d31eac00975..5a8b037b92a 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -19,6 +19,7 @@ "yargs": "17.7.2" }, "devDependencies": { + "@trezor/eslint": "workspace:*", "@types/prettier": "^3.0.0" } } diff --git a/suite-native/react-native-graph/eslint.config.mjs b/suite-native/react-native-graph/eslint.config.mjs index 1f1d8a168cf..f389921e162 100644 --- a/suite-native/react-native-graph/eslint.config.mjs +++ b/suite-native/react-native-graph/eslint.config.mjs @@ -1,7 +1,7 @@ -import parentConfig from '../../eslint.config.mjs'; +import { eslint } from '@trezor/eslint'; export default [ - ...parentConfig, + ...eslint, { rules: { 'react/style-prop-object': 'off', diff --git a/suite-native/react-native-graph/package.json b/suite-native/react-native-graph/package.json index 1b1821dfea8..3d088411375 100644 --- a/suite-native/react-native-graph/package.json +++ b/suite-native/react-native-graph/package.json @@ -19,5 +19,8 @@ "react-native": "0.75.2", "react-native-gesture-handler": "2.18.1", "react-native-reanimated": "3.16.1" + }, + "devDependencies": { + "@trezor/eslint": "workspace:*" } } diff --git a/testjs b/testjs deleted file mode 100644 index 978f5ea1e41..00000000000 --- a/testjs +++ /dev/null @@ -1,358 +0,0 @@ -import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"; -import _import from "eslint-plugin-import"; -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import reactHooks from "eslint-plugin-react-hooks"; -import jest from "eslint-plugin-jest"; -import chaiFriendly from "eslint-plugin-chai-friendly"; -import react from "eslint-plugin-react"; -import localRules from "eslint-plugin-local-rules"; -import globals from "globals"; -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default [{ - ignores: [ - - ], -}, ...fixupConfigRules(compat.extends( - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - "plugin:import/typescript", - "plugin:react-hooks/recommended", -)), { - plugins: { - import: fixupPluginRules(_import), - "@typescript-eslint": fixupPluginRules(typescriptEslint), - "react-hooks": fixupPluginRules(reactHooks), - jest, - "chai-friendly": chaiFriendly, - react: fixupPluginRules(react), - "local-rules": localRules, - }, - - languageOptions: { - globals: { - ...globals.jest, - ...jest.environments.globals.globals, - }, - - parser: tsParser, - ecmaVersion: "latest", - sourceType: "module", - - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - }, - }, - - settings: { - react: { - version: "detect", - }, - - "import/ignore": ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"], - - "import/resolver": { - node: { - paths: ["/home/user/workspace/trezor/trezor-suite/eslint-rules"], - }, - }, - }, - - rules: { - "@typescript-eslint/no-empty-object-type": "off", - "@typescript-eslint/no-require-imports": "off", - "@typescript-eslint/prefer-ts-expect-error": "error", - "@typescript-eslint/explicit-function-return-type": "off", - - "func-style": ["error", "declaration", { - allowArrowFunctions: true, - }], - - "react/jsx-filename-extension": ["error", { - extensions: [".tsx"], - }], - - "import/order": [1, { - groups: [["builtin", "external"], "internal", ["sibling", "parent"]], - - pathGroups: [{ - pattern: "react*", - group: "external", - position: "before", - }, { - pattern: "@trezor/**", - group: "internal", - }, { - pattern: "@suite-native/**", - group: "internal", - }, { - pattern: "@suite-common/**", - group: "internal", - }, { - pattern: "src/**", - group: "internal", - position: "after", - }], - - pathGroupsExcludedImportTypes: ["internal", "react"], - "newlines-between": "always", - }], - - "import/no-extraneous-dependencies": ["error", { - devDependencies: [ - "**/*fixtures*/**", - "**/*.test.{tsx,ts,js}", - "**/blockchain-link/tests/**", - "**/blockchain-link/webpack/**", - "**/suite-desktop-core/**", - "**/*e2e/**", - "**/suite/src/support/tests/**", - "**/suite-data/**", - "**/*.stories.*", - "**/*webpack.config*", - "**/webpack/**", - ], - - includeTypes: true, - }], - - "default-case": "off", - "import/prefer-default-export": "off", - "import/no-named-as-default": "off", - "no-nested-ternary": "error", - "import/no-unresolved": "off", - "import/extensions": "off", - "import/no-cycle": "off", - - "import/no-anonymous-default-export": ["error", { - allowArray: true, - allowLiteral: true, - allowObject: true, - }], - - "react/prop-types": "off", - "react/no-multi-comp": "off", - "react/no-unescaped-entities": "off", - - "react/jsx-curly-brace-presence": ["warn", { - props: "never", - children: "never", - }], - - "class-methods-use-this": "off", - "lines-between-class-members": "off", - "no-param-reassign": "off", - "no-plusplus": "off", - "no-return-assign": "off", - "consistent-return": "off", - - "no-console": ["error", { - allow: ["warn", "error"], - }], - - "no-undef": "off", - "react/jsx-no-undef": "off", - "react/react-in-jsx-scope": "off", - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "error", - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/no-explicit-any": "off", - "react/destructuring-assignment": "off", - "func-names": "off", - "react/require-default-props": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/triple-slash-reference": "off", - "react/jsx-props-no-spreading": "off", - "@typescript-eslint/ban-ts-ignore": "off", - "@typescript-eslint/no-empty-function": "off", - "no-useless-constructor": "off", - "@typescript-eslint/no-useless-constructor": "error", - "no-dupe-class-members": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "no-use-before-define": "off", - "@typescript-eslint/no-use-before-define": ["error"], - "require-await": ["error"], - "react/display-name": "off", - "react/jsx-key": "warn", - "react/prefer-stateless-function": "off", - "react/no-deprecated": "off", - "react/no-direct-mutation-state": "off", - "react/require-render-return": "off", - "react/no-is-mounted": "off", - "react/jsx-indent": "off", - - "prefer-destructuring": ["error", { - VariableDeclarator: { - array: false, - object: true, - }, - - AssignmentExpression: { - array: false, - object: false, - }, - }, { - enforceForRenamedProperties: false, - }], - - "handle-callback-err": "error", - "no-mixed-requires": "error", - "no-new-require": "error", - "no-path-concat": "error", - "no-process-exit": "off", - "no-restricted-modules": "error", - "no-sync": "off", - "eol-last": "error", - "import/no-default-export": "error", - "no-label-var": "error", - "no-shadow": "off", - - "@typescript-eslint/no-shadow": ["error", { - builtinGlobals: true, - allow: ["_", "error", "resolve", "reject", "fetch"], - }], - - "no-shadow-restricted-names": "error", - "no-undefined": "off", - "no-undef-init": "error", - "no-unused-vars": "off", - "no-unused-expressions": 0, - "prefer-const": "off", - "chai-friendly/no-unused-expressions": 2, - - "@typescript-eslint/no-unused-vars": ["error", { - vars: "all", - args: "none", - ignoreRestSiblings: true, - varsIgnorePattern: "^_", - }], - - "@typescript-eslint/no-restricted-imports": ["error", { - paths: [{ - name: ".", - }, { - name: "..", - }, { - name: "../..", - }], - - patterns: ["@trezor/*/lib", "@trezor/*/lib/**"], - }], - - "no-restricted-syntax": ["error", { - message: "Please don't use createAsyncThunk. Use createThunk from @suite-common/redux-utils instead.", - selector: "CallExpression[callee.name='createAsyncThunk']", - }, { - message: "Please don't use getState directly. Always use strongly typed selector, because geState is typed as \"any\" and it's dangerous to use it directly.", - selector: "MemberExpression[property.type=\"Identifier\"]:matches([object.callee.name=\"getState\"])", - }, { - message: "Do not assign \"getState\" directly. Always use strongly typed selector, because geState is typed as \"any\" and it's dangerous to use it directly.", - selector: "VariableDeclarator[init.type='CallExpression']:matches([init.callee.name='getState'])", - }, { - message: "Please don't use \"state\" directly because it's typed as \"any\". Always use it only as parameter for strongly typed selector function.", - selector: "CallExpression[callee.name='useSelector'] MemberExpression[object.name='state']:matches([property.type='Identifier'])", - }], - - "object-shorthand": ["error", "always", { - ignoreConstructors: false, - avoidQuotes: true, - }], - - "constructor-super": "error", - "no-duplicate-imports": "off", - - "no-useless-rename": ["error", { - ignoreDestructuring: false, - ignoreImport: false, - ignoreExport: false, - }], - - "prefer-numeric-literals": "error", - - "padding-line-between-statements": ["error", { - blankLine: "always", - prev: "*", - next: "return", - }], - - "local-rules/no-override-ds-component": ["error", { - packageName: "@trezor/product-components", - }], - }, -}, { - files: ["**/*.js"], - - rules: { - "@typescript-eslint/no-var-requires": "off", - "no-console": "off", - }, -}, { - files: [ - "packages/analytics/**/*", - "packages/blockchain-link/**/*", - "packages/components/**/*", - "packages/product-components/**/*", - "packages/connect/**/*", - "packages/connect-common/**/*", - "packages/connect-explorer/**/*", - "packages/connect-web/**/*", - "packages/connect-popup/**/*", - "packages/connect-iframe/**/*", - "packages/connect-examples/**/*", - "packages/connect-plugin-ethereum/**/*", - "packages/connect-plugin-stellar/**/*", - "packages/request-manager/**/*", - "packages/suite/**/*", - "packages/suite-build/**/*", - "packages/suite-data/**/*", - "packages/suite-desktop-api/**/*", - "packages/suite-storage/**/*", - "packages/suite-web/**/*", - "packages/transport/**/*", - "packages/utxo-lib/**/*", - "scripts/**/*", - "docs/**/*", - ], - - rules: { - "@typescript-eslint/no-shadow": "off", - "import/no-default-export": "off", - "import/order": "off", - "@typescript-eslint/no-unused-vars": "off", - "no-console": "off", - "react/jsx-no-undef": "off", - "no-catch-shadow": "off", - "@typescript-eslint/no-restricted-imports": "off", - "no-restricted-syntax": "off", - }, -}, { - files: ["suite-native/**/*"], - - rules: { - "@typescript-eslint/no-var-requires": "off", - "global-require": "off", - }, -}, { - files: ["**/*.test.*", "**/__tests__/**/*"], - - rules: { - "import/no-extraneous-dependencies": "off", - "import/no-unresolved": "off", - "import/no-default-export": "off", - }, -}]; diff --git a/tsconfig.json b/tsconfig.json index decda76b8f0..027147744d6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -158,6 +158,7 @@ }, { "path": "packages/crypto-utils" }, { "path": "packages/device-utils" }, + { "path": "packages/eslint" }, { "path": "packages/dom-utils" }, { "path": "packages/e2e-utils" }, { "path": "packages/env-utils" }, diff --git a/yarn.lock b/yarn.lock index 9afe0cc32a1..c991574bb54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10567,6 +10567,7 @@ __metadata: dependencies: "@shopify/react-native-skia": "npm:1.3.11" "@suite-common/suite-utils": "workspace:*" + "@trezor/eslint": "workspace:*" "@types/react": "npm:18.2.79" react: "npm:18.2.0" react-native: "npm:0.75.2" @@ -11154,6 +11155,7 @@ __metadata: "@solana/web3.js": "npm:^1.95.4" "@trezor/blockchain-link-types": "workspace:*" "@trezor/env-utils": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/type-utils": "workspace:*" "@trezor/utils": "workspace:*" tsx: "npm:^4.16.3" @@ -11172,6 +11174,7 @@ __metadata: "@trezor/blockchain-link-utils": "workspace:*" "@trezor/e2e-utils": "workspace:*" "@trezor/env-utils": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/type-utils": "workspace:*" "@trezor/utils": "workspace:*" "@trezor/utxo-lib": "workspace:*" @@ -11201,6 +11204,7 @@ __metadata: "@trezor/blockchain-link": "workspace:*" "@trezor/blockchain-link-types": "workspace:*" "@trezor/blockchain-link-utils": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/utils": "workspace:*" "@trezor/utxo-lib": "workspace:*" cross-fetch: "npm:^4.0.0" @@ -11341,6 +11345,7 @@ __metadata: "@trezor/connect-mobile": "workspace:^" "@trezor/connect-web": "workspace:^" "@trezor/connect-webextension": "workspace:^" + "@trezor/eslint": "workspace:*" "@trezor/protobuf": "workspace:^" "@trezor/schema-utils": "workspace:^" "@trezor/theme": "workspace:^" @@ -11522,6 +11527,7 @@ __metadata: "@playwright/test": "npm:^1.46.1" "@trezor/connect": "workspace:*" "@trezor/connect-common": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/utils": "workspace:*" "@types/chrome": "npm:^0.0.278" "@types/w3c-web-usb": "npm:^1.0.10" @@ -11550,6 +11556,7 @@ __metadata: "@trezor/connect": "workspace:*" "@trezor/connect-common": "workspace:*" "@trezor/connect-web": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/node-utils": "workspace:*" "@trezor/trezor-user-env-link": "workspace:*" "@trezor/utils": "workspace:*" @@ -11582,6 +11589,7 @@ __metadata: "@trezor/blockchain-link-types": "workspace:*" "@trezor/connect-analytics": "workspace:*" "@trezor/connect-common": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/protobuf": "workspace:*" "@trezor/protocol": "workspace:*" "@trezor/schema-utils": "workspace:*" @@ -11665,6 +11673,20 @@ __metadata: languageName: unknown linkType: soft +"@trezor/eslint@workspace:*, @trezor/eslint@workspace:packages/eslint": + version: 0.0.0-use.local + resolution: "@trezor/eslint@workspace:packages/eslint" + dependencies: + "@eslint/js": "npm:^9.13.0" + eslint: "npm:^9.13.0" + eslint-plugin-import: "npm:^2.31.0" + eslint-plugin-jest: "npm:^28.8.3" + eslint-plugin-react: "npm:^7.37.2" + eslint-plugin-react-hooks: "npm:^5.0.0" + typescript-eslint: "npm:^8.12.2" + languageName: unknown + linkType: soft + "@trezor/ipc-proxy@workspace:*, @trezor/ipc-proxy@workspace:packages/ipc-proxy": version: 0.0.0-use.local resolution: "@trezor/ipc-proxy@workspace:packages/ipc-proxy" @@ -11720,6 +11742,7 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/protobuf@workspace:packages/protobuf" dependencies: + "@trezor/eslint": "workspace:*" "@trezor/schema-utils": "workspace:*" protobufjs: "npm:7.4.0" protobufjs-cli: "npm:^1.1.3" @@ -11778,6 +11801,7 @@ __metadata: dependencies: "@sinclair/typebox": "npm:^0.33.7" "@sinclair/typebox-codegen": "npm:^0.10.4" + "@trezor/eslint": "workspace:*" ts-mixer: "npm:^6.0.3" ts-node: "npm:^10.9.2" tsx: "npm:^4.16.3" @@ -11791,6 +11815,7 @@ __metadata: resolution: "@trezor/scripts@workspace:scripts" dependencies: "@mobily/ts-belt": "npm:^3.13.1" + "@trezor/eslint": "workspace:*" "@types/prettier": "npm:^3.0.0" chalk: "npm:^4.1.2" dotenv: "npm:^16.4.1" @@ -12113,6 +12138,7 @@ __metadata: "@trezor/device-utils": "workspace:*" "@trezor/dom-utils": "workspace:*" "@trezor/env-utils": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/ipc-proxy": "workspace:*" "@trezor/product-components": "workspace:*" "@trezor/react-utils": "workspace:*" @@ -12238,6 +12264,7 @@ __metadata: dependencies: "@jest/types": "npm:^29.6.3" "@trezor/protobuf": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/transport": "workspace:*" "@trezor/transport-bridge": "workspace:*" "@trezor/trezor-user-env-link": "workspace:^" @@ -12257,6 +12284,7 @@ __metadata: dependencies: "@babel/preset-env": "npm:^7.23.9" "@babel/preset-typescript": "npm:^7.24.7" + "@trezor/eslint": "workspace:*" "@trezor/protobuf": "workspace:*" "@trezor/protocol": "workspace:*" "@trezor/trezor-user-env-link": "workspace:*" @@ -12306,6 +12334,7 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/utils@workspace:packages/utils" dependencies: + "@trezor/eslint": "workspace:*" bignumber.js: "npm:^9.1.2" tsx: "npm:^4.16.3" peerDependencies: @@ -12317,6 +12346,7 @@ __metadata: version: 0.0.0-use.local resolution: "@trezor/utxo-lib@workspace:packages/utxo-lib" dependencies: + "@trezor/eslint": "workspace:*" "@trezor/utils": "workspace:*" "@types/bchaddrjs": "npm:^0.4.3" "@types/bn.js": "npm:^5.1.6" @@ -40138,8 +40168,8 @@ __metadata: "@babel/preset-react": "npm:^7.24.7" "@babel/preset-typescript": "npm:^7.24.7" "@babel/runtime": "npm:^7.23.9" - "@eslint/js": "npm:^9.13.0" "@suite-common/wallet-types": "workspace:*" + "@trezor/eslint": "workspace:*" "@types/jest": "npm:29.5.12" "@types/node": "npm:20.12.7" "@types/prettier": "npm:^3.0.0" @@ -40147,11 +40177,6 @@ __metadata: "@types/tar": "npm:^6.1.11" babel-jest: "npm:29.7.0" depcheck: "npm:^1.4.7" - eslint: "npm:^9.13.0" - eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-jest: "npm:^28.8.3" - eslint-plugin-react: "npm:^7.37.2" - eslint-plugin-react-hooks: "npm:^5.0.0" globals: "npm:^15.11.0" jest: "npm:29.7.0" jest-environment-jsdom: "npm:29.7.0" @@ -40168,7 +40193,6 @@ __metadata: tslib: "npm:^2.6.2" tsx: "npm:^4.16.3" typescript: "npm:5.5.4" - typescript-eslint: "npm:^8.12.2" version-bump-prompt: "npm:^6.1.0" dependenciesMeta: core-js-pure: From 7176b43384c041ff69cf6e9c26a92eed4e314741 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Mon, 4 Nov 2024 12:19:22 +0100 Subject: [PATCH 08/29] chore: re-add all our custom eslint rules --- packages/eslint/package.json | 3 +- packages/eslint/src/eslint.config.mjs | 48 +++- packages/eslint/src/importConfig.mjs | 25 +- packages/eslint/src/javascriptConfig.mjs | 77 +++++- .../eslint/src/javascriptNodejsConfig.mjs | 18 ++ packages/eslint/src/jestConfig.mjs | 9 +- packages/eslint/src/localRulesConfig.mjs | 20 ++ packages/eslint/src/reactConfig.mjs | 10 +- packages/eslint/src/typescriptConfig.mjs | 22 +- yarn.lock | 259 ++---------------- 10 files changed, 245 insertions(+), 246 deletions(-) create mode 100644 packages/eslint/src/javascriptNodejsConfig.mjs create mode 100644 packages/eslint/src/localRulesConfig.mjs diff --git a/packages/eslint/package.json b/packages/eslint/package.json index c5b90b41eee..1859ca95f13 100644 --- a/packages/eslint/package.json +++ b/packages/eslint/package.json @@ -10,11 +10,12 @@ "type-check": "yarn g:tsc --build", "lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'" }, - "dependencies": { + "devDependencies": { "@eslint/js": "^9.13.0", "eslint": "^9.13.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-jest": "^28.8.3", + "eslint-plugin-local-rules": "^3.0.2", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.0.0", "typescript-eslint": "^8.12.2" diff --git a/packages/eslint/src/eslint.config.mjs b/packages/eslint/src/eslint.config.mjs index aac1d5eaa99..019098f1fc2 100644 --- a/packages/eslint/src/eslint.config.mjs +++ b/packages/eslint/src/eslint.config.mjs @@ -5,6 +5,8 @@ import { javascriptConfig } from './javascriptConfig.mjs'; import { typescriptConfig } from './typescriptConfig.mjs'; import { importConfig } from './importConfig.mjs'; import { jestConfig } from './jestConfig.mjs'; +import { javascriptNodejsConfig } from './javascriptNodejsConfig.mjs'; +import { localRulesConfig } from './localRulesConfig.mjs'; export default [ { @@ -39,9 +41,53 @@ export default [ ...reactConfig, ...javascriptConfig, + ...javascriptNodejsConfig, ...typescriptConfig, ...importConfig, ...jestConfig, + ...localRulesConfig, + + // Todo: Resolve this legacy! + { + // we are using explicit blacklist because this will enforce new rules in newly created packages + files: [ + 'packages/analytics/**/*', + 'packages/blockchain-link/**/*', + 'packages/components/**/*', + 'packages/product-components/**/*', + 'packages/connect/**/*', + 'packages/connect-common/**/*', + 'packages/connect-explorer/**/*', + 'packages/connect-web/**/*', + 'packages/connect-popup/**/*', + 'packages/connect-iframe/**/*', + 'packages/connect-examples/**/*', + 'packages/connect-plugin-ethereum/**/*', + 'packages/connect-plugin-stellar/**/*', + 'packages/request-manager/**/*', + 'packages/suite/**/*', + 'packages/suite-build/**/*', + 'packages/suite-data/**/*', + 'packages/suite-desktop-api/**/*', + 'packages/suite-storage/**/*', + 'packages/suite-web/**/*', + 'packages/transport/**/*', + 'packages/utxo-lib/**/*', + 'scripts/**/*', + 'docs/**/*', + ], + rules: { + '@typescript-eslint/no-shadow': 'off', + 'import/no-default-export': 'off', + 'import/order': 'off', + '@typescript-eslint/no-unused-vars': 'off', + 'no-console': 'off', + 'react/jsx-no-undef': 'off', + 'no-catch-shadow': 'off', + '@typescript-eslint/no-restricted-imports': 'off', + 'no-restricted-syntax': 'off', + }, + }, // Tests { @@ -51,7 +97,7 @@ export default [ }, }, - // ESLint config + // ESLint config itself { files: ['eslint.config.mjs'], rules: { diff --git a/packages/eslint/src/importConfig.mjs b/packages/eslint/src/importConfig.mjs index 403406e4985..dc8bbed1b02 100644 --- a/packages/eslint/src/importConfig.mjs +++ b/packages/eslint/src/importConfig.mjs @@ -18,8 +18,7 @@ export const importConfig = [ }, }, rules: { - // Offs - 'import/no-unresolved': 'off', // Does not work with Babel react-native to react-native-web + // Additional 'import/no-default-export': 'error', 'import/no-anonymous-default-export': [ 'error', @@ -29,6 +28,25 @@ export const importConfig = [ allowObject: true, }, ], + 'import/order': [ + 1, + { + groups: [['builtin', 'external'], 'internal', ['sibling', 'parent']], + pathGroups: [ + { + pattern: 'react*', + group: 'external', + position: 'before', + }, + { pattern: '@trezor/**', group: 'internal' }, // Translates to /packages/** */ + { pattern: '@suite-native/**', group: 'internal' }, + { pattern: '@suite-common/**', group: 'internal' }, + { pattern: 'src/**', group: 'internal', position: 'after' }, + ], + pathGroupsExcludedImportTypes: ['internal', 'react'], + 'newlines-between': 'always', + }, + ], 'import/no-extraneous-dependencies': [ 'error', { @@ -49,6 +67,9 @@ export const importConfig = [ includeTypes: true, }, ], + + // Offs + 'import/no-unresolved': 'off', // Does not work with Babel react-native to react-native-web }, }, ]; diff --git a/packages/eslint/src/javascriptConfig.mjs b/packages/eslint/src/javascriptConfig.mjs index a9ede7e4216..019b2cf7195 100644 --- a/packages/eslint/src/javascriptConfig.mjs +++ b/packages/eslint/src/javascriptConfig.mjs @@ -4,12 +4,83 @@ export const javascriptConfig = [ pluginJs.configs.recommended, { rules: { - // Offs - 'no-undef': 'off', // Todo: write description - // Additional rules 'no-console': ['error', { allow: ['warn', 'error'] }], 'require-await': ['error'], + 'no-nested-ternary': 'error', + 'prefer-destructuring': [ + 'error', + { + VariableDeclarator: { + array: false, + object: true, + }, + AssignmentExpression: { + array: false, + object: false, + }, + }, + { + enforceForRenamedProperties: false, + }, + ], + 'no-label-var': 'error', // Disallow labels that share a name with a variable + 'no-undef-init': 'error', // Disallow initializing variables to undefined + 'no-unused-expressions': 'error', + 'no-restricted-syntax': [ + 'error', + { + message: + "Please don't use createAsyncThunk. Use createThunk from @suite-common/redux-utils instead.", + selector: "CallExpression[callee.name='createAsyncThunk']", + }, + { + message: + 'Please don\'t use getState directly. Always use strongly typed selector, because geState is typed as "any" and it\'s dangerous to use it directly.', + selector: + 'MemberExpression[property.type="Identifier"]:matches([object.callee.name="getState"])', + }, + { + message: + 'Do not assign "getState" directly. Always use strongly typed selector, because geState is typed as "any" and it\'s dangerous to use it directly.', + selector: + "VariableDeclarator[init.type='CallExpression']:matches([init.callee.name='getState'])", + }, + { + message: + 'Please don\'t use "state" directly because it\'s typed as "any". Always use it only as parameter for strongly typed selector function.', + selector: + "CallExpression[callee.name='useSelector'] MemberExpression[object.name='state']:matches([property.type='Identifier'])", + }, + ], + 'object-shorthand': [ + 'error', + 'always', + { + ignoreConstructors: false, + avoidQuotes: true, + }, + ], + 'no-useless-rename': [ + 'error', + { + ignoreDestructuring: false, + ignoreImport: false, + ignoreExport: false, + }, + ], + 'prefer-numeric-literals': 'error', + 'padding-line-between-statements': [ + 'error', // Todo: deprecated, use @stylistic/eslint-plugin-js instead + { blankLine: 'always', prev: '*', next: 'return' }, + ], + + // Offs + 'no-undef': 'off', // Todo: write description + + // Offs for Node.js + 'no-sync': 'off', // disallow use of synchronous methods (off by default) + 'no-process-exit': 'off', // disallow process.exit() (on by default in the node environment) }, }, { diff --git a/packages/eslint/src/javascriptNodejsConfig.mjs b/packages/eslint/src/javascriptNodejsConfig.mjs new file mode 100644 index 00000000000..b98c1c6434d --- /dev/null +++ b/packages/eslint/src/javascriptNodejsConfig.mjs @@ -0,0 +1,18 @@ +export const javascriptNodejsConfig = [ + { + // These rules are specific to JavaScript running on Node.js. + rules: { + // Additional + 'handle-callback-err': 'error', // enforces error handling in callbacks (off by default) (on by default in the node environment) + 'no-mixed-requires': 'error', // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment) + 'no-new-require': 'error', // disallow use of new operator with the require function (off by default) (on by default in the node environment) + 'no-path-concat': 'error', // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment) + 'no-restricted-modules': 'error', // restrict usage of specified node modules (off by default) + 'eol-last': 'error', + + // Offs + 'no-sync': 'off', // disallow use of synchronous methods (off by default) + 'no-process-exit': 'off', // disallow process.exit() (on by default in the node environment) + }, + }, +]; diff --git a/packages/eslint/src/jestConfig.mjs b/packages/eslint/src/jestConfig.mjs index c46b6fb1204..6ad5a3abadf 100644 --- a/packages/eslint/src/jestConfig.mjs +++ b/packages/eslint/src/jestConfig.mjs @@ -4,10 +4,15 @@ export const jestConfig = [ pluginJest.configs['flat/recommended'], { rules: { + // Additions + // Enforce arrow functions only is afaik not possible. But this helps. + 'func-style': ['error', 'declaration', { allowArrowFunctions: true }], + 'no-console': ['error', { allow: ['warn', 'error'] }], + + // Offs 'jest/valid-title': 'off', // This rule does not use Typescript and produces false positives 'jest/valid-describe-callback': 'off', // This rule does not use Typescript and produces false positives - 'jest/no-disabled-tests': 'off', // Well, what can I say... ¯\_(ツ)_/¯ We skip tests sometimes. - 'jest/no-focused-tests': 'off', // Same as above, but // Todo: shall be easy to get rid of this + 'jest/no-disabled-tests': 'off', 'jest/no-conditional-expect': 'off', // Todo: we shall solve this, this is bad practice 'jest/expect-expect': 'off', // Todo: we have test with no assertions, this may be legit but it needs to be checked }, diff --git a/packages/eslint/src/localRulesConfig.mjs b/packages/eslint/src/localRulesConfig.mjs new file mode 100644 index 00000000000..54ed5cb5769 --- /dev/null +++ b/packages/eslint/src/localRulesConfig.mjs @@ -0,0 +1,20 @@ +import pluginLocalRules from 'eslint-plugin-local-rules'; + +export const localRulesConfig = [ + { + plugins: { + 'local-rules': pluginLocalRules, + }, + rules: { + 'local-rules/no-override-ds-component': [ + 'error', + { packageName: '@trezor/components' }, + ], + // Todo: figure out hot to re-enable this rule + // 'local-rules/no-override-ds-component': [ + // 'error', + // { packageName: '@trezor/product-components' }, + // ], + }, + }, +]; diff --git a/packages/eslint/src/reactConfig.mjs b/packages/eslint/src/reactConfig.mjs index 5dd2ce96b34..d59b056c536 100644 --- a/packages/eslint/src/reactConfig.mjs +++ b/packages/eslint/src/reactConfig.mjs @@ -10,6 +10,10 @@ export const reactConfig = [ }, settings: { react: { version: 'detect' } }, rules: { + // Additions + 'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }], + 'react/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'never' }], + // Offs 'react/react-in-jsx-scope': 'off', // We are not importing React in every file 'react/prop-types': 'off', // This rule is not needed when using TypeScript @@ -21,6 +25,10 @@ export const reactConfig = [ // React Hooks { plugins: { 'react-hooks': pluginReactHooks }, - rules: pluginReactHooks.configs.recommended.rules, + rules: { + ...pluginReactHooks.configs.recommended.rules, + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'error', + }, }, ]; diff --git a/packages/eslint/src/typescriptConfig.mjs b/packages/eslint/src/typescriptConfig.mjs index c4c043c08ec..503d3b65fee 100644 --- a/packages/eslint/src/typescriptConfig.mjs +++ b/packages/eslint/src/typescriptConfig.mjs @@ -4,12 +4,6 @@ export const typescriptConfig = [ ...tseslint.configs.recommended, { rules: { - // Offs - '@typescript-eslint/no-require-imports': 'off', // We just use require a lot (mostly for dynamic imports) - '@typescript-eslint/no-explicit-any': 'off', // Todo: write description - '@typescript-eslint/ban-ts-comment': 'off', // Todo: just temporary, reconsider to remove it - '@typescript-eslint/no-empty-object-type': 'off', // Todo: we shall solve this, this is bad practice - // Additional rules '@typescript-eslint/no-unused-vars': [ 'error', @@ -28,6 +22,22 @@ export const typescriptConfig = [ }, ], '@typescript-eslint/no-use-before-define': ['error'], + '@typescript-eslint/no-restricted-imports': [ + 'error', + { + paths: [{ name: '.' }, { name: '..' }, { name: '../..' }], + patterns: ['@trezor/*/lib', '@trezor/*/lib/**'], + }, + ], + + // Additions from "plugin:@typescript-eslint/strict" (we may turn this on one day as a whole) + '@typescript-eslint/no-useless-constructor': ['error'], + + // Offs + '@typescript-eslint/no-require-imports': 'off', // We just use require a lot (mostly for dynamic imports) + '@typescript-eslint/no-explicit-any': 'off', // Todo: write description + '@typescript-eslint/ban-ts-comment': 'off', // Todo: just temporary, reconsider to remove it + '@typescript-eslint/no-empty-object-type': 'off', // Todo: we shall solve this, this is bad practice }, }, ]; diff --git a/yarn.lock b/yarn.lock index c991574bb54..906c0ab6e62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -104,17 +104,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/code-frame@npm:7.24.7" - dependencies: - "@babel/highlight": "npm:^7.24.7" - picocolors: "npm:^1.0.0" - checksum: 10/4812e94885ba7e3213d49583a155fdffb05292330f0a9b2c41b49288da70cf3c746a3fda0bf1074041a6d741c33f8d7be24be5e96f41ef77395eeddc5c9ff624 - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.21.4": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.7": version: 7.26.2 resolution: "@babel/code-frame@npm:7.26.2" dependencies: @@ -418,14 +408,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.22.20, @babel/helper-validator-identifier@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-validator-identifier@npm:7.24.7" - checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.25.9": +"@babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.22.20, @babel/helper-validator-identifier@npm:^7.24.7, @babel/helper-validator-identifier@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-validator-identifier@npm:7.25.9" checksum: 10/3f9b649be0c2fd457fa1957b694b4e69532a668866b8a0d81eabfa34ba16dbf3107b39e0e7144c55c3c652bf773ec816af8df4a61273a2bb4eb3145ca9cf478e @@ -461,7 +444,7 @@ __metadata: languageName: node linkType: hard -"@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.24.7": +"@babel/highlight@npm:^7.10.4": version: 7.24.7 resolution: "@babel/highlight@npm:7.24.7" dependencies: @@ -1816,7 +1799,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.5, @babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.24.7, @babel/runtime@npm:^7.25.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.5, @babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.25.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.25.6 resolution: "@babel/runtime@npm:7.25.6" dependencies: @@ -5301,15 +5284,6 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.3.0, @noble/curves@npm:~1.3.0": - version: 1.3.0 - resolution: "@noble/curves@npm:1.3.0" - dependencies: - "@noble/hashes": "npm:1.3.3" - checksum: 10/f3cbdd1af00179e30146eac5539e6df290228fb857a7a8ba36d1a772cbe59288a2ca83d06f175d3446ef00db3a80d7fd8b8347f7de9c2d4d5bf3865d8bb78252 - languageName: node - linkType: hard - "@noble/curves@npm:1.4.2, @noble/curves@npm:^1.1.0, @noble/curves@npm:^1.4.2, @noble/curves@npm:~1.4.0": version: 1.4.2 resolution: "@noble/curves@npm:1.4.2" @@ -5319,7 +5293,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.3, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.2": +"@noble/hashes@npm:1.3.3, @noble/hashes@npm:~1.3.0": version: 1.3.3 resolution: "@noble/hashes@npm:1.3.3" checksum: 10/1025ddde4d24630e95c0818e63d2d54ee131b980fe113312d17ed7468bc18f54486ac86c907685759f8a7e13c2f9b9e83ec7b67d1cc20836f36b5e4a65bb102d @@ -7571,32 +7545,14 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:^1.1.3, @scure/base@npm:~1.1.0, @scure/base@npm:~1.1.3, @scure/base@npm:~1.1.4": - version: 1.1.7 - resolution: "@scure/base@npm:1.1.7" - checksum: 10/fc50ffaab36cb46ff9fa4dc5052a06089ab6a6707f63d596bb34aaaec76173c9a564ac312a0b981b5e7a5349d60097b8878673c75d6cbfc4da7012b63a82099b - languageName: node - linkType: hard - -"@scure/base@npm:~1.1.6": +"@scure/base@npm:^1.1.3, @scure/base@npm:~1.1.0, @scure/base@npm:~1.1.3, @scure/base@npm:~1.1.6": version: 1.1.9 resolution: "@scure/base@npm:1.1.9" checksum: 10/f0ab7f687bbcdee2a01377fe3cd808bf63977999672751295b6a92625d5322f4754a96d40f6bd579bc367aad48ecf8a4e6d0390e70296e6ded1076f52adb16bb languageName: node linkType: hard -"@scure/bip32@npm:1.3.3, @scure/bip32@npm:^1.3.1": - version: 1.3.3 - resolution: "@scure/bip32@npm:1.3.3" - dependencies: - "@noble/curves": "npm:~1.3.0" - "@noble/hashes": "npm:~1.3.2" - "@scure/base": "npm:~1.1.4" - checksum: 10/4b8b75567866ff7d6b3ba154538add02d2951e9433e8dd7f0014331ac500cda5a88fe3d39b408fcc36e86b633682013f172b967af022c2e4e4ab07336801d688 - languageName: node - linkType: hard - -"@scure/bip32@npm:1.4.0": +"@scure/bip32@npm:1.4.0, @scure/bip32@npm:^1.3.1": version: 1.4.0 resolution: "@scure/bip32@npm:1.4.0" dependencies: @@ -7617,17 +7573,7 @@ __metadata: languageName: node linkType: hard -"@scure/bip39@npm:1.2.2, @scure/bip39@npm:^1.2.1": - version: 1.2.2 - resolution: "@scure/bip39@npm:1.2.2" - dependencies: - "@noble/hashes": "npm:~1.3.2" - "@scure/base": "npm:~1.1.4" - checksum: 10/f71aceda10a7937bf3779fd2b4c4156c95ec9813269470ddca464cb8ab610d2451b173037f4b1e6dac45414e406e7adc7b5814c51279f4474d5d38140bbee542 - languageName: node - linkType: hard - -"@scure/bip39@npm:1.3.0": +"@scure/bip39@npm:1.3.0, @scure/bip39@npm:^1.2.1": version: 1.3.0 resolution: "@scure/bip39@npm:1.3.0" dependencies: @@ -8226,30 +8172,7 @@ __metadata: languageName: node linkType: hard -"@solana/web3.js@npm:^1.75.0": - version: 1.95.0 - resolution: "@solana/web3.js@npm:1.95.0" - dependencies: - "@babel/runtime": "npm:^7.24.7" - "@noble/curves": "npm:^1.4.2" - "@noble/hashes": "npm:^1.4.0" - "@solana/buffer-layout": "npm:^4.0.1" - agentkeepalive: "npm:^4.5.0" - bigint-buffer: "npm:^1.1.5" - bn.js: "npm:^5.2.1" - borsh: "npm:^0.7.0" - bs58: "npm:^4.0.1" - buffer: "npm:6.0.3" - fast-stable-stringify: "npm:^1.0.0" - jayson: "npm:^4.1.0" - node-fetch: "npm:^2.7.0" - rpc-websockets: "npm:^9.0.2" - superstruct: "npm:^2.0.2" - checksum: 10/24837dbbc00203c8396a6d43b17fecec337f64e1cadc0f7155408062d540cd3fbfb64d044ac14e2ef09c48e4b3d273634fa3954f9dfccf2af1535e249ade750c - languageName: node - linkType: hard - -"@solana/web3.js@npm:^1.95.4": +"@solana/web3.js@npm:^1.75.0, @solana/web3.js@npm:^1.95.4": version: 1.95.4 resolution: "@solana/web3.js@npm:1.95.4" dependencies: @@ -11681,6 +11604,7 @@ __metadata: eslint: "npm:^9.13.0" eslint-plugin-import: "npm:^2.31.0" eslint-plugin-jest: "npm:^28.8.3" + eslint-plugin-local-rules: "npm:^3.0.2" eslint-plugin-react: "npm:^7.37.2" eslint-plugin-react-hooks: "npm:^5.0.0" typescript-eslint: "npm:^8.12.2" @@ -13797,14 +13721,7 @@ __metadata: languageName: node linkType: hard -"@types/unist@npm:^2, @types/unist@npm:^2.0.0": - version: 2.0.10 - resolution: "@types/unist@npm:2.0.10" - checksum: 10/e2924e18dedf45f68a5c6ccd6015cd62f1643b1b43baac1854efa21ae9e70505db94290434a23da1137d9e31eb58e54ca175982005698ac37300a1c889f6c4aa - languageName: node - linkType: hard - -"@types/unist@npm:^2.0.2": +"@types/unist@npm:^2, @types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2": version: 2.0.11 resolution: "@types/unist@npm:2.0.11" checksum: 10/6d436e832bc35c6dde9f056ac515ebf2b3384a1d7f63679d12358766f9b313368077402e9c1126a14d827f10370a5485e628bf61aa91117cf4fc882423191a4e @@ -14719,16 +14636,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.1.0, acorn@npm:^8.10.0, acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": - version: 8.12.1 - resolution: "acorn@npm:8.12.1" - bin: - acorn: bin/acorn - checksum: 10/d08c2d122bba32d0861e0aa840b2ee25946c286d5dc5990abca991baf8cdbfbe199b05aacb221b979411a2fea36f83e26b5ac4f6b4e0ce49038c62316c1848f0 - languageName: node - linkType: hard - -"acorn@npm:^8.14.0": +"acorn@npm:^8.0.0, acorn@npm:^8.0.4, acorn@npm:^8.1.0, acorn@npm:^8.10.0, acorn@npm:^8.11.3, acorn@npm:^8.14.0, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": version: 8.14.0 resolution: "acorn@npm:8.14.0" bin: @@ -15605,18 +15513,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.3.5, axios@npm:^1.6.0, axios@npm:^1.6.1, axios@npm:^1.6.7": - version: 1.7.2 - resolution: "axios@npm:1.7.2" - dependencies: - follow-redirects: "npm:^1.15.6" - form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10/6ae80dda9736bb4762ce717f1a26ff997d94672d3a5799ad9941c24d4fb019c1dff45be8272f08d1975d7950bac281f3ba24aff5ecd49ef5a04d872ec428782f - languageName: node - linkType: hard - -"axios@npm:^1.7.7": +"axios@npm:^1.3.5, axios@npm:^1.6.0, axios@npm:^1.6.1, axios@npm:^1.6.7, axios@npm:^1.7.7": version: 1.7.7 resolution: "axios@npm:1.7.7" dependencies: @@ -21617,6 +21514,13 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-local-rules@npm:^3.0.2": + version: 3.0.2 + resolution: "eslint-plugin-local-rules@npm:3.0.2" + checksum: 10/6ec5a9e6d5a0a8f56ed22307761d1bc2bebee75ebfc9518e0eeed0d334c45c84713aff1969eefa5ac0fdeca63e427fee53b3912333caa9e70cc1f87e4c198f11 + languageName: node + linkType: hard + "eslint-plugin-markdown@npm:^3.0.1": version: 3.0.1 resolution: "eslint-plugin-markdown@npm:3.0.1" @@ -21994,19 +21898,7 @@ __metadata: languageName: node linkType: hard -"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": - version: 2.1.3 - resolution: "ethereum-cryptography@npm:2.1.3" - dependencies: - "@noble/curves": "npm:1.3.0" - "@noble/hashes": "npm:1.3.3" - "@scure/bip32": "npm:1.3.3" - "@scure/bip39": "npm:1.2.2" - checksum: 10/cc5aa9a4368dc1dd7680ba921957c098ced7b3d7dbb1666334013ab2f8d4cd25a785ad84e66fd9f5c5a9b6de337930ea24ff8c722938f36a9c00cec597ca16b5 - languageName: node - linkType: hard - -"ethereum-cryptography@npm:^2.2.1": +"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2, ethereum-cryptography@npm:^2.2.1": version: 2.2.1 resolution: "ethereum-cryptography@npm:2.2.1" dependencies: @@ -26799,28 +26691,6 @@ __metadata: languageName: node linkType: hard -"jayson@npm:^4.1.0": - version: 4.1.0 - resolution: "jayson@npm:4.1.0" - dependencies: - "@types/connect": "npm:^3.4.33" - "@types/node": "npm:^12.12.54" - "@types/ws": "npm:^7.4.4" - JSONStream: "npm:^1.3.5" - commander: "npm:^2.20.3" - delay: "npm:^5.0.0" - es6-promisify: "npm:^5.0.0" - eyes: "npm:^0.1.8" - isomorphic-ws: "npm:^4.0.1" - json-stringify-safe: "npm:^5.0.1" - uuid: "npm:^8.3.2" - ws: "npm:^7.4.5" - bin: - jayson: bin/jayson.js - checksum: 10/d76b3f220e14388007958b8f79e793009d6bc572b6e5ea65848a0f027b324d1950d836468986d7e38ddfb30b660e8b048b459c8bc8456e9b38dbbebc60a563b4 - languageName: node - linkType: hard - "jayson@npm:^4.1.1": version: 4.1.2 resolution: "jayson@npm:4.1.2" @@ -40884,22 +40754,7 @@ __metadata: languageName: node linkType: hard -"unified@npm:^11.0.0": - version: 11.0.4 - resolution: "unified@npm:11.0.4" - dependencies: - "@types/unist": "npm:^3.0.0" - bail: "npm:^2.0.0" - devlop: "npm:^1.0.0" - extend: "npm:^3.0.0" - is-plain-obj: "npm:^4.0.0" - trough: "npm:^2.0.0" - vfile: "npm:^6.0.0" - checksum: 10/425f0618d6f5e5d2ae64ec206cb6fd11f4b86fec7a785cfe2fc3a334191a91bf837eecb32858c70bcc2c08e76ce9d6a38457319f70f77399c8f496fb8e486817 - languageName: node - linkType: hard - -"unified@npm:^11.0.4": +"unified@npm:^11.0.0, unified@npm:^11.0.4": version: 11.0.5 resolution: "unified@npm:11.0.5" dependencies: @@ -41732,18 +41587,7 @@ __metadata: languageName: node linkType: hard -"vfile@npm:^6.0.0": - version: 6.0.1 - resolution: "vfile@npm:6.0.1" - dependencies: - "@types/unist": "npm:^3.0.0" - unist-util-stringify-position: "npm:^4.0.0" - vfile-message: "npm:^4.0.0" - checksum: 10/7f8412f9ce7709d3be4041fd68a159e2cf96f9c9a4f095bcb18d1561009757b8efb37b71d0ae087e5202fe0e3b3162aae0adf92e30e2448a45645912c23c4ab2 - languageName: node - linkType: hard - -"vfile@npm:^6.0.1": +"vfile@npm:^6.0.0, vfile@npm:^6.0.1": version: 6.0.3 resolution: "vfile@npm:6.0.3" dependencies: @@ -42148,7 +41992,7 @@ __metadata: languageName: node linkType: hard -"web3-errors@npm:^1.1.3, web3-errors@npm:^1.3.0": +"web3-errors@npm:^1.1.3, web3-errors@npm:^1.2.0, web3-errors@npm:^1.3.0": version: 1.3.0 resolution: "web3-errors@npm:1.3.0" dependencies: @@ -42157,15 +42001,6 @@ __metadata: languageName: node linkType: hard -"web3-errors@npm:^1.2.0": - version: 1.2.0 - resolution: "web3-errors@npm:1.2.0" - dependencies: - web3-types: "npm:^1.6.0" - checksum: 10/99d0ecc4368c2969cc799ed4ef1b35f233dc3e7e0ccde713bcc850be4e75725ce175127342512504057ca48186266d6a053f129634f20ae23c405855a766d13d - languageName: node - linkType: hard - "web3-eth-abi@npm:^4.2.3, web3-eth-abi@npm:^4.3.0": version: 4.3.0 resolution: "web3-eth-abi@npm:4.3.0" @@ -42346,21 +42181,14 @@ __metadata: languageName: node linkType: hard -"web3-types@npm:^1.3.0, web3-types@npm:^1.8.0, web3-types@npm:^1.8.1": +"web3-types@npm:^1.3.0, web3-types@npm:^1.6.0, web3-types@npm:^1.7.0, web3-types@npm:^1.8.0, web3-types@npm:^1.8.1": version: 1.8.1 resolution: "web3-types@npm:1.8.1" checksum: 10/e64f7e59806e1875e34a1daaa34e98043fcaebfd2fc96ab9948789129e8da73e812de62f63cf32c347c202d6ba40121f87516b183bb7074f27331fc7f90a46d9 languageName: node linkType: hard -"web3-types@npm:^1.6.0, web3-types@npm:^1.7.0": - version: 1.7.0 - resolution: "web3-types@npm:1.7.0" - checksum: 10/fcd5d7a9a94579fcd01fa86dfa70e6afb269f66a7ce60e6786849e64ff6e4a107f1c25cb2784343a48952ac36d4bf3093a73b75de6ebcc971308e6b44abb211f - languageName: node - linkType: hard - -"web3-utils@npm:^4.0.7, web3-utils@npm:^4.3.0, web3-utils@npm:^4.3.2": +"web3-utils@npm:^4.0.7, web3-utils@npm:^4.3.0, web3-utils@npm:^4.3.1, web3-utils@npm:^4.3.2": version: 4.3.2 resolution: "web3-utils@npm:4.3.2" dependencies: @@ -42373,19 +42201,6 @@ __metadata: languageName: node linkType: hard -"web3-utils@npm:^4.3.1": - version: 4.3.1 - resolution: "web3-utils@npm:4.3.1" - dependencies: - ethereum-cryptography: "npm:^2.0.0" - eventemitter3: "npm:^5.0.1" - web3-errors: "npm:^1.2.0" - web3-types: "npm:^1.7.0" - web3-validator: "npm:^2.0.6" - checksum: 10/88e39a6d43b756e965226b25ddc54855f26a7c13f6240b99fb521e1bae35a20a24f637f09fd0f4ef5d3f5a9e46b7f843bb5fd7ac2c9f99cfe18bb71817390f6e - languageName: node - linkType: hard - "web3-validator@npm:^2.0.3, web3-validator@npm:^2.0.6": version: 2.0.6 resolution: "web3-validator@npm:2.0.6" @@ -43020,20 +42835,13 @@ __metadata: languageName: node linkType: hard -"word-wrap@npm:^1.2.5": +"word-wrap@npm:^1.2.5, word-wrap@npm:~1.2.3": version: 1.2.5 resolution: "word-wrap@npm:1.2.5" checksum: 10/1ec6f6089f205f83037be10d0c4b34c9183b0b63fca0834a5b3cee55dd321429d73d40bb44c8fc8471b5203d6e8f8275717f49a8ff4b2b0ab41d7e1b563e0854 languageName: node linkType: hard -"word-wrap@npm:~1.2.3": - version: 1.2.4 - resolution: "word-wrap@npm:1.2.4" - checksum: 10/a749c0cf410724acde4bdb263dcb13de61489dde22889a6a408e8a57e5948477c5b7438a757e25bb92985ed02562ab271aade90d605a24f3ae78410b638fbbd8 - languageName: node - linkType: hard - "wordwrap@npm:^1.0.0": version: 1.0.0 resolution: "wordwrap@npm:1.0.0" @@ -43133,7 +42941,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7, ws@npm:^7.0.0, ws@npm:^7.2.0, ws@npm:^7.3.1, ws@npm:^7.4.5, ws@npm:^7.5.10, ws@npm:^7.5.3": +"ws@npm:^7, ws@npm:^7.0.0, ws@npm:^7.2.0, ws@npm:^7.3.1, ws@npm:^7.5.10, ws@npm:^7.5.3": version: 7.5.10 resolution: "ws@npm:7.5.10" peerDependencies: @@ -43334,7 +43142,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.0.0": +"yaml@npm:^2.0.0, yaml@npm:^2.2.1, yaml@npm:^2.2.2, yaml@npm:^2.3.4": version: 2.6.0 resolution: "yaml@npm:2.6.0" bin: @@ -43343,15 +43151,6 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.2.1, yaml@npm:^2.2.2, yaml@npm:^2.3.4": - version: 2.4.1 - resolution: "yaml@npm:2.4.1" - bin: - yaml: bin.mjs - checksum: 10/2c54fd69ef59126758ae710f9756405a7d41abcbb61aca894250d0e81e76057c14dc9bb00a9528f72f99b8f24077f694a6f7fd09cdd6711fcec2eebfbb5df409 - languageName: node - linkType: hard - "yargs-parser@npm:21.1.1, yargs-parser@npm:^21.0.0, yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" From db6e8e9bd755ec6e5eea1492b0304f6dc0a34eed Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Mon, 4 Nov 2024 13:47:56 +0100 Subject: [PATCH 09/29] chore: add no-prototype-builtins ESLint rule as it became part of recommended in ESLint9 --- .../wallet/WalletLayout/AccountsMenu/AccountsList.tsx | 2 +- suite-common/suite-utils/src/comparison.ts | 7 ++++++- suite-common/wallet-config/src/utils.ts | 5 +++-- suite-common/wallet-utils/src/fiatRatesUtils.ts | 9 ++++++--- .../src/hooks/useConnectParseParams.ts | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsList.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsList.tsx index d17219371d4..243418e64a9 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsList.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsList.tsx @@ -47,7 +47,7 @@ export const AccountsList = ({ onItemClick }: AccountListProps) => { searchString || coinFilter ? list.filter(account => { const { key, accountType, symbol, index } = account; - const accountLabel = accountLabels.hasOwnProperty(key) + const accountLabel = Object.prototype.hasOwnProperty.call(accountLabels, key) ? accountLabels[key] : getDefaultAccountLabel({ accountType, symbol, index }); diff --git a/suite-common/suite-utils/src/comparison.ts b/suite-common/suite-utils/src/comparison.ts index 20988838976..3ea99737963 100644 --- a/suite-common/suite-utils/src/comparison.ts +++ b/suite-common/suite-utils/src/comparison.ts @@ -30,7 +30,12 @@ export const isChanged = (prev?: any, current?: any, filter?: { [k: string]: str for (let i = 0; i < currentKeys.length; i++) { const key = currentKeys[i]; - if (filter && filter.hasOwnProperty(key) && prev[key] && current[key]) { + if ( + filter && + Object.prototype.hasOwnProperty.call(filter, key) && + prev[key] && + current[key] + ) { const prevFiltered = {}; const currentFiltered = {}; for (let i2 = 0; i2 < filter[key].length; i2++) { diff --git a/suite-common/wallet-config/src/utils.ts b/suite-common/wallet-config/src/utils.ts index be539d65a5b..c7e52476dd6 100644 --- a/suite-common/wallet-config/src/utils.ts +++ b/suite-common/wallet-config/src/utils.ts @@ -51,7 +51,7 @@ export const getNetworkFeatures = (symbol: NetworkSymbol): NetworkFeature[] => export const getCoingeckoId = (symbol: NetworkSymbol) => networks[symbol].coingeckoId; export const isNetworkSymbol = (symbol: NetworkSymbol | string): symbol is NetworkSymbol => - networks.hasOwnProperty(symbol); + Object.prototype.hasOwnProperty.call(networks, symbol); /** * Get network object by symbol as a generic `Network` type. @@ -67,7 +67,8 @@ export const isAccountOfNetwork = ( network: Network, accountType: string, ): accountType is AccountType => - network.accountTypes.hasOwnProperty(accountType) || accountType === 'normal'; + Object.prototype.hasOwnProperty.call(network.accountTypes, accountType) || + accountType === 'normal'; export const getNetworkByCoingeckoId = (coingeckoId: string) => networksCollection.find(n => n.coingeckoId === coingeckoId); diff --git a/suite-common/wallet-utils/src/fiatRatesUtils.ts b/suite-common/wallet-utils/src/fiatRatesUtils.ts index 8f444ed856d..aca7575fff4 100644 --- a/suite-common/wallet-utils/src/fiatRatesUtils.ts +++ b/suite-common/wallet-utils/src/fiatRatesUtils.ts @@ -47,14 +47,17 @@ const combineFiatRates = (fiatRates: RatesByTimestamps, accountRates: RatesByTim for (const fiatRate in accountRates) { const fiatRateKey = fiatRate as FiatRateKey; - if (accountRates.hasOwnProperty(fiatRateKey)) { + if (Object.prototype.hasOwnProperty.call(accountRates, fiatRateKey)) { if (!fiatRates[fiatRateKey]) { fiatRates[fiatRateKey] = accountRates[fiatRateKey]; } else { for (const timestampRate in accountRates[fiatRateKey]) { const timestamp = timestampRate as unknown as Timestamp; if ( - accountRates[fiatRateKey].hasOwnProperty(timestamp) && + Object.prototype.hasOwnProperty.call( + accountRates[fiatRateKey], + timestamp, + ) && !fiatRates[fiatRateKey][timestamp] ) { fiatRates[fiatRateKey][timestamp] = accountRates[fiatRateKey][timestamp]; @@ -70,7 +73,7 @@ export const buildHistoricRatesFromStorage = (storageHistoricRates: RatesByTimes storageHistoricRates.forEach(fiatRates => { for (const fiatRate in fiatRates) { - if (fiatRates.hasOwnProperty(fiatRate)) { + if (Object.prototype.hasOwnProperty.call(fiatRates, fiatRate)) { const fiatRateKey = fiatRate as FiatRateKey; if (!historicFiatRates[fiatRateKey]) { diff --git a/suite-native/module-connect-popup/src/hooks/useConnectParseParams.ts b/suite-native/module-connect-popup/src/hooks/useConnectParseParams.ts index 62a6e1d6afd..7a67d23f125 100644 --- a/suite-native/module-connect-popup/src/hooks/useConnectParseParams.ts +++ b/suite-native/module-connect-popup/src/hooks/useConnectParseParams.ts @@ -31,7 +31,7 @@ export const useConnectParseParams = (url: ParsedURL): UseConnectParseParamsType typeof queryParams?.params !== 'string' || typeof queryParams?.method !== 'string' || typeof queryParams?.callback !== 'string' || - !TrezorConnect.hasOwnProperty(queryParams?.method) + !Object.prototype.hasOwnProperty.call(TrezorConnect, queryParams?.method) ) { return { parseParamsError: TypedError('Method_InvalidParameter') }; } From 31a6e8e01561010c58dea22fb115860ea8f56279 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Mon, 4 Nov 2024 16:24:25 +0100 Subject: [PATCH 10/29] chore: progress --- packages/eslint/src/eslint.config.mjs | 42 --------------------------- packages/eslint/src/importConfig.mjs | 2 +- packages/eslint/src/jestConfig.mjs | 1 - packages/suite/package.json | 2 +- packages/transport/eslint.config.mjs | 1 + packages/utils/eslint.config.mjs | 4 +-- packages/utxo-lib/eslint.config.mjs | 1 + packages/utxo-lib/src/networks.ts | 1 + 8 files changed, 7 insertions(+), 47 deletions(-) diff --git a/packages/eslint/src/eslint.config.mjs b/packages/eslint/src/eslint.config.mjs index 019098f1fc2..65041549b81 100644 --- a/packages/eslint/src/eslint.config.mjs +++ b/packages/eslint/src/eslint.config.mjs @@ -47,48 +47,6 @@ export default [ ...jestConfig, ...localRulesConfig, - // Todo: Resolve this legacy! - { - // we are using explicit blacklist because this will enforce new rules in newly created packages - files: [ - 'packages/analytics/**/*', - 'packages/blockchain-link/**/*', - 'packages/components/**/*', - 'packages/product-components/**/*', - 'packages/connect/**/*', - 'packages/connect-common/**/*', - 'packages/connect-explorer/**/*', - 'packages/connect-web/**/*', - 'packages/connect-popup/**/*', - 'packages/connect-iframe/**/*', - 'packages/connect-examples/**/*', - 'packages/connect-plugin-ethereum/**/*', - 'packages/connect-plugin-stellar/**/*', - 'packages/request-manager/**/*', - 'packages/suite/**/*', - 'packages/suite-build/**/*', - 'packages/suite-data/**/*', - 'packages/suite-desktop-api/**/*', - 'packages/suite-storage/**/*', - 'packages/suite-web/**/*', - 'packages/transport/**/*', - 'packages/utxo-lib/**/*', - 'scripts/**/*', - 'docs/**/*', - ], - rules: { - '@typescript-eslint/no-shadow': 'off', - 'import/no-default-export': 'off', - 'import/order': 'off', - '@typescript-eslint/no-unused-vars': 'off', - 'no-console': 'off', - 'react/jsx-no-undef': 'off', - 'no-catch-shadow': 'off', - '@typescript-eslint/no-restricted-imports': 'off', - 'no-restricted-syntax': 'off', - }, - }, - // Tests { files: ['**/__fixtures__/**/*'], diff --git a/packages/eslint/src/importConfig.mjs b/packages/eslint/src/importConfig.mjs index dc8bbed1b02..138fdf7f4bf 100644 --- a/packages/eslint/src/importConfig.mjs +++ b/packages/eslint/src/importConfig.mjs @@ -19,7 +19,7 @@ export const importConfig = [ }, rules: { // Additional - 'import/no-default-export': 'error', + 'import/no-default-export': 'error', // We don't want to use default exports, always use named exports 'import/no-anonymous-default-export': [ 'error', { diff --git a/packages/eslint/src/jestConfig.mjs b/packages/eslint/src/jestConfig.mjs index 6ad5a3abadf..27579f01fed 100644 --- a/packages/eslint/src/jestConfig.mjs +++ b/packages/eslint/src/jestConfig.mjs @@ -7,7 +7,6 @@ export const jestConfig = [ // Additions // Enforce arrow functions only is afaik not possible. But this helps. 'func-style': ['error', 'declaration', { allowArrowFunctions: true }], - 'no-console': ['error', { allow: ['warn', 'error'] }], // Offs 'jest/valid-title': 'off', // This rule does not use Typescript and produces false positives diff --git a/packages/suite/package.json b/packages/suite/package.json index 87d57c7b3ff..5f42b90e576 100644 --- a/packages/suite/package.json +++ b/packages/suite/package.json @@ -68,7 +68,6 @@ "@trezor/device-utils": "workspace:*", "@trezor/dom-utils": "workspace:*", "@trezor/env-utils": "workspace:*", - "@trezor/eslint": "workspace:*", "@trezor/ipc-proxy": "workspace:*", "@trezor/product-components": "workspace:*", "@trezor/react-utils": "workspace:*", @@ -124,6 +123,7 @@ "@formatjs/cli": "^6.2.7", "@testing-library/react": "14.2.1", "@testing-library/user-event": "14.5.2", + "@trezor/eslint": "workspace:*", "@types/file-saver": "^2.0.6", "@types/invity-api": "^1.1.1", "@types/jws": "^3.2.10", diff --git a/packages/transport/eslint.config.mjs b/packages/transport/eslint.config.mjs index 723658343d1..4298837f58b 100644 --- a/packages/transport/eslint.config.mjs +++ b/packages/transport/eslint.config.mjs @@ -6,6 +6,7 @@ export default [ rules: { 'no-console': 'off', '@typescript-eslint/no-unused-vars': 'off', + 'import/order': 'off', // Todo: we shall enable this in future PR }, }, ]; diff --git a/packages/utils/eslint.config.mjs b/packages/utils/eslint.config.mjs index 503cbe7f636..a9df06046e8 100644 --- a/packages/utils/eslint.config.mjs +++ b/packages/utils/eslint.config.mjs @@ -5,11 +5,11 @@ export default [ { rules: { 'no-console': 'warn', - 'import/no-default-export': 'error', - 'import/no-extraneous-dependencies': [ 'error', { + // Globally we have a list of whitelisted devDependencies. But this is the library + // published in npm, so we don't want to allow ANY devDependencies. devDependencies: true, }, ], diff --git a/packages/utxo-lib/eslint.config.mjs b/packages/utxo-lib/eslint.config.mjs index 4979e7c8960..7e85c09a1ee 100644 --- a/packages/utxo-lib/eslint.config.mjs +++ b/packages/utxo-lib/eslint.config.mjs @@ -8,6 +8,7 @@ export default [ 'prefer-object-spread': 'off', // prefer Object.assign 'no-underscore-dangle': 'off', // underscore is used 'no-console': 'warn', + 'import/order': 'off', '@typescript-eslint/no-unused-vars': 'off', }, }, diff --git a/packages/utxo-lib/src/networks.ts b/packages/utxo-lib/src/networks.ts index 91ceac2c89d..36f2be62dcc 100644 --- a/packages/utxo-lib/src/networks.ts +++ b/packages/utxo-lib/src/networks.ts @@ -278,6 +278,7 @@ export function isNetworkType(type: NetworkTypes, network?: Network) { }, network, ); + return false; } catch (e) { /* empty */ From d4d3fc5da79fa048e1e987bfe1d712642ac0c79c Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Mon, 4 Nov 2024 17:54:57 +0100 Subject: [PATCH 11/29] fix: duplicate key --- packages/transport/jest.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/transport/jest.config.js b/packages/transport/jest.config.js index 5f5990b86a0..061f21335fe 100644 --- a/packages/transport/jest.config.js +++ b/packages/transport/jest.config.js @@ -2,7 +2,6 @@ const { ...baseConfig } = require('../../jest.config.base'); module.exports = { ...baseConfig, - testEnvironment: 'node', collectCoverage: true, collectCoverageFrom: ['src/**/*.ts'], watchPathIgnorePatterns: ['/libDev', '/lib'], From 0533c6ccf1dcdcc536a3471ed72d99bc08733949 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Tue, 5 Nov 2024 11:14:45 +0100 Subject: [PATCH 12/29] fix: missing devDependency --- yarn.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/yarn.lock b/yarn.lock index 906c0ab6e62..7ec1e685fc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12189,6 +12189,7 @@ __metadata: "@jest/types": "npm:^29.6.3" "@trezor/protobuf": "workspace:*" "@trezor/eslint": "workspace:*" + "@trezor/protobuf": "workspace:*" "@trezor/transport": "workspace:*" "@trezor/transport-bridge": "workspace:*" "@trezor/trezor-user-env-link": "workspace:^" From 001954415c611526e9525aae2e1074d0dad4ef74 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Tue, 5 Nov 2024 11:25:24 +0100 Subject: [PATCH 13/29] chore: more ESLint fixies --- packages/suite/eslint.config.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/suite/eslint.config.mjs b/packages/suite/eslint.config.mjs index 589e60b3319..25fa43ba2f2 100644 --- a/packages/suite/eslint.config.mjs +++ b/packages/suite/eslint.config.mjs @@ -10,6 +10,8 @@ export default [ allow: ['FormattedNumber'], }, ], + 'no-restricted-syntax': 'off', // Todo: this should be fixed in codebase and this line removed + 'import/order': 'off', // Todo: fix and solve }, }, ]; From c8aa11951b0d7fbb80d09971864d5cc7e1bfbdff Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Tue, 5 Nov 2024 11:43:29 +0100 Subject: [PATCH 14/29] chore: get rid of '@typescript-eslint/no-unused-vars': 'off', and enforce it everywhere --- packages/blockchain-link/src/index.ts | 2 +- .../blockchain-link/src/workers/baseWebsocket.ts | 7 ++++--- .../blockchain-link/src/workers/electrum/devrun.ts | 1 + .../blockchain-link/src/workers/ripple/index.ts | 2 +- .../src/workers/solana/transactionConfirmation.ts | 2 +- .../blockchain-link/tests/unit/workers.test.ts | 1 + .../src/components/animations/LottieAnimation.tsx | 2 +- .../connect-common/src/messageChannel/abstract.ts | 6 ++++-- packages/connect-common/src/storage.ts | 4 ++-- .../src/actions/trezorConnectActions.ts | 2 +- packages/connect-explorer/src/pages/index.mdx | 8 +------- packages/connect-iframe/src/index.ts | 2 +- .../connect-popup/e2e/tests/passphrase.test.ts | 2 +- .../connect-popup/e2e/tests/popup-close.test.ts | 2 +- packages/connect-popup/e2e/tests/unchained.test.ts | 2 +- packages/connect-popup/src/index.tsx | 2 +- packages/connect-popup/src/log.tsx | 2 +- packages/connect-popup/src/view/common.tsx | 4 ++-- packages/connect-web/src/iframe/index.ts | 4 ++-- packages/connect-web/src/impl/core-in-iframe.ts | 2 +- .../src/webextension/extensionPermissions.ts | 2 +- packages/connect-web/src/webusb/index.ts | 2 +- packages/connect/e2e/__wscache__/server.js | 2 +- packages/connect/e2e/utils.ts | 1 + packages/connect/src/api/bitcoin/Fees.ts | 4 ++-- packages/connect/src/api/common/paramsValidator.ts | 2 +- packages/connect/src/api/firmware/getBinary.ts | 2 +- packages/connect/src/core/index.ts | 2 +- packages/connect/src/device/Device.ts | 4 ++-- packages/connect/src/device/DeviceCommands.ts | 4 ++-- packages/connect/src/utils/addressUtils.ts | 4 ++-- packages/request-manager/src/torControlPort.ts | 4 ++-- packages/suite-data/src/guide/parser.ts | 2 +- .../suite-data/src/translations/list-unused.ts | 3 ++- packages/suite-web/e2e/stubs/metadata.ts | 2 +- packages/suite/src/actions/suite/modalActions.ts | 2 +- .../src/actions/wallet/cardanoStakingActions.ts | 2 +- .../src/actions/wallet/coinjoinAccountActions.ts | 1 + packages/suite/src/hooks/suite/useLocales.ts | 2 +- packages/suite/src/services/google.ts | 2 +- .../src/services/suite/metadata/DropboxProvider.ts | 3 ++- .../src/services/suite/metadata/GoogleProvider.ts | 3 ++- packages/suite/src/support/tests/hooksHelper.tsx | 2 +- packages/suite/src/utils/suite/parseUri.ts | 4 ++-- packages/suite/src/utils/suite/passwords.ts | 2 +- .../src/utils/wallet/coinmarket/coinmarketUtils.ts | 2 +- .../TransactionListActions.tsx | 2 +- packages/transport/src/api/udp.ts | 2 +- packages/transport/src/utils/bridgeApiCall.ts | 2 +- packages/transport/src/utils/bridgeApiResult.ts | 4 ++-- packages/utxo-lib/src/address.ts | 14 +++++++------- packages/utxo-lib/src/bufferutils.ts | 2 +- .../utxo-lib/src/coinselect/coinselectUtils.ts | 2 +- packages/utxo-lib/src/crypto.ts | 2 +- 54 files changed, 79 insertions(+), 75 deletions(-) diff --git a/packages/blockchain-link/src/index.ts b/packages/blockchain-link/src/index.ts index 038a1c8cab2..3ba26ef9942 100644 --- a/packages/blockchain-link/src/index.ts +++ b/packages/blockchain-link/src/index.ts @@ -50,7 +50,7 @@ const initWorker = async (settings: BlockchainSettings) => { worker.onerror = null; try { worker.terminate(); - } catch (error) { + } catch { // empty } diff --git a/packages/blockchain-link/src/workers/baseWebsocket.ts b/packages/blockchain-link/src/workers/baseWebsocket.ts index 1d999d20b78..094c9df6b38 100644 --- a/packages/blockchain-link/src/workers/baseWebsocket.ts +++ b/packages/blockchain-link/src/workers/baseWebsocket.ts @@ -42,6 +42,7 @@ export abstract class BaseWebsocket extends TypedEmitter; protected abstract ping(): Promise; + protected abstract createWebsocket(): WebSocket; constructor(options: Options) { @@ -79,7 +80,7 @@ export abstract class BaseWebsocket extends TypedEmitter extends TypedEmitter extends TypedEmitter {}); // hack; ws throws uncaughtably when there's no error listener ws.close(); - } catch (error) { + } catch { // empty } }, diff --git a/packages/blockchain-link/src/workers/electrum/devrun.ts b/packages/blockchain-link/src/workers/electrum/devrun.ts index ea387e3cd71..bca61a08917 100644 --- a/packages/blockchain-link/src/workers/electrum/devrun.ts +++ b/packages/blockchain-link/src/workers/electrum/devrun.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ // @ts-nocheck /// diff --git a/packages/blockchain-link/src/workers/ripple/index.ts b/packages/blockchain-link/src/workers/ripple/index.ts index 5ee200360e9..6ac75a59965 100644 --- a/packages/blockchain-link/src/workers/ripple/index.ts +++ b/packages/blockchain-link/src/workers/ripple/index.ts @@ -139,7 +139,7 @@ const getAccountInfo = async (request: Request) => account.availableBalance = new BigNumber(mempoolInfo.xrpBalance).minus(reserve).toString(); account.misc.sequence = mempoolInfo.sequence; account.history.unconfirmed = mempoolInfo.txs; - } catch (error) { + } catch { // do not throw error for mempool (ledger_index: "current") // mainnet sometimes return "error": "noNetwork", "error_message": "InsufficientNetworkMode", // TODO: investigate diff --git a/packages/blockchain-link/src/workers/solana/transactionConfirmation.ts b/packages/blockchain-link/src/workers/solana/transactionConfirmation.ts index d475248a87c..693136b658e 100644 --- a/packages/blockchain-link/src/workers/solana/transactionConfirmation.ts +++ b/packages/blockchain-link/src/workers/solana/transactionConfirmation.ts @@ -12,7 +12,7 @@ const tryConfirmBySignatureStatus = async ( const getCurrentBlockHeight = async () => { try { return await api.getBlockHeight('finalized'); - } catch (_) { + } catch { return -1; } }; diff --git a/packages/blockchain-link/tests/unit/workers.test.ts b/packages/blockchain-link/tests/unit/workers.test.ts index 34cebbcb12e..cbdd8542481 100644 --- a/packages/blockchain-link/tests/unit/workers.test.ts +++ b/packages/blockchain-link/tests/unit/workers.test.ts @@ -166,6 +166,7 @@ describe('Worker', () => { return new TinyWorker(() => { self.onmessage = () => { // @ts-expect-error undefined "x" + // eslint-disable-next-line @typescript-eslint/no-unused-vars const r = 1 / x; }; diff --git a/packages/components/src/components/animations/LottieAnimation.tsx b/packages/components/src/components/animations/LottieAnimation.tsx index c8515b240a9..ff54c5576b0 100644 --- a/packages/components/src/components/animations/LottieAnimation.tsx +++ b/packages/components/src/components/animations/LottieAnimation.tsx @@ -46,7 +46,7 @@ export const LottieAnimation = ({ ).json(); setLottieAnimationData(animation); - } catch (error) { + } catch { // do not need to handle error } }; diff --git a/packages/connect-common/src/messageChannel/abstract.ts b/packages/connect-common/src/messageChannel/abstract.ts index a0929d80fbf..37d3161ff77 100644 --- a/packages/connect-common/src/messageChannel/abstract.ts +++ b/packages/connect-common/src/messageChannel/abstract.ts @@ -48,7 +48,9 @@ export abstract class AbstractMessageChannel< protected messageID = 0; public isConnected = false; + abstract connect(): void; + abstract disconnect(): void; private readonly handshakeMaxRetries = 5; @@ -219,7 +221,7 @@ export abstract class AbstractMessageChannel< if (!usePromise) { try { this.sendFn(message); - } catch (err) { + } catch { if (useQueue) { this.messagesQueue.push(message); } @@ -234,7 +236,7 @@ export abstract class AbstractMessageChannel< try { this.sendFn(message); - } catch (err) { + } catch { if (useQueue) { this.messagesQueue.push(message); } diff --git a/packages/connect-common/src/storage.ts b/packages/connect-common/src/storage.ts index 0adae8bf825..471405e3926 100644 --- a/packages/connect-common/src/storage.ts +++ b/packages/connect-common/src/storage.ts @@ -73,7 +73,7 @@ class Storage extends TypedEmitter { const newState = getNewState(getPermanentStorage()); localStorage.setItem(storageName, JSON.stringify(newState)); this.emit('changed', newState); - } catch (err) { + } catch { // memory storage is fallback of the last resort console.warn('long term storage not available'); memoryStorage = getNewState(memoryStorage); @@ -104,7 +104,7 @@ class Storage extends TypedEmitter { try { return getPermanentStorage(); - } catch (err) { + } catch { // memory storage is fallback of the last resort console.warn('long term storage not available'); diff --git a/packages/connect-explorer/src/actions/trezorConnectActions.ts b/packages/connect-explorer/src/actions/trezorConnectActions.ts index 0bda38d062c..c75774bca87 100644 --- a/packages/connect-explorer/src/actions/trezorConnectActions.ts +++ b/packages/connect-explorer/src/actions/trezorConnectActions.ts @@ -124,7 +124,7 @@ export const init = try { // Verify if valid by loading core.js, if this file exists we can assume the connectSrc is valid await testLoadingScript(options.connectSrc + 'js/core.js'); - } catch (err) { + } catch { dispatch({ type: ACTIONS.ON_INIT_ERROR, payload: `Invalid connectSrc: ${options.connectSrc}`, diff --git a/packages/connect-explorer/src/pages/index.mdx b/packages/connect-explorer/src/pages/index.mdx index fc3c48f34a2..3d93a2bb29e 100644 --- a/packages/connect-explorer/src/pages/index.mdx +++ b/packages/connect-explorer/src/pages/index.mdx @@ -8,13 +8,7 @@ import styled from 'styled-components'; import Link from 'next/link'; import { spacings, spacingsPx } from '@trezor/theme'; -import { - Button, - Card as TrezorCard, - CollapsibleBox, - variables, - Paragraph, -} from '@trezor/components'; +import { Button, Card as TrezorCard, CollapsibleBox, variables } from '@trezor/components'; import IconNode from '../components/icons/IconNode'; import IconWeb from '../components/icons/IconWeb'; diff --git a/packages/connect-iframe/src/index.ts b/packages/connect-iframe/src/index.ts index 74f95a7da9f..75647f8eba3 100644 --- a/packages/connect-iframe/src/index.ts +++ b/packages/connect-iframe/src/index.ts @@ -314,7 +314,7 @@ const init = async (payload: IFrameInit['payload'], origin: string) => { // throws DOMException: The operation is insecure. _popupMessagePort = new BroadcastChannel(broadcastID); _popupMessagePort.onmessage = message => handleMessage(message); - } catch (error) { + } catch { // popup will use MessageChannel fallback communication } } diff --git a/packages/connect-popup/e2e/tests/passphrase.test.ts b/packages/connect-popup/e2e/tests/passphrase.test.ts index 252eec90ca8..645d7d8637f 100644 --- a/packages/connect-popup/e2e/tests/passphrase.test.ts +++ b/packages/connect-popup/e2e/tests/passphrase.test.ts @@ -372,7 +372,7 @@ test('passphrase mismatch', async ({ page }) => { timeout: 10000, }); await popup.click('.explain.unacquired'); - } catch (error) { + } catch { // May appear or not } diff --git a/packages/connect-popup/e2e/tests/popup-close.test.ts b/packages/connect-popup/e2e/tests/popup-close.test.ts index cb2a28c2c9e..f116f540d11 100644 --- a/packages/connect-popup/e2e/tests/popup-close.test.ts +++ b/packages/connect-popup/e2e/tests/popup-close.test.ts @@ -186,7 +186,7 @@ test(`device disconnected during device interaction`, async ({ page, context }) try { log('waiting to click @connect-ui/error-close-button'); await popup.click("button[data-testid='@connect-ui/error-close-button']"); - } catch (error) { + } catch { // Sometimes this crashes with error that the page is already closed. } diff --git a/packages/connect-popup/e2e/tests/unchained.test.ts b/packages/connect-popup/e2e/tests/unchained.test.ts index 17c3a975a81..068a29d9a44 100644 --- a/packages/connect-popup/e2e/tests/unchained.test.ts +++ b/packages/connect-popup/e2e/tests/unchained.test.ts @@ -102,7 +102,7 @@ const signTransaction = async (page: Page, iteration: number) => { }); await TrezorUserEnvLink.send({ type: 'emulator-press-yes' }); await popup.waitForTimeout(501); - } catch (err) { + } catch { confirmOnTrezorScreenStilVisible = false; } } diff --git a/packages/connect-popup/src/index.tsx b/packages/connect-popup/src/index.tsx index 0374ffd798c..026c976504f 100644 --- a/packages/connect-popup/src/index.tsx +++ b/packages/connect-popup/src/index.tsx @@ -58,7 +58,7 @@ const escapeHtml = (payload: any) => { div.appendChild(document.createTextNode(JSON.stringify(payload))); return JSON.parse(div.innerHTML); - } catch (error) { + } catch { // do nothing } }; diff --git a/packages/connect-popup/src/log.tsx b/packages/connect-popup/src/log.tsx index 12c7b1dd9cb..601fdb993c4 100644 --- a/packages/connect-popup/src/log.tsx +++ b/packages/connect-popup/src/log.tsx @@ -102,7 +102,7 @@ const useLogWorker = (setLogs: React.Dispatch>) => { try { logWorker = new SharedWorker('./workers/shared-logger-worker.js'); - } catch (error) { + } catch { console.warn('Failed to initialize SharedWorker'); } diff --git a/packages/connect-popup/src/view/common.tsx b/packages/connect-popup/src/view/common.tsx index 29f3b98b480..9310a129b36 100644 --- a/packages/connect-popup/src/view/common.tsx +++ b/packages/connect-popup/src/view/common.tsx @@ -78,7 +78,7 @@ export const getIframeElement = () => { if (frames[i].location.host === window.location.host) { iframe = frames[i]; } - } catch (error) { + } catch { // do nothing, try next entry } } @@ -146,7 +146,7 @@ export const initMessageChannelWithIframe = async ( // otherwise close BroadcastChannel and try to use MessageChannel fallback broadcast.close(); broadcast.removeEventListener('message', handler); - } catch (error) { + } catch { // silent error. use MessageChannel as fallback communication } } diff --git a/packages/connect-web/src/iframe/index.ts b/packages/connect-web/src/iframe/index.ts index ffa538eccf1..bb620bdcea9 100644 --- a/packages/connect-web/src/iframe/index.ts +++ b/packages/connect-web/src/iframe/index.ts @@ -18,7 +18,7 @@ export const dispose = () => { if (instance && instance.parentNode) { try { instance.parentNode.removeChild(instance); - } catch (e) { + } catch { // do nothing } } @@ -108,7 +108,7 @@ export const init = async (settings: ConnectSettings) => { return; } - } catch (e) { + } catch { // empty } diff --git a/packages/connect-web/src/impl/core-in-iframe.ts b/packages/connect-web/src/impl/core-in-iframe.ts index 1757a90fce8..99e91b488d4 100644 --- a/packages/connect-web/src/impl/core-in-iframe.ts +++ b/packages/connect-web/src/impl/core-in-iframe.ts @@ -348,7 +348,7 @@ export class CoreInIframe implements ConnectFactoryDependencies { await usb.requestDevice({ filters: config.webusb }); sendMessage(WEBEXTENSION.USB_PERMISSIONS_CLOSE, '*'); broadcastPermissionFinished(); - } catch (error) { + } catch { // empty } } diff --git a/packages/connect-web/src/webusb/index.ts b/packages/connect-web/src/webusb/index.ts index 4a53f8f6fbe..bb43f1ee252 100644 --- a/packages/connect-web/src/webusb/index.ts +++ b/packages/connect-web/src/webusb/index.ts @@ -16,7 +16,7 @@ const onload = () => { if (usb) { try { await usb.requestDevice({ filters: config.webusb }); - } catch (error) { + } catch { // empty } } diff --git a/packages/connect/e2e/__wscache__/server.js b/packages/connect/e2e/__wscache__/server.js index 00a5b23518a..f02878e8b0c 100644 --- a/packages/connect/e2e/__wscache__/server.js +++ b/packages/connect/e2e/__wscache__/server.js @@ -36,7 +36,7 @@ const createServer = () => { try { const data = fn(params, request); ws.send(JSON.stringify({ ...data, id: request.id })); - } catch (e) { + } catch { // empty } }; diff --git a/packages/connect/e2e/utils.ts b/packages/connect/e2e/utils.ts index f939c45603f..b943388cfe2 100644 --- a/packages/connect/e2e/utils.ts +++ b/packages/connect/e2e/utils.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars let Trezor: { getController: (testName?: string) => any; setup: (controller: any, options: any) => any; diff --git a/packages/connect/src/api/bitcoin/Fees.ts b/packages/connect/src/api/bitcoin/Fees.ts index 9c8b35fff64..67b14605a28 100644 --- a/packages/connect/src/api/bitcoin/Fees.ts +++ b/packages/connect/src/api/bitcoin/Fees.ts @@ -94,7 +94,7 @@ export class FeeLevels { Math.max(this.coinInfo.minFee, parseInt(response.feePerUnit, 10)), ).toString(), }; - } catch (error) { + } catch { // silent } @@ -146,7 +146,7 @@ export class FeeLevels { }); this.longTermFeeRate = findLowest(this.blocks); - } catch (error) { + } catch { // do not throw } diff --git a/packages/connect/src/api/common/paramsValidator.ts b/packages/connect/src/api/common/paramsValidator.ts index a749232a041..b23a0bc0882 100644 --- a/packages/connect/src/api/common/paramsValidator.ts +++ b/packages/connect/src/api/common/paramsValidator.ts @@ -42,7 +42,7 @@ export function validateParams

>(params: P, schema: validateParams(p, [{ name: field.name, type: t }]); return count + 1; - } catch (e) { + } catch { return count; } }, 0); diff --git a/packages/connect/src/api/firmware/getBinary.ts b/packages/connect/src/api/firmware/getBinary.ts index 55fbba3683b..50264a7eb43 100644 --- a/packages/connect/src/api/firmware/getBinary.ts +++ b/packages/connect/src/api/firmware/getBinary.ts @@ -17,7 +17,7 @@ export const getBinary = ({ baseUrl, btcOnly, release }: GetBinaryProps) => { export const getBinaryOptional = async (props: GetBinaryProps) => { try { return await getBinary(props); - } catch (error) { + } catch { return null; } }; diff --git a/packages/connect/src/core/index.ts b/packages/connect/src/core/index.ts index f3c49980aca..f7663eb63ea 100644 --- a/packages/connect/src/core/index.ts +++ b/packages/connect/src/core/index.ts @@ -709,7 +709,7 @@ const onCallDevice = async ( // (acquire > Initialize > nothing > release) try { await device.run(() => Promise.resolve(), { skipFinalReload: true }); - } catch (err) { + } catch { // ignore. on model T, this block of code is probably not needed at all. but I am keeping it here for // backwards compatibility } diff --git a/packages/connect/src/device/Device.ts b/packages/connect/src/device/Device.ts index b3cab76ca38..6fc81cf5fe6 100644 --- a/packages/connect/src/device/Device.ts +++ b/packages/connect/src/device/Device.ts @@ -798,7 +798,7 @@ export class Device extends TypedEmitter { return await this.getCommands().typedCall('GetFirmwareHash', 'FirmwareHash', { challenge, }); - } catch (e) { + } catch { return null; } }; @@ -1109,7 +1109,7 @@ export class Device extends TypedEmitter { path: this.transportPath, onClose: true, }); - } catch (err) { + } catch { // empty } } diff --git a/packages/connect/src/device/DeviceCommands.ts b/packages/connect/src/device/DeviceCommands.ts index 1a879d3b999..3cbce3a7840 100644 --- a/packages/connect/src/device/DeviceCommands.ts +++ b/packages/connect/src/device/DeviceCommands.ts @@ -45,7 +45,7 @@ const assertType = (res: DefaultPayloadMessage, resType: MessageKey | MessageKey const generateEntropy = (len: number) => { try { return randomBytes(len); - } catch (err) { + } catch { throw ERRORS.TypedError( 'Runtime', 'generateEntropy: Environment does not support crypto random', @@ -563,7 +563,7 @@ export class DeviceCommands { await createTimeoutPromise(1); await this.device.acquire(); await cancelPrompt(this.device, false); - } catch (err) { + } catch { // ignore whatever happens } } else { diff --git a/packages/connect/src/utils/addressUtils.ts b/packages/connect/src/utils/addressUtils.ts index 7355dc8a2f6..a92cef74860 100644 --- a/packages/connect/src/utils/addressUtils.ts +++ b/packages/connect/src/utils/addressUtils.ts @@ -10,7 +10,7 @@ const isValidBase58Address = (address: string, network: BitcoinNetworkInfo['netw if (decoded.version !== network.pubKeyHash && decoded.version !== network.scriptHash) { return false; } - } catch (e) { + } catch { return false; } @@ -24,7 +24,7 @@ const isValidBech32Address = (address: string, network: BitcoinNetworkInfo['netw if (decoded.prefix !== network.bech32) { return false; } - } catch (e) { + } catch { return false; } diff --git a/packages/request-manager/src/torControlPort.ts b/packages/request-manager/src/torControlPort.ts index 0803129aedb..b9f5b96492d 100644 --- a/packages/request-manager/src/torControlPort.ts +++ b/packages/request-manager/src/torControlPort.ts @@ -67,7 +67,7 @@ export class TorControlPort { let cookieString; try { cookieString = await getCookieString(this.options.torDataDir); - } catch (error) { + } catch { reject(new Error('TOR control port control_auth_cookie cannot be read')); } const serverNonce = authchallengeResponse[2]; @@ -117,7 +117,7 @@ export class TorControlPort { } try { return !!this.write('GETINFO'); - } catch (error) { + } catch { return false; } } diff --git a/packages/suite-data/src/guide/parser.ts b/packages/suite-data/src/guide/parser.ts index 3762ce66821..c84a7fdd9e0 100644 --- a/packages/suite-data/src/guide/parser.ts +++ b/packages/suite-data/src/guide/parser.ts @@ -74,7 +74,7 @@ export class Parser { .match(/^# (.+$)/m)![1]! .replace(/[\\]/g, '') .trim(); - } catch (e) { + } catch { throw new Error(`Could not parse title from ${path}.`); } } diff --git a/packages/suite-data/src/translations/list-unused.ts b/packages/suite-data/src/translations/list-unused.ts index 6488ea8df10..f3fb6f7e3d3 100644 --- a/packages/suite-data/src/translations/list-unused.ts +++ b/packages/suite-data/src/translations/list-unused.ts @@ -9,6 +9,7 @@ import messages from '@trezor/suite/src/support/messages'; console.log('unused messages: '); const rootDir = path.join(__dirname, '..', '..', '..', '..'); + function execLocal(cmd: string) { return execSync(cmd, { encoding: 'utf-8', @@ -60,7 +61,7 @@ for (const message in messages) { try { execLocal(cmd); - } catch (err) { + } catch { unused.push(message); } } diff --git a/packages/suite-web/e2e/stubs/metadata.ts b/packages/suite-web/e2e/stubs/metadata.ts index 35210ab18eb..4824b6d0e23 100644 --- a/packages/suite-web/e2e/stubs/metadata.ts +++ b/packages/suite-web/e2e/stubs/metadata.ts @@ -16,7 +16,7 @@ export const rerouteMetadataToMockProvider = ( let url; try { url = new URL(uri); - } catch (_err) { + } catch { // catching absolute next.js urls which throw in URL constructor return fetch(uri, options); } diff --git a/packages/suite/src/actions/suite/modalActions.ts b/packages/suite/src/actions/suite/modalActions.ts index 7087202f975..61c74cf77ed 100644 --- a/packages/suite/src/actions/suite/modalActions.ts +++ b/packages/suite/src/actions/suite/modalActions.ts @@ -84,7 +84,7 @@ export const openDeferredModal = }); try { return dfd.promise; - } catch (error) { + } catch { // do nothing, return void } }; diff --git a/packages/suite/src/actions/wallet/cardanoStakingActions.ts b/packages/suite/src/actions/wallet/cardanoStakingActions.ts index 9bfc6a64dc7..d756c09b301 100644 --- a/packages/suite/src/actions/wallet/cardanoStakingActions.ts +++ b/packages/suite/src/actions/wallet/cardanoStakingActions.ts @@ -130,7 +130,7 @@ export const fetchTrezorPools = (network: 'ADA' | 'tADA') => async (dispatch: Di trezorPools: responseJson as PoolsResponse, network: cardanoNetwork, }); - } catch (err) { + } catch { dispatch({ type: CARDANO_STAKING.SET_FETCH_ERROR, error: true, diff --git a/packages/suite/src/actions/wallet/coinjoinAccountActions.ts b/packages/suite/src/actions/wallet/coinjoinAccountActions.ts index cfd47ea4ef4..e1c9471e807 100644 --- a/packages/suite/src/actions/wallet/coinjoinAccountActions.ts +++ b/packages/suite/src/actions/wallet/coinjoinAccountActions.ts @@ -120,6 +120,7 @@ const coinjoinAccountAuthorizeFailed = (accountKey: string, error: string) => }, }) as const; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const coinjoinAccountUnregister = (accountKey: string) => ({ type: COINJOIN.ACCOUNT_UNREGISTER, diff --git a/packages/suite/src/hooks/suite/useLocales.ts b/packages/suite/src/hooks/suite/useLocales.ts index 087c46e35f8..0a1bc3c4b50 100644 --- a/packages/suite/src/hooks/suite/useLocales.ts +++ b/packages/suite/src/hooks/suite/useLocales.ts @@ -17,7 +17,7 @@ export const useLocales = () => { let dateLocale; try { dateLocale = await import(`date-fns/locale/${lang}/index`); - } catch (error) { + } catch { dateLocale = await import(`date-fns/locale/en-US/index`); console.warn( diff --git a/packages/suite/src/services/google.ts b/packages/suite/src/services/google.ts index 17cd9c1d4e1..93975f9dd7b 100644 --- a/packages/suite/src/services/google.ts +++ b/packages/suite/src/services/google.ts @@ -171,7 +171,7 @@ class Client { static async isAuthServerAvailable() { try { Client.authServerAvailable = (await fetch(`${Client.authServerUrl}/status`)).ok; - } catch (err) { + } catch { Client.authServerAvailable = false; } diff --git a/packages/suite/src/services/suite/metadata/DropboxProvider.ts b/packages/suite/src/services/suite/metadata/DropboxProvider.ts index f5b65ee92aa..faa9979bec8 100644 --- a/packages/suite/src/services/suite/metadata/DropboxProvider.ts +++ b/packages/suite/src/services/suite/metadata/DropboxProvider.ts @@ -48,7 +48,7 @@ class DropboxProvider extends AbstractMetadataProvider { await this.auth.refreshAccessToken(['']); return true; - } catch (err) { + } catch { return false; } } @@ -237,6 +237,7 @@ class DropboxProvider extends AbstractMetadataProvider { return this.handleProviderError(err); } } + /** * Specific implementation in every provider. Returns standardized error */ diff --git a/packages/suite/src/services/suite/metadata/GoogleProvider.ts b/packages/suite/src/services/suite/metadata/GoogleProvider.ts index cc676b7aa81..36749fbee71 100644 --- a/packages/suite/src/services/suite/metadata/GoogleProvider.ts +++ b/packages/suite/src/services/suite/metadata/GoogleProvider.ts @@ -4,6 +4,7 @@ import GoogleClient from 'src/services/google'; class GoogleProvider extends AbstractMetadataProvider { connected = false; isCloud = true; + constructor(tokens: Tokens, environment: OAuthServerEnvironment) { super('google'); GoogleClient.init(tokens, environment); @@ -179,7 +180,7 @@ class GoogleProvider extends AbstractMetadataProvider { const result = await GoogleClient.getAccessToken(); return !!result; - } catch (_err) { + } catch { return false; } } diff --git a/packages/suite/src/support/tests/hooksHelper.tsx b/packages/suite/src/support/tests/hooksHelper.tsx index f2ac9f9c86a..c4ce4cc3dc3 100644 --- a/packages/suite/src/support/tests/hooksHelper.tsx +++ b/packages/suite/src/support/tests/hooksHelper.tsx @@ -27,7 +27,7 @@ export const waitForLoader = (text = /Loading/i) => { if (loading) { return waitForElementToBeRemoved(() => screen.queryByText(text), { timeout: 5000 }); } - } catch (e) { + } catch { return true; } }; diff --git a/packages/suite/src/utils/suite/parseUri.ts b/packages/suite/src/utils/suite/parseUri.ts index bc2ab9846e5..eb832b7dd35 100644 --- a/packages/suite/src/utils/suite/parseUri.ts +++ b/packages/suite/src/utils/suite/parseUri.ts @@ -6,7 +6,7 @@ export const parseQuery = (uri: string) => { new URLSearchParams(uri.substring(index)).forEach((v, k) => { params[k] = v; }); - } catch (e) { + } catch { // empty } @@ -16,7 +16,7 @@ export const parseQuery = (uri: string) => { export const parseUri = (uri: string) => { try { return new URL(uri); - } catch (e) { + } catch { // empty } }; diff --git a/packages/suite/src/utils/suite/passwords.ts b/packages/suite/src/utils/suite/passwords.ts index f162e606886..f3b6d33f2a2 100644 --- a/packages/suite/src/utils/suite/passwords.ts +++ b/packages/suite/src/utils/suite/passwords.ts @@ -1,7 +1,7 @@ export const getDisplayKey = (title: string, username: string) => { try { return `Unlock ${new URL(title).host} for user ${username}?`; - } catch (err) { + } catch { return `Unlock ${title} for user ${username}?`; } }; diff --git a/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts b/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts index 5866a53618a..b4be989a50b 100644 --- a/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts +++ b/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts @@ -148,7 +148,7 @@ export const getCountryLabelParts = (label: string) => { const text = parts.join(' '); return { flag, text }; - } catch (err) { + } catch { return null; } }; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx index 083e20cf1f7..226049cd14a 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx @@ -57,7 +57,7 @@ export const TransactionListActions = ({ noLoading: true, }), ); - } catch (err) { + } catch { dispatch( notificationsActions.addToast({ type: 'error', diff --git a/packages/transport/src/api/udp.ts b/packages/transport/src/api/udp.ts index 9c086b12f1f..7ba4f4b0620 100644 --- a/packages/transport/src/api/udp.ts +++ b/packages/transport/src/api/udp.ts @@ -180,7 +180,7 @@ export class UdpApi extends AbstractApi { this.handleDevicesChange(enumerateResult); return this.success(enumerateResult); - } catch (e) { + } catch { this.handleDevicesChange([]); return this.error({ error: ERRORS.ABORTED_BY_SIGNAL }); diff --git a/packages/transport/src/utils/bridgeApiCall.ts b/packages/transport/src/utils/bridgeApiCall.ts index 7d09e46fd3f..5df05698f4d 100644 --- a/packages/transport/src/utils/bridgeApiCall.ts +++ b/packages/transport/src/utils/bridgeApiCall.ts @@ -39,7 +39,7 @@ function wrapBody(body: unknown) { function parseResult(text: string): Record | string { try { return JSON.parse(text); - } catch (e) { + } catch { return text; } } diff --git a/packages/transport/src/utils/bridgeApiResult.ts b/packages/transport/src/utils/bridgeApiResult.ts index 1d0fd0926ea..0833d3544a1 100644 --- a/packages/transport/src/utils/bridgeApiResult.ts +++ b/packages/transport/src/utils/bridgeApiResult.ts @@ -84,7 +84,7 @@ export function acquire(res: UnknownPayload) { export function call(res: UnknownPayload) { try { return success(validateProtocolMessage(res, true)); - } catch (e) { + } catch { return error({ error: ERRORS.WRONG_RESULT_TYPE }); } } @@ -92,7 +92,7 @@ export function call(res: UnknownPayload) { export function post(res: UnknownPayload) { try { return success(validateProtocolMessage(res, false)); - } catch (e) { + } catch { return error({ error: ERRORS.WRONG_RESULT_TYPE }); } } diff --git a/packages/utxo-lib/src/address.ts b/packages/utxo-lib/src/address.ts index b55f8fe6e06..d831712feea 100644 --- a/packages/utxo-lib/src/address.ts +++ b/packages/utxo-lib/src/address.ts @@ -28,7 +28,7 @@ export function fromBech32(address: string): Bech32Result { let version: number; try { result = bech32.decode(address); - } catch (e) { + } catch { // silent } @@ -82,32 +82,32 @@ function toFutureSegwitAddress(output: Buffer, network = BITCOIN_NETWORK) { export function fromOutputScript(output: Buffer, network = BITCOIN_NETWORK) { try { return payments.p2pkh({ output, network }).address as string; - } catch (e) { + } catch { // empty } try { return payments.p2sh({ output, network }).address as string; - } catch (e) { + } catch { // empty } try { return payments.p2wpkh({ output, network }).address as string; - } catch (e) { + } catch { // empty } try { return payments.p2wsh({ output, network }).address as string; - } catch (e) { + } catch { // empty } try { return payments.p2tr({ output, network }).address as string; - } catch (e) { + } catch { // empty } try { return toFutureSegwitAddress(output, network); - } catch (e) { + } catch { // empty } diff --git a/packages/utxo-lib/src/bufferutils.ts b/packages/utxo-lib/src/bufferutils.ts index 18f2c081da1..517704f01fa 100644 --- a/packages/utxo-lib/src/bufferutils.ts +++ b/packages/utxo-lib/src/bufferutils.ts @@ -36,7 +36,7 @@ export function readUInt64LEasString(buffer: Buffer, offset: number) { const result = readUInt64LE(buffer, offset); return result.toString(); - } catch (error) { + } catch { const aUint = buffer.readUInt32LE(offset); const bUint = buffer.readUInt32LE(offset + 4); const m = new BN(0x100000000); diff --git a/packages/utxo-lib/src/coinselect/coinselectUtils.ts b/packages/utxo-lib/src/coinselect/coinselectUtils.ts index 64feb7e5d62..057fd680d3a 100644 --- a/packages/utxo-lib/src/coinselect/coinselectUtils.ts +++ b/packages/utxo-lib/src/coinselect/coinselectUtils.ts @@ -143,7 +143,7 @@ export function bignumberOrNaN(v?: BN | string, forgiving = false) { try { return new BN(v); - } catch (error) { + } catch { return defaultValue; } } diff --git a/packages/utxo-lib/src/crypto.ts b/packages/utxo-lib/src/crypto.ts index 4e4e3881db3..d0ba734b6b8 100644 --- a/packages/utxo-lib/src/crypto.ts +++ b/packages/utxo-lib/src/crypto.ts @@ -9,7 +9,7 @@ import { createHash } from 'crypto'; export function ripemd160(buffer: Buffer): Buffer { try { return createHash('rmd160').update(buffer).digest(); - } catch (err) { + } catch { return createHash('ripemd160').update(buffer).digest(); } } From 70da0020ad38ab75e6439ed1290d3aa556100010 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Tue, 5 Nov 2024 12:09:27 +0100 Subject: [PATCH 15/29] fix: wip --- packages/eslint/src/eslint.config.mjs | 41 +++++++++++++++++++ packages/suite/eslint.config.mjs | 1 + .../SkeletonTransactionItem.tsx | 1 - 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/packages/eslint/src/eslint.config.mjs b/packages/eslint/src/eslint.config.mjs index 65041549b81..9b525dc2e19 100644 --- a/packages/eslint/src/eslint.config.mjs +++ b/packages/eslint/src/eslint.config.mjs @@ -63,4 +63,45 @@ export default [ 'import/no-extraneous-dependencies': 'off', }, }, + + // Todo: remove all below before merge! + { + // we are using explicit blacklist because this will enforce new rules in newly created packages + files: [ + '**/packages/analytics/**/*', + 'packages/blockchain-link/**/*', + 'packages/components/**/*', + 'packages/product-components/**/*', + 'packages/connect/**/*', + 'packages/connect-common/**/*', + 'packages/connect-explorer/**/*', + 'packages/connect-web/**/*', + 'packages/connect-popup/**/*', + 'packages/connect-iframe/**/*', + 'packages/connect-examples/**/*', + 'packages/connect-plugin-ethereum/**/*', + 'packages/connect-plugin-stellar/**/*', + 'packages/request-manager/**/*', + 'packages/suite/**/*', + 'packages/suite-build/**/*', + 'packages/suite-data/**/*', + 'packages/suite-desktop-api/**/*', + 'packages/suite-storage/**/*', + 'packages/suite-web/**/*', + 'packages/transport/**/*', + 'packages/utxo-lib/**/*', + 'scripts/**/*', + 'docs/**/*', + ], + rules: { + // '@typescript-eslint/no-shadow': 'off', + 'import/no-default-export': 'off', + 'import/order': 'off', + // 'no-console': 'off', + // 'react/jsx-no-undef': 'off', + // 'no-catch-shadow': 'off', + // '@typescript-eslint/no-restricted-imports': 'off', + // 'no-restricted-syntax': 'off', + }, + }, ]; diff --git a/packages/suite/eslint.config.mjs b/packages/suite/eslint.config.mjs index 25fa43ba2f2..719d36125f6 100644 --- a/packages/suite/eslint.config.mjs +++ b/packages/suite/eslint.config.mjs @@ -12,6 +12,7 @@ export default [ ], 'no-restricted-syntax': 'off', // Todo: this should be fixed in codebase and this line removed 'import/order': 'off', // Todo: fix and solve + 'import/no-default-export': 'off', // Todo: shall be solved one day, usually its legacy Components }, }, ]; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/SkeletonTransactionItem.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/SkeletonTransactionItem.tsx index 99235a80653..e0d4c4dd50a 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/SkeletonTransactionItem.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/SkeletonTransactionItem.tsx @@ -12,5 +12,4 @@ export const SkeletonTransactionItem = () => ( ); -// eslint-disable-next-line import/no-default-export export default SkeletonTransactionItem; From b1456af11e721e469676b8d6377dff8c39dea1fb Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Tue, 5 Nov 2024 13:13:09 +0100 Subject: [PATCH 16/29] fix: local-rules/no-override-ds-component were not riggered correcly due to incorrect configuration --- packages/eslint/src/localRulesConfig.mjs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/eslint/src/localRulesConfig.mjs b/packages/eslint/src/localRulesConfig.mjs index 54ed5cb5769..3eee2159afc 100644 --- a/packages/eslint/src/localRulesConfig.mjs +++ b/packages/eslint/src/localRulesConfig.mjs @@ -8,13 +8,8 @@ export const localRulesConfig = [ rules: { 'local-rules/no-override-ds-component': [ 'error', - { packageName: '@trezor/components' }, + { packageNames: ['@trezor/components', '@trezor/product-components'] }, ], - // Todo: figure out hot to re-enable this rule - // 'local-rules/no-override-ds-component': [ - // 'error', - // { packageName: '@trezor/product-components' }, - // ], }, }, ]; From 8a23a79464e00f9b888d049b21553c61e3c0c837 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Tue, 5 Nov 2024 16:27:32 +0100 Subject: [PATCH 17/29] chore: enable no-constant-binary-expression as it becames recommanded default in new ESLint --- packages/connect-popup/e2e/tests/methods.test.ts | 1 + packages/suite/src/components/wallet/Pagination.tsx | 2 +- .../suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx | 4 ++-- .../src/views/wallet/coinmarket/common/CoinmarketBalance.tsx | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/connect-popup/e2e/tests/methods.test.ts b/packages/connect-popup/e2e/tests/methods.test.ts index 9cddbd281d7..68b77f2a3be 100644 --- a/packages/connect-popup/e2e/tests/methods.test.ts +++ b/packages/connect-popup/e2e/tests/methods.test.ts @@ -62,6 +62,7 @@ filteredFixtures.forEach(f => { // - fixture require different device than prev fixture, or // - fixture is retried // FIXME: always reset for now, due to flaky tests with bridge bug + // eslint-disable-next-line no-constant-binary-expression if (true || JSON.stringify(device) !== JSON.stringify(f.device) || retry) { device = f.device; await TrezorUserEnvLink.stopBridge(); diff --git a/packages/suite/src/components/wallet/Pagination.tsx b/packages/suite/src/components/wallet/Pagination.tsx index 920bc952e40..06973f9ac73 100644 --- a/packages/suite/src/components/wallet/Pagination.tsx +++ b/packages/suite/src/components/wallet/Pagination.tsx @@ -99,7 +99,7 @@ export const Pagination = ({ onPageSelected(i)} $isActive={i === currentPage} > diff --git a/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx b/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx index fec3ea85774..ed9210cfcb6 100644 --- a/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx +++ b/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx @@ -77,8 +77,8 @@ export const PortfolioCard = memo(() => { } const isWalletEmpty = !discoveryStatus && isDeviceEmpty; - const isWalletLoading = discoveryStatus?.status === 'loading' ?? false; - const isWalletError = discoveryStatus?.status === 'exception' ?? false; + const isWalletLoading = discoveryStatus?.status === 'loading'; + const isWalletError = discoveryStatus?.status === 'exception'; const showGraphControls = !isWalletEmpty && !isWalletLoading && !isWalletError && !dashboardGraphHidden; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketBalance.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketBalance.tsx index e247d84f298..3b68d4635ee 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketBalance.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketBalance.tsx @@ -54,7 +54,7 @@ export const CoinmarketBalance = ({ }); if (showOnlyAmount) { - if (typeof balance === 'undefined' || isNaN(Number(balance))) return null; + if (balance === undefined || isNaN(Number(balance))) return null; return ( From fe888c137abf4e7e7337546a4367fc5a2307685b Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Tue, 5 Nov 2024 11:43:29 +0100 Subject: [PATCH 18/29] chore: get rid of '@typescript-eslint/no-unused-vars': 'off', and enforce it everywhere --- packages/utxo-lib/src/networks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utxo-lib/src/networks.ts b/packages/utxo-lib/src/networks.ts index 36f2be62dcc..8b4b442c912 100644 --- a/packages/utxo-lib/src/networks.ts +++ b/packages/utxo-lib/src/networks.ts @@ -280,7 +280,7 @@ export function isNetworkType(type: NetworkTypes, network?: Network) { ); return false; - } catch (e) { + } catch { /* empty */ } From 812fb2970057016b42149831b0f448088fd531cc Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 11:39:13 +0100 Subject: [PATCH 19/29] chore: wip --- packages/connect-explorer/eslint.config.mjs | 7 +++++++ packages/connect-popup/eslint.config.mjs | 10 ++++++++++ packages/connect-popup/package.json | 1 + packages/connect-web/eslint.config.mjs | 1 + packages/connect/eslint.config.mjs | 2 ++ packages/eslint/src/eslint.config.mjs | 4 ++-- packages/request-manager/eslint.config.mjs | 12 ++++++++++++ packages/suite-data/eslint.config.mjs | 15 +++++++++++++++ packages/suite-web/eslint.config.mjs | 12 ++++++++++++ packages/suite-web/package.json | 1 + packages/suite/eslint.config.mjs | 1 + yarn.lock | 1 + 12 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 packages/connect-popup/eslint.config.mjs create mode 100644 packages/request-manager/eslint.config.mjs create mode 100644 packages/suite-data/eslint.config.mjs create mode 100644 packages/suite-web/eslint.config.mjs diff --git a/packages/connect-explorer/eslint.config.mjs b/packages/connect-explorer/eslint.config.mjs index f1a19bc9c94..cf7306d7eef 100644 --- a/packages/connect-explorer/eslint.config.mjs +++ b/packages/connect-explorer/eslint.config.mjs @@ -1,4 +1,5 @@ import * as mdx from 'eslint-plugin-mdx'; + import { eslint } from '@trezor/eslint'; export default [ @@ -14,6 +15,12 @@ export default [ 'no-restricted-syntax': 'off', }, }, + { + files: ['**/*.mdx'], + rules: { + 'react/no-unescaped-entities': 'off', + }, + }, // Typescript { diff --git a/packages/connect-popup/eslint.config.mjs b/packages/connect-popup/eslint.config.mjs new file mode 100644 index 00000000000..2fb3b82f9ee --- /dev/null +++ b/packages/connect-popup/eslint.config.mjs @@ -0,0 +1,10 @@ +import { eslint } from '@trezor/eslint'; + +export default [ + ...eslint, + { + rules: { + 'no-restricted-syntax': 'off', // Todo: fix and solve + }, + }, +]; diff --git a/packages/connect-popup/package.json b/packages/connect-popup/package.json index 41db6cafa1b..150a8b1e3d2 100644 --- a/packages/connect-popup/package.json +++ b/packages/connect-popup/package.json @@ -39,6 +39,7 @@ "@trezor/node-utils": "workspace:*", "@trezor/trezor-user-env-link": "workspace:*", "@trezor/utils": "workspace:*", + "@trezor/eslint": "workspace:*", "@types/react": "18.2.79", "babel-loader": "^9.1.3", "copy-webpack-plugin": "^12.0.2", diff --git a/packages/connect-web/eslint.config.mjs b/packages/connect-web/eslint.config.mjs index f81636fa2d8..5569543a784 100644 --- a/packages/connect-web/eslint.config.mjs +++ b/packages/connect-web/eslint.config.mjs @@ -7,6 +7,7 @@ export default [ 'no-underscore-dangle': 'off', // underscore is used camelcase: 'off', // camelcase is used 'jest/valid-expect': 'off', // because of cypress tests + 'import/order': 'off', // Todo: fix and solve }, }, ]; diff --git a/packages/connect/eslint.config.mjs b/packages/connect/eslint.config.mjs index 6d7abd12de2..e7f5b0b09fd 100644 --- a/packages/connect/eslint.config.mjs +++ b/packages/connect/eslint.config.mjs @@ -14,6 +14,8 @@ export default [ 'error', { additionalTestBlockFunctions: ['conditionalTest'] }, ], + 'import/order': 'off', // Todo: fix and solve + 'import/no-default-export': 'off', // Todo: shall be solved one day, but now its heavily used }, }, ]; diff --git a/packages/eslint/src/eslint.config.mjs b/packages/eslint/src/eslint.config.mjs index 9b525dc2e19..8800186fcca 100644 --- a/packages/eslint/src/eslint.config.mjs +++ b/packages/eslint/src/eslint.config.mjs @@ -68,7 +68,7 @@ export default [ { // we are using explicit blacklist because this will enforce new rules in newly created packages files: [ - '**/packages/analytics/**/*', + 'packages/analytics/**/*', 'packages/blockchain-link/**/*', 'packages/components/**/*', 'packages/product-components/**/*', @@ -82,7 +82,7 @@ export default [ 'packages/connect-plugin-ethereum/**/*', 'packages/connect-plugin-stellar/**/*', 'packages/request-manager/**/*', - 'packages/suite/**/*', + '**/packages/suite/**/*', 'packages/suite-build/**/*', 'packages/suite-data/**/*', 'packages/suite-desktop-api/**/*', diff --git a/packages/request-manager/eslint.config.mjs b/packages/request-manager/eslint.config.mjs new file mode 100644 index 00000000000..4f1bd071bb6 --- /dev/null +++ b/packages/request-manager/eslint.config.mjs @@ -0,0 +1,12 @@ +import { eslint } from '@trezor/eslint'; + +export default [ + ...eslint, + { + files: ['**/e2e/**/*'], + rules: { + 'no-console': 'off', // used in e2e tests + 'import/order': 'off', // Todo: fix and solve + }, + }, +]; diff --git a/packages/suite-data/eslint.config.mjs b/packages/suite-data/eslint.config.mjs new file mode 100644 index 00000000000..dedaa169ad0 --- /dev/null +++ b/packages/suite-data/eslint.config.mjs @@ -0,0 +1,15 @@ +import { eslint } from '@trezor/eslint'; + +export default [ + ...eslint, + { + "ignores": [ + "files/**/*", + ] + }, + { + rules: { + 'no-console': 'off', + }, + }, +]; diff --git a/packages/suite-web/eslint.config.mjs b/packages/suite-web/eslint.config.mjs new file mode 100644 index 00000000000..ec504483275 --- /dev/null +++ b/packages/suite-web/eslint.config.mjs @@ -0,0 +1,12 @@ +import { eslint } from '@trezor/eslint'; + +export default [ + ...eslint, + { + rules: { + 'jest/valid-expect': 'off', // because of cypress tests + 'import/order': 'off', // Todo: fix and solve + 'no-console': 'off', // It's used in cypress tests + }, + }, +]; diff --git a/packages/suite-web/package.json b/packages/suite-web/package.json index a460d372205..a6e5d96e532 100644 --- a/packages/suite-web/package.json +++ b/packages/suite-web/package.json @@ -35,6 +35,7 @@ "@trezor/connect": "workspace:*", "@trezor/e2e-utils": "workspace:*", "@trezor/env-utils": "workspace:*", + "@trezor/eslint": "workspace:*", "@trezor/protobuf": "workspace:*", "@trezor/suite-analytics": "workspace:*", "@trezor/transport": "workspace:*", diff --git a/packages/suite/eslint.config.mjs b/packages/suite/eslint.config.mjs index 719d36125f6..488a8977c6b 100644 --- a/packages/suite/eslint.config.mjs +++ b/packages/suite/eslint.config.mjs @@ -13,6 +13,7 @@ export default [ 'no-restricted-syntax': 'off', // Todo: this should be fixed in codebase and this line removed 'import/order': 'off', // Todo: fix and solve 'import/no-default-export': 'off', // Todo: shall be solved one day, usually its legacy Components + 'no-console': 'off', // Todo: we use it a lot, shall be disabled more granulary I think }, }, ]; diff --git a/yarn.lock b/yarn.lock index 7ec1e685fc5..0fed7bb24ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11972,6 +11972,7 @@ __metadata: "@trezor/device-utils": "workspace:*" "@trezor/e2e-utils": "workspace:*" "@trezor/env-utils": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/protobuf": "workspace:*" "@trezor/suite": "workspace:*" "@trezor/suite-analytics": "workspace:*" From c16260816d6644c9e17c6abc69be3125bd4cd00e Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 11:46:31 +0100 Subject: [PATCH 20/29] chore: enable no-extra-boolean-cast as it becames recomended --- packages/connect-popup/package.json | 2 +- yarn.lock | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/connect-popup/package.json b/packages/connect-popup/package.json index 150a8b1e3d2..a7ddeaefd46 100644 --- a/packages/connect-popup/package.json +++ b/packages/connect-popup/package.json @@ -36,10 +36,10 @@ "@playwright/browser-firefox": "^1.46.1", "@playwright/browser-webkit": "^1.46.1", "@playwright/test": "^1.46.1", + "@trezor/eslint": "workspace:*", "@trezor/node-utils": "workspace:*", "@trezor/trezor-user-env-link": "workspace:*", "@trezor/utils": "workspace:*", - "@trezor/eslint": "workspace:*", "@types/react": "18.2.79", "babel-loader": "^9.1.3", "copy-webpack-plugin": "^12.0.2", diff --git a/yarn.lock b/yarn.lock index 0fed7bb24ab..56f37ddcf8c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11384,6 +11384,7 @@ __metadata: "@trezor/connect-ui": "workspace:*" "@trezor/crypto-utils": "workspace:*" "@trezor/device-utils": "workspace:*" + "@trezor/eslint": "workspace:*" "@trezor/node-utils": "workspace:*" "@trezor/transport": "workspace:*" "@trezor/trezor-user-env-link": "workspace:*" From 82a9290dfb7ada9601773c41baaa0bd595d2f973 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 11:59:12 +0100 Subject: [PATCH 21/29] chore: wip --- packages/eslint/eslint.config.mjs | 12 ++++++++++++ packages/eslint/src/importConfig.mjs | 1 - packages/suite-web/eslint.config.mjs | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 packages/eslint/eslint.config.mjs diff --git a/packages/eslint/eslint.config.mjs b/packages/eslint/eslint.config.mjs new file mode 100644 index 00000000000..ea1f551ff9c --- /dev/null +++ b/packages/eslint/eslint.config.mjs @@ -0,0 +1,12 @@ +import { eslint } from './src/index.mjs'; + +export default [ + ...eslint, + { + files: ['**/*.mjs'], // disable for all other config-files in this package + rules: { + 'import/no-default-export': 'off', + 'import/no-extraneous-dependencies': 'off', + }, + }, +]; diff --git a/packages/eslint/src/importConfig.mjs b/packages/eslint/src/importConfig.mjs index 138fdf7f4bf..455eb4fdc0f 100644 --- a/packages/eslint/src/importConfig.mjs +++ b/packages/eslint/src/importConfig.mjs @@ -1,6 +1,5 @@ import path from 'path'; import { fileURLToPath } from 'url'; - import pluginImport from 'eslint-plugin-import'; const __filename = fileURLToPath(import.meta.url); diff --git a/packages/suite-web/eslint.config.mjs b/packages/suite-web/eslint.config.mjs index ec504483275..1691ab3b7ee 100644 --- a/packages/suite-web/eslint.config.mjs +++ b/packages/suite-web/eslint.config.mjs @@ -6,6 +6,7 @@ export default [ rules: { 'jest/valid-expect': 'off', // because of cypress tests 'import/order': 'off', // Todo: fix and solve + 'import/no-default-export': 'off', // Todo: fix and solve 'no-console': 'off', // It's used in cypress tests }, }, From 7c73c09cfe9e1d8f0802a42256172baff0962176 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 12:05:04 +0100 Subject: [PATCH 22/29] chore: add no-async-promise-executor as it becames recommanded --- packages/suite-data/eslint.config.mjs | 4 +--- packages/suite-desktop-core/e2e/support/regtest.ts | 2 ++ .../suite/src/actions/wallet/exportTransactionsActions.ts | 2 -- .../suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx | 4 ++-- packages/trezor-user-env-link/src/websocket-client.ts | 1 + yarn.lock | 1 - 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/suite-data/eslint.config.mjs b/packages/suite-data/eslint.config.mjs index dedaa169ad0..7da057a6a42 100644 --- a/packages/suite-data/eslint.config.mjs +++ b/packages/suite-data/eslint.config.mjs @@ -3,9 +3,7 @@ import { eslint } from '@trezor/eslint'; export default [ ...eslint, { - "ignores": [ - "files/**/*", - ] + ignores: ['files/**/*'], }, { rules: { diff --git a/packages/suite-desktop-core/e2e/support/regtest.ts b/packages/suite-desktop-core/e2e/support/regtest.ts index 6e659613ce2..3f0c40059de 100644 --- a/packages/suite-desktop-core/e2e/support/regtest.ts +++ b/packages/suite-desktop-core/e2e/support/regtest.ts @@ -17,6 +17,8 @@ export const generateBlock = () => }); export const waitForCoinjoinBackend = () => + // Todo: refactor to not use async-promise-executor + // eslint-disable-next-line no-async-promise-executor new Promise(async (resolve, reject) => { const limit = 60; const error = ''; diff --git a/packages/suite/src/actions/wallet/exportTransactionsActions.ts b/packages/suite/src/actions/wallet/exportTransactionsActions.ts index 5613adc20b0..d5de823d00d 100644 --- a/packages/suite/src/actions/wallet/exportTransactionsActions.ts +++ b/packages/suite/src/actions/wallet/exportTransactionsActions.ts @@ -38,10 +38,8 @@ export const exportTransactionsThunk = createThunk( // TODO: this is not nice (copy-paste) // metadata reducer is still not part of trezor-common and I can not import it // here. so either followup, or maybe when I have a moment I'll refactor it before merging this - // eslint-disable-next-line no-restricted-syntax const provider = getState().metadata?.providers.find( // @ts-expect-error - // eslint-disable-next-line no-restricted-syntax p => p.clientId === getState().metadata.selectedProvider.labels, ); const metadataKeys = account?.metadata[1]; diff --git a/packages/suite/src/components/suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx b/packages/suite/src/components/suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx index 48b1e93442a..cff234f900d 100644 --- a/packages/suite/src/components/suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx +++ b/packages/suite/src/components/suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx @@ -8,10 +8,10 @@ import { DeviceModelInternal } from '@trezor/connect'; import { DeepPartial } from '@trezor/type-utils'; import suiteReducer from '../../../../reducers/suite/suiteReducer'; -const deviceReducer = prepareDeviceReducer(extraDependencies); +const _deviceReducer = prepareDeviceReducer(extraDependencies); type State = { - device: DeepPartial>; + device: DeepPartial>; suite: DeepPartial>; }; diff --git a/packages/trezor-user-env-link/src/websocket-client.ts b/packages/trezor-user-env-link/src/websocket-client.ts index d61e75f99be..bb24e77dbd7 100644 --- a/packages/trezor-user-env-link/src/websocket-client.ts +++ b/packages/trezor-user-env-link/src/websocket-client.ts @@ -268,6 +268,7 @@ export class WebsocketClient extends TypedEmitter { } waitForTrezorUserEnv() { + // Todo: refactor to not use async-promise-executor // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { // unfortunately, it can take incredibly long for trezor-user-env to start, we should diff --git a/yarn.lock b/yarn.lock index 56f37ddcf8c..dfdfa21407d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12189,7 +12189,6 @@ __metadata: resolution: "@trezor/transport-test@workspace:packages/transport-test" dependencies: "@jest/types": "npm:^29.6.3" - "@trezor/protobuf": "workspace:*" "@trezor/eslint": "workspace:*" "@trezor/protobuf": "workspace:*" "@trezor/transport": "workspace:*" From d1748b5b918c4a80677dfae1f3d616b0c09a9330 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 12:29:17 +0100 Subject: [PATCH 23/29] chore: enable import/order rule for whole codebase --- packages/analytics/src/utils.ts | 3 +- .../src/workers/baseWebsocket.ts | 2 +- .../blockchain-link/src/workers/baseWorker.ts | 6 ++- .../src/workers/blockbook/index.ts | 5 +- .../src/workers/blockbook/websocket.ts | 2 +- .../src/workers/blockfrost/index.ts | 5 +- .../src/workers/blockfrost/websocket.ts | 2 +- .../src/workers/electrum/client/caching.ts | 3 +- .../src/workers/electrum/client/electrum.ts | 1 + .../src/workers/electrum/client/json-rpc.ts | 2 + .../src/workers/electrum/devrun.ts | 3 +- .../src/workers/electrum/index.ts | 5 +- .../electrum/listeners/blockListener.ts | 3 +- .../workers/electrum/listeners/txListener.ts | 5 +- .../workers/electrum/methods/estimateFee.ts | 3 +- .../methods/getAccountBalanceHistory.ts | 3 +- .../electrum/methods/getAccountInfo.ts | 3 +- .../electrum/methods/getAccountUtxo.ts | 3 +- .../workers/electrum/methods/getBlockHash.ts | 3 +- .../src/workers/electrum/methods/getInfo.ts | 3 +- .../electrum/methods/getTransaction.ts | 3 +- .../electrum/methods/pushTransaction.ts | 3 +- .../src/workers/electrum/sockets/base.ts | 1 + .../src/workers/electrum/sockets/index.ts | 1 + .../src/workers/electrum/sockets/tcp.ts | 1 + .../src/workers/electrum/sockets/tls.ts | 1 + .../src/workers/electrum/sockets/tor.ts | 3 +- .../workers/electrum/utils/addressManager.ts | 3 +- .../src/workers/electrum/utils/discovery.ts | 3 +- .../src/workers/electrum/utils/transaction.ts | 3 +- .../src/workers/ripple/index.ts | 4 +- .../blockchain-link/src/workers/solana/fee.ts | 1 + .../src/workers/solana/index.ts | 9 ++-- .../tests/integration/blockbook.test.ts | 1 + .../tests/integration/blockfrost.test.ts | 1 + .../tests/integration/connection.test.ts | 1 + .../tests/integration/electrum.test.ts | 3 +- .../tests/integration/ripple.test.ts | 1 + .../tests/integration/solana.test.ts | 1 + .../tests/unit/connection.test.ts | 1 + .../tests/unit/estimateFee.test.ts | 1 + .../tests/unit/getAccountInfo.test.ts | 1 + .../tests/unit/getAccountUtxo.test.ts | 1 + .../tests/unit/getBlockHash.test.ts | 1 + .../tests/unit/getInfo.test.ts | 1 + .../tests/unit/getTransaction.test.ts | 1 + .../tests/unit/notifications.test.ts | 2 +- .../tests/unit/pushTransaction.test.ts | 1 + .../tests/unit/subscribe.test.ts | 1 + .../blockchain-link/tests/unit/utils.test.ts | 1 - .../tests/unit/workers.test.ts | 1 + packages/blockchain-link/webpack/dev.js | 1 + .../blockchain-link/webpack/workers.web.js | 1 + .../components/AssetLogo/AssetInitials.tsx | 4 +- .../src/components/AssetLogo/AssetLogo.tsx | 12 +++-- .../AutoScalingInput.stories.tsx | 4 +- .../AutoScalingInput/AutoScalingInput.tsx | 1 + .../AutoScalingInputExamples.stories.tsx | 3 +- .../src/components/Badge/Badge.stories.tsx | 1 + .../components/src/components/Badge/Badge.tsx | 3 ++ .../src/components/Banner/Banner.stories.tsx | 3 +- .../src/components/Banner/Banner.tsx | 4 +- .../src/components/Banner/BannerContext.ts | 1 + .../src/components/Banner/utils.tsx | 4 +- .../src/components/Card/Card.stories.tsx | 1 + .../components/src/components/Card/Card.tsx | 3 ++ .../components/src/components/Card/utils.tsx | 4 +- .../CollapsibleBox/CollapsibleBox.tsx | 3 ++ .../src/components/CollapsibleBox/utils.tsx | 1 + .../ComponentWithSubIcon.stories.tsx | 1 + .../ComponentWithSubIcon.tsx | 7 ++- .../src/components/DataAnalytics.tsx | 7 ++- .../components/Divider/Divider.stories.tsx | 3 +- .../src/components/Divider/Divider.tsx | 2 + .../components/Dropdown/Dropdown.stories.tsx | 2 + .../src/components/Dropdown/Dropdown.tsx | 3 ++ .../src/components/Dropdown/Menu.tsx | 3 ++ .../src/components/Dropdown/menuStyle.ts | 1 + .../ElevationContext.stories.tsx | 22 ++++---- .../ElevationContext/ElevationContext.tsx | 4 +- .../src/components/Flag/Flag.stories.tsx | 1 + .../components/src/components/Flag/Flag.tsx | 1 + .../src/components/Flex/Flex.stories.tsx | 6 ++- .../components/src/components/Flex/Flex.tsx | 8 ++- .../GradientOverlay.stories.tsx | 3 +- .../GradientOverlay/GradientOverlay.tsx | 4 +- .../src/components/Grid/Grid.stories.tsx | 6 ++- .../components/src/components/Grid/Grid.tsx | 4 +- .../HotkeyBadge/HotkeyBadge.stories.tsx | 1 + .../components/HotkeyBadge/HotkeyBadge.tsx | 8 ++- .../src/components/Icon/Icon.stories.tsx | 12 +++-- .../components/src/components/Icon/Icon.tsx | 1 + .../src/components/Icon/icons.stories.tsx | 13 +++-- .../IconCircle/IconCircle.stories.tsx | 2 + .../src/components/IconCircle/types.tsx | 3 +- .../src/components/IconCircle/utils.tsx | 4 +- .../src/components/Image/Image.stories.tsx | 1 + .../components/src/components/Image/Image.tsx | 2 + .../components/InfoRow/InfoRow.stories.tsx | 1 + .../src/components/InfoRow/InfoRow.tsx | 5 +- .../src/components/List/List.stories.tsx | 2 + .../components/src/components/List/List.tsx | 4 +- .../src/components/List/ListItem.tsx | 5 +- .../components/Markdown/Markdown.stories.tsx | 1 + .../src/components/Markdown/Markdown.tsx | 7 ++- .../components/NewModal/NewModal.stories.tsx | 3 +- .../src/components/NewModal/NewModal.tsx | 4 +- .../components/NewModal/NewModalBackdrop.tsx | 7 ++- .../components/NewModal/NewModalContext.tsx | 1 + .../src/components/Note/Note.stories.tsx | 1 + .../components/src/components/Note/Note.tsx | 1 + .../ResizableBox/ResizableBox.stories.tsx | 1 + .../components/ResizableBox/ResizableBox.tsx | 4 +- .../ResizableBoxExamples.stories.tsx | 1 + .../components/src/components/Table/Table.tsx | 2 + .../src/components/Table/TableCell.tsx | 1 + .../src/components/Table/TableHeader.tsx | 1 + .../src/components/Table/TableRow.tsx | 1 + .../Timerange/Timerange.stories.tsx | 1 + .../src/components/Timerange/Timerange.tsx | 4 +- .../components/Tooltip/Tooltip.stories.tsx | 7 ++- .../src/components/Tooltip/Tooltip.tsx | 6 ++- .../src/components/Tooltip/TooltipArrow.tsx | 4 +- .../src/components/Tooltip/TooltipBox.tsx | 5 +- .../components/Tooltip/TooltipFloatingUi.tsx | 31 +++++------ .../VirtualizedList.stories.tsx | 4 +- .../VirtualizedList/VirtualizedList.tsx | 4 +- .../animations/AnimationPrimitives.tsx | 3 +- .../components/animations/DeviceAnimation.tsx | 1 + .../components/animations/LottieAnimation.tsx | 4 +- .../buttons/Button/Button.stories.tsx | 1 + .../src/components/buttons/Button/Button.tsx | 3 ++ .../buttons/Button/buttons.stories.tsx | 7 ++- .../buttons/ButtonGroup/ButtonGroup.tsx | 3 ++ .../ButtonGroup/ButtonGroups.stories.tsx | 2 + .../buttons/IconButton/IconButton.stories.tsx | 1 + .../buttons/IconButton/IconButton.tsx | 2 + .../IconButton/IconButtons.stories.tsx | 4 +- .../buttons/PinButton/PinButton.stories.tsx | 1 + .../buttons/PinButton/PinButton.tsx | 7 ++- .../buttons/TextButton/TextButton.stories.tsx | 1 + .../buttons/TextButton/TextButton.tsx | 3 ++ .../TextButton/TextButtons.stories.tsx | 2 + .../components/buttons/buttonStyleUtils.ts | 3 +- .../src/components/form/BottomText.tsx | 5 +- .../src/components/form/Checkbox/Checkbox.tsx | 2 + .../components/form/Input/Input.stories.tsx | 1 + .../src/components/form/Input/Input.tsx | 5 +- .../src/components/form/InputStyles.ts | 1 + .../src/components/form/Radio/Radio.tsx | 2 + .../src/components/form/Range/Range.tsx | 1 + .../src/components/form/Select/Select.tsx | 2 + .../form/Select/customComponents.tsx | 1 + .../form/Select/useDetectPortalTarget.ts | 1 + .../components/form/Select/useOnKeyDown.ts | 1 + .../components/form/SelectBar/SelectBar.tsx | 3 ++ .../src/components/form/Switch/Switch.tsx | 3 ++ .../form/Textarea/CharacterCount.tsx | 1 + .../form/Textarea/Textarea.stories.tsx | 4 +- .../src/components/form/Textarea/Textarea.tsx | 4 +- .../src/components/form/TopAddons.tsx | 2 + .../LoadingContent/LoadingContent.stories.tsx | 1 + .../loaders/LoadingContent/LoadingContent.tsx | 2 + .../ProgressBar/ProgressBar.stories.tsx | 1 + .../loaders/ProgressBar/ProgressBar.tsx | 3 +- .../ProgressPie/ProgressPie.stories.tsx | 1 + .../loaders/ProgressPie/ProgressPie.tsx | 1 + .../loaders/Spinner/Spinner.stories.tsx | 1 + .../components/loaders/Spinner/Spinner.tsx | 2 + .../loaders/Stepper/Stepper.stories.tsx | 1 + .../components/loaders/Stepper/Stepper.tsx | 1 + .../DialogModal/DialogModal.stories.tsx | 1 + .../modals/DialogModal/DialogModal.tsx | 5 +- .../src/components/modals/Modal/Backdrop.tsx | 2 + .../components/modals/Modal/Modal.stories.tsx | 1 + .../src/components/modals/Modal/Modal.tsx | 3 +- .../skeletons/SkeletonCircle.stories.tsx | 1 + .../components/skeletons/SkeletonCircle.tsx | 4 +- .../skeletons/SkeletonRectangle.stories.tsx | 1 + .../skeletons/SkeletonRectangle.tsx | 4 +- .../skeletons/SkeletonSpread.stories.tsx | 3 +- .../components/skeletons/SkeletonSpread.tsx | 1 + .../skeletons/SkeletonStack.stories.tsx | 1 + .../src/components/skeletons/utils.ts | 4 +- .../typography/Code/Code.stories.tsx | 1 + .../src/components/typography/Code/Code.tsx | 4 +- .../typography/Heading/Heading.stories.tsx | 1 + .../components/typography/Heading/Heading.tsx | 1 + .../typography/Link/Link.stories.tsx | 1 + .../src/components/typography/Link/Link.tsx | 3 ++ .../Paragraph/Paragraph.stories.tsx | 1 + .../typography/Paragraph/Paragraph.tsx | 1 + .../typography/Text/Text.stories.tsx | 1 + .../src/components/typography/Text/Text.tsx | 5 +- .../TruncateWithTooltip.stories.tsx | 3 +- .../TruncateWithTooltip.tsx | 4 +- .../typography/typography.stories.tsx | 3 +- .../src/components/typography/utils.tsx | 4 +- packages/components/src/support/Story.tsx | 1 + packages/components/src/utils/frameProps.tsx | 4 +- .../components/src/utils/useScrollShadow.tsx | 5 +- packages/components/styled.d.ts | 1 + .../src/actions/trezorConnectActions.ts | 1 - .../src/components/GuideIndex.tsx | 5 +- .../src/components/ZoomableIllustration.tsx | 2 +- .../src/components/fields/ArrayWrapper.tsx | 3 +- .../connect-explorer/src/pages/callback.mdx | 1 + .../connect-explorer/src/pages/changelog.mdx | 5 +- .../src/pages/details/deeplinking.mdx | 1 + .../src/pages/readme/[name].mdx | 1 + packages/connect-iframe/src/index.ts | 3 +- .../webpack/base.webpack.config.ts | 1 + packages/connect-plugin-stellar/src/index.ts | 1 + .../connect-popup/e2e/tests/analytics.test.ts | 1 + .../e2e/tests/browser-support.test.ts | 2 + .../connect-popup/e2e/tests/methods.test.ts | 3 +- .../e2e/tests/passphrase.test.ts | 2 + .../e2e/tests/permissions.test.ts | 2 + .../e2e/tests/popup-close.test.ts | 2 + .../e2e/tests/popup-pages.test.ts | 4 +- .../connect-popup/e2e/tests/transport.test.ts | 6 ++- .../connect-popup/e2e/tests/unchained.test.ts | 1 + packages/connect-popup/src/deeplink.tsx | 1 + packages/connect-popup/src/index.tsx | 5 +- packages/connect-popup/src/log.tsx | 1 + packages/connect-popup/src/view/browser.ts | 1 + packages/connect-popup/src/view/common.tsx | 7 +-- .../connect-popup/src/view/confirmation.ts | 1 + .../src/view/firmwareNotCompatible.ts | 3 +- .../src/view/firmwareNotSupported.ts | 1 + .../src/view/firmwareRequiredUpdate.ts | 1 + .../src/view/invalidPassphrase.ts | 1 + .../src/view/passphraseOnDevice.ts | 1 + .../connect-popup/src/view/permissions.ts | 1 + packages/connect-popup/src/view/pin.ts | 1 + .../src/view/react/StylesSheetWrapper.tsx | 1 + .../connect-popup/src/view/requestButton.ts | 1 + .../connect-popup/src/view/selectAccount.ts | 1 + .../connect-popup/src/view/selectDevice.ts | 3 +- packages/connect-popup/src/view/selectFee.ts | 1 + packages/connect-popup/src/view/word.ts | 3 +- .../webpack/dev.webpack.config.ts | 1 + .../webpack/prod.webpack.config.ts | 4 +- packages/connect-web/src/iframe/index.ts | 1 + .../connect-web/src/impl/core-in-iframe.ts | 2 +- .../connect-web/src/impl/core-in-popup.ts | 6 +-- packages/connect-web/src/index.ts | 3 +- packages/connect-web/src/popup/index.ts | 7 +-- .../webpack/inline.webpack.config.ts | 1 + .../e2e/__fixtures__/cardanoGetAddress.ts | 3 +- .../cardanoGetAddressDerivations.ts | 3 +- .../__fixtures__/cardanoSignTransaction.ts | 3 +- .../e2e/__fixtures__/ethereumSignMessage.ts | 1 + .../__fixtures__/stellarSignTransaction.ts | 3 +- packages/connect/e2e/__txcache__/gen-reftx.ts | 1 + packages/connect/e2e/__wscache__/server.js | 1 + packages/connect/e2e/common.setup.ts | 5 +- .../tests/device/authenticateDevice.test.ts | 2 +- .../tests/device/authorizeCoinjoin.test.ts | 1 - .../connect/e2e/tests/device/cancel.test.ts | 1 + .../cancelCoinjoinAuthorization.test.ts | 1 - .../e2e/tests/device/keepSession.test.ts | 1 - .../connect/e2e/tests/device/methods.test.ts | 1 - .../connect/e2e/tests/device/override.test.ts | 1 - .../e2e/tests/device/passphrase.test.ts | 1 - .../connect/e2e/tests/device/setBusy.test.ts | 1 - .../e2e/tests/device/unlockPath.test.ts | 1 - packages/connect/setupJest.ts | 1 + packages/connect/src/api/applyFlags.ts | 3 +- packages/connect/src/api/applySettings.ts | 3 +- .../connect/src/api/authenticateDevice.ts | 3 +- packages/connect/src/api/authorizeCoinjoin.ts | 3 +- packages/connect/src/api/backupDevice.ts | 3 +- .../src/api/binance/api/binanceGetAddress.ts | 3 +- .../api/binance/api/binanceGetPublicKey.ts | 3 +- .../api/binance/api/binanceSignTransaction.ts | 4 +- .../connect/src/api/binance/binanceSignTx.ts | 3 +- packages/connect/src/api/bitcoin/Fees.ts | 1 + .../src/api/bitcoin/TransactionComposer.ts | 1 + .../src/api/bitcoin/__fixtures__/refTx.ts | 1 + .../src/api/bitcoin/__tests__/Fees.test.ts | 1 + .../src/api/bitcoin/__tests__/inputs.test.ts | 1 + .../bitcoin/__tests__/signtxVerify.test.ts | 1 + .../src/api/bitcoin/createPendingTx.ts | 3 +- packages/connect/src/api/bitcoin/inputs.ts | 1 + packages/connect/src/api/bitcoin/outputs.ts | 1 + packages/connect/src/api/bitcoin/refTx.ts | 8 +-- .../connect/src/api/bitcoin/signtxVerify.ts | 2 +- .../connect/src/api/blockchainDisconnect.ts | 3 +- .../src/api/cancelCoinjoinAuthorization.ts | 3 +- .../src/api/cardano/api/cardanoGetAddress.ts | 3 +- .../cardano/api/cardanoGetNativeScriptHash.ts | 3 +- .../api/cardano/api/cardanoGetPublicKey.ts | 3 +- .../api/cardano/api/cardanoSignTransaction.ts | 3 +- .../api/cardano/cardanoAddressParameters.ts | 3 +- .../src/api/cardano/cardanoAuxiliaryData.ts | 3 +- .../src/api/cardano/cardanoCertificate.ts | 3 +- .../connect/src/api/cardano/cardanoInputs.ts | 3 +- .../connect/src/api/cardano/cardanoOutputs.ts | 3 +- .../src/api/cardano/cardanoTokenBundle.ts | 3 +- packages/connect/src/api/changeLanguage.ts | 3 +- packages/connect/src/api/changePin.ts | 3 +- packages/connect/src/api/cipherKeyValue.ts | 3 +- packages/connect/src/api/common/Discovery.ts | 1 + .../connect/src/api/composeTransaction.ts | 3 +- .../src/api/eos/api/eosGetPublicKey.ts | 3 +- .../src/api/eos/api/eosSignTransaction.ts | 3 +- .../__fixtures__/ethereumSignTypedData.ts | 1 + .../ethereum/__tests__/ethereumSignTx.test.ts | 1 - .../api/ethereum/api/ethereumGetAddress.ts | 3 +- .../api/ethereum/api/ethereumGetPublicKey.ts | 3 +- .../api/ethereum/api/ethereumSignMessage.ts | 5 +- .../ethereum/api/ethereumSignTransaction.ts | 9 ++-- .../api/ethereum/api/ethereumSignTypedData.ts | 5 +- .../api/ethereum/api/ethereumVerifyMessage.ts | 3 +- .../src/api/ethereum/ethereumDefinitions.ts | 3 +- .../src/api/ethereum/ethereumSignTx.ts | 1 + .../src/api/ethereum/ethereumSignTypedData.ts | 1 + .../api/firmware/verifyAuthenticityProof.ts | 1 + .../connect/src/api/getAccountDescriptor.ts | 3 +- packages/connect/src/api/getAddress.ts | 3 +- packages/connect/src/api/getCoinInfo.ts | 3 +- packages/connect/src/api/getFirmwareHash.ts | 3 +- packages/connect/src/api/getOwnershipId.ts | 3 +- packages/connect/src/api/getOwnershipProof.ts | 3 +- packages/connect/src/api/getPublicKey.ts | 3 +- packages/connect/src/api/loadDevice.ts | 3 +- .../connect/src/api/nem/api/nemGetAddress.ts | 3 +- .../src/api/nem/api/nemSignTransaction.ts | 3 +- packages/connect/src/api/pushTransaction.ts | 3 +- .../connect/src/api/rebootToBootloader.ts | 3 +- packages/connect/src/api/recoveryDevice.ts | 3 +- packages/connect/src/api/requestLogin.ts | 3 +- packages/connect/src/api/resetDevice.ts | 3 +- .../src/api/ripple/api/rippleGetAddress.ts | 3 +- .../api/ripple/api/rippleSignTransaction.ts | 3 +- packages/connect/src/api/setBrightness.ts | 3 +- packages/connect/src/api/setBusy.ts | 3 +- packages/connect/src/api/signMessage.ts | 3 +- .../connect/src/api/solana/additionalInfo.ts | 1 + .../src/api/solana/api/solanaGetAddress.ts | 3 +- .../src/api/solana/api/solanaGetPublicKey.ts | 3 +- .../api/solana/api/solanaSignTransaction.ts | 3 +- .../src/api/stellar/api/stellarGetAddress.ts | 3 +- .../api/stellar/api/stellarSignTransaction.ts | 3 +- .../connect/src/api/stellar/stellarSignTx.ts | 3 +- .../src/api/tezos/api/tezosGetAddress.ts | 3 +- .../src/api/tezos/api/tezosGetPublicKey.ts | 3 +- .../src/api/tezos/api/tezosSignTransaction.ts | 3 +- packages/connect/src/api/tezos/tezosSignTx.ts | 4 +- packages/connect/src/api/unlockPath.ts | 3 +- packages/connect/src/api/verifyMessage.ts | 3 +- .../connect/src/backend/BackendManager.ts | 1 - packages/connect/src/backend/Blockchain.ts | 2 +- .../connect/src/backend/BlockchainLink.ts | 1 - .../src/backend/__tests__/Blockchain.test.ts | 1 + packages/connect/src/core/AbstractMethod.ts | 3 +- .../connect/src/core/onCallFirmwareUpdate.ts | 2 +- packages/connect/src/data/DataManager.ts | 1 - .../src/data/__tests__/coinInfo.test.ts | 1 + .../src/data/__tests__/firmwareInfo.test.ts | 3 +- .../src/data/__tests__/transportInfo.test.ts | 3 +- packages/connect/src/data/analyticsInfo.ts | 1 + packages/connect/src/data/coinInfo.ts | 1 + .../src/data/deviceAuthenticityConfigTypes.ts | 1 + packages/connect/src/data/firmwareInfo.ts | 1 + packages/connect/src/device/Device.ts | 6 ++- packages/connect/src/device/DeviceCommands.ts | 5 +- packages/connect/src/device/DeviceList.ts | 4 +- packages/connect/src/device/StateStorage.ts | 3 +- .../__tests__/checkFirmwareRevision.test.ts | 1 + .../resolveDescriptorForTaproot.test.ts | 3 +- .../src/device/calculateRevisionForDevice.ts | 1 + .../src/device/checkFirmwareRevision.ts | 1 + .../src/device/resolveDescriptorForTaproot.ts | 3 +- packages/connect/src/events/blockchain.ts | 1 + packages/connect/src/events/transport.ts | 5 +- packages/connect/src/events/ui-promise.ts | 1 + packages/connect/src/factory.ts | 3 +- packages/connect/src/impl/dynamic.ts | 1 - .../connect/src/types/api/applySettings.ts | 1 + .../src/types/api/authenticateDevice.ts | 1 + .../src/types/api/authorizeCoinjoin.ts | 4 +- .../connect/src/types/api/binance/index.ts | 3 +- .../connect/src/types/api/bitcoin/index.ts | 3 +- .../src/types/api/blockchainEstimateFee.ts | 1 + .../src/types/api/blockchainEvmRpcCall.ts | 1 + .../api/blockchainGetAccountBalanceHistory.ts | 1 + .../api/blockchainGetCurrentFiatRates.ts | 1 + .../blockchainGetFiatRatesForTimestamps.ts | 1 + .../types/api/blockchainGetTransactions.ts | 1 + .../src/types/api/blockchainSubscribe.ts | 1 + .../types/api/blockchainSubscribeFiatRates.ts | 1 + .../src/types/api/blockchainUnsubscribe.ts | 1 + .../api/blockchainUnsubscribeFiatRates.ts | 1 + .../types/api/cancelCoinjoinAuthorization.ts | 1 + .../connect/src/types/api/cardano/index.ts | 1 + .../types/api/cardanoComposeTransaction.ts | 1 + .../connect/src/types/api/changeLanguage.ts | 1 + .../connect/src/types/api/cipherKeyValue.ts | 3 +- .../src/types/api/composeTransaction.ts | 1 + packages/connect/src/types/api/eos/index.ts | 3 +- .../connect/src/types/api/ethereum/index.ts | 1 + .../connect/src/types/api/firmwareUpdate.ts | 1 + .../src/types/api/getAccountDescriptor.ts | 1 + .../connect/src/types/api/getAccountInfo.ts | 1 + packages/connect/src/types/api/getAddress.ts | 1 + .../connect/src/types/api/getOwnershipId.ts | 1 + .../src/types/api/getOwnershipProof.ts | 1 + .../connect/src/types/api/getPublicKey.ts | 3 +- packages/connect/src/types/api/nem/index.ts | 3 +- .../connect/src/types/api/nemGetAddress.ts | 1 + .../connect/src/types/api/pushTransaction.ts | 1 + .../connect/src/types/api/recoveryDevice.ts | 1 + .../connect/src/types/api/requestLogin.ts | 1 + .../connect/src/types/api/ripple/index.ts | 3 +- .../connect/src/types/api/solana/index.ts | 3 +- .../connect/src/types/api/stellar/index.ts | 3 +- packages/connect/src/types/api/tezos/index.ts | 3 +- packages/connect/src/types/api/unlockPath.ts | 1 + packages/connect/src/types/coinInfo.ts | 1 + packages/connect/src/types/device.ts | 1 + packages/connect/src/types/params.ts | 1 + .../src/utils/__fixtures__/accountUtils.ts | 1 - .../src/utils/__fixtures__/ethereumUtils.ts | 1 - .../src/utils/__fixtures__/formatUtils.ts | 1 - .../src/utils/__tests__/accountUtils.test.ts | 1 - .../src/utils/__tests__/addressUtils.test.ts | 1 + .../__tests__/deviceFeaturesUtils.test.ts | 1 - .../src/utils/__tests__/ethereumUtils.test.ts | 1 - .../src/utils/__tests__/formatUtils.test.ts | 1 - packages/connect/src/utils/addressUtils.ts | 1 + packages/connect/src/utils/assetUtils.ts | 1 + packages/connect/src/utils/assets.ts | 1 + .../connect/src/utils/deviceFeaturesUtils.ts | 1 + packages/connect/src/utils/firmwareUtils.ts | 1 + packages/connect/src/utils/formatUtils.ts | 1 + packages/connect/src/utils/hdnodeUtils.ts | 1 + .../connect/src/utils/uiPromiseManager.ts | 3 +- .../AssetShareIndicator.tsx | 5 +- .../components/CoinLogo/CoinLogo.stories.tsx | 1 + .../src/components/CoinLogo/CoinLogo.tsx | 5 +- .../components/CoinLogo/coinLogos.stories.tsx | 7 ++- .../ConfirmOnDevice.stories.tsx | 4 +- .../ConfirmOnDevice/ConfirmOnDevice.tsx | 4 +- .../ConfirmOnDeviceContent.tsx | 3 ++ .../EnterOnTrezorButton.tsx | 2 + .../PassphraseTypeCard/NonAsciiBanner.tsx | 2 + .../PassphraseTypeCard.stories.tsx | 4 +- .../PassphraseTypeCard/PassphraseTypeCard.tsx | 9 ++-- .../PassphraseTypeCardContent.tsx | 13 +++-- .../PassphraseTypeCardHeading.tsx | 8 ++- .../PassphraseTypeCard/useNonAsciiChars.ts | 1 + .../PasswordStrengthIndicator.stories.tsx | 1 + .../PasswordStrengthIndicator.tsx | 2 +- .../RotateDeviceImage.stories.tsx | 4 +- .../RotateDeviceImage/RotateDeviceImage.tsx | 4 +- .../components/SelectAssetModal/AssetItem.tsx | 3 +- .../SelectAssetModal/AssetItemNotFound.tsx | 7 ++- .../SelectAssetModal/CheckableTag.tsx | 3 +- .../SelectAssetModal/NetworkTabs.tsx | 7 ++- .../SelectAssetModal.stories.tsx | 9 ++-- .../SelectAssetModal/SelectAssetModal.tsx | 7 ++- .../TokenIconSet/TokenIconSet.stories.tsx | 1 + .../components/TokenIconSet/TokenIconSet.tsx | 4 +- .../TrezorLogo/TrezorLogo.stories.tsx | 1 + .../src/components/TrezorLogo/TrezorLogo.tsx | 2 + .../TrezorLogo/trezorLogos.stories.tsx | 4 +- packages/product-components/styled.d.ts | 1 + .../request-manager/e2e/identities-stress.ts | 1 + packages/request-manager/src/httpPool.ts | 1 + packages/request-manager/src/interceptor.ts | 2 + .../request-manager/src/torControlPort.ts | 2 + packages/request-manager/src/torIdentities.ts | 1 + packages/suite-data/src/guide/parser.ts | 3 +- .../src/__tests__/ipcRenderer.ts | 3 +- packages/suite-desktop-api/src/factory.ts | 1 + packages/suite-storage/src/native/index.ts | 1 + packages/suite-storage/src/web/index.ts | 1 + packages/suite-web/e2e/cypress.config.ts | 4 +- packages/suite-web/e2e/run_tests.ts | 1 + packages/suite-web/e2e/support/commands.ts | 3 +- .../suite-web/e2e/support/utils/shortcuts.ts | 1 + .../e2e/tests/analytics/events.test.ts | 1 + .../e2e/tests/analytics/toggle.test.ts | 1 + .../e2e/tests/backup/t2t1-fail.test.ts | 1 + .../e2e/tests/backup/t2t1-success.test.ts | 1 + .../e2e/tests/dashboard/assets.test.ts | 1 + .../e2e/tests/dashboard/discreet-mode.test.ts | 1 + .../e2e/tests/settings/coins.test.ts | 1 + .../e2e/tests/settings/general.test.ts | 1 + .../e2e/tests/suite/passphrase.test.ts | 1 + .../tests/wallet/add-account-types.test.ts | 5 +- .../e2e/tests/wallet/check-coins-xpub.test.ts | 1 + .../tests/wallet/export-transactions.test.ts | 1 + packages/suite-web/src/Main.tsx | 13 +++-- packages/suite-web/src/support/Router.tsx | 3 +- packages/suite-web/src/support/useCypress.ts | 3 +- .../__tests__/onboardingActions.test.ts | 4 +- .../src/actions/recovery/recoveryActions.ts | 1 + .../settings/__fixtures__/deviceSettings.ts | 9 ++-- .../__tests__/walletSettingsActions.test.ts | 1 + .../actions/settings/deviceSettingsActions.ts | 3 +- .../actions/settings/walletSettingsActions.ts | 7 +-- .../suite/__tests__/analyticsActions.test.ts | 3 +- .../suite/__tests__/protocolActions.test.ts | 2 +- .../suite/__tests__/resizeActions.test.ts | 1 - .../suite/__tests__/routerActions.test.ts | 4 +- .../src/actions/suite/analyticsActions.ts | 6 +-- .../src/actions/suite/desktopUpdateActions.ts | 4 +- .../suite/src/actions/suite/guideActions.ts | 2 +- .../suite/src/actions/suite/initAction.ts | 4 +- .../src/actions/suite/metadataActions.ts | 5 +- .../actions/suite/metadataLabelingActions.ts | 1 - .../actions/suite/metadataPasswordsActions.ts | 1 - .../actions/suite/metadataProviderActions.ts | 4 +- .../src/actions/suite/protocolActions.ts | 12 +++-- .../suite/src/actions/suite/storageActions.ts | 9 ++-- .../__fixtures__/coinjoinAccountActions.ts | 1 + .../__fixtures__/mockCoinjoinService.ts | 1 + .../moveLabelsForRbfMetadataState.fixture.ts | 1 + .../moveLabelsForRbfTransactions.fixture.ts | 1 + .../wallet/__fixtures__/receiveActions.ts | 2 +- .../__tests__/cardanoStakingActions.test.ts | 10 ++-- .../__tests__/coinmarketBuyActions.test.ts | 6 +-- .../coinmarketExchangeActions.test.ts | 6 +-- .../wallet/__tests__/discoveryActions.test.ts | 2 +- .../wallet/__tests__/formDraftActions.test.ts | 2 +- .../__tests__/moveLabelsForRbfActions.test.ts | 4 +- .../wallet/__tests__/receiveActions.test.ts | 4 +- .../__tests__/selectedAccountActions.test.ts | 1 - .../__tests__/signVerifyActions.test.ts | 2 +- .../__tests__/transactionActions.test.ts | 6 ++- .../src/actions/wallet/addWalletThunk.ts | 4 +- .../actions/wallet/cardanoStakingActions.ts | 12 +++-- .../actions/wallet/coinjoinClientActions.ts | 4 +- .../coinmarketCommonActions/verifyAddress.ts | 2 +- .../__tests__/coinmarketCommonActions.test.ts | 6 +-- .../coinmarket/coinmarketCommonActions.ts | 4 +- .../actions/wallet/coinmarketBuyActions.ts | 6 ++- .../wallet/coinmarketExchangeActions.ts | 8 +-- .../actions/wallet/coinmarketInfoActions.ts | 1 + .../actions/wallet/coinmarketSellActions.ts | 4 +- .../wallet/exportTransactionsActions.ts | 1 + .../src/actions/wallet/formDraftActions.ts | 7 ++- .../suite/src/actions/wallet/graphActions.ts | 25 ++++----- .../actions/wallet/moveLabelsForRbfActions.ts | 7 +-- .../src/actions/wallet/receiveActions.ts | 3 +- .../src/actions/wallet/send/sendFormThunks.ts | 3 +- .../src/actions/wallet/signVerifyActions.ts | 4 +- .../wallet/stake/stakeFormEthereumActions.ts | 5 +- .../suite/src/actions/wallet/stakeActions.ts | 4 +- .../suite/src/actions/wallet/tokenActions.ts | 5 +- .../backup/AfterBackupCheckboxes.tsx | 5 +- .../src/components/backup/BackupSeedCard.tsx | 2 + .../src/components/backup/BackupSeedCards.tsx | 4 +- .../components/backup/PreBackupCheckboxes.tsx | 5 +- .../components/dashboard/DashboardSection.tsx | 2 + .../firmware/Buttons/FirmwareButtonsRow.tsx | 3 +- .../firmware/Buttons/FirmwareCloseButton.tsx | 1 + .../Buttons/FirmwareContinueButton.tsx | 3 ++ .../Buttons/FirmwareInstallButton.tsx | 1 + .../firmware/Buttons/FirmwareRetryButton.tsx | 1 + .../src/components/firmware/CheckSeedStep.tsx | 7 ++- .../src/components/firmware/Fingerprint.tsx | 1 + .../components/firmware/FirmwareInitial.tsx | 6 ++- .../firmware/FirmwareInstallation.tsx | 5 +- .../src/components/firmware/FirmwareOffer.tsx | 2 +- .../firmware/FirmwareProgressBar.tsx | 4 +- .../firmware/FirmwareUpdateHashCheckError.tsx | 1 + .../firmware/ReconnectDevicePrompt.tsx | 8 +-- .../firmware/SelectCustomFirmware.tsx | 1 + .../suite/src/components/guide/Feedback.tsx | 13 +++-- packages/suite/src/components/guide/Guide.tsx | 5 +- .../src/components/guide/GuideArticle.tsx | 3 +- .../src/components/guide/GuideButton.tsx | 4 +- .../src/components/guide/GuideCategories.tsx | 2 + .../src/components/guide/GuideCategory.tsx | 1 + .../src/components/guide/GuideContent.tsx | 2 + .../src/components/guide/GuideHeader.tsx | 7 ++- .../suite/src/components/guide/GuideHint.tsx | 1 + .../src/components/guide/GuideMarkdown.tsx | 3 ++ .../suite/src/components/guide/GuideNode.tsx | 8 +-- .../src/components/guide/GuideRouter.tsx | 6 ++- .../src/components/guide/GuideSearch.tsx | 7 ++- .../src/components/guide/GuideViewWrapper.tsx | 2 + .../src/components/guide/HeaderBreadcrumb.tsx | 6 +-- .../components/guide/OpenGuideFromTooltip.tsx | 4 +- .../guide/SupportFeedbackSelection.tsx | 2 +- .../Buttons/OnboardingButtonBack.tsx | 1 + .../Buttons/OnboardingButtonCta.tsx | 1 + .../Buttons/OnboardingButtonSkip.tsx | 2 + .../onboarding/CollapsibleOnboardingCard.tsx | 2 + .../src/components/onboarding/Hologram.tsx | 8 +-- .../onboarding/OnboardingLayout.tsx | 8 ++- .../onboarding/OnboardingOption.tsx | 2 + .../onboarding/OnboardingProgressBar.tsx | 2 + .../onboarding/OnboardingStepBox.tsx | 13 +++-- .../onboarding/SkipStepConfirmation.tsx | 4 +- .../suite/src/components/onboarding/index.ts | 2 - .../src/components/settings/DeviceBanner.tsx | 4 +- .../components/settings/SettingsLayout.tsx | 1 + .../components/settings/SettingsSection.tsx | 2 + .../src/components/suite/AccountLabel.tsx | 5 +- .../src/components/suite/AccountTypeBadge.tsx | 3 +- .../suite/AmountUnitSwitchWrapper.tsx | 9 +++- .../AppNavigation/AppNavigationTooltip.tsx | 3 +- .../components/suite/ChangeDeviceLabel.tsx | 12 +++-- .../components/suite/CoinGroup/CoinGroup.tsx | 4 +- .../suite/CoinGroup/CoinGroupHeader.tsx | 2 + .../src/components/suite/CoinList/Coin.tsx | 5 +- .../components/suite/CoinList/CoinList.tsx | 4 +- .../components/suite/ConnectDevicePrompt.tsx | 5 +- .../src/components/suite/CountdownTimer.tsx | 9 +++- .../suite/DeviceAuthenticationExplainer.tsx | 2 +- .../suite/DeviceDisplay/DeviceDisplay.tsx | 9 ++-- .../suite/DeviceDisplay/DisplayChunks.tsx | 5 +- .../DeviceDisplay/DisplayPageSeparator.tsx | 4 +- .../DeviceDisplay/DisplayPaginatedText.tsx | 5 +- .../DisplaySinglePageWrapText.tsx | 1 + .../__tests__/DeviceDisplay.test.tsx | 9 ++-- .../parseTextToPagesAndLines.test.ts | 1 + .../suite/DeviceMatrixExplanation.tsx | 5 +- .../suite/src/components/suite/DropZone.tsx | 5 +- packages/suite/src/components/suite/Error.tsx | 2 + .../suite/src/components/suite/FiatValue.tsx | 18 ++++--- .../components/suite/FormFractionButtons.tsx | 4 +- .../suite/FormattedCryptoAmount.tsx | 9 ++-- .../components/suite/FormattedNftAmount.tsx | 2 +- .../components/suite/HiddenPlaceholder.tsx | 5 +- .../src/components/suite/HoverAnimation.tsx | 2 + .../src/components/suite/InstructionStep.tsx | 2 + .../src/components/suite/LearnMoreButton.tsx | 3 +- .../suite/src/components/suite/Loading.tsx | 1 + .../suite/src/components/suite/Metadata.tsx | 4 +- .../src/components/suite/NotificationCard.tsx | 4 +- .../src/components/suite/NumberInput.tsx | 6 +-- .../suite/PinMatrix/PinInput/InputPin.tsx | 2 + .../suite/PinMatrix/PinInput/PinInput.tsx | 3 ++ .../components/suite/PinMatrix/PinMatrix.tsx | 4 ++ .../suite/Preloader/InitialLoading.tsx | 1 + .../components/suite/Preloader/Preloader.tsx | 18 ++++--- .../Preloader/__tests__/Preloader.test.tsx | 2 +- .../PrerequisitesGuide/DeviceInitialize.tsx | 2 + .../PrerequisitesGuide/DeviceNoFirmware.tsx | 1 + .../PrerequisitesGuide/DeviceRecoveryMode.tsx | 2 + .../PrerequisitesGuide/DeviceUnreadable.tsx | 1 + .../DeviceUpdateRequired.tsx | 1 + .../PrerequisitesGuide/PrerequisitesGuide.tsx | 5 +- .../suite/PrerequisitesGuide/Transport.tsx | 1 - .../suite/src/components/suite/QrCode.tsx | 3 +- .../src/components/suite/QuestionTooltip.tsx | 2 + .../src/components/suite/ReadMoreLink.tsx | 1 + .../suite/SecurityCheck/DeviceCompromised.tsx | 2 + .../suite/SecurityCheck/SecurityCheckFail.tsx | 1 + .../suite/SecurityCheck/checklistItems.tsx | 3 +- packages/suite/src/components/suite/Sign.tsx | 1 + .../components/suite/StakeAmountWrapper.tsx | 6 ++- .../src/components/suite/StakingFeature.tsx | 1 + .../suite/StakingProcess/InfoRow.tsx | 1 + .../suite/StakingProcess/StakingInfo.tsx | 7 ++- .../suite/StakingProcess/Subheading.tsx | 3 +- .../suite/StakingProcess/UnstakingInfo.tsx | 7 ++- .../src/components/suite/StatusLight.tsx | 3 +- .../suite/Ticker/LastUpdateTooltip.tsx | 9 ++-- .../suite/Ticker/NoRatesTooltip.tsx | 8 ++- .../components/suite/Ticker/PriceTicker.tsx | 7 ++- .../components/suite/Ticker/TrendTicker.tsx | 1 + .../src/components/suite/TooltipSymbol.tsx | 2 + .../components/suite/TorLoader/TorLoader.tsx | 5 +- .../suite/TorLoader/TorProgressBar.tsx | 2 +- .../components/suite/TrafficLightOffset.tsx | 4 +- .../suite/src/components/suite/TrezorLink.tsx | 1 + .../src/components/suite/UdevDownload.tsx | 6 ++- .../components/suite/UnstakingTxAmount.tsx | 2 + .../src/components/suite/WebUsbButton.tsx | 1 + .../suite/src/components/suite/WordInput.tsx | 7 ++- .../components/suite/WordInputAdvanced.tsx | 5 +- .../suite/__tests__/NumberInput.test.tsx | 11 ++-- .../suite/__tests__/Translation.test.tsx | 1 + .../suite/banners/MessageSystemBanner.tsx | 8 +-- .../SuiteBanners/FailedBackupBanner.tsx | 3 +- .../FirmwareHashMismatchBanner.tsx | 3 +- .../banners/SuiteBanners/NoBackupBanner.tsx | 3 +- .../SuiteBanners/NoConnectionBanner.tsx | 3 +- .../SuiteBanners/SafetyChecksBanner.tsx | 3 +- .../banners/SuiteBanners/SuiteBanners.tsx | 2 + .../SuiteBanners/TranslationModeBanner.tsx | 3 +- .../SuiteBanners/UpdateBridgeBanner.tsx | 3 +- .../suite/graph/GraphRangeSelector.tsx | 5 +- .../suite/graph/GraphScaleDropdownItem.tsx | 4 +- .../components/suite/graph/GraphSkeleton.tsx | 1 + .../TransactionsGraph/GraphTooltipAccount.tsx | 10 ++-- .../TransactionsGraph/GraphTooltipBase.tsx | 1 + .../TransactionsGraph/GraphXAxisTick.tsx | 3 +- .../TransactionsGraph/GraphYAxisTick.tsx | 8 ++- .../suite/labeling/AccountLabeling.tsx | 2 +- .../suite/labeling/AddressLabeling.tsx | 4 +- .../MetadataLabeling/MetadataLabeling.tsx | 14 +++-- .../labeling/MetadataLabeling/definitions.ts | 4 +- .../MetadataLabeling/withDropdown.tsx | 4 +- .../MetadataLabeling/withEditable.tsx | 1 + .../suite/labeling/WalletLabeling.tsx | 10 ++-- .../suite/layouts/LoggedOutLayout.tsx | 5 +- .../SuiteLayout/CoinjoinBars/CoinjoinBars.tsx | 4 +- .../DeviceSelector/DeviceSelector.tsx | 13 +++-- .../DeviceSelector/DeviceStatus.tsx | 10 ++-- .../DeviceSelector/SidebarDeviceStatus.tsx | 3 ++ .../MobileMenu/MobileActionItem.tsx | 2 + .../SuiteLayout/MobileMenu/MobileMenu.tsx | 2 + .../MobileMenu/MobileMenuActions.tsx | 2 +- .../MobileMenu/MobileNavigation.tsx | 6 ++- .../PageHeader/HeaderActionButton.tsx | 1 + .../SuiteLayout/PageHeader/HeaderActions.tsx | 2 + .../SuiteLayout/PageHeader/PageHeader.tsx | 5 +- .../PageNames/AccountName/AccountDetails.tsx | 7 ++- .../PageNames/AccountName/AccountName.tsx | 3 ++ .../AccountName/AccountSubpageName.tsx | 7 ++- .../PageHeader/PageNames/BasicName.tsx | 2 + .../PageHeader/PageNames/PageName.tsx | 1 + .../PageHeader/PageNames/SettingsName.tsx | 4 ++ .../SuiteLayout/PageHeader/TradeActions.tsx | 10 ++-- .../SuiteLayout/Sidebar/Navigation.tsx | 8 ++- .../SuiteLayout/Sidebar/NavigationItem.tsx | 9 ++-- .../Sidebar/NotificationDropdown.tsx | 4 ++ .../Sidebar/QuickActions/CustomBackend.tsx | 4 +- .../QuickActions/DebugAndExperimental.tsx | 7 ++- .../Sidebar/QuickActions/HideBalances.tsx | 1 + .../Sidebar/QuickActions/NavBackends.tsx | 9 ++-- .../QuickActions/QuickActionButton.tsx | 4 +- .../Sidebar/QuickActions/QuickActions.tsx | 1 + .../Sidebar/QuickActions/TooltipRow.tsx | 4 +- .../SuiteLayout/Sidebar/QuickActions/Tor.tsx | 15 +++--- .../QuickActions/Update/UpdateIconGroup.tsx | 4 +- .../Update/UpdateNotificationBanner.tsx | 5 +- .../Update/UpdateStatusActionBarIcon.tsx | 14 +++-- .../QuickActions/Update/UpdateTooltip.tsx | 16 +++--- .../Update/updateQuickActionTypes.ts | 4 +- .../layouts/SuiteLayout/Sidebar/Sidebar.tsx | 12 +++-- .../layouts/SuiteLayout/SubpageNavigation.tsx | 5 +- .../suite/layouts/SuiteLayout/SuiteLayout.tsx | 7 ++- .../layouts/SuiteLayout/useAppShortcuts.tsx | 7 ++- .../layouts/WelcomeLayout/NavSettings.tsx | 1 + .../layouts/WelcomeLayout/WelcomeLayout.tsx | 16 +++--- .../modals/ConfirmEvmExplanationModal.tsx | 12 +++-- .../suite/modals/Modal/DefaultRenderer.tsx | 3 ++ .../suite/modals/Modal/DialogRenderer.tsx | 5 +- .../components/suite/modals/Modal/Modal.tsx | 2 + .../suite/modals/ModalEnvironment.tsx | 1 + .../modals/ModalSwitcher/DiscoveryLoader.tsx | 5 +- .../ModalSwitcher/ForegroundAppModal.tsx | 7 ++- .../modals/ModalSwitcher/ModalSwitcher.tsx | 1 + .../modals/ReduxModal/ConfirmAddressModal.tsx | 1 + .../ConfirmValueModal/ConfirmValueModal.tsx | 10 ++-- .../ConfirmValueModal/DeviceDisconnected.tsx | 3 +- .../modals/ReduxModal/ConfirmXpubModal.tsx | 3 +- .../modals/ReduxModal/CopyAddressModal.tsx | 9 ++-- .../DeviceConfirmationModal/NoBackupModal.tsx | 6 ++- .../DeviceContextModal/ConfirmActionModal.tsx | 6 ++- .../ConfirmFingerprintModal.tsx | 4 +- .../DeviceContextModal/DeviceContextModal.tsx | 2 + .../DeviceContextModal/PassphraseModal.tsx | 4 +- .../PassphraseOnDeviceModal.tsx | 3 +- .../PassphraseWalletConfirmation.tsx | 5 +- .../PassphraseWalletConfirmationStep1.tsx | 4 +- .../PassphraseWalletConfirmationStep2.tsx | 7 ++- .../PassphraseWalletConfirmationStep3.tsx | 3 +- .../DeviceContextModal/PinInvalidModal.tsx | 1 + .../DeviceContextModal/PinModal.tsx | 3 +- .../DeviceContextModal/WordAdvancedModal.tsx | 5 +- .../DeviceContextModal/WordModal.tsx | 7 ++- .../suite/modals/ReduxModal/ReduxModal.tsx | 1 + .../TransactionReviewEvmExplanation.tsx | 5 +- .../TransactionReviewModal.tsx | 4 +- .../TransactionReviewModalContent.tsx | 11 ++-- .../TransactionReviewDetails.tsx | 3 +- .../TransactionReviewOutput.tsx | 13 +++-- .../TransactionReviewOutputElement.tsx | 11 ++-- .../TransactionReviewOutputList.tsx | 15 +++--- .../TransactionReviewStepIndicator.tsx | 1 + .../TransactionReviewTotalOutput.tsx | 6 ++- .../TransactionReviewSummary.tsx | 9 ++-- .../modals/ReduxModal/UnhideTokenModal.tsx | 10 ++-- .../AccountTypeDescription.tsx | 8 +-- .../AccountTypeSelect/AccountTypeSelect.tsx | 7 ++- .../AddAccountButton/AddAccountButton.tsx | 4 +- .../AddAccountButton/AddButton.tsx | 4 +- .../AddCoinjoinAccountButton.tsx | 2 +- .../AddAccountModal/AddAccountModal.tsx | 9 ++-- .../UserContextModal/AddTokenModal.tsx | 5 +- .../AdvancedCoinSettingsModal.tsx | 10 ++-- .../CustomBackends/BackendInput.tsx | 1 + .../CustomBackends/BackendTypeSelect.tsx | 5 +- .../CustomBackends/ConnectionInfo.tsx | 4 +- .../CustomBackends/CustomBackends.tsx | 10 ++-- .../CustomBackends/TorModal.tsx | 4 +- .../UserContextModal/ApplicationLogModal.tsx | 3 +- .../AuthenticateDeviceFailModal.tsx | 3 +- .../UserContextModal/CancelCoinjoinModal.tsx | 2 + .../ClaimModal/ClaimEthForm.tsx | 10 ++-- .../ClaimModal/ClaimModal.tsx | 2 + .../ClaimModal/ClaimModalContent.tsx | 2 + .../UserContextModal/ClaimModal/Fees.tsx | 1 + .../UserContextModal/CoinjoinSuccessModal.tsx | 3 +- .../UserContextModal/CoinmarketTermsModal.tsx | 8 +-- .../ConfirmUnverifiedAddressModal.tsx | 1 + .../ConfirmUnverifiedModal.tsx | 9 ++-- .../ConfirmUnverifiedProceedModal.tsx | 3 +- .../ConfirmUnverifiedXpubModal.tsx | 3 +- .../AutoStopButton.tsx | 5 +- .../CoinjoinPhaseProgress.tsx | 9 ++-- .../CriticalCoinjoinPhaseModal.tsx | 7 ++- .../DeviceAuthenticityOptOutModal.tsx | 3 +- .../UserContextModal/DisableTorModal.tsx | 7 ++- .../FirmwareRevisionOptOutModal.tsx | 3 +- .../ImportTransactionModal/DelimiterForm.tsx | 3 ++ .../ImportTransactionModal/ExampleCSV.tsx | 5 +- .../ImportTransactionModal.tsx | 3 ++ .../ImportTransactionModal/InputCSV.tsx | 2 + .../ImportTransactionModal/TabSelection.tsx | 5 +- .../MetadataProviderModal.tsx | 9 ++-- .../MoreRoundsNeededModal.tsx | 4 +- .../BackupInstructionsCard.tsx | 1 + .../BackupInstructionsStep.tsx | 1 + .../MultiShareBackupModal.tsx | 8 +-- .../MultiShareBackupStep1FirstInfo.tsx | 2 + .../MultiShareBackupStep5Done.tsx | 12 +++-- .../instructionSteps.tsx | 3 +- .../multiShareModalLayout.tsx | 3 +- .../PassphraseDuplicateModal.tsx | 1 - .../PassphraseMismatchModal.tsx | 7 +-- .../UserContextModal/PinMismatchModal.tsx | 2 + .../UserContextModal/QrScannerModal.tsx | 1 + .../UserContextModal/SafetyChecksModal.tsx | 7 ++- .../StakeEthInANutshellModal.tsx | 7 +-- .../StakeEthForm/AvailableBalance.tsx | 2 + .../StakeEthForm/ConfirmStakeEthModal.tsx | 6 ++- .../StakeModal/StakeEthForm/Inputs.tsx | 6 ++- .../StakeModal/StakeEthForm/StakeButton.tsx | 1 + .../StakeModal/StakeEthForm/StakeEthForm.tsx | 4 +- .../StakeModal/StakeModal.tsx | 4 +- .../StakingInfoCards/EstimatedGains.tsx | 12 +++-- .../StakingInfoCards/StakingInfoCards.tsx | 7 ++- .../AdvancedTxDetails/AdvancedTxDetails.tsx | 8 ++- .../AdvancedTxDetails/AmountDetails.tsx | 15 +++--- .../AdvancedTxDetails/AmountRow.tsx | 1 + .../TxDetailModal/AdvancedTxDetails/Data.tsx | 7 ++- .../IODetails/AnalyzeInExplorerBanner.tsx | 5 +- .../AdvancedTxDetails/IODetails/IODetails.tsx | 12 +++-- .../TxDetailModal/BasicTxDetails.tsx | 14 +++-- .../TxDetailModal/ChainedTxs.tsx | 3 +- .../ChangeFee/AffectedTransactionItem.tsx | 4 +- .../ChangeFee/AffectedTransactions.tsx | 3 ++ .../TxDetailModal/ChangeFee/ChangeFee.tsx | 11 ++-- .../ChangeFee/DecreasedOutputs.tsx | 9 +++- .../TxDetailModal/ChangeFee/GreyCard.tsx | 2 + .../ChangeFee/ReplaceTxButton.tsx | 2 + .../TxDetailModal/ChangeFee/WarnHeader.tsx | 2 + .../TxDetailModal/IOAddress.tsx | 10 ++-- .../TxDetailModal/TxDetailModal.tsx | 9 +++- .../UserContextModal/UnecoCoinjoinModal.tsx | 3 +- .../UnstakeModal/EverstakeModal.tsx | 6 ++- .../UnstakeModal/UnstakeEthForm/Fees.tsx | 1 + .../UnstakeModal/UnstakeEthForm/Inputs.tsx | 11 ++-- .../UnstakeModal/UnstakeEthForm/Options.tsx | 11 ++-- .../UnstakeEthForm/UnstakeButton.tsx | 1 + .../UnstakeEthForm/UnstakeEthForm.tsx | 15 ++++-- .../UnstakeModal/UnstakeModal.tsx | 11 ++-- .../UserContextModal/UserContextModal.tsx | 4 +- .../UserContextModal/WipeDeviceModal.tsx | 4 +- .../CoinProtocolRenderer.tsx | 8 +-- .../ConditionalActionRenderer.tsx | 2 + .../NotificationRenderer.tsx | 1 + .../NotificationGroup/NotificationGroup.tsx | 2 + .../NotificationList/NotificationList.tsx | 3 +- .../NotificationList/NotificationView.tsx | 1 + .../Notifications/Notifications.tsx | 8 ++- .../suite/notifications/ToastContainer.tsx | 3 +- .../suite/notifications/ToastNotification.tsx | 9 +++- .../components/suite/section/SectionItem.tsx | 2 + .../components/suite/section/TextColumn.tsx | 1 + .../suite/section/sectionStyles.tsx | 1 + .../troubleshooting/TroubleshootingTips.tsx | 5 +- .../troubleshooting/tips/UdevDescription.tsx | 6 ++- .../wallet/AccountExceptionLayout.tsx | 1 + .../components/wallet/AnimationWrapper.tsx | 1 + .../CoinjoinAccountDiscoveryProgress.tsx | 7 ++- .../RotatingFacts.tsx | 3 ++ .../components/wallet/DiscoveryProgress.tsx | 3 +- .../components/wallet/EvmExplanationBox.tsx | 6 ++- .../src/components/wallet/Fees/CustomFee.tsx | 22 +++++--- .../src/components/wallet/Fees/FeeDetails.tsx | 8 +-- .../suite/src/components/wallet/Fees/Fees.tsx | 16 ++++-- .../src/components/wallet/FiatHeader.tsx | 7 ++- .../src/components/wallet/InputError.tsx | 4 +- .../src/components/wallet/Pagination.tsx | 5 +- .../src/components/wallet/SearchAction.tsx | 4 +- .../components/wallet/TokenIconSetWrapper.tsx | 15 +++--- .../TransactionItem/CoinjoinBatchItem.tsx | 10 ++-- .../TransactionItem/CommonComponents.tsx | 3 ++ .../TransactionItem/InstantStakeBadge.tsx | 18 ++++--- .../TransactionItem/TransactionHeader.tsx | 5 +- .../TransactionItem/TransactionHeading.tsx | 22 ++++---- .../TransactionItem/TransactionItem.tsx | 30 ++++++----- .../wallet/TransactionItem/TransactionRow.tsx | 16 +++--- .../TransactionTarget/TargetAddressLabel.tsx | 7 ++- .../TokenTransferAddressLabel.tsx | 4 +- .../TransactionTarget/TransactionTarget.tsx | 11 ++-- .../TransactionTargetLayout.tsx | 5 +- .../TransactionItem/TransactionTypeIcon.tsx | 4 +- .../wallet/TransactionTimestamp.tsx | 4 +- .../AccountBanners/AccountBanners.tsx | 13 +++-- .../AccountBanners/BackendDisconnected.tsx | 5 +- .../AccountBanners/BannerPoints.tsx | 2 + .../AccountBanners/CloseableBanner.tsx | 6 ++- .../AccountBanners/ContextMessage.tsx | 9 ++-- .../AccountBanners/EvmExplanationBanner.tsx | 8 +-- .../AccountBanners/StakeEthBanner.tsx | 13 +++-- .../AccountBanners/TaprootBanner.tsx | 9 ++-- .../AccountBanners/XRPReserve.tsx | 6 ++- .../AccountException/AccountNotEnabled.tsx | 3 +- .../AccountTopPanel/AccountNavigation.tsx | 7 +-- .../AccountTopPanel/AccountTopPanel.tsx | 5 +- .../AccountsMenu/AccountGroup.tsx | 9 +++- .../WalletLayout/AccountsMenu/AccountItem.tsx | 5 +- .../AccountsMenu/AccountItemSkeleton.tsx | 3 +- .../AccountsMenu/AccountItemsGroup.tsx | 12 +++-- .../AccountsMenu/AccountSection.tsx | 8 +-- .../AccountsMenu/AccountsList.tsx | 8 +-- .../AccountsMenu/AccountsMenu.tsx | 9 ++-- .../AccountsMenu/AccountsMenuNotice.tsx | 3 +- .../AccountsMenu/AddAccountButton.tsx | 5 +- .../AccountsMenu/MobileAccountsMenu.tsx | 4 ++ .../RefreshAfterDiscoveryNeeded.tsx | 3 +- .../CoinjoinAccountDiscovery.tsx | 1 + .../RememberWallet.tsx | 2 +- .../wallet/WalletLayout/WalletLayout.tsx | 2 + .../WalletLayout/WalletSubpageHeading.tsx | 5 +- packages/suite/src/config/onboarding/steps.ts | 3 +- .../suite/src/constants/suite/experimental.ts | 1 - packages/suite/src/constants/suite/routes.ts | 2 +- .../useCoinjoinAccountLoadingProgress.ts | 1 + .../coinjoin/useCoinjoinSessionBlockers.ts | 4 +- .../hooks/coinjoin/useCoinjoinSessionPhase.ts | 1 + packages/suite/src/hooks/guide/useGuide.ts | 2 + .../suite/src/hooks/guide/useGuideKeyboard.ts | 1 + .../src/hooks/guide/useGuideLoadArticle.ts | 2 + .../suite/src/hooks/guide/useGuideSearch.ts | 2 + .../backends/useBackendReconnection.ts | 2 +- .../settings/backends/useBackendsForm.ts | 7 +-- .../settings/backends/useCustomBackends.ts | 3 +- .../hooks/settings/backends/useDefaultUrls.ts | 1 + .../src/hooks/settings/useNetworkSupport.ts | 2 +- .../suite/__fixtures__/useFilteredModal.ts | 1 + .../__tests__/useCountdownTimer.test.tsx | 1 + .../suite/__tests__/useFilteredModal.test.tsx | 8 ++- .../hooks/suite/__tests__/usePinModal.test.ts | 1 + packages/suite/src/hooks/suite/useActions.ts | 4 +- .../src/hooks/suite/useAnonymityStatus.ts | 3 +- .../suite/useClearAnchorHighlightOnClick.ts | 4 +- .../src/hooks/suite/useCountdownTimer.ts | 1 + .../hooks/suite/useDebugLanguageShortcut.ts | 6 ++- .../src/hooks/suite/useDefaultAccountLabel.ts | 7 ++- packages/suite/src/hooks/suite/useDevice.ts | 2 +- packages/suite/src/hooks/suite/useDispatch.ts | 2 + .../suite/src/hooks/suite/useDisplayMode.ts | 3 +- .../suite/src/hooks/suite/useExternalLink.ts | 1 + .../src/hooks/suite/useFiatFromCryptoValue.ts | 5 +- .../src/hooks/suite/useFormattersConfig.ts | 3 +- .../hooks/suite/useMessageSystemStaking.ts | 2 + .../suite/src/hooks/suite/useOnboarding.ts | 1 + .../src/hooks/suite/useOpenSuiteDesktop.ts | 1 + .../suite/src/hooks/suite/usePasswords.ts | 1 - packages/suite/src/hooks/suite/usePinModal.ts | 1 + .../src/hooks/suite/useRediscoveryNeeded.ts | 4 +- .../src/hooks/suite/useResetScrollOnUrl.ts | 1 + packages/suite/src/hooks/suite/useSelector.ts | 3 +- .../suite/src/hooks/suite/useTranslation.ts | 4 +- .../hooks/wallet/__fixtures__/useSendForm.ts | 1 + .../__tests__/useExcludedUtxos.test.tsx | 5 +- .../wallet/__tests__/useRbfForm.test.tsx | 7 ++- .../wallet/__tests__/useSendForm.test.tsx | 7 +-- .../form/common/useCoinmarketAccount.ts | 4 +- .../common/useCoinmarketBuildAccountGroups.ts | 4 +- .../common/useCoinmarketComposeTransaction.ts | 6 ++- .../common/useCoinmarketCurrencySwitcher.ts | 4 +- .../form/common/useCoinmarketFiatValues.tsx | 7 ++- .../form/common/useCoinmarketFormActions.ts | 11 ++-- .../form/common/useCoinmarketInitializer.ts | 4 +- .../form/common/useCoinmarketModalCrypto.ts | 4 +- .../coinmarket/form/useCoinmarketBuyForm.tsx | 12 +++-- .../useCoinmarketBuyFormDefaultValues.tsx | 10 ++-- .../form/useCoinmarketCommonForm.tsx | 1 + .../form/useCoinmarketExchangeForm.ts | 12 +++-- .../useCoinmarketExchangeFormDefaultValues.ts | 4 +- .../useCoinmarketExchangeWatchSendApproval.ts | 4 +- .../form/useCoinmarketPaymentMethod.tsx | 1 + .../coinmarket/form/useCoinmarketSellForm.ts | 11 ++-- .../useCoinmarketSellFormDefaultValues.ts | 6 ++- .../form/useCoinmarketVerifyAccount.tsx | 13 +++-- .../wallet/coinmarket/useCoinmarketDetail.ts | 3 +- .../wallet/coinmarket/useCoinmarketInfo.ts | 9 ++-- .../coinmarket/useCoinmarketLoadData.ts | 1 + .../coinmarket/useCoinmarketWatchTrade.ts | 12 +++-- .../wallet/form/useCoinjoinRegisteredUtxos.ts | 1 + .../form/useCoinjoinUnavailableUtxos.ts | 3 +- .../suite/src/hooks/wallet/form/useCompose.ts | 7 ++- .../suite/src/hooks/wallet/form/useFees.ts | 7 ++- .../src/hooks/wallet/form/useStakeCompose.ts | 5 +- .../src/hooks/wallet/form/useUtxoSelection.ts | 1 + .../sign-verify/useCopySignedMessage.ts | 3 +- .../sign-verify/useSignAddressOptions.ts | 1 + .../wallet/sign-verify/useSignVerifyForm.ts | 6 ++- .../src/hooks/wallet/useBitcoinAmountUnit.ts | 2 +- .../suite/src/hooks/wallet/useClaimEthForm.ts | 12 ++--- .../hooks/wallet/useCoinmarketNavigation.ts | 1 + .../wallet/useCoinmarketRecomposeAndSign.ts | 6 ++- .../src/hooks/wallet/useCoinmarketRedirect.ts | 7 ++- .../suite/src/hooks/wallet/useFormDraft.ts | 3 +- packages/suite/src/hooks/wallet/useRbfForm.ts | 12 +++-- .../suite/src/hooks/wallet/useSendForm.ts | 29 ++++++----- .../src/hooks/wallet/useSendFormCompose.ts | 10 ++-- .../src/hooks/wallet/useSendFormFields.ts | 7 ++- .../src/hooks/wallet/useSendFormImport.ts | 7 +-- .../src/hooks/wallet/useSendFormOutputs.ts | 2 + .../suite/src/hooks/wallet/useStakeEthForm.ts | 35 +++++++------ .../src/hooks/wallet/useUnstakeEthForm.ts | 26 +++++----- .../middlewares/backup/backupMiddleware.ts | 1 + .../__tests__/onboardingMiddleware.test.ts | 2 - .../recovery/recoveryMiddleware.ts | 1 + .../__tests__/protocolMiddleware.test.ts | 11 ++-- .../middlewares/suite/analyticsMiddleware.ts | 4 +- .../suite/buttonRequestMiddleware.ts | 2 +- .../src/middlewares/suite/logsMiddleware.ts | 1 + .../middlewares/suite/protocolMiddleware.ts | 2 +- .../src/middlewares/suite/routerMiddleware.ts | 2 +- .../src/middlewares/suite/toastMiddleware.ts | 4 +- .../wallet/__fixtures__/coinjoinMiddleware.ts | 2 +- .../wallet/__fixtures__/walletMiddleware.ts | 7 +-- .../__tests__/coinmarketMiddleware.test.ts | 4 +- .../wallet/coinmarketMiddleware.ts | 4 +- .../suite/src/middlewares/wallet/index.ts | 5 +- .../middlewares/wallet/storageMiddleware.ts | 4 +- .../src/reducers/backup/backupReducer.ts | 1 + .../desktop/__tests__/desktopReducer.test.ts | 6 ++- .../reducers/onboarding/onboardingReducer.ts | 2 +- .../src/reducers/recovery/recoveryReducer.ts | 1 + packages/suite/src/reducers/store.ts | 2 +- .../__tests__/desktopUpdateReducer.test.ts | 3 +- .../suite/__tests__/modalReducer.test.ts | 3 +- .../suite/__tests__/protocolReducer.test.ts | 3 +- .../reducers/suite/desktopUpdateReducer.ts | 4 +- .../suite/src/reducers/suite/guideReducer.ts | 6 ++- .../src/reducers/suite/metadataReducer.ts | 4 +- .../src/reducers/suite/protocolReducer.ts | 4 +- .../suite/src/reducers/suite/resizeReducer.ts | 4 +- .../suite/src/reducers/suite/suiteReducer.ts | 9 ++-- .../wallet/__fixtures__/coinjoinReducer.ts | 1 + .../wallet/__tests__/coinjoinReducer.test.ts | 3 +- .../__tests__/coinmarketReducer.test.ts | 15 +++--- .../wallet/__tests__/sendFormReducer.test.ts | 4 +- .../__tests__/transactionReducer.test.ts | 4 +- .../reducers/wallet/cardanoStakingReducer.ts | 4 +- .../src/reducers/wallet/coinjoinReducer.ts | 3 +- .../src/reducers/wallet/coinmarketReducer.ts | 9 ++-- .../src/reducers/wallet/formDraftReducer.ts | 3 +- .../suite/src/reducers/wallet/graphReducer.ts | 5 +- .../src/reducers/wallet/receiveReducer.ts | 4 +- .../reducers/wallet/selectedAccountReducer.ts | 3 +- .../src/reducers/wallet/settingsReducer.ts | 6 ++- .../src/services/coinjoin/coinjoinService.ts | 1 + .../suite/src/services/coinjoin/config.ts | 3 +- packages/suite/src/services/github.ts | 4 +- packages/suite/src/services/google.ts | 3 +- .../suite/src/services/suite/invityAPI.ts | 2 + .../suite/metadata/DropboxProvider.ts | 4 +- .../suite/metadata/FileSystemProvider.ts | 1 + packages/suite/src/storage/definitions.ts | 17 ++++--- packages/suite/src/storage/index.ts | 3 +- .../suite/src/storage/migrations/index.ts | 14 ++--- .../suite/src/storage/migrations/utils.ts | 1 + .../suite/src/support/extraDependencies.ts | 18 ++++--- .../suite/src/support/suite/Autodetect.tsx | 1 + .../support/suite/ConnectedIntlProvider.tsx | 4 +- .../support/suite/ConnectedThemeProvider.tsx | 2 + .../suite/src/support/suite/ErrorBoundary.tsx | 2 + .../suite/src/support/suite/OnlineStatus.tsx | 1 + packages/suite/src/support/suite/Protocol.tsx | 3 +- packages/suite/src/support/suite/Resize.tsx | 2 + packages/suite/src/support/suite/Router.tsx | 1 + .../suite/src/support/suite/ThemeProvider.tsx | 3 ++ .../src/support/suite/screens/ErrorScreen.tsx | 1 + .../support/suite/screens/LoadingScreen.tsx | 2 + .../src/support/suite/styles/GlobalStyle.tsx | 4 +- packages/suite/src/support/suite/useTor.tsx | 6 ++- .../suite/src/support/tests/IntlHelper.tsx | 1 + .../suite/src/support/tests/hooksHelper.tsx | 5 +- .../suite/src/types/coinmarket/coinmarket.ts | 32 ++++++------ .../src/types/coinmarket/coinmarketDetail.ts | 3 +- .../src/types/coinmarket/coinmarketForm.ts | 46 +++++++++-------- .../src/types/coinmarket/coinmarketVerify.ts | 9 ++-- packages/suite/src/types/onboarding/index.ts | 1 + packages/suite/src/types/wallet/coinjoin.ts | 1 + .../src/types/wallet/coinmarketCommonTypes.ts | 4 +- packages/suite/src/types/wallet/index.ts | 3 +- packages/suite/src/types/wallet/sendForm.ts | 1 - .../utils/firmware/__tests__/firmware.test.ts | 4 +- packages/suite/src/utils/firmware/index.ts | 3 +- .../utils/onboarding/__tests__/steps.test.ts | 1 + .../src/utils/suite/__fixtures__/device.ts | 3 +- .../utils/suite/__fixtures__/homescreen.ts | 3 +- .../utils/suite/__tests__/homescreen.test.ts | 4 +- .../utils/suite/__tests__/logsUtils.test.ts | 2 +- .../utils/suite/__tests__/metadata.test.ts | 1 + .../utils/suite/__tests__/parseUri.test.ts | 1 + .../utils/suite/__tests__/protocol.test.ts | 1 + .../src/utils/suite/__tests__/reload.test.ts | 1 + .../src/utils/suite/__tests__/stake.test.ts | 51 ++++++++++--------- .../src/utils/suite/__tests__/theme.test.ts | 1 + .../src/utils/suite/__tests__/tor.test.ts | 1 + packages/suite/src/utils/suite/anchor.ts | 4 +- packages/suite/src/utils/suite/l10n.ts | 3 +- packages/suite/src/utils/suite/metadata.ts | 4 +- .../suite/src/utils/suite/notification.ts | 3 +- packages/suite/src/utils/suite/oauth.ts | 3 +- .../suite/src/utils/suite/prerequisites.ts | 2 + packages/suite/src/utils/suite/protocol.ts | 3 +- packages/suite/src/utils/suite/stake.ts | 6 ++- packages/suite/src/utils/suite/storage.ts | 2 +- packages/suite/src/utils/suite/theme.ts | 1 + packages/suite/src/utils/suite/tor.ts | 1 + packages/suite/src/utils/suite/validation.ts | 1 + .../wallet/__fixtures__/coinjoinUtils.ts | 2 + .../suite/src/utils/wallet/accountUtils.ts | 1 + .../suite/src/utils/wallet/coinjoinUtils.ts | 27 +++++----- .../coinmarket/__fixtures__/exchangeUtils.ts | 3 +- .../__tests__/coinmarketUtils.test.ts | 3 +- .../__tests__/exchangeUtils.test.ts | 1 + .../src/utils/wallet/coinmarket/buyUtils.ts | 6 ++- .../coinmarket/coinmarketTypingUtils.ts | 4 +- .../wallet/coinmarket/coinmarketUtils.ts | 16 +++--- .../utils/wallet/coinmarket/exchangeUtils.ts | 3 +- .../src/utils/wallet/coinmarket/sellUtils.ts | 6 ++- .../utils/wallet/exportTransactionsUtils.ts | 1 - .../suite/src/utils/wallet/graph/utils.ts | 8 +-- .../src/utils/wallet/graph/utilsShared.ts | 1 + .../src/utils/wallet/graph/utilsWorker.ts | 8 +-- packages/suite/src/utils/wallet/tokenUtils.ts | 1 - .../views/dashboard/AssetsView/ArrowIcon.tsx | 3 +- .../AssetsView/AssetCard/AssetCard.tsx | 46 ++++++++++------- .../AssetsView/AssetCard/AssetCardInfo.tsx | 8 +-- .../AssetCardTokensAndStakingInfo.tsx | 3 +- .../dashboard/AssetsView/AssetCoinLogo.tsx | 3 +- .../dashboard/AssetsView/AssetCoinName.tsx | 2 + .../AssetsView/AssetTable/AssetRow.tsx | 22 ++++---- .../AssetTable/AssetRowSkeleton.tsx | 4 +- .../AssetsView/AssetTable/AssetStakingRow.tsx | 4 +- .../AssetsView/AssetTable/AssetTable.tsx | 10 ++-- .../AssetTable/AssetTableExtraRowsSection.tsx | 1 + .../AssetsView/AssetTable/AssetTokenRow.tsx | 4 +- .../views/dashboard/AssetsView/AssetsView.tsx | 28 +++++----- .../AssetsView/CoinmarketBuyButton.tsx | 10 ++-- .../dashboard/AssetsView/assetsViewUtils.ts | 11 ++-- .../dashboard/DashboardPassphraseBanner.tsx | 13 +++-- .../dashboard/PortfolioCard/EmptyWallet.tsx | 2 +- .../dashboard/PortfolioCard/PortfolioCard.tsx | 10 ++-- .../PortfolioCard/PortfolioCardHeader.tsx | 3 +- .../suite/src/views/dashboard/PromoBanner.tsx | 8 ++- .../dashboard/StakeEthCard/StakeEthCard.tsx | 17 ++++--- .../StakeEthCardFooter/NetworkBadge.tsx | 1 + .../StakeEthCardFooter/StakeEthCardFooter.tsx | 6 ++- .../T3T1PromoBanner/T3T1PromoBanner.tsx | 14 +++-- .../T3T1PromoBanner/T3T1PromoLogo.tsx | 2 + packages/suite/src/views/dashboard/index.tsx | 7 ++- .../src/views/firmware/FirmwareCustom.tsx | 1 + .../src/views/firmware/FirmwareModal.tsx | 1 + .../src/views/firmware/FirmwareUpdate.tsx | 1 + .../components/IsSameDevice.tsx | 1 + .../onboarding/UnexpectedState/index.tsx | 1 + packages/suite/src/views/onboarding/index.tsx | 4 +- .../steps/BasicSettings/AdvancedSetup.tsx | 10 ++-- .../BasicSettings/BasicSettingsStepBox.tsx | 11 ++-- .../steps/BasicSettings/TorSection.tsx | 2 + .../views/onboarding/steps/DeviceTutorial.tsx | 4 +- .../src/views/onboarding/steps/Final.tsx | 6 ++- .../steps/Recovery/RecoveryStepBox.tsx | 1 + .../views/onboarding/steps/ResetDevice.tsx | 8 ++- .../src/views/onboarding/steps/Security.tsx | 1 + .../SecurityCheck/DeviceAuthenticity.tsx | 1 + .../steps/SecurityCheck/SecurityCheck.tsx | 2 + .../steps/SecurityCheck/SecurityChecklist.tsx | 1 + .../onboarding/steps/SecurityCheck/types.ts | 1 + .../steps/SelectBackupType/DefaultTag.tsx | 1 + .../SelectBackupType/FloatingSelections.tsx | 10 ++-- .../steps/SelectBackupType/LegacyOptions.tsx | 6 ++- .../SelectBackupType/OptionWithContent.tsx | 12 +++-- .../SelectBackupType/SelectBackupType.tsx | 26 ++++++---- .../steps/SelectBackupType/ShamirOptions.tsx | 8 +-- .../steps/SelectBackupType/typesToLabelMap.ts | 1 + .../PasswordManager/EntryForm.tsx | 9 ++-- .../PasswordManager/PasswordEntry.tsx | 3 +- .../PasswordManager/PasswordManager.tsx | 2 + .../PasswordManager/PasswordsList.tsx | 11 ++-- .../PasswordManager/TagsList.tsx | 3 +- .../src/views/password-manager/index.tsx | 3 +- .../SettingsCoins/FirmwareTypeSuggestion.tsx | 7 +-- .../settings/SettingsDebug/InvityApi.tsx | 3 +- .../settings/SettingsDebug/SettingsDebug.tsx | 4 +- .../src/views/settings/SettingsDebug/Tor.tsx | 1 - .../settings/SettingsDebug/Transport.tsx | 2 +- .../SettingsDebug/TransportBackends.tsx | 3 +- .../SettingsDebug/TriggerHighlight.tsx | 1 + .../SettingsDebug/ViewOnlySettings.tsx | 2 +- .../views/settings/SettingsDebug/WipeData.tsx | 3 +- .../settings/SettingsDevice/AutoLock.tsx | 2 +- .../settings/SettingsDevice/Brightness.tsx | 2 + .../SettingsDevice/ChangeLanguage.tsx | 1 + .../SettingsDevice/DefaultWalletLoading.tsx | 2 +- .../SettingsDevice/DisplayRotation.tsx | 2 +- .../SettingsDevice/FirmwareRevisionCheck.tsx | 3 +- .../SettingsDevice/FirmwareTypeChange.tsx | 15 +++--- .../SettingsDevice/HapticFeedback.tsx | 6 ++- .../settings/SettingsDevice/Homescreen.tsx | 3 +- .../SettingsDevice/MultiShareBackup.tsx | 9 ++-- .../settings/SettingsDevice/Passphrase.tsx | 2 +- .../settings/SettingsDevice/PinProtection.tsx | 2 +- .../settings/SettingsDevice/WipeCode.tsx | 5 +- .../settings/SettingsGeneral/Analytics.tsx | 1 + .../settings/SettingsGeneral/AutoStart.tsx | 2 +- .../SettingsGeneral/AutomaticUpdate.tsx | 6 ++- .../SettingsGeneral/BitcoinAmountUnit.tsx | 2 +- .../SettingsGeneral/DesktopSuiteBanner.tsx | 4 +- .../settings/SettingsGeneral/Experimental.tsx | 1 + .../settings/SettingsGeneral/Language.tsx | 5 +- .../SettingsGeneral/SettingsGeneral.tsx | 2 +- .../SettingsGeneral/ShowApplicationLog.tsx | 1 - .../settings/SettingsGeneral/ShowOnTray.tsx | 2 +- .../views/settings/SettingsGeneral/Theme.tsx | 4 +- .../views/settings/SettingsGeneral/Tor.tsx | 2 + .../SettingsGeneral/TorOnionLinks.tsx | 2 +- .../settings/SettingsGeneral/TorSnowflake.tsx | 6 ++- .../src/views/settings/SettingsLoader.tsx | 8 ++- .../suite/src/views/start/StartContent.tsx | 6 ++- packages/suite/src/views/start/SuiteStart.tsx | 2 + packages/suite/src/views/suite/ErrorPage.tsx | 4 +- .../suite/SwitchDevice/CardWithDevice.tsx | 3 +- .../DeviceItem/AddWalletButton.tsx | 4 +- .../DeviceItem/DeviceConnectionText.tsx | 6 ++- .../SwitchDevice/DeviceItem/DeviceDetail.tsx | 3 +- .../SwitchDevice/DeviceItem/DeviceHeader.tsx | 8 +-- .../SwitchDevice/DeviceItem/DeviceItem.tsx | 11 ++-- .../DeviceItem/DeviceStatusText.tsx | 10 ++-- .../SwitchDevice/DeviceItem/EjectButton.tsx | 4 +- .../DeviceItem/EjectConfirmation.tsx | 10 ++-- .../SwitchDevice/DeviceItem/ViewOnly.tsx | 11 ++-- .../DeviceItem/ViewOnlyRadios.tsx | 4 +- .../DeviceItem/WalletInstance.tsx | 9 ++-- .../views/suite/SwitchDevice/SwitchDevice.tsx | 2 +- .../suite/SwitchDevice/SwitchDeviceModal.tsx | 3 ++ .../views/suite/bridge-requested/index.tsx | 12 +++-- .../suite/src/views/suite/bridge/index.tsx | 7 ++- .../src/views/suite/notifications/index.tsx | 1 + .../suite/src/views/suite/version/index.tsx | 4 +- .../suite/src/views/view-only/MacWindow.tsx | 6 ++- .../src/views/view-only/ViewOnlyPromo.tsx | 4 +- .../views/view-only/ViewOnlyPromoContent.tsx | 20 +++++--- .../src/views/view-only/ViewOnlyTooltip.tsx | 4 +- .../components/CoinjoinConfirmation.tsx | 9 ++-- .../wallet/anonymize/components/Tile.tsx | 1 + .../coinmarket/DCA/CoinmarketDCALanding.tsx | 9 ++-- .../common/CoinmarketAddressOptions.tsx | 12 +++-- .../coinmarket/common/CoinmarketBalance.tsx | 4 +- .../coinmarket/common/CoinmarketCoinLogo.tsx | 4 +- .../coinmarket/common/CoinmarketContainer.tsx | 1 + .../common/CoinmarketCryptoAmount.tsx | 8 +-- .../CoinmarketDetailBuy.tsx | 1 + .../CoinmarketDetailBuyPaymentFailed.tsx | 4 +- .../CoinmarketDetailBuyPaymentProcessing.tsx | 4 +- .../CoinmarketDetailBuyPaymentSuccessful.tsx | 2 + ...inmarketDetailBuyPaymentWaitingForUser.tsx | 8 ++- .../CoinmarketDetailExchange.tsx | 1 + ...nmarketDetailExchangePaymentConverting.tsx | 4 +- .../CoinmarketDetailExchangePaymentFailed.tsx | 3 +- .../CoinmarketDetailExchangePaymentKYC.tsx | 5 +- ...CoinmarketDetailExchangePaymentSending.tsx | 4 +- ...nmarketDetailExchangePaymentSuccessful.tsx | 2 + .../CoinmarketDetailSell.tsx | 1 + .../CoinmarketDetailSellPaymentFailed.tsx | 3 +- .../CoinmarketDetailSellPaymentPending.tsx | 4 +- .../CoinmarketDetailSellPaymentSuccessful.tsx | 4 +- .../CoinmarketFeaturedOffersAmounts.tsx | 9 ++-- .../CoinmarketFeaturedOffersItem.tsx | 6 ++- .../CoinmarketFeaturedOffersPaymentInfo.tsx | 6 ++- .../CoinmarketFooter/CoinmarketFooter.tsx | 7 ++- .../CoinmarketProvidedByInvity.tsx | 4 +- .../CoinmarketFormInputAccount.tsx | 11 ++-- .../CoinmarketFormInputAccountOption.tsx | 1 + .../CoinmarketFormInputCountry.tsx | 7 ++- .../CoinmarketFormInputCryptoSelect.tsx | 8 +-- .../CoinmarketFormInputCurrency.tsx | 6 ++- .../CoinmarketFormInputCryptoAmount.tsx | 14 ++--- .../CoinmarketFormInputFiat.tsx | 13 +++-- .../CoinmarketFormInputLoader.tsx | 3 +- .../CoinmarketFormInputPaymentMethod.tsx | 2 + .../CoinmarketFormSwitcherCryptoFiat.tsx | 1 + .../CoinmarketFormSwitcherExchangeRates.tsx | 9 ++-- .../CoinmarketForm/CoinmarketFormInputs.tsx | 12 +++-- .../CoinmarketForm/CoinmarketFormLayout.tsx | 1 + .../CoinmarketForm/CoinmarketFormOffer.tsx | 7 ++- .../CoinmarketFormOfferCryptoAmount.tsx | 3 +- .../CoinmarketFormOfferFiatAmount.tsx | 1 + .../CoinmarketFormOfferItem.tsx | 1 + .../CoinmarketFormOffersSwitcher.tsx | 4 +- .../CoinmarketFormOffersSwitcherItem.tsx | 8 +-- .../common/CoinmarketFractionButtons.tsx | 3 +- .../CoinmarketExchangeHeaderSummary.tsx | 10 ++-- .../CoinmarketHeader/CoinmarketHeader.tsx | 8 +-- .../CoinmarketHeaderFilter.tsx | 4 +- .../CoinmarketHeaderSummary.tsx | 4 +- .../CoinmarketOffersExchangeFiltersPanel.tsx | 8 +-- .../CoinmarketLayout/CoinmarketLayout.tsx | 1 + .../CoinmarketLayoutHeader.tsx | 6 ++- .../CoinmarketLayoutNavigation.tsx | 1 + .../CoinmarketLayoutNavigationItem.tsx | 4 +- .../CoinmarketOffersEmpty.tsx | 3 +- .../CoinmarketOffersExchange.tsx | 6 ++- ...arketOffersExchangeQuotesByTypeSection.tsx | 4 +- .../CoinmarketOffers/CoinmarketOffersItem.tsx | 6 ++- .../common/CoinmarketPaymentPlainType.tsx | 4 +- .../common/CoinmarketPaymentType.tsx | 1 + .../common/CoinmarketProviderInfo.tsx | 1 + .../common/CoinmarketRefreshTime.tsx | 2 + .../CoinmarketInfoExchangeType.tsx | 4 +- .../CoinmarketInfo/CoinmarketInfoHeader.tsx | 4 +- .../CoinmarketInfo/CoinmarketInfoItem.tsx | 4 +- .../CoinmarketInfoPaymentMethod.tsx | 1 + .../CoinmarketInfo/CoinmarketInfoProvider.tsx | 1 + .../CoinmarketOfferExchange.tsx | 3 +- .../CoinmarketOfferExchangeSendApproval.tsx | 7 ++- .../CoinmarketOfferExchangeSendSwap.tsx | 9 ++-- .../CoinmarketOfferSell.tsx | 1 + .../CoinmarketOfferSellBankAccount.tsx | 10 ++-- .../CoinmarketOfferSellTransaction.tsx | 7 ++- .../CoinmarketSelectedOffer.tsx | 1 + .../CoinmarketSelectedOfferInfo.tsx | 1 + .../CoinmarketSelectedOfferStepper.tsx | 4 +- .../CoinmarketVerify/CoinmarketVerify.tsx | 11 ++-- .../CoinmarketVerifyOptions.tsx | 1 + .../CoinmarketVerifyOptionsItem.tsx | 4 +- .../coinmarket/common/CoinmarketTag.tsx | 1 + .../common/CoinmarketTransactionId.tsx | 6 ++- .../CoinmarketTransactionAmounts.tsx | 1 + .../CoinmarketTransactionId.tsx | 1 + .../CoinmarketTransactionInfo.tsx | 1 + .../CoinmarketTransactionProvider.tsx | 1 + .../CoinmarketTransactionStatus.tsx | 10 ++-- .../CoinmarketTransactionExchange.tsx | 1 + .../CoinmarketTransactionsBuy.tsx | 4 +- .../CoinmarketTransactionsList.tsx | 8 +-- .../CoinmarketTransactionsSell.tsx | 4 +- .../CoinmarketUtils/CoinmarketUtilsKyc.tsx | 6 ++- .../CoinmarketUtils/CoinmarketUtilsPrice.tsx | 4 +- .../CoinmarketUtilsProvider.tsx | 1 + .../CoinmarketUtilsTooltip.tsx | 4 +- .../CoinmarketUtilsTooltipFee.tsx | 2 + .../coinmarket/common/ConfirmedOnTrezor.tsx | 4 +- .../src/views/wallet/coinmarket/index.tsx | 4 +- .../redirect/CoinmarketRedirect.tsx | 11 ++-- .../src/views/wallet/details/CoinjoinLogs.tsx | 4 +- .../CoinjoinSetup/AnonymityLevelSetup.tsx | 5 +- .../details/CoinjoinSetup/CoinjoinSetup.tsx | 7 ++- .../CoinjoinSetup/MaxMiningFeeSetup.tsx | 4 +- .../CoinjoinSetup/SetupSlider/SetupSlider.tsx | 5 +- .../CoinjoinSetup/SetupSlider/SliderInput.tsx | 2 + .../details/CoinjoinSetup/SkipRoundsSetup.tsx | 4 +- .../views/wallet/details/RescanAccount.tsx | 1 + .../suite/src/views/wallet/details/Row.tsx | 3 +- .../suite/src/views/wallet/details/index.tsx | 11 ++-- .../src/views/wallet/receive/Receive.tsx | 6 +-- .../components/CoinjoinReceiveWarning.tsx | 4 +- .../receive/components/ConnectDevicePromo.tsx | 4 +- .../receive/components/FreshAddress.tsx | 12 +++-- .../wallet/receive/components/Header.tsx | 4 +- .../receive/components/UsedAddresses.tsx | 1 + .../Options/BitcoinOptions/BitcoinOptions.tsx | 7 ++- .../CoinControl/CoinControl.tsx | 7 ++- .../BitcoinOptions/CoinControl/UtxoSearch.tsx | 3 ++ .../CoinControl/UtxoSelection.tsx | 6 ++- .../CoinControl/UtxoSelectionList.tsx | 8 ++- .../BitcoinOptions/CoinControl/UtxoTag.tsx | 1 + .../BitcoinOptions/Locktime/Locktime.tsx | 15 ++++-- .../wallet/send/Options/CardanoOptions.tsx | 2 + .../Options/EthereumOptions/EthereumData.tsx | 10 ++-- .../EthereumOptions/EthereumOptions.tsx | 2 + .../wallet/send/Options/OnOffSwitcher.tsx | 1 + .../Options/RippleOptions/DestinationTag.tsx | 8 +-- .../Options/RippleOptions/RippleOptions.tsx | 2 + .../src/views/wallet/send/Outputs/Address.tsx | 19 ++++--- .../wallet/send/Outputs/Amount/Amount.tsx | 4 +- .../wallet/send/Outputs/Amount/FiatInput.tsx | 20 +++++--- .../send/Outputs/Amount/SendMaxSwitch.tsx | 4 +- .../send/Outputs/Amount/TokenSelect.tsx | 15 +++--- .../views/wallet/send/Outputs/OpReturn.tsx | 11 ++-- .../src/views/wallet/send/Outputs/Outputs.tsx | 4 +- .../src/views/wallet/send/SendHeader.tsx | 6 ++- .../suite/src/views/wallet/send/SendRaw.tsx | 6 ++- .../wallet/send/TotalSent/ReviewButton.tsx | 7 ++- .../views/wallet/send/TotalSent/TotalSent.tsx | 8 ++- .../suite/src/views/wallet/send/index.tsx | 2 + .../sign-verify/components/ButtonRow.tsx | 11 ++-- .../components/HiddenAddressRow.tsx | 4 +- .../sign-verify/components/Navigation.tsx | 1 + .../sign-verify/components/NavigationTab.tsx | 2 + .../components/SignAddressInput.tsx | 4 ++ .../components/VerifyAddressButton.tsx | 5 +- .../src/views/wallet/sign-verify/index.tsx | 14 ++--- .../views/wallet/staking/WalletStaking.tsx | 4 +- .../components/CardanoActionPending.tsx | 3 +- .../staking/components/CardanoPrimitives.ts | 3 +- .../staking/components/CardanoRedelegate.tsx | 6 +-- .../staking/components/CardanoRewards.tsx | 4 +- .../staking/components/CardanoStake.tsx | 4 +- .../components/CardanoStakingDashboard.tsx | 9 ++-- .../EthStakingDashboard.tsx | 2 + .../ApproximateInstantEthAmount.tsx | 3 +- .../components/ApyCard.tsx | 3 ++ .../components/EmptyStakingCard.tsx | 4 +- .../components/EverstakeFooter.tsx | 7 ++- .../components/InstantStakeBanner.tsx | 13 +++-- .../components/PayoutCard.tsx | 12 +++-- .../ProgressLabels/ProgressLabel.tsx | 5 +- .../ProgressLabels/ProgressLabels.tsx | 2 + .../components/StakingCard.tsx | 7 ++- .../components/StakingDashboard.tsx | 24 +++++---- .../components/Transactions.tsx | 5 +- .../components/TrimmedCryptoAmount.tsx | 4 +- .../components/claim/ClaimCard.tsx | 3 ++ .../components/claim/ClaimPendingCard.tsx | 9 ++-- .../components/claim/ClaimReadyCard.tsx | 7 ++- .../components/claim/styled.ts | 1 + .../EthStakingDashboard/components/styled.ts | 1 + .../hooks/useIsTxStatusShown.ts | 1 + .../hooks/useProgressLabelsData.tsx | 6 ++- .../views/wallet/tokens/coins/CoinsTable.tsx | 3 +- .../views/wallet/tokens/common/BlurUrls.tsx | 5 +- .../tokens/common/TokensTable/TokenRow.tsx | 3 +- .../tokens/common/TokensTable/TokensTable.tsx | 2 + .../hidden-tokens/HiddenTokensTable.tsx | 9 ++-- .../suite/src/views/wallet/tokens/index.tsx | 6 ++- .../CoinjoinExplanation.tsx | 5 +- .../CoinjoinProcessStep.tsx | 3 ++ .../BalancePrivacyBreakdown.tsx | 2 + .../CryptoAmountWithHeader.tsx | 7 ++- .../CoinjoinSummary/CoinjoinBalanceError.tsx | 2 + .../CoinjoinBalanceSection.tsx | 3 ++ .../CoinjoinProgressContent.tsx | 7 ++- .../CoinjoinProgressWheel.tsx | 14 +++-- .../CoinjoinStatusMessage.tsx | 4 +- .../CoinjoinStatusWheel.tsx | 10 ++-- .../CoinjoinSummary/CoinjoinSummary.tsx | 2 + .../wallet/transactions/TradeBox/TradeBox.tsx | 9 ++-- .../transactions/TradeBox/TradeBoxMenu.tsx | 8 ++- .../transactions/TradeBox/TradeBoxPrices.tsx | 8 ++- .../TransactionList/NoSearchResults.tsx | 5 +- .../TransactionList/TransactionCandidates.tsx | 2 + .../TransactionGroupedList.tsx | 4 +- .../TransactionList/TransactionList.tsx | 13 +++-- .../TransactionListActions/ExportAction.tsx | 13 +++-- .../TransactionListActions.tsx | 13 +++-- .../TransactionsGroup/CommonComponents.tsx | 2 + .../TransactionsGroup/DayHeader.tsx | 5 +- .../TransactionsGroup/PendingGroupHeader.tsx | 1 + .../TransactionsGroup/TransactionsGroup.tsx | 10 ++-- .../wallet/transactions/Transactions.tsx | 15 ++++-- .../transactions/components/InfoCard.tsx | 5 +- .../components/NoTransactions.tsx | 3 +- .../transactions/components/SummaryCards.tsx | 12 +++-- .../components/TransactionSummary.tsx | 10 ++-- packages/transport/src/api/abstract.ts | 2 +- packages/transport/src/api/udp.ts | 1 + packages/transport/src/api/usb.ts | 1 - .../src/sessions/background-browser.ts | 1 - packages/transport/src/transports/abstract.ts | 2 +- .../transport/src/transports/abstractApi.ts | 2 +- packages/transport/src/transports/bridge.ts | 2 +- .../src/transports/nodeusb.browser.ts | 1 - packages/transport/src/transports/nodeusb.ts | 1 + .../transport/src/transports/udp.browser.ts | 1 - packages/transport/src/transports/udp.ts | 1 - .../src/transports/webusb.browser.ts | 1 - packages/transport/src/transports/webusb.ts | 1 - packages/transport/src/utils/bridgeApiCall.ts | 5 +- .../transport/src/utils/bridgeApiResult.ts | 1 - .../src/utils/bridgeProtocolMessage.ts | 1 + packages/transport/src/utils/send.ts | 1 + packages/transport/tests/abstractUsb.test.ts | 3 +- packages/transport/tests/apiUdp.test.ts | 1 + .../transport/tests/build-receive.test.ts | 2 + packages/utxo-lib/src/address.ts | 1 + packages/utxo-lib/src/bip32.ts | 1 + packages/utxo-lib/src/bs58check.ts | 3 +- packages/utxo-lib/src/bufferutils.ts | 2 + .../src/coinselect/coinselectUtils.ts | 1 + .../src/coinselect/inputs/accumulative.ts | 1 + .../src/coinselect/inputs/branchAndBound.ts | 1 + .../utxo-lib/src/coinselect/outputs/split.ts | 1 + .../compose/sorting/randomSortingStrategy.ts | 3 +- packages/utxo-lib/src/derivation.ts | 2 + packages/utxo-lib/src/payments/p2ms.ts | 1 + packages/utxo-lib/src/payments/p2pk.ts | 1 + packages/utxo-lib/src/payments/p2pkh.ts | 1 + packages/utxo-lib/src/payments/p2tr.ts | 1 + packages/utxo-lib/src/payments/p2wpkh.ts | 1 + packages/utxo-lib/src/payments/p2wsh.ts | 1 + packages/utxo-lib/src/script/index.ts | 1 + .../utxo-lib/src/script/scriptSignature.ts | 1 + packages/utxo-lib/src/transaction/base.ts | 2 +- packages/utxo-lib/src/transaction/dash.ts | 1 + packages/utxo-lib/src/transaction/decred.ts | 1 + packages/utxo-lib/src/transaction/zcash.ts | 1 + packages/utxo-lib/src/types/coinselect.ts | 1 + .../tests/coinselect/coinselectUtils.test.ts | 1 + .../utxo-lib/tests/coinselect/test.utils.ts | 1 + packages/utxo-lib/tests/compose.test.ts | 4 +- packages/utxo-lib/tests/script.test.ts | 4 +- 1525 files changed, 4440 insertions(+), 2054 deletions(-) diff --git a/packages/analytics/src/utils.ts b/packages/analytics/src/utils.ts index 5cb59538ee6..031e6b6e043 100644 --- a/packages/analytics/src/utils.ts +++ b/packages/analytics/src/utils.ts @@ -1,7 +1,8 @@ import type { Environment } from '@trezor/env-utils'; -import type { App, Event as AnalyticsEvent } from './types'; import { getWeakRandomId } from '@trezor/utils'; +import type { App, Event as AnalyticsEvent } from './types'; + export const getTrackingRandomId = () => getWeakRandomId(10); export const getRandomId = () => getWeakRandomId(10); diff --git a/packages/blockchain-link/src/workers/baseWebsocket.ts b/packages/blockchain-link/src/workers/baseWebsocket.ts index 094c9df6b38..0132080c76e 100644 --- a/packages/blockchain-link/src/workers/baseWebsocket.ts +++ b/packages/blockchain-link/src/workers/baseWebsocket.ts @@ -1,6 +1,6 @@ import WebSocket from 'ws'; -import { createDeferred, createDeferredManager, TypedEmitter } from '@trezor/utils'; +import { createDeferred, createDeferredManager, TypedEmitter } from '@trezor/utils'; import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'; interface Subscription { diff --git a/packages/blockchain-link/src/workers/baseWorker.ts b/packages/blockchain-link/src/workers/baseWorker.ts index cfe6d8f069d..e1ad3184439 100644 --- a/packages/blockchain-link/src/workers/baseWorker.ts +++ b/packages/blockchain-link/src/workers/baseWorker.ts @@ -6,13 +6,15 @@ // new BlockchainLink({ worker: () => new BlockchainLinkModule() }); import { SocksProxyAgent } from 'socks-proxy-agent'; + import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'; -import { WorkerState } from './state'; -import { prioritizeEndpoints } from './utils'; import { MESSAGES, RESPONSES } from '@trezor/blockchain-link-types/src/constants'; import type { Response, BlockchainSettings } from '@trezor/blockchain-link-types'; import type { Message } from '@trezor/blockchain-link-types/src/messages'; +import { prioritizeEndpoints } from './utils'; +import { WorkerState } from './state'; + // self is not declared in TS Webworker lib typings declare const self: { postMessage: (...args: any[]) => any }; diff --git a/packages/blockchain-link/src/workers/blockbook/index.ts b/packages/blockchain-link/src/workers/blockbook/index.ts index 60d6ba85ac9..f552b4b6ed7 100644 --- a/packages/blockchain-link/src/workers/blockbook/index.ts +++ b/packages/blockchain-link/src/workers/blockbook/index.ts @@ -1,7 +1,5 @@ import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'; import { MESSAGES, RESPONSES } from '@trezor/blockchain-link-types/src/constants'; -import { BaseWorker, CONTEXT, ContextType } from '../baseWorker'; -import { BlockbookAPI } from './websocket'; import * as utils from '@trezor/blockchain-link-utils/src/blockbook'; import type { Response, SubscriptionAccountInfo } from '@trezor/blockchain-link-types'; import type { @@ -12,6 +10,9 @@ import type { } from '@trezor/blockchain-link-types/src/blockbook'; import type * as MessageTypes from '@trezor/blockchain-link-types/src/messages'; +import { BlockbookAPI } from './websocket'; +import { BaseWorker, CONTEXT, ContextType } from '../baseWorker'; + type Context = ContextType; type Request = T & Context; diff --git a/packages/blockchain-link/src/workers/blockbook/websocket.ts b/packages/blockchain-link/src/workers/blockbook/websocket.ts index d3cfbb46253..77a74f11a30 100644 --- a/packages/blockchain-link/src/workers/blockbook/websocket.ts +++ b/packages/blockchain-link/src/workers/blockbook/websocket.ts @@ -20,9 +20,9 @@ import type { AccountBalanceHistoryParams, RpcCallParams, } from '@trezor/blockchain-link-types/src/params'; +import { getSuiteVersion } from '@trezor/env-utils'; import { BaseWebsocket } from '../baseWebsocket'; -import { getSuiteVersion } from '@trezor/env-utils'; interface BlockbookEvents { block: BlockNotification; diff --git a/packages/blockchain-link/src/workers/blockfrost/index.ts b/packages/blockchain-link/src/workers/blockfrost/index.ts index 7fa640e7c7e..7b6f2b5ca69 100644 --- a/packages/blockchain-link/src/workers/blockfrost/index.ts +++ b/packages/blockchain-link/src/workers/blockfrost/index.ts @@ -1,7 +1,5 @@ import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'; import { MESSAGES, RESPONSES } from '@trezor/blockchain-link-types/src/constants'; -import { BaseWorker, CONTEXT, ContextType } from '../baseWorker'; -import { BlockfrostAPI } from './websocket'; import { transformUtxos, transformAccountInfo, @@ -15,6 +13,9 @@ import type { } from '@trezor/blockchain-link-types/src/blockfrost'; import type * as MessageTypes from '@trezor/blockchain-link-types/src/messages'; +import { BlockfrostAPI } from './websocket'; +import { BaseWorker, CONTEXT, ContextType } from '../baseWorker'; + type Context = ContextType; type Request = T & Context; diff --git a/packages/blockchain-link/src/workers/blockfrost/websocket.ts b/packages/blockchain-link/src/workers/blockfrost/websocket.ts index f629692dffc..274477224e1 100644 --- a/packages/blockchain-link/src/workers/blockfrost/websocket.ts +++ b/packages/blockchain-link/src/workers/blockfrost/websocket.ts @@ -10,9 +10,9 @@ import type { EstimateFeeParams, AccountBalanceHistoryParams, } from '@trezor/blockchain-link-types/src/params'; +import { getSuiteVersion } from '@trezor/env-utils'; import { BaseWebsocket } from '../baseWebsocket'; -import { getSuiteVersion } from '@trezor/env-utils'; interface BlockfrostEvents { block: BlockContent; diff --git a/packages/blockchain-link/src/workers/electrum/client/caching.ts b/packages/blockchain-link/src/workers/electrum/client/caching.ts index 5ea93b48f5e..cbe8dd58002 100644 --- a/packages/blockchain-link/src/workers/electrum/client/caching.ts +++ b/packages/blockchain-link/src/workers/electrum/client/caching.ts @@ -1,6 +1,7 @@ -import { ElectrumClient } from './electrum'; import { Status } from '@trezor/blockchain-link-types/src/electrum'; +import { ElectrumClient } from './electrum'; + type Cache = { [descriptor: string]: [Status, any]; }; diff --git a/packages/blockchain-link/src/workers/electrum/client/electrum.ts b/packages/blockchain-link/src/workers/electrum/client/electrum.ts index 4fbd3d50a5d..17733b50ef2 100644 --- a/packages/blockchain-link/src/workers/electrum/client/electrum.ts +++ b/packages/blockchain-link/src/workers/electrum/client/electrum.ts @@ -1,5 +1,6 @@ import { Network, networks } from '@trezor/utxo-lib'; import { ElectrumAPI, BlockHeader, Version } from '@trezor/blockchain-link-types/src/electrum'; + import { JsonRpcClientOptions } from './json-rpc'; import { BatchingJsonRpcClient } from './batching'; import type { ISocket } from '../sockets/interface'; diff --git a/packages/blockchain-link/src/workers/electrum/client/json-rpc.ts b/packages/blockchain-link/src/workers/electrum/client/json-rpc.ts index d63e6554713..1d8add2ad97 100644 --- a/packages/blockchain-link/src/workers/electrum/client/json-rpc.ts +++ b/packages/blockchain-link/src/workers/electrum/client/json-rpc.ts @@ -1,5 +1,7 @@ import { EventEmitter } from 'events'; + import { throwError } from '@trezor/utils'; + import type { ISocket } from '../sockets/interface'; type Callback = (error: any, result?: any) => void; diff --git a/packages/blockchain-link/src/workers/electrum/devrun.ts b/packages/blockchain-link/src/workers/electrum/devrun.ts index bca61a08917..a037e7fc56d 100644 --- a/packages/blockchain-link/src/workers/electrum/devrun.ts +++ b/packages/blockchain-link/src/workers/electrum/devrun.ts @@ -2,10 +2,11 @@ // @ts-nocheck /// -import ElectrumWorker from './index'; import { createSocket } from './sockets'; import type { Message, Response } from '../../types'; +import ElectrumWorker from './index'; + const TOR_ADDRESS = '127.0.0.1:9050'; const LOCALHOST_CONFIG = 'localhost:50001:t'; diff --git a/packages/blockchain-link/src/workers/electrum/index.ts b/packages/blockchain-link/src/workers/electrum/index.ts index 5c5ecd4950b..bc732d36a94 100644 --- a/packages/blockchain-link/src/workers/electrum/index.ts +++ b/packages/blockchain-link/src/workers/electrum/index.ts @@ -1,13 +1,14 @@ import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'; import { MESSAGES, RESPONSES } from '@trezor/blockchain-link-types/src/constants'; +import type { Response } from '@trezor/blockchain-link-types'; +import { Message } from '@trezor/blockchain-link-types/src/messages'; + import { BaseWorker, CONTEXT, ContextType } from '../baseWorker'; import * as M from './methods'; import * as L from './listeners'; import { createSocket } from './sockets'; import { CachingElectrumClient } from './client/caching'; import type { ElectrumClient } from './client/electrum'; -import type { Response } from '@trezor/blockchain-link-types'; -import { Message } from '@trezor/blockchain-link-types/src/messages'; type BlockListener = ReturnType; type TxListener = ReturnType; diff --git a/packages/blockchain-link/src/workers/electrum/listeners/blockListener.ts b/packages/blockchain-link/src/workers/electrum/listeners/blockListener.ts index 94600a25da6..dca0709e606 100644 --- a/packages/blockchain-link/src/workers/electrum/listeners/blockListener.ts +++ b/packages/blockchain-link/src/workers/electrum/listeners/blockListener.ts @@ -1,8 +1,9 @@ import { throwError } from '@trezor/utils'; import { RESPONSES } from '@trezor/blockchain-link-types/src/constants'; +import type { BlockHeader, ElectrumAPI } from '@trezor/blockchain-link-types/src/electrum'; + import { blockheaderToBlockhash } from '../utils'; import type { BaseWorker } from '../../baseWorker'; -import type { BlockHeader, ElectrumAPI } from '@trezor/blockchain-link-types/src/electrum'; export const blockListener = (worker: BaseWorker) => { const { state } = worker; diff --git a/packages/blockchain-link/src/workers/electrum/listeners/txListener.ts b/packages/blockchain-link/src/workers/electrum/listeners/txListener.ts index 7e3f0c6d01b..204694af64b 100644 --- a/packages/blockchain-link/src/workers/electrum/listeners/txListener.ts +++ b/packages/blockchain-link/src/workers/electrum/listeners/txListener.ts @@ -1,8 +1,6 @@ import { throwError } from '@trezor/utils'; import { RESPONSES } from '@trezor/blockchain-link-types/src/constants'; -import { createAddressManager, getTransactions } from '../utils'; import { transformTransaction } from '@trezor/blockchain-link-utils/src/blockbook'; -import type { BaseWorker } from '../../baseWorker'; import type { ElectrumAPI, HistoryTx, @@ -10,6 +8,9 @@ import type { } from '@trezor/blockchain-link-types/src/electrum'; import type { Subscribe, Unsubscribe } from '@trezor/blockchain-link-types/src/messages'; +import type { BaseWorker } from '../../baseWorker'; +import { createAddressManager, getTransactions } from '../utils'; + type Payload = Extract< T['payload'], { type: 'addresses' | 'accounts' } diff --git a/packages/blockchain-link/src/workers/electrum/methods/estimateFee.ts b/packages/blockchain-link/src/workers/electrum/methods/estimateFee.ts index 9be3f4bf75f..5dede3fe56e 100644 --- a/packages/blockchain-link/src/workers/electrum/methods/estimateFee.ts +++ b/packages/blockchain-link/src/workers/electrum/methods/estimateFee.ts @@ -1,7 +1,8 @@ -import { Api, btcToSat } from '../utils'; import type { EstimateFee as Req } from '@trezor/blockchain-link-types/src/messages'; import type { EstimateFee as Res } from '@trezor/blockchain-link-types/src/responses'; +import { Api, btcToSat } from '../utils'; + const estimateFee: Api = (client, payload) => Promise.all( (payload.blocks || []).map(num => diff --git a/packages/blockchain-link/src/workers/electrum/methods/getAccountBalanceHistory.ts b/packages/blockchain-link/src/workers/electrum/methods/getAccountBalanceHistory.ts index a39c57f282e..b6d51ec3dbc 100644 --- a/packages/blockchain-link/src/workers/electrum/methods/getAccountBalanceHistory.ts +++ b/packages/blockchain-link/src/workers/electrum/methods/getAccountBalanceHistory.ts @@ -1,13 +1,14 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; import { discovery } from '@trezor/utxo-lib'; import { sumVinVout } from '@trezor/blockchain-link-utils'; -import { Api, tryGetScripthash, getTransactions, discoverAddress, AddressHistory } from '../utils'; import { transformTransaction } from '@trezor/blockchain-link-utils/src/blockbook'; import type { GetAccountBalanceHistory as Req } from '@trezor/blockchain-link-types/src/messages'; import type { GetAccountBalanceHistory as Res } from '@trezor/blockchain-link-types/src/responses'; import type { AccountAddresses, Transaction } from '@trezor/blockchain-link-types/src/common'; import type { HistoryTx } from '@trezor/blockchain-link-types/src/electrum'; +import { Api, tryGetScripthash, getTransactions, discoverAddress, AddressHistory } from '../utils'; + const transformAddress = (addr: AddressHistory) => ({ address: addr.address, path: addr.path, diff --git a/packages/blockchain-link/src/workers/electrum/methods/getAccountInfo.ts b/packages/blockchain-link/src/workers/electrum/methods/getAccountInfo.ts index 381a0724b9f..fd62f7f813f 100644 --- a/packages/blockchain-link/src/workers/electrum/methods/getAccountInfo.ts +++ b/packages/blockchain-link/src/workers/electrum/methods/getAccountInfo.ts @@ -1,6 +1,5 @@ import { discovery } from '@trezor/utxo-lib'; import { sortTxsFromLatest } from '@trezor/blockchain-link-utils'; -import { Api, tryGetScripthash, discoverAddress, AddressHistory, getTransactions } from '../utils'; import { transformTransaction } from '@trezor/blockchain-link-utils/src/blockbook'; import type { ElectrumAPI } from '@trezor/blockchain-link-types/src/electrum'; import type { GetAccountInfo as Req } from '@trezor/blockchain-link-types/src/messages'; @@ -8,6 +7,8 @@ import type { GetAccountInfo as Res } from '@trezor/blockchain-link-types/src/re import type { VinVout } from '@trezor/blockchain-link-types/src/blockbook'; import type { Address, Transaction } from '@trezor/blockchain-link-types'; +import { Api, tryGetScripthash, discoverAddress, AddressHistory, getTransactions } from '../utils'; + // const PAGE_DEFAULT = 0; const PAGE_SIZE_DEFAULT = 25; diff --git a/packages/blockchain-link/src/workers/electrum/methods/getAccountUtxo.ts b/packages/blockchain-link/src/workers/electrum/methods/getAccountUtxo.ts index cdea012d9a6..73736975d06 100644 --- a/packages/blockchain-link/src/workers/electrum/methods/getAccountUtxo.ts +++ b/packages/blockchain-link/src/workers/electrum/methods/getAccountUtxo.ts @@ -1,10 +1,11 @@ import { throwError } from '@trezor/utils'; import { discovery } from '@trezor/utxo-lib'; -import { Api, tryGetScripthash, discoverAddress } from '../utils'; import type { GetAccountUtxo as Req } from '@trezor/blockchain-link-types/src/messages'; import type { GetAccountUtxo as Res } from '@trezor/blockchain-link-types/src/responses'; import type { Utxo } from '@trezor/blockchain-link-types/src/electrum'; +import { Api, tryGetScripthash, discoverAddress } from '../utils'; + const transformUtxo = (currentHeight: number, addressInfo: { address?: string; path?: string } = {}) => ({ height, tx_hash, tx_pos, value }: Utxo): Res['payload'][number] => ({ diff --git a/packages/blockchain-link/src/workers/electrum/methods/getBlockHash.ts b/packages/blockchain-link/src/workers/electrum/methods/getBlockHash.ts index c8e2e60879e..de8e55a0047 100644 --- a/packages/blockchain-link/src/workers/electrum/methods/getBlockHash.ts +++ b/packages/blockchain-link/src/workers/electrum/methods/getBlockHash.ts @@ -1,7 +1,8 @@ -import { Api, blockheaderToBlockhash } from '../utils'; import type { GetBlockHash as Req } from '@trezor/blockchain-link-types/src/messages'; import type { GetBlockHash as Res } from '@trezor/blockchain-link-types/src/responses'; +import { Api, blockheaderToBlockhash } from '../utils'; + const getBlockHash: Api = async (client, payload) => { const blockheader = await client.request('blockchain.block.header', payload); diff --git a/packages/blockchain-link/src/workers/electrum/methods/getInfo.ts b/packages/blockchain-link/src/workers/electrum/methods/getInfo.ts index 88da9bb1a91..7b553cc8d6c 100644 --- a/packages/blockchain-link/src/workers/electrum/methods/getInfo.ts +++ b/packages/blockchain-link/src/workers/electrum/methods/getInfo.ts @@ -1,8 +1,9 @@ import { throwError } from '@trezor/utils'; -import { Api, blockheaderToBlockhash } from '../utils'; import type { GetInfo as Req } from '@trezor/blockchain-link-types/src/messages'; import type { GetInfo as Res } from '@trezor/blockchain-link-types/src/responses'; +import { Api, blockheaderToBlockhash } from '../utils'; + const getInfo: Api = client => { const { url, diff --git a/packages/blockchain-link/src/workers/electrum/methods/getTransaction.ts b/packages/blockchain-link/src/workers/electrum/methods/getTransaction.ts index 6efc4ee9591..c4a088ee6b4 100644 --- a/packages/blockchain-link/src/workers/electrum/methods/getTransaction.ts +++ b/packages/blockchain-link/src/workers/electrum/methods/getTransaction.ts @@ -1,8 +1,9 @@ -import { Api, getTransactions } from '../utils'; import { transformTransaction } from '@trezor/blockchain-link-utils/src/blockbook'; import type { GetTransaction as Req } from '@trezor/blockchain-link-types/src/messages'; import type { GetTransaction as Res } from '@trezor/blockchain-link-types/src/responses'; +import { Api, getTransactions } from '../utils'; + const getTransaction: Api = async (client, payload) => { const [tx] = await getTransactions(client, [{ tx_hash: payload, height: -1 }]); diff --git a/packages/blockchain-link/src/workers/electrum/methods/pushTransaction.ts b/packages/blockchain-link/src/workers/electrum/methods/pushTransaction.ts index 0ffbd7ef278..00122d50688 100644 --- a/packages/blockchain-link/src/workers/electrum/methods/pushTransaction.ts +++ b/packages/blockchain-link/src/workers/electrum/methods/pushTransaction.ts @@ -1,7 +1,8 @@ -import { Api } from '../utils'; import type { PushTransaction as Req } from '@trezor/blockchain-link-types/src/messages'; import type { PushTransaction as Res } from '@trezor/blockchain-link-types/src/responses'; +import { Api } from '../utils'; + const pushTransaction: Api = async (client, payload) => { const res = await client.request('blockchain.transaction.broadcast', payload); diff --git a/packages/blockchain-link/src/workers/electrum/sockets/base.ts b/packages/blockchain-link/src/workers/electrum/sockets/base.ts index a724c199407..6b5614f0b1c 100644 --- a/packages/blockchain-link/src/workers/electrum/sockets/base.ts +++ b/packages/blockchain-link/src/workers/electrum/sockets/base.ts @@ -1,6 +1,7 @@ import type { Socket as TCPSocket } from 'net'; import type { TLSSocket } from 'tls'; import type { SocksProxyAgent } from 'socks-proxy-agent'; + import type { ISocket, SocketListener } from './interface'; const TIMEOUT = 10000; diff --git a/packages/blockchain-link/src/workers/electrum/sockets/index.ts b/packages/blockchain-link/src/workers/electrum/sockets/index.ts index dfb401af562..888d286708c 100644 --- a/packages/blockchain-link/src/workers/electrum/sockets/index.ts +++ b/packages/blockchain-link/src/workers/electrum/sockets/index.ts @@ -1,5 +1,6 @@ import { parseElectrumUrl } from '@trezor/utils'; import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'; + import { TcpSocket } from './tcp'; import { TlsSocket } from './tls'; import { TorSocket } from './tor'; diff --git a/packages/blockchain-link/src/workers/electrum/sockets/tcp.ts b/packages/blockchain-link/src/workers/electrum/sockets/tcp.ts index e183142ed4c..f4ed9bfe994 100644 --- a/packages/blockchain-link/src/workers/electrum/sockets/tcp.ts +++ b/packages/blockchain-link/src/workers/electrum/sockets/tcp.ts @@ -1,4 +1,5 @@ import { Socket as TCPSocket } from 'net'; + import { SocketBase } from './base'; import type { SocketListener } from './interface'; diff --git a/packages/blockchain-link/src/workers/electrum/sockets/tls.ts b/packages/blockchain-link/src/workers/electrum/sockets/tls.ts index 71d09798bd6..16bbe5bab7e 100644 --- a/packages/blockchain-link/src/workers/electrum/sockets/tls.ts +++ b/packages/blockchain-link/src/workers/electrum/sockets/tls.ts @@ -1,4 +1,5 @@ import { TLSSocket } from 'tls'; + import { SocketBase } from './base'; import type { SocketListener } from './interface'; diff --git a/packages/blockchain-link/src/workers/electrum/sockets/tor.ts b/packages/blockchain-link/src/workers/electrum/sockets/tor.ts index c4907cc569a..902456364cb 100644 --- a/packages/blockchain-link/src/workers/electrum/sockets/tor.ts +++ b/packages/blockchain-link/src/workers/electrum/sockets/tor.ts @@ -1,5 +1,6 @@ -import { SocketBase, SocketConfig } from './base'; import type { SocksProxyAgent } from 'socks-proxy-agent'; + +import { SocketBase, SocketConfig } from './base'; import type { SocketListener } from './interface'; type TorSocketConfig = SocketConfig & { diff --git a/packages/blockchain-link/src/workers/electrum/utils/addressManager.ts b/packages/blockchain-link/src/workers/electrum/utils/addressManager.ts index d6bfe7495c2..2a950b4bc29 100644 --- a/packages/blockchain-link/src/workers/electrum/utils/addressManager.ts +++ b/packages/blockchain-link/src/workers/electrum/utils/addressManager.ts @@ -1,8 +1,9 @@ import { isNotUndefined, arrayDistinct, objectPartition } from '@trezor/utils'; -import { addressToScripthash } from './transform'; import type { Network } from '@trezor/utxo-lib'; import type { AccountAddresses, SubscriptionAccountInfo } from '@trezor/blockchain-link-types/src'; +import { addressToScripthash } from './transform'; + type AddressMap = { [address: string]: string }; type AccountMap = { [descriptor: string]: AccountAddresses }; diff --git a/packages/blockchain-link/src/workers/electrum/utils/discovery.ts b/packages/blockchain-link/src/workers/electrum/utils/discovery.ts index 4d29a33388c..8a26ab70763 100644 --- a/packages/blockchain-link/src/workers/electrum/utils/discovery.ts +++ b/packages/blockchain-link/src/workers/electrum/utils/discovery.ts @@ -1,6 +1,7 @@ -import { addressToScripthash } from './transform'; import type { ElectrumAPI, HistoryTx } from '@trezor/blockchain-link-types/src/electrum'; +import { addressToScripthash } from './transform'; + export type AddressHistory = { address: string; scripthash: string; diff --git a/packages/blockchain-link/src/workers/electrum/utils/transaction.ts b/packages/blockchain-link/src/workers/electrum/utils/transaction.ts index 6e1feb07d70..d6ac609b584 100644 --- a/packages/blockchain-link/src/workers/electrum/utils/transaction.ts +++ b/packages/blockchain-link/src/workers/electrum/utils/transaction.ts @@ -1,5 +1,4 @@ import { arrayToDictionary, arrayDistinct } from '@trezor/utils'; -import { btcToSat } from './transform'; import type { Transaction as BlockbookTransaction } from '@trezor/blockchain-link-types/src/blockbook'; import type { ElectrumAPI, @@ -10,6 +9,8 @@ import type { HistoryTx, } from '@trezor/blockchain-link-types/src/electrum'; +import { btcToSat } from './transform'; + const transformOpReturn = (hex: string) => { const [, _len, data] = hex.match(/^6a(?:4c)?([0-9a-f]{2})([0-9a-f]*)$/i) ?? []; diff --git a/packages/blockchain-link/src/workers/ripple/index.ts b/packages/blockchain-link/src/workers/ripple/index.ts index 6ac75a59965..94224e1153f 100644 --- a/packages/blockchain-link/src/workers/ripple/index.ts +++ b/packages/blockchain-link/src/workers/ripple/index.ts @@ -1,13 +1,15 @@ import { RippleAPI, APIOptions } from 'ripple-lib'; import { RippleError } from 'ripple-lib/dist/npm/common/errors'; + import { BigNumber } from '@trezor/utils/src/bigNumber'; import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'; import { MESSAGES, RESPONSES } from '@trezor/blockchain-link-types/src/constants'; -import { BaseWorker, CONTEXT, ContextType } from '../baseWorker'; import * as utils from '@trezor/blockchain-link-utils/src/ripple'; import type { Response, SubscriptionAccountInfo, AccountInfo } from '@trezor/blockchain-link-types'; import type * as MessageTypes from '@trezor/blockchain-link-types/src/messages'; +import { BaseWorker, CONTEXT, ContextType } from '../baseWorker'; + type Context = ContextType; type Request = T & Context; diff --git a/packages/blockchain-link/src/workers/solana/fee.ts b/packages/blockchain-link/src/workers/solana/fee.ts index 72c46971abb..dcaa4e6967b 100644 --- a/packages/blockchain-link/src/workers/solana/fee.ts +++ b/packages/blockchain-link/src/workers/solana/fee.ts @@ -1,4 +1,5 @@ import { Connection, Message, PublicKey } from '@solana/web3.js'; + import { BigNumber } from '@trezor/utils/src/bigNumber'; const COMPUTE_BUDGET_PROGRAM_ID = 'ComputeBudget111111111111111111111111111111'; diff --git a/packages/blockchain-link/src/workers/solana/index.ts b/packages/blockchain-link/src/workers/solana/index.ts index f5af3c99202..52a55969eed 100644 --- a/packages/blockchain-link/src/workers/solana/index.ts +++ b/packages/blockchain-link/src/workers/solana/index.ts @@ -1,3 +1,5 @@ +import { Connection, Message, PublicKey, SendTransactionError } from '@solana/web3.js'; + import type { Response, AccountInfo, @@ -13,20 +15,19 @@ import type { } from '@trezor/blockchain-link-types/src/solana'; import type * as MessageTypes from '@trezor/blockchain-link-types/src/messages'; import { CustomError } from '@trezor/blockchain-link-types/src/constants/errors'; -import { BaseWorker, ContextType, CONTEXT } from '../baseWorker'; import { MESSAGES, RESPONSES } from '@trezor/blockchain-link-types/src/constants'; -import { Connection, Message, PublicKey, SendTransactionError } from '@solana/web3.js'; import { solanaUtils } from '@trezor/blockchain-link-utils'; import { createLazy } from '@trezor/utils'; - import { transformTokenInfo, TOKEN_PROGRAM_PUBLIC_KEY, } from '@trezor/blockchain-link-utils/src/solana'; +import { getSuiteVersion } from '@trezor/env-utils'; + import { TOKEN_ACCOUNT_LAYOUT } from './tokenUtils'; import { getBaseFee, getPriorityFee } from './fee'; import { confirmTransactionWithResubmit } from './transactionConfirmation'; -import { getSuiteVersion } from '@trezor/env-utils'; +import { BaseWorker, ContextType, CONTEXT } from '../baseWorker'; export type SolanaAPI = Connection; diff --git a/packages/blockchain-link/tests/integration/blockbook.test.ts b/packages/blockchain-link/tests/integration/blockbook.test.ts index 389a80689d7..4dd92f02049 100644 --- a/packages/blockchain-link/tests/integration/blockbook.test.ts +++ b/packages/blockchain-link/tests/integration/blockbook.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import BlockchainLink from '../../src'; import { // blockbookWorkerFactory, diff --git a/packages/blockchain-link/tests/integration/blockfrost.test.ts b/packages/blockchain-link/tests/integration/blockfrost.test.ts index ddccb1f5e96..9f03bd8f1d7 100644 --- a/packages/blockchain-link/tests/integration/blockfrost.test.ts +++ b/packages/blockchain-link/tests/integration/blockfrost.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import BlockchainLink from '../../src'; import { // blockfrostWorkerFactory, diff --git a/packages/blockchain-link/tests/integration/connection.test.ts b/packages/blockchain-link/tests/integration/connection.test.ts index 40cc1687b6f..ef68ff4137b 100644 --- a/packages/blockchain-link/tests/integration/connection.test.ts +++ b/packages/blockchain-link/tests/integration/connection.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import BlockchainLink from '../../src'; import { // rippleWorkerFactory, diff --git a/packages/blockchain-link/tests/integration/electrum.test.ts b/packages/blockchain-link/tests/integration/electrum.test.ts index d3e927f424d..3781c2fea8f 100644 --- a/packages/blockchain-link/tests/integration/electrum.test.ts +++ b/packages/blockchain-link/tests/integration/electrum.test.ts @@ -1,8 +1,9 @@ -import ElectrumWorker from '../../src/workers/electrum'; import type { Message } from '@trezor/blockchain-link-types/src/messages'; import type { Response } from '@trezor/blockchain-link-types/src/responses'; import { GET_ACCOUNT_INFO, HANDSHAKE } from '@trezor/blockchain-link-types/src/constants/messages'; +import ElectrumWorker from '../../src/workers/electrum'; + const TCP_CONFIG = '127.0.0.1:50001:t'; const NETWORK = 'REGTEST'; diff --git a/packages/blockchain-link/tests/integration/ripple.test.ts b/packages/blockchain-link/tests/integration/ripple.test.ts index 4119cf331bd..c64c807148c 100644 --- a/packages/blockchain-link/tests/integration/ripple.test.ts +++ b/packages/blockchain-link/tests/integration/ripple.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import BlockchainLink from '../../src'; import { // rippleWorkerFactory, diff --git a/packages/blockchain-link/tests/integration/solana.test.ts b/packages/blockchain-link/tests/integration/solana.test.ts index e53444d189d..2752bc95c03 100644 --- a/packages/blockchain-link/tests/integration/solana.test.ts +++ b/packages/blockchain-link/tests/integration/solana.test.ts @@ -1,4 +1,5 @@ import { AccountInfoParams } from '@trezor/blockchain-link-types'; + import BlockchainLink from '../../src'; import SolanaWorker, { SolanaAPI } from '../../src/workers/solana'; diff --git a/packages/blockchain-link/tests/unit/connection.test.ts b/packages/blockchain-link/tests/unit/connection.test.ts index 5c06a7eea2f..86e42eccf9a 100644 --- a/packages/blockchain-link/tests/unit/connection.test.ts +++ b/packages/blockchain-link/tests/unit/connection.test.ts @@ -1,5 +1,6 @@ /* eslint-disable jest/no-jasmine-globals */ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; diff --git a/packages/blockchain-link/tests/unit/estimateFee.test.ts b/packages/blockchain-link/tests/unit/estimateFee.test.ts index 57a4b1187fe..db58740a5a5 100644 --- a/packages/blockchain-link/tests/unit/estimateFee.test.ts +++ b/packages/blockchain-link/tests/unit/estimateFee.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; import fixtures from './fixtures/estimateFee'; diff --git a/packages/blockchain-link/tests/unit/getAccountInfo.test.ts b/packages/blockchain-link/tests/unit/getAccountInfo.test.ts index 24c1ec08db9..8712a6464a0 100644 --- a/packages/blockchain-link/tests/unit/getAccountInfo.test.ts +++ b/packages/blockchain-link/tests/unit/getAccountInfo.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; import fixtures from './fixtures/getAccountInfo'; diff --git a/packages/blockchain-link/tests/unit/getAccountUtxo.test.ts b/packages/blockchain-link/tests/unit/getAccountUtxo.test.ts index 9fb0b3ada3d..500c3f31a1c 100644 --- a/packages/blockchain-link/tests/unit/getAccountUtxo.test.ts +++ b/packages/blockchain-link/tests/unit/getAccountUtxo.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; import fixtures from './fixtures/getAccountUtxo'; diff --git a/packages/blockchain-link/tests/unit/getBlockHash.test.ts b/packages/blockchain-link/tests/unit/getBlockHash.test.ts index 347a77615e7..9a63c0873da 100644 --- a/packages/blockchain-link/tests/unit/getBlockHash.test.ts +++ b/packages/blockchain-link/tests/unit/getBlockHash.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; import fixtures from './fixtures/getBlockHash'; diff --git a/packages/blockchain-link/tests/unit/getInfo.test.ts b/packages/blockchain-link/tests/unit/getInfo.test.ts index 53b1a2fd85a..f143f1af43c 100644 --- a/packages/blockchain-link/tests/unit/getInfo.test.ts +++ b/packages/blockchain-link/tests/unit/getInfo.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; import fixtures from './fixtures/getInfo'; diff --git a/packages/blockchain-link/tests/unit/getTransaction.test.ts b/packages/blockchain-link/tests/unit/getTransaction.test.ts index a821639183c..3aacdca842a 100644 --- a/packages/blockchain-link/tests/unit/getTransaction.test.ts +++ b/packages/blockchain-link/tests/unit/getTransaction.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; import fixtures from './fixtures/getTransaction'; diff --git a/packages/blockchain-link/tests/unit/notifications.test.ts b/packages/blockchain-link/tests/unit/notifications.test.ts index b0ecbf1687f..dbab1887fdb 100644 --- a/packages/blockchain-link/tests/unit/notifications.test.ts +++ b/packages/blockchain-link/tests/unit/notifications.test.ts @@ -1,7 +1,7 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; - import fixturesBlockbook from './fixtures/notifications-blockbook'; import fixturesRipple from './fixtures/notifications-ripple'; import fixturesBlockfrost from './fixtures/notifications-blockfrost'; diff --git a/packages/blockchain-link/tests/unit/pushTransaction.test.ts b/packages/blockchain-link/tests/unit/pushTransaction.test.ts index 0b58302d260..c27b934611d 100644 --- a/packages/blockchain-link/tests/unit/pushTransaction.test.ts +++ b/packages/blockchain-link/tests/unit/pushTransaction.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; import fixtures from './fixtures/pushTransaction'; diff --git a/packages/blockchain-link/tests/unit/subscribe.test.ts b/packages/blockchain-link/tests/unit/subscribe.test.ts index 83db8ed478f..66d6051a46d 100644 --- a/packages/blockchain-link/tests/unit/subscribe.test.ts +++ b/packages/blockchain-link/tests/unit/subscribe.test.ts @@ -1,4 +1,5 @@ import { BackendWebsocketServerMock } from '@trezor/e2e-utils'; + import workers from './worker'; import BlockchainLink from '../../src'; import fixtures from './fixtures/subscribe'; diff --git a/packages/blockchain-link/tests/unit/utils.test.ts b/packages/blockchain-link/tests/unit/utils.test.ts index b8e3eba9cfc..a294210a0c1 100644 --- a/packages/blockchain-link/tests/unit/utils.test.ts +++ b/packages/blockchain-link/tests/unit/utils.test.ts @@ -1,5 +1,4 @@ import { prioritizeEndpoints } from '../../src/workers/utils'; - import * as fixtures from './fixtures/utils'; describe('prioritizeEndpoints', () => { diff --git a/packages/blockchain-link/tests/unit/workers.test.ts b/packages/blockchain-link/tests/unit/workers.test.ts index cbdd8542481..ee5d9649f3a 100644 --- a/packages/blockchain-link/tests/unit/workers.test.ts +++ b/packages/blockchain-link/tests/unit/workers.test.ts @@ -1,5 +1,6 @@ /* eslint-disable jest/no-jasmine-globals */ import TinyWorker from 'tiny-worker'; + import BlockchainLink from '../../src'; class BaseMockWorker { diff --git a/packages/blockchain-link/webpack/dev.js b/packages/blockchain-link/webpack/dev.js index ff811e42dd4..94f0f2d8286 100644 --- a/packages/blockchain-link/webpack/dev.js +++ b/packages/blockchain-link/webpack/dev.js @@ -1,5 +1,6 @@ const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); + const { SRC, BUILD, PORT } = require('./constants'); module.exports = { diff --git a/packages/blockchain-link/webpack/workers.web.js b/packages/blockchain-link/webpack/workers.web.js index bb8b9594a77..4197bfb4ada 100644 --- a/packages/blockchain-link/webpack/workers.web.js +++ b/packages/blockchain-link/webpack/workers.web.js @@ -1,4 +1,5 @@ const webpack = require('webpack'); + const { SRC, BUILD } = require('./constants'); module.exports = { diff --git a/packages/components/src/components/AssetLogo/AssetInitials.tsx b/packages/components/src/components/AssetLogo/AssetInitials.tsx index 6f5ebdb48d5..23ff3f25efe 100644 --- a/packages/components/src/components/AssetLogo/AssetInitials.tsx +++ b/packages/components/src/components/AssetLogo/AssetInitials.tsx @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import { ElevationUp, useElevation } from '../ElevationContext/ElevationContext'; + import { borders, Elevation, @@ -7,6 +7,8 @@ import { mapElevationToBorder, spacingsPx, } from '@trezor/theme'; + +import { ElevationUp, useElevation } from '../ElevationContext/ElevationContext'; import { Text } from '../typography/Text/Text'; import { Tooltip } from '../Tooltip/Tooltip'; diff --git a/packages/components/src/components/AssetLogo/AssetLogo.tsx b/packages/components/src/components/AssetLogo/AssetLogo.tsx index ec97026763c..c515cedd030 100644 --- a/packages/components/src/components/AssetLogo/AssetLogo.tsx +++ b/packages/components/src/components/AssetLogo/AssetLogo.tsx @@ -1,14 +1,16 @@ +import { useEffect, useState } from 'react'; + +import styled from 'styled-components'; + +import { borders, Elevation, mapElevationToBackground, mapElevationToBorder } from '@trezor/theme'; +import { getAssetLogoUrl } from '@trezor/asset-utils'; + import { FrameProps, FramePropsKeys, pickAndPrepareFrameProps, withFrameProps, } from '../../utils/frameProps'; -import { useEffect, useState } from 'react'; -import styled from 'styled-components'; -import { borders, Elevation, mapElevationToBackground, mapElevationToBorder } from '@trezor/theme'; -import { getAssetLogoUrl } from '@trezor/asset-utils'; - import { AssetInitials } from './AssetInitials'; import { TransientProps } from '../../utils/transientProps'; import { ElevationUp, useElevation } from '../ElevationContext/ElevationContext'; diff --git a/packages/components/src/components/AutoScalingInput/AutoScalingInput.stories.tsx b/packages/components/src/components/AutoScalingInput/AutoScalingInput.stories.tsx index c6f5a269363..d8cd47f8067 100644 --- a/packages/components/src/components/AutoScalingInput/AutoScalingInput.stories.tsx +++ b/packages/components/src/components/AutoScalingInput/AutoScalingInput.stories.tsx @@ -1,7 +1,9 @@ import { ForwardRefExoticComponent, RefAttributes } from 'react'; -import { AutoScalingInput as AutoScalingInputComponent, Props } from './AutoScalingInput'; + import { Meta, StoryObj } from '@storybook/react'; +import { AutoScalingInput as AutoScalingInputComponent, Props } from './AutoScalingInput'; + const meta: Meta = { title: 'Form/AutoScalingInput', component: AutoScalingInputComponent, diff --git a/packages/components/src/components/AutoScalingInput/AutoScalingInput.tsx b/packages/components/src/components/AutoScalingInput/AutoScalingInput.tsx index 72e940cc7f0..402af20f113 100644 --- a/packages/components/src/components/AutoScalingInput/AutoScalingInput.tsx +++ b/packages/components/src/components/AutoScalingInput/AutoScalingInput.tsx @@ -1,4 +1,5 @@ import React, { useRef, useEffect, forwardRef, useState, ChangeEvent, useCallback } from 'react'; + import styled from 'styled-components'; const HiddenInputToMeasurePlaceholderScrollableWidth = styled.input` diff --git a/packages/components/src/components/AutoScalingInput/AutoScalingInputExamples.stories.tsx b/packages/components/src/components/AutoScalingInput/AutoScalingInputExamples.stories.tsx index 480071c9b3c..1159d3d20a4 100644 --- a/packages/components/src/components/AutoScalingInput/AutoScalingInputExamples.stories.tsx +++ b/packages/components/src/components/AutoScalingInput/AutoScalingInputExamples.stories.tsx @@ -1,7 +1,8 @@ import styled from 'styled-components'; -import { AutoScalingInput as Input } from './AutoScalingInput'; import { Meta } from '@storybook/react'; +import { AutoScalingInput as Input } from './AutoScalingInput'; + const Wrapper = styled.div` display: flex; flex: 1; diff --git a/packages/components/src/components/Badge/Badge.stories.tsx b/packages/components/src/components/Badge/Badge.stories.tsx index c97522f92b0..38b0bb26787 100644 --- a/packages/components/src/components/Badge/Badge.stories.tsx +++ b/packages/components/src/components/Badge/Badge.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Badge as BadgeComponent, BadgeProps, allowedBadgeFrameProps, badgeSizes } from './Badge'; import { getFramePropsStory } from '../../utils/frameProps'; diff --git a/packages/components/src/components/Badge/Badge.tsx b/packages/components/src/components/Badge/Badge.tsx index 491867c8fc4..856c27264a3 100644 --- a/packages/components/src/components/Badge/Badge.tsx +++ b/packages/components/src/components/Badge/Badge.tsx @@ -1,6 +1,9 @@ import React from 'react'; + import styled, { css, DefaultTheme, useTheme } from 'styled-components'; + import { borders, Color, CSSColor, spacings, spacingsPx, typography } from '@trezor/theme'; + import { focusStyleTransition, getFocusShadowStyle } from '../../utils/utils'; import type { UISize, UIVariant } from '../../config/types'; import { diff --git a/packages/components/src/components/Banner/Banner.stories.tsx b/packages/components/src/components/Banner/Banner.stories.tsx index 534aee0e7c9..3349a7f91ef 100644 --- a/packages/components/src/components/Banner/Banner.stories.tsx +++ b/packages/components/src/components/Banner/Banner.stories.tsx @@ -1,7 +1,8 @@ import { Meta, StoryObj } from '@storybook/react'; +import styled from 'styled-components'; + import { Banner as BannerComponent, BannerProps, variables, Row } from '../../index'; import { allowedBannerFrameProps } from './Banner'; -import styled from 'styled-components'; import { getFramePropsStory } from '../../utils/frameProps'; const Wrapper = styled.div` diff --git a/packages/components/src/components/Banner/Banner.tsx b/packages/components/src/components/Banner/Banner.tsx index 9d3ddf5eddd..abb92b99062 100755 --- a/packages/components/src/components/Banner/Banner.tsx +++ b/packages/components/src/components/Banner/Banner.tsx @@ -1,8 +1,10 @@ import { ReactNode } from 'react'; + import styled, { css, DefaultTheme, useTheme } from 'styled-components'; -import { variables } from '../../config'; import { Elevation, borders, spacingsPx, typography, spacings } from '@trezor/theme'; + +import { variables } from '../../config'; import { FrameProps, FramePropsKeys, diff --git a/packages/components/src/components/Banner/BannerContext.ts b/packages/components/src/components/Banner/BannerContext.ts index cddde230cc2..58ba257eded 100644 --- a/packages/components/src/components/Banner/BannerContext.ts +++ b/packages/components/src/components/Banner/BannerContext.ts @@ -1,4 +1,5 @@ import { createContext, useContext } from 'react'; + import { BannerVariant } from './types'; export const BannerContext = createContext<{ diff --git a/packages/components/src/components/Banner/utils.tsx b/packages/components/src/components/Banner/utils.tsx index ded9531ee3d..ea4165229d4 100644 --- a/packages/components/src/components/Banner/utils.tsx +++ b/packages/components/src/components/Banner/utils.tsx @@ -1,6 +1,8 @@ +import { DefaultTheme } from 'styled-components'; + import { Color, CSSColor, Elevation, mapElevationToBackgroundToken } from '@trezor/theme'; + import { BannerVariant } from './types'; -import { DefaultTheme } from 'styled-components'; import { IconName } from '../Icon/Icon'; type MapArgs = { diff --git a/packages/components/src/components/Card/Card.stories.tsx b/packages/components/src/components/Card/Card.stories.tsx index 561f4fc4b0c..d95d73e54d6 100644 --- a/packages/components/src/components/Card/Card.stories.tsx +++ b/packages/components/src/components/Card/Card.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Card as CardComponent, allowedCardFrameProps } from './Card'; import { paddingTypes, fillTypes } from './types'; import { getFramePropsStory } from '../../utils/frameProps'; diff --git a/packages/components/src/components/Card/Card.tsx b/packages/components/src/components/Card/Card.tsx index 5d666651a65..78e862a752e 100644 --- a/packages/components/src/components/Card/Card.tsx +++ b/packages/components/src/components/Card/Card.tsx @@ -1,6 +1,9 @@ import { forwardRef, HTMLAttributes, ReactNode } from 'react'; + import styled from 'styled-components'; + import { borders, Elevation, spacingsPx } from '@trezor/theme'; + import { ElevationUp, useElevation } from '../ElevationContext/ElevationContext'; import { FrameProps, diff --git a/packages/components/src/components/Card/utils.tsx b/packages/components/src/components/Card/utils.tsx index ee2544b8c38..54faeb84172 100644 --- a/packages/components/src/components/Card/utils.tsx +++ b/packages/components/src/components/Card/utils.tsx @@ -1,10 +1,12 @@ +import { css, DefaultTheme, RuleSet } from 'styled-components'; + import { spacingsPx, Elevation, mapElevationToBackground, mapElevationToBorder, } from '@trezor/theme'; -import { css, DefaultTheme, RuleSet } from 'styled-components'; + import { PaddingType, FillType } from './types'; type PaddingMapArgs = { diff --git a/packages/components/src/components/CollapsibleBox/CollapsibleBox.tsx b/packages/components/src/components/CollapsibleBox/CollapsibleBox.tsx index ecc7b8d550d..335da570caa 100644 --- a/packages/components/src/components/CollapsibleBox/CollapsibleBox.tsx +++ b/packages/components/src/components/CollapsibleBox/CollapsibleBox.tsx @@ -1,6 +1,8 @@ import { useState, ReactNode, MouseEvent } from 'react'; + import { motion } from 'framer-motion'; import styled, { css } from 'styled-components'; + import { spacingsPx, borders, @@ -9,6 +11,7 @@ import { mapElevationToBorder, spacings, } from '@trezor/theme'; + import { Icon } from '../Icon/Icon'; import { Row, Column } from '../Flex/Flex'; import { Text } from '../typography/Text/Text'; diff --git a/packages/components/src/components/CollapsibleBox/utils.tsx b/packages/components/src/components/CollapsibleBox/utils.tsx index 6691b9a7b68..4d107dfb60b 100644 --- a/packages/components/src/components/CollapsibleBox/utils.tsx +++ b/packages/components/src/components/CollapsibleBox/utils.tsx @@ -1,4 +1,5 @@ import { spacingsPx, TypographyStyle } from '@trezor/theme'; + import { HeadingSize, PaddingType } from './types'; import { IconSize } from '../Icon/Icon'; diff --git a/packages/components/src/components/ComponentWithSubIcon/ComponentWithSubIcon.stories.tsx b/packages/components/src/components/ComponentWithSubIcon/ComponentWithSubIcon.stories.tsx index 6cc42af8c57..74c18b1bf77 100644 --- a/packages/components/src/components/ComponentWithSubIcon/ComponentWithSubIcon.stories.tsx +++ b/packages/components/src/components/ComponentWithSubIcon/ComponentWithSubIcon.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Icon, iconVariants } from '../Icon/Icon'; import { allowedComponentWithSubIconFrameProps, diff --git a/packages/components/src/components/ComponentWithSubIcon/ComponentWithSubIcon.tsx b/packages/components/src/components/ComponentWithSubIcon/ComponentWithSubIcon.tsx index 32125d7d71f..632436ff1db 100644 --- a/packages/components/src/components/ComponentWithSubIcon/ComponentWithSubIcon.tsx +++ b/packages/components/src/components/ComponentWithSubIcon/ComponentWithSubIcon.tsx @@ -1,4 +1,9 @@ +import { ReactNode } from 'react'; + import styled, { useTheme } from 'styled-components'; + +import { borders, spacingsPx } from '@trezor/theme'; + import { ExclusiveColorOrVariant, getColorForIconVariant, @@ -6,9 +11,7 @@ import { Icon, IconProps, } from '../Icon/Icon'; -import { borders, spacingsPx } from '@trezor/theme'; import { TransientProps } from '../../utils/transientProps'; -import { ReactNode } from 'react'; import { FramePropsKeys, FrameProps, diff --git a/packages/components/src/components/DataAnalytics.tsx b/packages/components/src/components/DataAnalytics.tsx index 665c8c2ee05..ba6afe52835 100644 --- a/packages/components/src/components/DataAnalytics.tsx +++ b/packages/components/src/components/DataAnalytics.tsx @@ -1,13 +1,16 @@ import { Fragment, useState, ReactNode } from 'react'; +import { FormattedMessage } from 'react-intl'; + import styled from 'styled-components'; -import { FormattedMessage } from 'react-intl'; +import { spacingsPx } from '@trezor/theme'; + import { variables } from '../config'; import { Button } from './buttons/Button/Button'; import { CollapsibleBox } from './CollapsibleBox/CollapsibleBox'; import { Card } from './Card/Card'; import { Switch } from './form/Switch/Switch'; -import { spacingsPx } from '@trezor/theme'; + const Wrapper = styled.div` display: flex; diff --git a/packages/components/src/components/Divider/Divider.stories.tsx b/packages/components/src/components/Divider/Divider.stories.tsx index a7fd9b8bfbe..41faa6ccc28 100644 --- a/packages/components/src/components/Divider/Divider.stories.tsx +++ b/packages/components/src/components/Divider/Divider.stories.tsx @@ -1,6 +1,7 @@ import { Meta, StoryObj } from '@storybook/react'; -import { Divider as DividerComponent, allowedDividerFrameProps } from './Divider'; import styled from 'styled-components'; + +import { Divider as DividerComponent, allowedDividerFrameProps } from './Divider'; import { getFramePropsStory } from '../../utils/frameProps'; const Container = styled.div` diff --git a/packages/components/src/components/Divider/Divider.tsx b/packages/components/src/components/Divider/Divider.tsx index 3df4fcd2552..78fea8cb07b 100644 --- a/packages/components/src/components/Divider/Divider.tsx +++ b/packages/components/src/components/Divider/Divider.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { Color, Elevation, mapElevationToBorder, spacings } from '@trezor/theme'; + import { useElevation } from '../ElevationContext/ElevationContext'; import { FrameProps, diff --git a/packages/components/src/components/Dropdown/Dropdown.stories.tsx b/packages/components/src/components/Dropdown/Dropdown.stories.tsx index f5b6becf2ed..97f48f9b6ad 100644 --- a/packages/components/src/components/Dropdown/Dropdown.stories.tsx +++ b/packages/components/src/components/Dropdown/Dropdown.stories.tsx @@ -1,6 +1,8 @@ import React from 'react'; + import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; + import { Dropdown as DropdownComponent, DropdownProps } from './Dropdown'; const Center = styled.div` diff --git a/packages/components/src/components/Dropdown/Dropdown.tsx b/packages/components/src/components/Dropdown/Dropdown.tsx index 275339e2785..e39dcb76f10 100644 --- a/packages/components/src/components/Dropdown/Dropdown.tsx +++ b/packages/components/src/components/Dropdown/Dropdown.tsx @@ -11,8 +11,11 @@ import { useEffect, } from 'react'; import { createPortal } from 'react-dom'; + import styled from 'styled-components'; + import { useOnClickOutside } from '@trezor/react-utils'; + import { Menu, MenuProps, DropdownMenuItemProps } from './Menu'; import { Coords, getAdjustedCoords } from './getAdjustedCoords'; import { IconButton } from '../buttons/IconButton/IconButton'; diff --git a/packages/components/src/components/Dropdown/Menu.tsx b/packages/components/src/components/Dropdown/Menu.tsx index 646fc96df97..9cc52796f3e 100644 --- a/packages/components/src/components/Dropdown/Menu.tsx +++ b/packages/components/src/components/Dropdown/Menu.tsx @@ -1,5 +1,7 @@ import React, { forwardRef, useEffect, useState } from 'react'; + import styled, { css, keyframes, useTheme } from 'styled-components'; + import { borders, spacings, @@ -9,6 +11,7 @@ import { mapElevationToBackground, nextElevation, } from '@trezor/theme'; + import type { Coords } from './getAdjustedCoords'; import { menuStyle } from './menuStyle'; import { useElevation } from '../ElevationContext/ElevationContext'; diff --git a/packages/components/src/components/Dropdown/menuStyle.ts b/packages/components/src/components/Dropdown/menuStyle.ts index 773550a5db5..4d9bcf01b61 100644 --- a/packages/components/src/components/Dropdown/menuStyle.ts +++ b/packages/components/src/components/Dropdown/menuStyle.ts @@ -1,4 +1,5 @@ import { css, keyframes } from 'styled-components'; + import { spacingsPx, borders, diff --git a/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx b/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx index 859b816350b..129ace1de78 100644 --- a/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx +++ b/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx @@ -1,7 +1,18 @@ +import { ReactNode } from 'react'; + import { Meta, StoryObj } from '@storybook/react'; +import styled from 'styled-components'; + +import { + Elevation, + borders, + mapElevationToBackground, + mapElevationToBorder, + spacingsPx, +} from '@trezor/theme'; + import { Card } from '../Card/Card'; import { Modal } from '../modals/Modal/Modal'; -import styled from 'styled-components'; import { Textarea } from '../form/Textarea/Textarea'; import { useElevation, @@ -9,14 +20,7 @@ import { ElevationDown, ElevationUp, } from './ElevationContext'; -import { - Elevation, - borders, - mapElevationToBackground, - mapElevationToBorder, - spacingsPx, -} from '@trezor/theme'; -import { ReactNode } from 'react'; + const UiBox = styled.div<{ $elevation: Elevation }>` background-color: ${mapElevationToBackground}; diff --git a/packages/components/src/components/ElevationContext/ElevationContext.tsx b/packages/components/src/components/ElevationContext/ElevationContext.tsx index cea2ee7011b..291f5834c68 100644 --- a/packages/components/src/components/ElevationContext/ElevationContext.tsx +++ b/packages/components/src/components/ElevationContext/ElevationContext.tsx @@ -1,7 +1,9 @@ -import { Elevation, nextElevation, prevElevation } from '@trezor/theme'; import { ReactNode, createContext, useContext, useMemo } from 'react'; + import styled from 'styled-components'; +import { Elevation, nextElevation, prevElevation } from '@trezor/theme'; + const DEBUG = false; const ElevationReactContext = createContext<{ diff --git a/packages/components/src/components/Flag/Flag.stories.tsx b/packages/components/src/components/Flag/Flag.stories.tsx index 603200398d0..ee375c2fccf 100644 --- a/packages/components/src/components/Flag/Flag.stories.tsx +++ b/packages/components/src/components/Flag/Flag.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Flag as FlagComponent } from './Flag'; const meta: Meta = { diff --git a/packages/components/src/components/Flag/Flag.tsx b/packages/components/src/components/Flag/Flag.tsx index f0b2e7c4564..393f1000648 100644 --- a/packages/components/src/components/Flag/Flag.tsx +++ b/packages/components/src/components/Flag/Flag.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { FLAGS } from './flags'; export type FlagType = keyof typeof FLAGS; diff --git a/packages/components/src/components/Flex/Flex.stories.tsx b/packages/components/src/components/Flex/Flex.stories.tsx index 80e4a22729d..c21449141d8 100644 --- a/packages/components/src/components/Flex/Flex.stories.tsx +++ b/packages/components/src/components/Flex/Flex.stories.tsx @@ -1,4 +1,8 @@ import { ArgTypes, Meta, StoryObj } from '@storybook/react'; +import styled from 'styled-components'; + +import { spacings } from '@trezor/theme'; + import { FlexProps, flexAlignItems, @@ -8,8 +12,6 @@ import { Column as ColumnComponent, allowedFlexFrameProps, } from './Flex'; -import { spacings } from '@trezor/theme'; -import styled from 'styled-components'; import { getFramePropsStory } from '../../utils/frameProps'; const Container = styled.div` diff --git a/packages/components/src/components/Flex/Flex.tsx b/packages/components/src/components/Flex/Flex.tsx index 8cb1801ed44..4634fe219cc 100644 --- a/packages/components/src/components/Flex/Flex.tsx +++ b/packages/components/src/components/Flex/Flex.tsx @@ -1,5 +1,9 @@ -import { Elevation, mapElevationToBorder, SpacingValues } from '@trezor/theme'; +import React from 'react'; + import styled, { css, DefaultTheme } from 'styled-components'; + +import { Elevation, mapElevationToBorder, SpacingValues } from '@trezor/theme'; + import { FrameProps, FramePropsKeys, @@ -8,7 +12,7 @@ import { } from '../../utils/frameProps'; import { makePropsTransient, TransientProps } from '../../utils/transientProps'; import { useElevation } from '../ElevationContext/ElevationContext'; -import React from 'react'; + export const allowedFlexFrameProps = [ 'margin', diff --git a/packages/components/src/components/GradientOverlay/GradientOverlay.stories.tsx b/packages/components/src/components/GradientOverlay/GradientOverlay.stories.tsx index db8cc9b3416..2d7eda6a8f5 100644 --- a/packages/components/src/components/GradientOverlay/GradientOverlay.stories.tsx +++ b/packages/components/src/components/GradientOverlay/GradientOverlay.stories.tsx @@ -1,9 +1,10 @@ import { Meta, StoryObj } from '@storybook/react'; +import styled from 'styled-components'; + import { GradientOverlay as GradientOverlayComponent, GradientOverlayProps, } from './GradientOverlay'; -import styled from 'styled-components'; import { Card } from '../Card/Card'; import { ElevationContext } from '../ElevationContext/ElevationContext'; diff --git a/packages/components/src/components/GradientOverlay/GradientOverlay.tsx b/packages/components/src/components/GradientOverlay/GradientOverlay.tsx index b399bb68c51..f0d0c8874b5 100644 --- a/packages/components/src/components/GradientOverlay/GradientOverlay.tsx +++ b/packages/components/src/components/GradientOverlay/GradientOverlay.tsx @@ -1,5 +1,7 @@ -import { Elevation, mapElevationToBackground } from '@trezor/theme'; import styled from 'styled-components'; + +import { Elevation, mapElevationToBackground } from '@trezor/theme'; + import { useElevation } from '../ElevationContext/ElevationContext'; export interface GradientOverlayProps { diff --git a/packages/components/src/components/Grid/Grid.stories.tsx b/packages/components/src/components/Grid/Grid.stories.tsx index bc4c60cc523..774808462d6 100644 --- a/packages/components/src/components/Grid/Grid.stories.tsx +++ b/packages/components/src/components/Grid/Grid.stories.tsx @@ -1,7 +1,9 @@ import { ArgTypes, Meta, StoryObj } from '@storybook/react'; -import { GridProps, Grid as GridComponent, allowedGridFrameProps } from './Grid'; -import { spacings } from '@trezor/theme'; import styled from 'styled-components'; + +import { spacings } from '@trezor/theme'; + +import { GridProps, Grid as GridComponent, allowedGridFrameProps } from './Grid'; import { getFramePropsStory } from '../../utils/frameProps'; const Container = styled.div` diff --git a/packages/components/src/components/Grid/Grid.tsx b/packages/components/src/components/Grid/Grid.tsx index 26cbf3a1093..27d3a24a606 100644 --- a/packages/components/src/components/Grid/Grid.tsx +++ b/packages/components/src/components/Grid/Grid.tsx @@ -1,5 +1,7 @@ -import { SpacingValues } from '@trezor/theme'; import styled from 'styled-components'; + +import { SpacingValues } from '@trezor/theme'; + import { FrameProps, FramePropsKeys, withFrameProps } from '../../utils/frameProps'; import { makePropsTransient, TransientProps } from '../../utils/transientProps'; diff --git a/packages/components/src/components/HotkeyBadge/HotkeyBadge.stories.tsx b/packages/components/src/components/HotkeyBadge/HotkeyBadge.stories.tsx index 42e43595f90..90e3ad32595 100644 --- a/packages/components/src/components/HotkeyBadge/HotkeyBadge.stories.tsx +++ b/packages/components/src/components/HotkeyBadge/HotkeyBadge.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { HotkeyBadge as HotkeyBadgeComponent, HotkeyBadgeProps } from './HotkeyBadge'; const meta: Meta = { diff --git a/packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx b/packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx index 19ebd53f4a0..c1b6322dd05 100644 --- a/packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx +++ b/packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx @@ -1,3 +1,7 @@ +import { Fragment } from 'react'; + +import styled from 'styled-components'; + import { Elevation, borders, @@ -5,10 +9,10 @@ import { spacingsPx, typography, } from '@trezor/theme'; -import styled from 'styled-components'; + import { ElevationDown, useElevation } from '../ElevationContext/ElevationContext'; import { Keys, keyboardKeys } from './keyboardKeys'; -import { Fragment } from 'react'; + export const Container = styled.div<{ $elevation: Elevation; $isActive: boolean }>` display: flex; diff --git a/packages/components/src/components/Icon/Icon.stories.tsx b/packages/components/src/components/Icon/Icon.stories.tsx index faf61f9ec37..7c9d2518b41 100644 --- a/packages/components/src/components/Icon/Icon.stories.tsx +++ b/packages/components/src/components/Icon/Icon.stories.tsx @@ -1,4 +1,11 @@ import { Meta, StoryObj } from '@storybook/react'; + +import { IconName, icons } from '@suite-common/icons/src/icons'; +import { + icons as iconsDeprecated, + IconName as IconNameDeprecated, +} from '@suite-common/icons-deprecated'; + import { allowedIconFrameProps, Icon as IconComponent, @@ -6,11 +13,6 @@ import { iconVariants, iconSizes, } from './Icon'; -import { IconName, icons } from '@suite-common/icons/src/icons'; -import { - icons as iconsDeprecated, - IconName as IconNameDeprecated, -} from '@suite-common/icons-deprecated'; import { getFramePropsStory } from '../../utils/frameProps'; const meta: Meta = { diff --git a/packages/components/src/components/Icon/Icon.tsx b/packages/components/src/components/Icon/Icon.tsx index 12b882166c8..48da5a049ee 100644 --- a/packages/components/src/components/Icon/Icon.tsx +++ b/packages/components/src/components/Icon/Icon.tsx @@ -2,6 +2,7 @@ import { ReactSVG } from 'react-svg'; import { forwardRef, MouseEvent, Ref } from 'react'; import styled, { css, DefaultTheme } from 'styled-components'; + import { icons as iconsDeprecated, IconName as IconNameDeprecated, diff --git a/packages/components/src/components/Icon/icons.stories.tsx b/packages/components/src/components/Icon/icons.stories.tsx index 76bf4a2feeb..7232aafdd6a 100644 --- a/packages/components/src/components/Icon/icons.stories.tsx +++ b/packages/components/src/components/Icon/icons.stories.tsx @@ -1,11 +1,8 @@ import React, { useState } from 'react'; + import styled, { useTheme } from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; -import { Icon, IconProps, allowedIconFrameProps, iconVariants, iconSizes } from './Icon'; -import { getFramePropsStory } from '../../utils/frameProps'; -import { Input } from '../form/Input/Input'; -import { Checkbox } from '../form/Checkbox/Checkbox'; -import { Text } from '../typography/Text/Text'; + import { typography } from '@trezor/theme'; import { icons, IconName } from '@suite-common/icons/src/icons'; import { @@ -13,6 +10,12 @@ import { IconName as IconNameDeprecated, } from '@suite-common/icons-deprecated'; +import { Icon, IconProps, allowedIconFrameProps, iconVariants, iconSizes } from './Icon'; +import { getFramePropsStory } from '../../utils/frameProps'; +import { Input } from '../form/Input/Input'; +import { Checkbox } from '../form/Checkbox/Checkbox'; +import { Text } from '../typography/Text/Text'; + const CopiedText = styled.div` display: flex; justify-content: center; diff --git a/packages/components/src/components/IconCircle/IconCircle.stories.tsx b/packages/components/src/components/IconCircle/IconCircle.stories.tsx index d966a91f53d..d20b670aa83 100644 --- a/packages/components/src/components/IconCircle/IconCircle.stories.tsx +++ b/packages/components/src/components/IconCircle/IconCircle.stories.tsx @@ -1,5 +1,7 @@ import React from 'react'; + import { Meta, StoryObj } from '@storybook/react'; + import { icons, IconName } from '@suite-common/icons/src/icons'; import { diff --git a/packages/components/src/components/IconCircle/types.tsx b/packages/components/src/components/IconCircle/types.tsx index 62d00ad7b82..c813c094a60 100644 --- a/packages/components/src/components/IconCircle/types.tsx +++ b/packages/components/src/components/IconCircle/types.tsx @@ -1,6 +1,7 @@ -import { UIVariant } from '../../config/types'; import { CSSColor } from '@trezor/theme'; +import { UIVariant } from '../../config/types'; + export const iconCircleVariants = [ 'primary', 'warning', diff --git a/packages/components/src/components/IconCircle/utils.tsx b/packages/components/src/components/IconCircle/utils.tsx index cc49d8347e7..2e2358bc032 100644 --- a/packages/components/src/components/IconCircle/utils.tsx +++ b/packages/components/src/components/IconCircle/utils.tsx @@ -1,6 +1,8 @@ +import { DefaultTheme } from 'styled-components'; + import { Color, CSSColor } from '@trezor/theme'; + import { IconCircleVariant, IconCircleExclusiveColorOrVariant } from './types'; -import { DefaultTheme } from 'styled-components'; import { TransientProps } from '../../utils/transientProps'; type MapArgs = { diff --git a/packages/components/src/components/Image/Image.stories.tsx b/packages/components/src/components/Image/Image.stories.tsx index c596964890c..21dd8faf331 100644 --- a/packages/components/src/components/Image/Image.stories.tsx +++ b/packages/components/src/components/Image/Image.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Image as ImageComponent, ImageProps } from './Image'; import { PNG_IMAGES, SVG_IMAGES } from './images'; diff --git a/packages/components/src/components/Image/Image.tsx b/packages/components/src/components/Image/Image.tsx index 4cbc1ff2695..c8b29cc4691 100644 --- a/packages/components/src/components/Image/Image.tsx +++ b/packages/components/src/components/Image/Image.tsx @@ -1,5 +1,7 @@ import { ImgHTMLAttributes } from 'react'; + import styled from 'styled-components'; + import { PngImage, SvgImage, PNG_IMAGES, SVG_IMAGES } from './images'; import { resolveStaticPath } from '../../utils/resolveStaticPath'; diff --git a/packages/components/src/components/InfoRow/InfoRow.stories.tsx b/packages/components/src/components/InfoRow/InfoRow.stories.tsx index 136c9705431..ec339c91557 100644 --- a/packages/components/src/components/InfoRow/InfoRow.stories.tsx +++ b/packages/components/src/components/InfoRow/InfoRow.stories.tsx @@ -1,4 +1,5 @@ import React from 'react'; + import { Meta, StoryObj } from '@storybook/react'; import { diff --git a/packages/components/src/components/InfoRow/InfoRow.tsx b/packages/components/src/components/InfoRow/InfoRow.tsx index 73e3a4cf32d..1b3023fb2c8 100644 --- a/packages/components/src/components/InfoRow/InfoRow.tsx +++ b/packages/components/src/components/InfoRow/InfoRow.tsx @@ -1,6 +1,9 @@ import { ReactNode } from 'react'; -import { spacings } from '@trezor/theme'; + import styled from 'styled-components'; + +import { spacings } from '@trezor/theme'; + import { FrameProps, FramePropsKeys, diff --git a/packages/components/src/components/List/List.stories.tsx b/packages/components/src/components/List/List.stories.tsx index 4f08099bfef..9d809b6ce98 100644 --- a/packages/components/src/components/List/List.stories.tsx +++ b/packages/components/src/components/List/List.stories.tsx @@ -1,7 +1,9 @@ import React from 'react'; + import { Meta, StoryObj } from '@storybook/react'; import { spacings } from '@trezor/theme'; + import { Icon } from '../Icon/Icon'; import { List as ListComponent, diff --git a/packages/components/src/components/List/List.tsx b/packages/components/src/components/List/List.tsx index 60bac4d42c7..232630cb65a 100644 --- a/packages/components/src/components/List/List.tsx +++ b/packages/components/src/components/List/List.tsx @@ -1,7 +1,9 @@ import { createContext, useContext } from 'react'; -import { spacings, SpacingValues } from '@trezor/theme'; import styled from 'styled-components'; + +import { spacings, SpacingValues } from '@trezor/theme'; + import { FrameProps, FramePropsKeys, diff --git a/packages/components/src/components/List/ListItem.tsx b/packages/components/src/components/List/ListItem.tsx index 638d0832dda..55aa6342a16 100644 --- a/packages/components/src/components/List/ListItem.tsx +++ b/packages/components/src/components/List/ListItem.tsx @@ -1,6 +1,9 @@ import { useEffect, useRef } from 'react'; -import { SpacingValues, spacingsPx, borders } from '@trezor/theme'; + import styled, { css } from 'styled-components'; + +import { SpacingValues, spacingsPx, borders } from '@trezor/theme'; + import { FlexAlignItems } from '../Flex/Flex'; import { useList, BulletVerticalAlignment } from './List'; diff --git a/packages/components/src/components/Markdown/Markdown.stories.tsx b/packages/components/src/components/Markdown/Markdown.stories.tsx index e845eeb37c7..0c41f39734a 100644 --- a/packages/components/src/components/Markdown/Markdown.stories.tsx +++ b/packages/components/src/components/Markdown/Markdown.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Markdown as MarkdownComponent } from './Markdown'; const meta: Meta = { diff --git a/packages/components/src/components/Markdown/Markdown.tsx b/packages/components/src/components/Markdown/Markdown.tsx index 67cb605bd47..c898c62756c 100644 --- a/packages/components/src/components/Markdown/Markdown.tsx +++ b/packages/components/src/components/Markdown/Markdown.tsx @@ -1,9 +1,12 @@ +import ReactMarkdown, { Options } from 'react-markdown'; + import styled from 'styled-components'; -import ReactMarkdown, { Options } from 'react-markdown'; -import { variables } from '../../config'; import { typography } from '@trezor/theme'; +import { variables } from '../../config'; + + const StyledMarkdown = styled.div` ${typography.hint} diff --git a/packages/components/src/components/NewModal/NewModal.stories.tsx b/packages/components/src/components/NewModal/NewModal.stories.tsx index 3434e955672..3da32c7bfcf 100644 --- a/packages/components/src/components/NewModal/NewModal.stories.tsx +++ b/packages/components/src/components/NewModal/NewModal.stories.tsx @@ -1,5 +1,7 @@ import { Meta, StoryObj } from '@storybook/react'; import { action } from '@storybook/addon-actions'; +import { ThemeProvider } from 'styled-components'; + import { allowedNewModalFrameProps, NewModal as ModalComponent, @@ -9,7 +11,6 @@ import { IconCircle, } from '../../index'; import { newModalVariants, newModalSizes } from './types'; -import { ThemeProvider } from 'styled-components'; import { getFramePropsStory } from '../../utils/frameProps'; const Buttons = () => ( diff --git a/packages/components/src/components/NewModal/NewModal.tsx b/packages/components/src/components/NewModal/NewModal.tsx index 1fcb501980c..a8ff48d910c 100644 --- a/packages/components/src/components/NewModal/NewModal.tsx +++ b/packages/components/src/components/NewModal/NewModal.tsx @@ -1,6 +1,8 @@ import { ReactNode } from 'react'; -import styled from 'styled-components'; import { useEvent } from 'react-use'; + +import styled from 'styled-components'; + import { borders, Elevation, diff --git a/packages/components/src/components/NewModal/NewModalBackdrop.tsx b/packages/components/src/components/NewModal/NewModalBackdrop.tsx index 5939346cf75..56089d43d6d 100644 --- a/packages/components/src/components/NewModal/NewModalBackdrop.tsx +++ b/packages/components/src/components/NewModal/NewModalBackdrop.tsx @@ -1,9 +1,12 @@ import { ReactNode } from 'react'; -import styled from 'styled-components'; import FocusLock from 'react-focus-lock'; -import { zIndices, spacings } from '@trezor/theme'; import { createPortal } from 'react-dom'; +import styled from 'styled-components'; + +import { zIndices, spacings } from '@trezor/theme'; + + import { NewModalAlignment } from './types'; import { mapAlignmentToAlignItems, mapAlignmentToJustifyContent } from './utils'; import { useModalTarget } from './NewModalProvider'; diff --git a/packages/components/src/components/NewModal/NewModalContext.tsx b/packages/components/src/components/NewModal/NewModalContext.tsx index b94f5479a73..8f436e34c4e 100644 --- a/packages/components/src/components/NewModal/NewModalContext.tsx +++ b/packages/components/src/components/NewModal/NewModalContext.tsx @@ -1,4 +1,5 @@ import { createContext, useContext } from 'react'; + import { NewModalVariant } from './types'; export const NewModalContext = createContext<{ diff --git a/packages/components/src/components/Note/Note.stories.tsx b/packages/components/src/components/Note/Note.stories.tsx index 068de82c543..8dbebcdc98e 100644 --- a/packages/components/src/components/Note/Note.stories.tsx +++ b/packages/components/src/components/Note/Note.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Note as NoteComponent, NoteProps } from './Note'; const meta: Meta = { diff --git a/packages/components/src/components/Note/Note.tsx b/packages/components/src/components/Note/Note.tsx index 9fd581cbc80..286a2f7e025 100644 --- a/packages/components/src/components/Note/Note.tsx +++ b/packages/components/src/components/Note/Note.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled, { useTheme } from 'styled-components'; import { spacings, spacingsPx } from '@trezor/theme'; diff --git a/packages/components/src/components/ResizableBox/ResizableBox.stories.tsx b/packages/components/src/components/ResizableBox/ResizableBox.stories.tsx index 1a530f6ddfb..19edddb5cbf 100644 --- a/packages/components/src/components/ResizableBox/ResizableBox.stories.tsx +++ b/packages/components/src/components/ResizableBox/ResizableBox.stories.tsx @@ -1,5 +1,6 @@ import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; + import { ResizableBoxProps, ResizableBox as ResizableBoxComponent } from './ResizableBox'; const Container = styled.div` diff --git a/packages/components/src/components/ResizableBox/ResizableBox.tsx b/packages/components/src/components/ResizableBox/ResizableBox.tsx index 72fabc73862..5010706ef23 100644 --- a/packages/components/src/components/ResizableBox/ResizableBox.tsx +++ b/packages/components/src/components/ResizableBox/ResizableBox.tsx @@ -1,5 +1,7 @@ -import styled, { css } from 'styled-components'; import { useCallback, useEffect, useRef, useState } from 'react'; + +import styled, { css } from 'styled-components'; + import { createCooldown } from '@trezor/utils'; import { ZIndexValues, zIndices } from '@trezor/theme'; diff --git a/packages/components/src/components/ResizableBox/ResizableBoxExamples.stories.tsx b/packages/components/src/components/ResizableBox/ResizableBoxExamples.stories.tsx index 6381e50563c..24bce4ef473 100644 --- a/packages/components/src/components/ResizableBox/ResizableBoxExamples.stories.tsx +++ b/packages/components/src/components/ResizableBox/ResizableBoxExamples.stories.tsx @@ -1,5 +1,6 @@ import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; + import { ResizableBox } from './ResizableBox'; const Container = styled.div` diff --git a/packages/components/src/components/Table/Table.tsx b/packages/components/src/components/Table/Table.tsx index 72977686702..da0a985d208 100644 --- a/packages/components/src/components/Table/Table.tsx +++ b/packages/components/src/components/Table/Table.tsx @@ -1,7 +1,9 @@ import { createContext, ReactNode, useContext } from 'react'; + import styled from 'styled-components'; import { mapElevationToBackgroundToken } from '@trezor/theme'; + import { FrameProps, FramePropsKeys, withFrameProps } from '../../utils/frameProps'; import { makePropsTransient, TransientProps } from '../../utils/transientProps'; import { TableHeader } from './TableHeader'; diff --git a/packages/components/src/components/Table/TableCell.tsx b/packages/components/src/components/Table/TableCell.tsx index e8eed543057..34efa2b4009 100644 --- a/packages/components/src/components/Table/TableCell.tsx +++ b/packages/components/src/components/Table/TableCell.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; import { diff --git a/packages/components/src/components/Table/TableHeader.tsx b/packages/components/src/components/Table/TableHeader.tsx index e3fdff18f64..92bb419a548 100644 --- a/packages/components/src/components/Table/TableHeader.tsx +++ b/packages/components/src/components/Table/TableHeader.tsx @@ -1,4 +1,5 @@ import { createContext, useContext, ReactNode } from 'react'; + import styled from 'styled-components'; import { Elevation, mapElevationToBorder } from '@trezor/theme'; diff --git a/packages/components/src/components/Table/TableRow.tsx b/packages/components/src/components/Table/TableRow.tsx index 554c090f215..00b7c2d27df 100644 --- a/packages/components/src/components/Table/TableRow.tsx +++ b/packages/components/src/components/Table/TableRow.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; import { diff --git a/packages/components/src/components/Timerange/Timerange.stories.tsx b/packages/components/src/components/Timerange/Timerange.stories.tsx index 5d2bf6cce4b..3397b4e3f06 100644 --- a/packages/components/src/components/Timerange/Timerange.stories.tsx +++ b/packages/components/src/components/Timerange/Timerange.stories.tsx @@ -1,5 +1,6 @@ import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; + import { Timerange as TimerangeComponent, TimerangeProps } from './Timerange'; const Center = styled.div` diff --git a/packages/components/src/components/Timerange/Timerange.tsx b/packages/components/src/components/Timerange/Timerange.tsx index 73c6c456a40..35204258a1d 100644 --- a/packages/components/src/components/Timerange/Timerange.tsx +++ b/packages/components/src/components/Timerange/Timerange.tsx @@ -1,10 +1,12 @@ import { useState, ReactNode } from 'react'; import { DateRange } from 'react-date-range'; + import styled, { css } from 'styled-components'; +import type { Locale } from 'date-fns'; + import { mediaQueries } from '@trezor/styles'; import { borders, spacingsPx, zIndices } from '@trezor/theme'; -import type { Locale } from 'date-fns'; import { Button } from '../buttons/Button/Button'; diff --git a/packages/components/src/components/Tooltip/Tooltip.stories.tsx b/packages/components/src/components/Tooltip/Tooltip.stories.tsx index 339431bd32f..9dd0ae1bd1d 100644 --- a/packages/components/src/components/Tooltip/Tooltip.stories.tsx +++ b/packages/components/src/components/Tooltip/Tooltip.stories.tsx @@ -1,8 +1,12 @@ +import { useState } from 'react'; + import styled from 'styled-components'; -import { Tooltip as TooltipComponent, TooltipProps } from './Tooltip'; import { Meta, StoryObj } from '@storybook/react'; import { Placement } from '@floating-ui/react'; + import { Elevation, mapElevationToBackground, spacingsPx, zIndices } from '@trezor/theme'; + +import { Tooltip as TooltipComponent, TooltipProps } from './Tooltip'; import { ElevationContext, useElevation } from '../ElevationContext/ElevationContext'; import { TOOLTIP_DELAY_LONG, @@ -10,7 +14,6 @@ import { TOOLTIP_DELAY_NORMAL, TOOLTIP_DELAY_SHORT, } from './TooltipDelay'; -import { useState } from 'react'; import { Button } from '../buttons/Button/Button'; const Center = styled.div` diff --git a/packages/components/src/components/Tooltip/Tooltip.tsx b/packages/components/src/components/Tooltip/Tooltip.tsx index 3fece61b9f5..f60221c3dc5 100644 --- a/packages/components/src/components/Tooltip/Tooltip.tsx +++ b/packages/components/src/components/Tooltip/Tooltip.tsx @@ -1,11 +1,13 @@ -import styled, { ThemeProvider } from 'styled-components'; import { ReactNode, MutableRefObject } from 'react'; + +import styled, { ThemeProvider } from 'styled-components'; import { transparentize } from 'polished'; +import { Placement, ShiftOptions } from '@floating-ui/react'; + import { ZIndexValues, spacingsPx, spacings, zIndices } from '@trezor/theme'; import { Icon } from '../Icon/Icon'; import { TooltipContent, TooltipFloatingUi, TooltipTrigger } from './TooltipFloatingUi'; -import { Placement, ShiftOptions } from '@floating-ui/react'; import { TooltipBox, TooltipBoxProps } from './TooltipBox'; import { TooltipArrow } from './TooltipArrow'; import { TOOLTIP_DELAY_SHORT, TooltipDelay } from './TooltipDelay'; diff --git a/packages/components/src/components/Tooltip/TooltipArrow.tsx b/packages/components/src/components/Tooltip/TooltipArrow.tsx index 346ef76dd4b..4c375516c9d 100644 --- a/packages/components/src/components/Tooltip/TooltipArrow.tsx +++ b/packages/components/src/components/Tooltip/TooltipArrow.tsx @@ -1,6 +1,8 @@ import { FloatingArrow } from '@floating-ui/react'; -import { ArrowProps } from './TooltipFloatingUi'; + import { palette } from '@trezor/theme'; + +import { ArrowProps } from './TooltipFloatingUi'; import { TOOLTIP_BORDER_RADIUS } from './TooltipBox'; export const TooltipArrow = ({ ref, context }: ArrowProps) => ( diff --git a/packages/components/src/components/Tooltip/TooltipBox.tsx b/packages/components/src/components/Tooltip/TooltipBox.tsx index b40fff1b387..3b05063d05f 100644 --- a/packages/components/src/components/Tooltip/TooltipBox.tsx +++ b/packages/components/src/components/Tooltip/TooltipBox.tsx @@ -1,6 +1,9 @@ import { ReactElement, ReactNode } from 'react'; -import { borders, palette, spacings, spacingsPx, typography } from '@trezor/theme'; + import styled from 'styled-components'; + +import { borders, palette, spacings, spacingsPx, typography } from '@trezor/theme'; + import { Icon, IconName } from '../Icon/Icon'; export const TOOLTIP_BORDER_RADIUS = borders.radii.sm; diff --git a/packages/components/src/components/Tooltip/TooltipFloatingUi.tsx b/packages/components/src/components/Tooltip/TooltipFloatingUi.tsx index 7745feded01..ff2561723aa 100644 --- a/packages/components/src/components/Tooltip/TooltipFloatingUi.tsx +++ b/packages/components/src/components/Tooltip/TooltipFloatingUi.tsx @@ -1,3 +1,19 @@ +import { + useState, + useMemo, + createContext, + useContext, + ReactNode, + HTMLProps, + forwardRef, + isValidElement, + cloneElement, + useRef, + RefObject, + CSSProperties, + MutableRefObject, +} from 'react'; + import { useFloating, autoUpdate, @@ -15,21 +31,6 @@ import { arrow, } from '@floating-ui/react'; import type { Placement, ShiftOptions, UseFloatingReturn } from '@floating-ui/react'; -import { - useState, - useMemo, - createContext, - useContext, - ReactNode, - HTMLProps, - forwardRef, - isValidElement, - cloneElement, - useRef, - RefObject, - CSSProperties, - MutableRefObject, -} from 'react'; /** * Based on https://floating-ui.com/docs/tooltip but heavily modified diff --git a/packages/components/src/components/VirtualizedList/VirtualizedList.stories.tsx b/packages/components/src/components/VirtualizedList/VirtualizedList.stories.tsx index b764a92990f..9462f98bf67 100644 --- a/packages/components/src/components/VirtualizedList/VirtualizedList.stories.tsx +++ b/packages/components/src/components/VirtualizedList/VirtualizedList.stories.tsx @@ -1,7 +1,9 @@ +import { useEffect, useState } from 'react'; + import { Meta, StoryFn } from '@storybook/react'; import styled from 'styled-components'; + import { VirtualizedList as VirtualizedListComponent } from './VirtualizedList'; -import { useEffect, useState } from 'react'; const meta: Meta = { title: 'VirtualizedList', diff --git a/packages/components/src/components/VirtualizedList/VirtualizedList.tsx b/packages/components/src/components/VirtualizedList/VirtualizedList.tsx index 2b7718c58ba..4ae6dd13404 100644 --- a/packages/components/src/components/VirtualizedList/VirtualizedList.tsx +++ b/packages/components/src/components/VirtualizedList/VirtualizedList.tsx @@ -1,7 +1,9 @@ -import { isChanged } from '@suite-common/suite-utils'; import React, { useState, useEffect, useCallback, forwardRef, useRef } from 'react'; + import styled from 'styled-components'; +import { isChanged } from '@suite-common/suite-utils'; + function debounce void>( func: T, wait: number, diff --git a/packages/components/src/components/animations/AnimationPrimitives.tsx b/packages/components/src/components/animations/AnimationPrimitives.tsx index a646cc8be04..dc4b99fb193 100644 --- a/packages/components/src/components/animations/AnimationPrimitives.tsx +++ b/packages/components/src/components/animations/AnimationPrimitives.tsx @@ -1,6 +1,7 @@ -import { borders } from '@trezor/theme'; import styled, { CSSProperties, css } from 'styled-components'; +import { borders } from '@trezor/theme'; + export type Shape = 'CIRCLE' | 'ROUNDED' | 'ROUNDED-SMALL'; export const AnimationWrapper = styled.div<{ diff --git a/packages/components/src/components/animations/DeviceAnimation.tsx b/packages/components/src/components/animations/DeviceAnimation.tsx index d0296463f75..1f927e4c520 100644 --- a/packages/components/src/components/animations/DeviceAnimation.tsx +++ b/packages/components/src/components/animations/DeviceAnimation.tsx @@ -1,4 +1,5 @@ import { CSSProperties, MouseEventHandler, forwardRef } from 'react'; + import styled, { useTheme } from 'styled-components'; import { DEFAULT_FLAGSHIP_MODEL } from '@suite-common/suite-constants'; diff --git a/packages/components/src/components/animations/LottieAnimation.tsx b/packages/components/src/components/animations/LottieAnimation.tsx index ff54c5576b0..9cc264c9651 100644 --- a/packages/components/src/components/animations/LottieAnimation.tsx +++ b/packages/components/src/components/animations/LottieAnimation.tsx @@ -1,10 +1,12 @@ -import styled from 'styled-components'; import React, { useEffect, useState } from 'react'; + +import styled from 'styled-components'; import Lottie, { LottieOptions } from 'lottie-react'; import { DEFAULT_FLAGSHIP_MODEL } from '@suite-common/suite-constants'; import { getNarrowedDeviceModelInternal } from '@suite-common/suite-utils'; import { DeviceModelInternal } from '@trezor/connect'; + import { AnimationWrapper, Shape } from './AnimationPrimitives'; import { resolveStaticPath } from '../../utils/resolveStaticPath'; diff --git a/packages/components/src/components/buttons/Button/Button.stories.tsx b/packages/components/src/components/buttons/Button/Button.stories.tsx index 8defbc1befa..e0822a1cf87 100644 --- a/packages/components/src/components/buttons/Button/Button.stories.tsx +++ b/packages/components/src/components/buttons/Button/Button.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { allowedButtonFrameProps, Button as ButtonComponent, ButtonProps } from './Button'; import { getFramePropsStory } from '../../../utils/frameProps'; import { variables } from '../../../config'; diff --git a/packages/components/src/components/buttons/Button/Button.tsx b/packages/components/src/components/buttons/Button/Button.tsx index 187b5c817ac..be95425b49e 100644 --- a/packages/components/src/components/buttons/Button/Button.tsx +++ b/packages/components/src/components/buttons/Button/Button.tsx @@ -1,6 +1,9 @@ import { ButtonHTMLAttributes } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { borders, CSSColor, Elevation, spacingsPx, typography } from '@trezor/theme'; + import { Spinner } from '../../loaders/Spinner/Spinner'; import { ButtonSize, diff --git a/packages/components/src/components/buttons/Button/buttons.stories.tsx b/packages/components/src/components/buttons/Button/buttons.stories.tsx index 1fc6df2080d..4dac9402fe9 100644 --- a/packages/components/src/components/buttons/Button/buttons.stories.tsx +++ b/packages/components/src/components/buttons/Button/buttons.stories.tsx @@ -1,9 +1,12 @@ -import { Button } from '../../../index'; import { Meta, StoryFn } from '@storybook/react'; +import { action } from '@storybook/addon-actions'; + import { capitalizeFirstLetter } from '@trezor/utils'; + +import { Button } from '../../../index'; import { StoryColumn } from '../../../support/Story'; import { ButtonVariant } from '../buttonStyleUtils'; -import { action } from '@storybook/addon-actions'; + const variants: Array = ['primary', 'tertiary', 'info', 'warning', 'destructive']; diff --git a/packages/components/src/components/buttons/ButtonGroup/ButtonGroup.tsx b/packages/components/src/components/buttons/ButtonGroup/ButtonGroup.tsx index eb561288197..c7631de2823 100644 --- a/packages/components/src/components/buttons/ButtonGroup/ButtonGroup.tsx +++ b/packages/components/src/components/buttons/ButtonGroup/ButtonGroup.tsx @@ -1,6 +1,9 @@ import React from 'react'; + import styled from 'styled-components'; + import { borders } from '@trezor/theme'; + import { ButtonProps } from '../Button/Button'; import { ButtonSize, ButtonVariant } from '../buttonStyleUtils'; import { IconButtonProps } from '../IconButton/IconButton'; diff --git a/packages/components/src/components/buttons/ButtonGroup/ButtonGroups.stories.tsx b/packages/components/src/components/buttons/ButtonGroup/ButtonGroups.stories.tsx index 3a2f79b7ed7..95dacead1c6 100644 --- a/packages/components/src/components/buttons/ButtonGroup/ButtonGroups.stories.tsx +++ b/packages/components/src/components/buttons/ButtonGroup/ButtonGroups.stories.tsx @@ -1,5 +1,7 @@ import React from 'react'; + import { Meta, StoryObj } from '@storybook/react'; + import { StoryColumn } from '../../../support/Story'; import { Button } from '../Button/Button'; import { ButtonGroup } from './ButtonGroup'; diff --git a/packages/components/src/components/buttons/IconButton/IconButton.stories.tsx b/packages/components/src/components/buttons/IconButton/IconButton.stories.tsx index 9fb9db388b8..1ba9795d09a 100644 --- a/packages/components/src/components/buttons/IconButton/IconButton.stories.tsx +++ b/packages/components/src/components/buttons/IconButton/IconButton.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { IconButton as IconButtonComponent, IconButtonProps } from './IconButton'; import { variables } from '../../../config'; import { buttonSizes, buttonVariants, subtleButtonVariants } from '../buttonStyleUtils'; diff --git a/packages/components/src/components/buttons/IconButton/IconButton.tsx b/packages/components/src/components/buttons/IconButton/IconButton.tsx index af676067806..39c7c441eda 100644 --- a/packages/components/src/components/buttons/IconButton/IconButton.tsx +++ b/packages/components/src/components/buttons/IconButton/IconButton.tsx @@ -1,5 +1,7 @@ import React from 'react'; + import styled, { useTheme } from 'styled-components'; + import { Spinner } from '../../loaders/Spinner/Spinner'; import { ButtonContainer, ButtonProps, getIcon, IconOrComponent } from '../Button/Button'; import { ButtonVariant, getIconColor, getIconSize, getPadding } from '../buttonStyleUtils'; diff --git a/packages/components/src/components/buttons/IconButton/IconButtons.stories.tsx b/packages/components/src/components/buttons/IconButton/IconButtons.stories.tsx index e49974fc70c..f7442d3e9be 100644 --- a/packages/components/src/components/buttons/IconButton/IconButtons.stories.tsx +++ b/packages/components/src/components/buttons/IconButton/IconButtons.stories.tsx @@ -1,8 +1,10 @@ import React from 'react'; + +import { Meta, StoryObj } from '@storybook/react'; + import { IconButton } from '../../../index'; import { StoryColumn } from '../../../support/Story'; import { ButtonVariant } from '../buttonStyleUtils'; -import { Meta, StoryObj } from '@storybook/react'; const variants: Array> = ['primary', 'tertiary']; diff --git a/packages/components/src/components/buttons/PinButton/PinButton.stories.tsx b/packages/components/src/components/buttons/PinButton/PinButton.stories.tsx index 7d330768fdb..9cbcedeae7a 100644 --- a/packages/components/src/components/buttons/PinButton/PinButton.stories.tsx +++ b/packages/components/src/components/buttons/PinButton/PinButton.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { PinButton as PinButtonComponent } from './PinButton'; const meta: Meta = { diff --git a/packages/components/src/components/buttons/PinButton/PinButton.tsx b/packages/components/src/components/buttons/PinButton/PinButton.tsx index e881aba4bec..d22e9e57666 100644 --- a/packages/components/src/components/buttons/PinButton/PinButton.tsx +++ b/packages/components/src/components/buttons/PinButton/PinButton.tsx @@ -1,3 +1,7 @@ +import { ButtonHTMLAttributes } from 'react'; + +import styled from 'styled-components'; + import { Elevation, borders, @@ -5,8 +9,7 @@ import { mapElevationToBorder, spacingsPx, } from '@trezor/theme'; -import { ButtonHTMLAttributes } from 'react'; -import styled from 'styled-components'; + import { useElevation } from '../../ElevationContext/ElevationContext'; const Button = styled.button<{ $elevation: Elevation }>` diff --git a/packages/components/src/components/buttons/TextButton/TextButton.stories.tsx b/packages/components/src/components/buttons/TextButton/TextButton.stories.tsx index a467b60a466..666318f5977 100644 --- a/packages/components/src/components/buttons/TextButton/TextButton.stories.tsx +++ b/packages/components/src/components/buttons/TextButton/TextButton.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { TextButton as TextButtonComponent, TextButtonProps } from './TextButton'; import { variables } from '../../../config'; import { buttonSizes } from '../buttonStyleUtils'; diff --git a/packages/components/src/components/buttons/TextButton/TextButton.tsx b/packages/components/src/components/buttons/TextButton/TextButton.tsx index 70bfa45dda9..b5746b4c592 100644 --- a/packages/components/src/components/buttons/TextButton/TextButton.tsx +++ b/packages/components/src/components/buttons/TextButton/TextButton.tsx @@ -1,6 +1,9 @@ import React from 'react'; + import styled from 'styled-components'; + import { borders, spacingsPx, typography } from '@trezor/theme'; + import { ButtonProps, getIcon } from '../Button/Button'; import { ButtonSize, getIconSize, IconAlignment } from '../buttonStyleUtils'; import { Spinner } from '../../loaders/Spinner/Spinner'; diff --git a/packages/components/src/components/buttons/TextButton/TextButtons.stories.tsx b/packages/components/src/components/buttons/TextButton/TextButtons.stories.tsx index 22eebfbc248..42fa8c88d59 100644 --- a/packages/components/src/components/buttons/TextButton/TextButtons.stories.tsx +++ b/packages/components/src/components/buttons/TextButton/TextButtons.stories.tsx @@ -1,5 +1,7 @@ import React from 'react'; + import { Meta, StoryFn } from '@storybook/react'; + import { TextButton } from '../../../index'; import { StoryColumn } from '../../../support/Story'; diff --git a/packages/components/src/components/buttons/buttonStyleUtils.ts b/packages/components/src/components/buttons/buttonStyleUtils.ts index 0fa8bf15152..fb00519dad3 100644 --- a/packages/components/src/components/buttons/buttonStyleUtils.ts +++ b/packages/components/src/components/buttons/buttonStyleUtils.ts @@ -1,10 +1,11 @@ import { DefaultTheme, css, useTheme } from 'styled-components'; import { Color, Colors, Elevation, spacings, spacingsPx } from '@trezor/theme'; -import type { UIHorizontalAlignment, UISize, UIVariant } from '../../config/types'; import { hexToRgba } from '@suite-common/suite-utils'; import { capitalizeFirstLetter } from '@trezor/utils'; +import type { UIHorizontalAlignment, UISize, UIVariant } from '../../config/types'; + const SUBTLE_ALPHA = 0.12; const SUBTLE_ALPHA_HOVER = 0.2; diff --git a/packages/components/src/components/form/BottomText.tsx b/packages/components/src/components/form/BottomText.tsx index 2e1204590fd..059664174ad 100644 --- a/packages/components/src/components/form/BottomText.tsx +++ b/packages/components/src/components/form/BottomText.tsx @@ -1,7 +1,10 @@ +import { ReactNode } from 'react'; + import styled, { keyframes } from 'styled-components'; + import { spacingsPx, typography } from '@trezor/theme'; + import { getInputStateTextColor } from './InputStyles'; -import { ReactNode } from 'react'; import { InputState } from './inputTypes'; export const BOTTOM_TEXT_MIN_HEIGHT = 26; // 1 line of text + top padding diff --git a/packages/components/src/components/form/Checkbox/Checkbox.tsx b/packages/components/src/components/form/Checkbox/Checkbox.tsx index 3dc19fb3de7..0926274b8eb 100755 --- a/packages/components/src/components/form/Checkbox/Checkbox.tsx +++ b/packages/components/src/components/form/Checkbox/Checkbox.tsx @@ -1,5 +1,7 @@ import { EventHandler, SyntheticEvent, KeyboardEvent, ReactNode } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { borders, Color, spacingsPx, typography } from '@trezor/theme'; import { KEYBOARD_CODE } from '../../../constants/keyboardEvents'; diff --git a/packages/components/src/components/form/Input/Input.stories.tsx b/packages/components/src/components/form/Input/Input.stories.tsx index f576e3f8b3a..60927a34b8e 100644 --- a/packages/components/src/components/form/Input/Input.stories.tsx +++ b/packages/components/src/components/form/Input/Input.stories.tsx @@ -1,4 +1,5 @@ import { ChangeEvent } from 'react'; + import { useArgs } from '@storybook/client-api'; import { Meta, StoryObj } from '@storybook/react'; diff --git a/packages/components/src/components/form/Input/Input.tsx b/packages/components/src/components/form/Input/Input.tsx index 620a504f74f..375395cbb7a 100644 --- a/packages/components/src/components/form/Input/Input.tsx +++ b/packages/components/src/components/form/Input/Input.tsx @@ -1,7 +1,10 @@ import { useState, Ref, ReactNode, ReactElement, InputHTMLAttributes } from 'react'; -import styled, { useTheme } from 'styled-components'; import { useMeasure } from 'react-use'; + +import styled, { useTheme } from 'styled-components'; + import { spacingsPx, spacings, typography } from '@trezor/theme'; + import { Icon } from '../../Icon/Icon'; import { baseInputStyle, diff --git a/packages/components/src/components/form/InputStyles.ts b/packages/components/src/components/form/InputStyles.ts index c5aa3f26140..0e1ed09effa 100644 --- a/packages/components/src/components/form/InputStyles.ts +++ b/packages/components/src/components/form/InputStyles.ts @@ -1,4 +1,5 @@ import styled, { css, DefaultTheme } from 'styled-components'; + import { borders, spacingsPx, diff --git a/packages/components/src/components/form/Radio/Radio.tsx b/packages/components/src/components/form/Radio/Radio.tsx index e60fc22a591..25d6c59396a 100755 --- a/packages/components/src/components/form/Radio/Radio.tsx +++ b/packages/components/src/components/form/Radio/Radio.tsx @@ -1,5 +1,7 @@ import { EventHandler, KeyboardEvent, ReactNode, SyntheticEvent } from 'react'; + import styled from 'styled-components'; + import { Color, borders } from '@trezor/theme'; import { KEYBOARD_CODE } from '../../../constants/keyboardEvents'; diff --git a/packages/components/src/components/form/Range/Range.tsx b/packages/components/src/components/form/Range/Range.tsx index 1e94733617c..9416ae2676e 100644 --- a/packages/components/src/components/form/Range/Range.tsx +++ b/packages/components/src/components/form/Range/Range.tsx @@ -6,6 +6,7 @@ import { KeyboardEventHandler, ChangeEventHandler, } from 'react'; + import styled, { css, CSSObject } from 'styled-components'; import { borders, spacingsPx, typography } from '@trezor/theme'; diff --git a/packages/components/src/components/form/Select/Select.tsx b/packages/components/src/components/form/Select/Select.tsx index d5a48d69048..d934f76ca8a 100644 --- a/packages/components/src/components/form/Select/Select.tsx +++ b/packages/components/src/components/form/Select/Select.tsx @@ -1,6 +1,8 @@ import { useCallback, useRef, ReactNode, useMemo } from 'react'; import ReactSelect, { Props as ReactSelectProps, StylesConfig, SelectInstance } from 'react-select'; + import styled, { css, DefaultTheme, useTheme } from 'styled-components'; + import { borders, spacings, diff --git a/packages/components/src/components/form/Select/customComponents.tsx b/packages/components/src/components/form/Select/customComponents.tsx index c2297931bd7..2143922bc43 100644 --- a/packages/components/src/components/form/Select/customComponents.tsx +++ b/packages/components/src/components/form/Select/customComponents.tsx @@ -1,4 +1,5 @@ import { components, ControlProps, OptionProps, GroupHeadingProps } from 'react-select'; + import type { Option as OptionType } from './Select'; export interface ControlComponentProps extends ControlProps { diff --git a/packages/components/src/components/form/Select/useDetectPortalTarget.ts b/packages/components/src/components/form/Select/useDetectPortalTarget.ts index 8b90d84a507..22757fc43e9 100644 --- a/packages/components/src/components/form/Select/useDetectPortalTarget.ts +++ b/packages/components/src/components/form/Select/useDetectPortalTarget.ts @@ -1,5 +1,6 @@ import { useState, useEffect, RefObject } from 'react'; import { SelectInstance } from 'react-select'; + import { MODAL_CONTENT_ID } from '../../modals/Modal/Modal'; import type { Option } from './Select'; diff --git a/packages/components/src/components/form/Select/useOnKeyDown.ts b/packages/components/src/components/form/Select/useOnKeyDown.ts index 793d98fe465..633a557df82 100644 --- a/packages/components/src/components/form/Select/useOnKeyDown.ts +++ b/packages/components/src/components/form/Select/useOnKeyDown.ts @@ -1,5 +1,6 @@ import { useRef, useCallback, RefObject, KeyboardEvent } from 'react'; import { GroupBase, Options, OptionsOrGroups, SelectInstance } from 'react-select'; + import type { Option } from './Select'; /** Custom Type Guards to check if options are grouped or not */ diff --git a/packages/components/src/components/form/SelectBar/SelectBar.tsx b/packages/components/src/components/form/SelectBar/SelectBar.tsx index bc632f4e8c9..8abf533b44f 100644 --- a/packages/components/src/components/form/SelectBar/SelectBar.tsx +++ b/packages/components/src/components/form/SelectBar/SelectBar.tsx @@ -1,5 +1,7 @@ import { useState, useEffect, ReactNode, useCallback, KeyboardEvent } from 'react'; + import styled, { css } from 'styled-components'; + import { breakpointMediaQueries } from '@trezor/styles'; import { borders, @@ -10,6 +12,7 @@ import { mapElevationToBackground, nextElevation, } from '@trezor/theme'; + import { focusStyleTransition, getFocusShadowStyle } from '../../../utils/utils'; import { useElevation } from '../../ElevationContext/ElevationContext'; diff --git a/packages/components/src/components/form/Switch/Switch.tsx b/packages/components/src/components/form/Switch/Switch.tsx index 69e8c41f092..2f1e09e8aa5 100755 --- a/packages/components/src/components/form/Switch/Switch.tsx +++ b/packages/components/src/components/form/Switch/Switch.tsx @@ -1,7 +1,10 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; + import { borders, spacingsPx, typography } from '@trezor/theme'; import { getWeakRandomId } from '@trezor/utils'; + import { getInputColor, getLabelColor, diff --git a/packages/components/src/components/form/Textarea/CharacterCount.tsx b/packages/components/src/components/form/Textarea/CharacterCount.tsx index 64c875c6278..de8debece6f 100644 --- a/packages/components/src/components/form/Textarea/CharacterCount.tsx +++ b/packages/components/src/components/form/Textarea/CharacterCount.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { borders, spacings, spacingsPx, typography } from '@trezor/theme'; const Container = styled.div` diff --git a/packages/components/src/components/form/Textarea/Textarea.stories.tsx b/packages/components/src/components/form/Textarea/Textarea.stories.tsx index 76057136f9a..e9ceefc22db 100644 --- a/packages/components/src/components/form/Textarea/Textarea.stories.tsx +++ b/packages/components/src/components/form/Textarea/Textarea.stories.tsx @@ -1,6 +1,8 @@ +import { ChangeEventHandler } from 'react'; + import { useArgs } from '@storybook/client-api'; import { Meta, StoryObj } from '@storybook/react'; -import { ChangeEventHandler } from 'react'; + import { Textarea as TextareaComponent, TextareaProps } from './Textarea'; const meta: Meta = { diff --git a/packages/components/src/components/form/Textarea/Textarea.tsx b/packages/components/src/components/form/Textarea/Textarea.tsx index c295c65ba6d..6fca19fa91b 100644 --- a/packages/components/src/components/form/Textarea/Textarea.tsx +++ b/packages/components/src/components/form/Textarea/Textarea.tsx @@ -1,5 +1,7 @@ -import styled from 'styled-components'; import { useState, Ref, ReactNode, TextareaHTMLAttributes } from 'react'; + +import styled from 'styled-components'; + import { spacingsPx, Elevation } from '@trezor/theme'; import { InputState } from '../inputTypes'; diff --git a/packages/components/src/components/form/TopAddons.tsx b/packages/components/src/components/form/TopAddons.tsx index a3fdc9827ef..768ba15ec16 100644 --- a/packages/components/src/components/form/TopAddons.tsx +++ b/packages/components/src/components/form/TopAddons.tsx @@ -1,5 +1,7 @@ import React from 'react'; + import styled from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; const Container = styled.div<{ $hasLeftAddon?: boolean }>` diff --git a/packages/components/src/components/loaders/LoadingContent/LoadingContent.stories.tsx b/packages/components/src/components/loaders/LoadingContent/LoadingContent.stories.tsx index 13081b7f922..2d16178f4ea 100644 --- a/packages/components/src/components/loaders/LoadingContent/LoadingContent.stories.tsx +++ b/packages/components/src/components/loaders/LoadingContent/LoadingContent.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { H1, LoadingContent as LoadingContentComponent, LoadingContentProps } from '../../../index'; const meta: Meta = { diff --git a/packages/components/src/components/loaders/LoadingContent/LoadingContent.tsx b/packages/components/src/components/loaders/LoadingContent/LoadingContent.tsx index 62603ca36d1..1eeeb9f720d 100644 --- a/packages/components/src/components/loaders/LoadingContent/LoadingContent.tsx +++ b/packages/components/src/components/loaders/LoadingContent/LoadingContent.tsx @@ -1,5 +1,7 @@ import { ReactNode, useState, useEffect } from 'react'; + import styled, { css } from 'styled-components'; + import { Spinner } from '../Spinner/Spinner'; const LoadingWrapper = styled.div` diff --git a/packages/components/src/components/loaders/ProgressBar/ProgressBar.stories.tsx b/packages/components/src/components/loaders/ProgressBar/ProgressBar.stories.tsx index 7c4a8ad1a57..ba82870a6d5 100644 --- a/packages/components/src/components/loaders/ProgressBar/ProgressBar.stories.tsx +++ b/packages/components/src/components/loaders/ProgressBar/ProgressBar.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { ProgressBar as ProgressBarComponent, ProgressBarProps } from './ProgressBar'; const meta: Meta = { diff --git a/packages/components/src/components/loaders/ProgressBar/ProgressBar.tsx b/packages/components/src/components/loaders/ProgressBar/ProgressBar.tsx index 76343684d15..96b610b273e 100644 --- a/packages/components/src/components/loaders/ProgressBar/ProgressBar.tsx +++ b/packages/components/src/components/loaders/ProgressBar/ProgressBar.tsx @@ -1,6 +1,7 @@ -import { borders } from '@trezor/theme'; import styled from 'styled-components'; +import { borders } from '@trezor/theme'; + const Wrapper = styled.div` background: ${({ theme }) => theme.backgroundNeutralSubdued}; width: 100%; diff --git a/packages/components/src/components/loaders/ProgressPie/ProgressPie.stories.tsx b/packages/components/src/components/loaders/ProgressPie/ProgressPie.stories.tsx index eb0d2d48cb1..c3ababa25fd 100644 --- a/packages/components/src/components/loaders/ProgressPie/ProgressPie.stories.tsx +++ b/packages/components/src/components/loaders/ProgressPie/ProgressPie.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { ProgressPie as ProgressPieComponent, ProgressPieProps } from './ProgressPie'; const meta: Meta = { diff --git a/packages/components/src/components/loaders/ProgressPie/ProgressPie.tsx b/packages/components/src/components/loaders/ProgressPie/ProgressPie.tsx index 8941fe4fcb2..1547cf215f3 100644 --- a/packages/components/src/components/loaders/ProgressPie/ProgressPie.tsx +++ b/packages/components/src/components/loaders/ProgressPie/ProgressPie.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; const Container = styled.div<{ diff --git a/packages/components/src/components/loaders/Spinner/Spinner.stories.tsx b/packages/components/src/components/loaders/Spinner/Spinner.stories.tsx index 81aca151198..fabd17abd93 100644 --- a/packages/components/src/components/loaders/Spinner/Spinner.stories.tsx +++ b/packages/components/src/components/loaders/Spinner/Spinner.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Spinner as SpinnerComponent, SpinnerProps, allowedSpinnerFrameProps } from './Spinner'; import { getFramePropsStory } from '../../../utils/frameProps'; diff --git a/packages/components/src/components/loaders/Spinner/Spinner.tsx b/packages/components/src/components/loaders/Spinner/Spinner.tsx index 31b1058652f..b17aaed948f 100644 --- a/packages/components/src/components/loaders/Spinner/Spinner.tsx +++ b/packages/components/src/components/loaders/Spinner/Spinner.tsx @@ -1,6 +1,8 @@ import { useState } from 'react'; + import Lottie from 'lottie-react'; import styled from 'styled-components'; + import animationStart from './animationData/refresh-spinner-start.json'; import animationMiddle from './animationData/refresh-spinner-middle.json'; import animationEnd from './animationData/refresh-spinner-end-success.json'; diff --git a/packages/components/src/components/loaders/Stepper/Stepper.stories.tsx b/packages/components/src/components/loaders/Stepper/Stepper.stories.tsx index cbbe0fd68e8..3e7791ee086 100644 --- a/packages/components/src/components/loaders/Stepper/Stepper.stories.tsx +++ b/packages/components/src/components/loaders/Stepper/Stepper.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Stepper as StepperComponent, StepperProps } from './Stepper'; const meta: Meta = { diff --git a/packages/components/src/components/loaders/Stepper/Stepper.tsx b/packages/components/src/components/loaders/Stepper/Stepper.tsx index 764e2612ab3..5e9ee5235e4 100644 --- a/packages/components/src/components/loaders/Stepper/Stepper.tsx +++ b/packages/components/src/components/loaders/Stepper/Stepper.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { borders, spacingsPx } from '@trezor/theme'; const Container = styled.div<{ $maxWidth: number }>` diff --git a/packages/components/src/components/modals/DialogModal/DialogModal.stories.tsx b/packages/components/src/components/modals/DialogModal/DialogModal.stories.tsx index 75b7897dca6..4ffd033529e 100644 --- a/packages/components/src/components/modals/DialogModal/DialogModal.stories.tsx +++ b/packages/components/src/components/modals/DialogModal/DialogModal.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { DialogModal as ModalComponent, Button, DialogModalProps } from '../../../index'; import { variables } from '../../../config'; diff --git a/packages/components/src/components/modals/DialogModal/DialogModal.tsx b/packages/components/src/components/modals/DialogModal/DialogModal.tsx index 6ca8294107e..bf92ab9ccac 100644 --- a/packages/components/src/components/modals/DialogModal/DialogModal.tsx +++ b/packages/components/src/components/modals/DialogModal/DialogModal.tsx @@ -1,8 +1,11 @@ +import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { borders, spacingsPx, typography } from '@trezor/theme'; + import { Icon, IconName } from '../../Icon/Icon'; import { Modal, ModalProps } from '../Modal/Modal'; -import { ReactNode } from 'react'; const BodyHeading = styled.div` margin-bottom: ${spacingsPx.xs}; diff --git a/packages/components/src/components/modals/Modal/Backdrop.tsx b/packages/components/src/components/modals/Modal/Backdrop.tsx index 449994843f7..ffa2b952230 100644 --- a/packages/components/src/components/modals/Modal/Backdrop.tsx +++ b/packages/components/src/components/modals/Modal/Backdrop.tsx @@ -1,5 +1,7 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; + import { zIndices } from '@trezor/theme'; export type ModalAlignment = { x: 'center' | 'left'; y: 'center' | 'top' }; diff --git a/packages/components/src/components/modals/Modal/Modal.stories.tsx b/packages/components/src/components/modals/Modal/Modal.stories.tsx index 7fe6e9d6c7d..aebc56f081e 100644 --- a/packages/components/src/components/modals/Modal/Modal.stories.tsx +++ b/packages/components/src/components/modals/Modal/Modal.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Modal as ModalComponent, Button, ModalProps } from '../../../index'; import { Icon } from '../../Icon/Icon'; diff --git a/packages/components/src/components/modals/Modal/Modal.tsx b/packages/components/src/components/modals/Modal/Modal.tsx index 9d884dae45c..aad9e4ff0e2 100644 --- a/packages/components/src/components/modals/Modal/Modal.tsx +++ b/packages/components/src/components/modals/Modal/Modal.tsx @@ -1,7 +1,8 @@ import { useCallback, useState, ReactNode, useEffect } from 'react'; +import { useEvent } from 'react-use'; import styled, { css, useTheme } from 'styled-components'; -import { useEvent } from 'react-use'; + import { borders, spacings, spacingsPx, typography } from '@trezor/theme'; import { Stepper } from '../../loaders/Stepper/Stepper'; diff --git a/packages/components/src/components/skeletons/SkeletonCircle.stories.tsx b/packages/components/src/components/skeletons/SkeletonCircle.stories.tsx index 79ca80dc133..2e46a667b2e 100644 --- a/packages/components/src/components/skeletons/SkeletonCircle.stories.tsx +++ b/packages/components/src/components/skeletons/SkeletonCircle.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { SkeletonCircle as SkeletonCircleComponent, SkeletonCircleProps } from './SkeletonCircle'; const meta: Meta = { diff --git a/packages/components/src/components/skeletons/SkeletonCircle.tsx b/packages/components/src/components/skeletons/SkeletonCircle.tsx index c2cf1d98c90..6926817b517 100644 --- a/packages/components/src/components/skeletons/SkeletonCircle.tsx +++ b/packages/components/src/components/skeletons/SkeletonCircle.tsx @@ -1,7 +1,9 @@ import styled, { css } from 'styled-components'; + +import { Elevation, mapElevationToBackground } from '@trezor/theme'; + import { getValue, shimmerEffect } from './utils'; import { SkeletonBaseProps } from './types'; -import { Elevation, mapElevationToBackground } from '@trezor/theme'; import { useElevation } from '../ElevationContext/ElevationContext'; import { TransientProps } from '../../utils/transientProps'; diff --git a/packages/components/src/components/skeletons/SkeletonRectangle.stories.tsx b/packages/components/src/components/skeletons/SkeletonRectangle.stories.tsx index aba04a8c7f1..70a836674e1 100644 --- a/packages/components/src/components/skeletons/SkeletonRectangle.stories.tsx +++ b/packages/components/src/components/skeletons/SkeletonRectangle.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { SkeletonRectangle as SkeletonRectangleComponent, SkeletonRectangleProps, diff --git a/packages/components/src/components/skeletons/SkeletonRectangle.tsx b/packages/components/src/components/skeletons/SkeletonRectangle.tsx index 2b0244467cb..b9b8d0f82a4 100644 --- a/packages/components/src/components/skeletons/SkeletonRectangle.tsx +++ b/packages/components/src/components/skeletons/SkeletonRectangle.tsx @@ -1,7 +1,9 @@ import styled, { css } from 'styled-components'; + +import { Elevation, borders, mapElevationToBackground } from '@trezor/theme'; + import { SkeletonBaseProps } from './types'; import { getValue, shimmerEffect } from './utils'; -import { Elevation, borders, mapElevationToBackground } from '@trezor/theme'; import { useElevation } from '../ElevationContext/ElevationContext'; import { TransientProps } from '../../utils/transientProps'; diff --git a/packages/components/src/components/skeletons/SkeletonSpread.stories.tsx b/packages/components/src/components/skeletons/SkeletonSpread.stories.tsx index b73a202b307..99260d771c2 100644 --- a/packages/components/src/components/skeletons/SkeletonSpread.stories.tsx +++ b/packages/components/src/components/skeletons/SkeletonSpread.stories.tsx @@ -1,7 +1,8 @@ import { Meta, StoryObj } from '@storybook/react'; +import styled from 'styled-components'; + import { SkeletonSpread as SkeletonSpreadComponent, SkeletonSpreadProps } from './SkeletonSpread'; import { SkeletonCircle } from './SkeletonCircle'; -import styled from 'styled-components'; import { ElevationContext } from '../ElevationContext/ElevationContext'; const Container = styled.div` diff --git a/packages/components/src/components/skeletons/SkeletonSpread.tsx b/packages/components/src/components/skeletons/SkeletonSpread.tsx index ee17ea2304e..f917be4da49 100644 --- a/packages/components/src/components/skeletons/SkeletonSpread.tsx +++ b/packages/components/src/components/skeletons/SkeletonSpread.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { SkeletonStack, SkeletonStackProps } from './SkeletonStack'; export interface SkeletonSpreadProps extends SkeletonStackProps { diff --git a/packages/components/src/components/skeletons/SkeletonStack.stories.tsx b/packages/components/src/components/skeletons/SkeletonStack.stories.tsx index c9d3508e56d..04db1ac42cc 100644 --- a/packages/components/src/components/skeletons/SkeletonStack.stories.tsx +++ b/packages/components/src/components/skeletons/SkeletonStack.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { SkeletonStack as SkeletonStackComponent, SkeletonStackProps } from './SkeletonStack'; import { SkeletonCircle } from './SkeletonCircle'; import { ElevationContext } from '../ElevationContext/ElevationContext'; diff --git a/packages/components/src/components/skeletons/utils.ts b/packages/components/src/components/skeletons/utils.ts index d8be77b695b..f9e1e61b684 100644 --- a/packages/components/src/components/skeletons/utils.ts +++ b/packages/components/src/components/skeletons/utils.ts @@ -1,5 +1,7 @@ -import { Elevation, mapElevationToBackground } from '@trezor/theme'; import { css, keyframes } from 'styled-components'; + +import { Elevation, mapElevationToBackground } from '@trezor/theme'; + import { mapElevationToSkeletonForeground } from './colors'; const SHINE = keyframes` diff --git a/packages/components/src/components/typography/Code/Code.stories.tsx b/packages/components/src/components/typography/Code/Code.stories.tsx index d2723080011..dede65b54c6 100644 --- a/packages/components/src/components/typography/Code/Code.stories.tsx +++ b/packages/components/src/components/typography/Code/Code.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Code } from './Code'; const meta: Meta = { diff --git a/packages/components/src/components/typography/Code/Code.tsx b/packages/components/src/components/typography/Code/Code.tsx index c80b79aa41e..977c95c0a58 100644 --- a/packages/components/src/components/typography/Code/Code.tsx +++ b/packages/components/src/components/typography/Code/Code.tsx @@ -1,7 +1,9 @@ -import { borders, spacingsPx } from '@trezor/theme'; import React, { type ReactNode } from 'react'; + import styled from 'styled-components'; +import { borders, spacingsPx } from '@trezor/theme'; + const StyledCode = styled.code` font-family: RobotoMono, 'PixelOperatorMono8', monospace; display: inline; diff --git a/packages/components/src/components/typography/Heading/Heading.stories.tsx b/packages/components/src/components/typography/Heading/Heading.stories.tsx index 9ff87b3ecfe..930eb5906a2 100644 --- a/packages/components/src/components/typography/Heading/Heading.stories.tsx +++ b/packages/components/src/components/typography/Heading/Heading.stories.tsx @@ -1,5 +1,6 @@ import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; + import { H1, H2, H3, H4, allowedHeadingFrameProps, allowedHeadingTextProps } from './Heading'; import { getFramePropsStory } from '../../../utils/frameProps'; import { getTextPropsStory } from '../utils'; diff --git a/packages/components/src/components/typography/Heading/Heading.tsx b/packages/components/src/components/typography/Heading/Heading.tsx index 700fa280233..1f52b53987f 100644 --- a/packages/components/src/components/typography/Heading/Heading.tsx +++ b/packages/components/src/components/typography/Heading/Heading.tsx @@ -1,6 +1,7 @@ import styled from 'styled-components'; import { Color, TypographyStyle } from '@trezor/theme'; + import { FrameProps, FramePropsKeys, diff --git a/packages/components/src/components/typography/Link/Link.stories.tsx b/packages/components/src/components/typography/Link/Link.stories.tsx index 22066c78a98..0f158d4562d 100644 --- a/packages/components/src/components/typography/Link/Link.stories.tsx +++ b/packages/components/src/components/typography/Link/Link.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Link as LinkComponent, LinkProps } from '../../../index'; const meta: Meta = { diff --git a/packages/components/src/components/typography/Link/Link.tsx b/packages/components/src/components/typography/Link/Link.tsx index a60566d3561..d4058186c08 100644 --- a/packages/components/src/components/typography/Link/Link.tsx +++ b/packages/components/src/components/typography/Link/Link.tsx @@ -1,6 +1,9 @@ import { ReactNode, MouseEvent } from 'react'; + import styled, { css } from 'styled-components'; + import { TypographyStyle, spacingsPx, typography, typographyStylesBase } from '@trezor/theme'; + import { Icon, IconName } from '../../Icon/Icon'; type AProps = { diff --git a/packages/components/src/components/typography/Paragraph/Paragraph.stories.tsx b/packages/components/src/components/typography/Paragraph/Paragraph.stories.tsx index 948a75b3d1f..0ba245343ca 100644 --- a/packages/components/src/components/typography/Paragraph/Paragraph.stories.tsx +++ b/packages/components/src/components/typography/Paragraph/Paragraph.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { Paragraph as P } from './Paragraph'; import { getFramePropsStory } from '../../../utils/frameProps'; import { getTextPropsStory } from '../utils'; diff --git a/packages/components/src/components/typography/Paragraph/Paragraph.tsx b/packages/components/src/components/typography/Paragraph/Paragraph.tsx index f81f563230a..9ae742fbec5 100644 --- a/packages/components/src/components/typography/Paragraph/Paragraph.tsx +++ b/packages/components/src/components/typography/Paragraph/Paragraph.tsx @@ -1,4 +1,5 @@ import React from 'react'; + import { Text, TextProps } from '../Text/Text'; export const Paragraph = ({ children, ...rest }: TextProps) => { diff --git a/packages/components/src/components/typography/Text/Text.stories.tsx b/packages/components/src/components/typography/Text/Text.stories.tsx index 5c1d39fd3c7..8c84f1c8b10 100644 --- a/packages/components/src/components/typography/Text/Text.stories.tsx +++ b/packages/components/src/components/typography/Text/Text.stories.tsx @@ -1,5 +1,6 @@ import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; + import { allowedTextFrameProps, allowedTextTextProps, Text as TextComponent } from './Text'; import { getFramePropsStory } from '../../../utils/frameProps'; import { getTextPropsStory } from '../utils'; diff --git a/packages/components/src/components/typography/Text/Text.tsx b/packages/components/src/components/typography/Text/Text.tsx index f57e5beec08..5e67ee73781 100644 --- a/packages/components/src/components/typography/Text/Text.tsx +++ b/packages/components/src/components/typography/Text/Text.tsx @@ -1,6 +1,9 @@ +import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { CSSColor, Color, Colors } from '@trezor/theme'; -import { ReactNode } from 'react'; + import { TransientProps } from '../../../utils/transientProps'; import { FrameProps, diff --git a/packages/components/src/components/typography/TruncateWithTooltip/TruncateWithTooltip.stories.tsx b/packages/components/src/components/typography/TruncateWithTooltip/TruncateWithTooltip.stories.tsx index 960bd860776..18c99733291 100644 --- a/packages/components/src/components/typography/TruncateWithTooltip/TruncateWithTooltip.stories.tsx +++ b/packages/components/src/components/typography/TruncateWithTooltip/TruncateWithTooltip.stories.tsx @@ -1,9 +1,10 @@ import { Meta, StoryObj } from '@storybook/react'; +import styled from 'styled-components'; + import { TruncateWithTooltip as TruncateWithTooltipComponent, TruncateWithTooltipProps, } from './TruncateWithTooltip'; -import styled from 'styled-components'; const Container = styled.div` overflow: hidden; diff --git a/packages/components/src/components/typography/TruncateWithTooltip/TruncateWithTooltip.tsx b/packages/components/src/components/typography/TruncateWithTooltip/TruncateWithTooltip.tsx index f23eb2c2945..decf5aa4c54 100644 --- a/packages/components/src/components/typography/TruncateWithTooltip/TruncateWithTooltip.tsx +++ b/packages/components/src/components/typography/TruncateWithTooltip/TruncateWithTooltip.tsx @@ -1,5 +1,7 @@ -import styled from 'styled-components'; import { useEffect, useRef, useState } from 'react'; + +import styled from 'styled-components'; + import { Tooltip, Cursor } from '../../Tooltip/Tooltip'; import { TooltipDelay } from '../../Tooltip/TooltipDelay'; diff --git a/packages/components/src/components/typography/typography.stories.tsx b/packages/components/src/components/typography/typography.stories.tsx index f6473c92daa..b92417330c8 100644 --- a/packages/components/src/components/typography/typography.stories.tsx +++ b/packages/components/src/components/typography/typography.stories.tsx @@ -1,6 +1,7 @@ +import { Meta, StoryFn } from '@storybook/react'; + import { StoryColumn } from '../../support/Story'; import { H1, H2, Paragraph, Link } from '../../index'; -import { Meta, StoryFn } from '@storybook/react'; const meta: Meta = { title: 'Typography', diff --git a/packages/components/src/components/typography/utils.tsx b/packages/components/src/components/typography/utils.tsx index 6f12928271c..5c980549b77 100644 --- a/packages/components/src/components/typography/utils.tsx +++ b/packages/components/src/components/typography/utils.tsx @@ -1,7 +1,9 @@ +import { css } from 'styled-components'; + import { typography, TypographyStyle, typographyStyles } from '@trezor/theme'; + import { TransientProps, makePropsTransient } from '../../utils/transientProps'; import { UIHorizontalAlignment, uiHorizontalAlignments } from '../../config/types'; -import { css } from 'styled-components'; export const textWraps = ['balance', 'break-word']; export type TextWrap = (typeof textWraps)[number]; diff --git a/packages/components/src/support/Story.tsx b/packages/components/src/support/Story.tsx index ab437b298a7..53a440117c6 100644 --- a/packages/components/src/support/Story.tsx +++ b/packages/components/src/support/Story.tsx @@ -1,4 +1,5 @@ import styled, { ThemeProvider } from 'styled-components'; + import { intermediaryTheme } from '../index'; const Wrapper = styled.div` diff --git a/packages/components/src/utils/frameProps.tsx b/packages/components/src/utils/frameProps.tsx index 1c1307880c4..54ffaa1b85a 100644 --- a/packages/components/src/utils/frameProps.tsx +++ b/packages/components/src/utils/frameProps.tsx @@ -1,7 +1,9 @@ import { css } from 'styled-components'; -import { makePropsTransient, TransientProps } from './transientProps'; + import { SpacingValues } from '@trezor/theme'; +import { makePropsTransient, TransientProps } from './transientProps'; + type Margin = { top?: SpacingValues | 'auto'; bottom?: SpacingValues | 'auto'; diff --git a/packages/components/src/utils/useScrollShadow.tsx b/packages/components/src/utils/useScrollShadow.tsx index 0eacf47939b..c6abfb19ace 100644 --- a/packages/components/src/utils/useScrollShadow.tsx +++ b/packages/components/src/utils/useScrollShadow.tsx @@ -1,7 +1,10 @@ import { useEffect, useRef, useState } from 'react'; + import styled, { CSSObject, DefaultTheme } from 'styled-components'; -import { useElevation } from '../components/ElevationContext/ElevationContext'; + import { Color, Elevation, mapElevationToBackground } from '@trezor/theme'; + +import { useElevation } from '../components/ElevationContext/ElevationContext'; import { UIHorizontalAlignment, UIVerticalAlignment } from '../config/types'; type GradientDirection = Exclude; diff --git a/packages/components/styled.d.ts b/packages/components/styled.d.ts index ff56311cfb2..83b3a85013a 100644 --- a/packages/components/styled.d.ts +++ b/packages/components/styled.d.ts @@ -1,6 +1,7 @@ // import original module declarations import 'styled-components'; import { BoxShadows, Colors } from '@trezor/theme'; + import { SuiteThemeColors } from './src/config/colors'; declare module 'styled-components' { diff --git a/packages/connect-explorer/src/actions/trezorConnectActions.ts b/packages/connect-explorer/src/actions/trezorConnectActions.ts index c75774bca87..c8ba3c357cd 100644 --- a/packages/connect-explorer/src/actions/trezorConnectActions.ts +++ b/packages/connect-explorer/src/actions/trezorConnectActions.ts @@ -4,7 +4,6 @@ import TrezorConnect, { TRANSPORT_EVENT, WEBEXTENSION, } from '@trezor/connect-web'; - import TrezorConnectMobile from '@trezor/connect-mobile'; import { TrezorConnectDevice, Dispatch, Field, GetState } from '../types'; diff --git a/packages/connect-explorer/src/components/GuideIndex.tsx b/packages/connect-explorer/src/components/GuideIndex.tsx index 3e86ecadfe1..f7e01a60fcc 100644 --- a/packages/connect-explorer/src/components/GuideIndex.tsx +++ b/packages/connect-explorer/src/components/GuideIndex.tsx @@ -1,9 +1,10 @@ +import { ReactNode } from 'react'; + import { getPagesUnderRoute } from 'nextra/context'; import Link from 'next/link'; -import { ReactNode } from 'react'; +import styled from 'styled-components'; import { Card as TrezorCard, H3, Paragraph, Button } from '@trezor/components'; -import styled from 'styled-components'; import { spacingsPx } from '@trezor/theme'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/connect-explorer/src/components/ZoomableIllustration.tsx b/packages/connect-explorer/src/components/ZoomableIllustration.tsx index 8d33328c94b..0012c5aac65 100644 --- a/packages/connect-explorer/src/components/ZoomableIllustration.tsx +++ b/packages/connect-explorer/src/components/ZoomableIllustration.tsx @@ -1,7 +1,7 @@ import React from 'react'; import Zoom from 'react-medium-image-zoom'; -import { useRouter } from 'next/router'; +import { useRouter } from 'next/router'; import { createGlobalStyle, useTheme, styled } from 'styled-components'; import 'react-medium-image-zoom/dist/styles.css'; diff --git a/packages/connect-explorer/src/components/fields/ArrayWrapper.tsx b/packages/connect-explorer/src/components/fields/ArrayWrapper.tsx index 0d22e70f520..852e67a7317 100644 --- a/packages/connect-explorer/src/components/fields/ArrayWrapper.tsx +++ b/packages/connect-explorer/src/components/fields/ArrayWrapper.tsx @@ -2,9 +2,10 @@ import { ReactNode } from 'react'; import styled from 'styled-components'; -import type { FieldWithBundle } from '../../types'; import { Icon } from '@trezor/components'; +import type { FieldWithBundle } from '../../types'; + interface AddButtonProps { field: FieldWithBundle; onAdd: () => void; diff --git a/packages/connect-explorer/src/pages/callback.mdx b/packages/connect-explorer/src/pages/callback.mdx index 8ec2ef41e86..fb77584a588 100644 --- a/packages/connect-explorer/src/pages/callback.mdx +++ b/packages/connect-explorer/src/pages/callback.mdx @@ -1,4 +1,5 @@ import { useEffect } from 'react'; + import { Button } from '@trezor/components'; export const CallbackHandler = () => { diff --git a/packages/connect-explorer/src/pages/changelog.mdx b/packages/connect-explorer/src/pages/changelog.mdx index b8f49ffd6c6..18de55d9b1e 100644 --- a/packages/connect-explorer/src/pages/changelog.mdx +++ b/packages/connect-explorer/src/pages/changelog.mdx @@ -2,14 +2,15 @@ icon: log --- +import Markdown from 'react-markdown'; + import rehypeSectionize from '@hbsnow/rehype-sectionize'; import remarkGfm from 'remark-gfm'; import remarkGemoji from 'remark-gemoji'; import useSWR from 'swr'; -import Markdown from 'react-markdown'; -import { useMDXComponents } from '@trezor/connect-explorer-theme'; import { Callout } from 'nextra/components'; +import { useMDXComponents } from '@trezor/connect-explorer-theme'; import { spacings } from '@trezor/theme'; import { CollapsibleBox } from '@trezor/components'; import { isNewer } from '@trezor/utils/src/versionUtils'; diff --git a/packages/connect-explorer/src/pages/details/deeplinking.mdx b/packages/connect-explorer/src/pages/details/deeplinking.mdx index a56977f7eaf..b4c67277cbe 100644 --- a/packages/connect-explorer/src/pages/details/deeplinking.mdx +++ b/packages/connect-explorer/src/pages/details/deeplinking.mdx @@ -1,4 +1,5 @@ import { Callout } from 'nextra/components'; + import { BetaOnly } from '../../components/BetaOnly'; # Deep linking specification diff --git a/packages/connect-explorer/src/pages/readme/[name].mdx b/packages/connect-explorer/src/pages/readme/[name].mdx index f9bdec59a62..0002bd71e1f 100644 --- a/packages/connect-explorer/src/pages/readme/[name].mdx +++ b/packages/connect-explorer/src/pages/readme/[name].mdx @@ -2,6 +2,7 @@ import { RemoteContent } from 'nextra/data'; import { buildDynamicMDX, buildDynamicMeta } from 'nextra/remote'; import rehypeSectionize from '@hbsnow/rehype-sectionize'; import remarkGemoji from 'remark-gemoji'; + import { isBetaOnly } from '../../components/BetaOnly'; export const getStaticPaths = () => { diff --git a/packages/connect-iframe/src/index.ts b/packages/connect-iframe/src/index.ts index 75647f8eba3..9feeb5f8eba 100644 --- a/packages/connect-iframe/src/index.ts +++ b/packages/connect-iframe/src/index.ts @@ -28,8 +28,9 @@ import { getOrigin } from '@trezor/connect/src/utils/urlUtils'; import { suggestBridgeInstaller } from '@trezor/connect/src/data/transportInfo'; import { suggestUdevInstaller } from '@trezor/connect/src/data/udevInfo'; import { storage, getSystemInfo, getInstallerPackage } from '@trezor/connect-common'; -import { parseConnectSettings, isOriginWhitelisted } from './connectSettings'; import { analytics, EventType } from '@trezor/connect-analytics'; + +import { parseConnectSettings, isOriginWhitelisted } from './connectSettings'; // @ts-expect-error (typescript does not know this is worker constructor, this is done by webpack) import LogWorker from './sharedLoggerWorker'; import { initLogWriterWithWorker } from './sharedLoggerUtils'; diff --git a/packages/connect-iframe/webpack/base.webpack.config.ts b/packages/connect-iframe/webpack/base.webpack.config.ts index 1b73e0ea59f..8a8238ae09b 100644 --- a/packages/connect-iframe/webpack/base.webpack.config.ts +++ b/packages/connect-iframe/webpack/base.webpack.config.ts @@ -3,6 +3,7 @@ import { execSync } from 'child_process'; import webpack from 'webpack'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import TerserPlugin from 'terser-webpack-plugin'; + import { version } from '../package.json'; const COMMON_DATA_SRC = '../../packages/connect-common/files'; diff --git a/packages/connect-plugin-stellar/src/index.ts b/packages/connect-plugin-stellar/src/index.ts index bf42c2f23e5..21cb64240c3 100644 --- a/packages/connect-plugin-stellar/src/index.ts +++ b/packages/connect-plugin-stellar/src/index.ts @@ -9,6 +9,7 @@ import { MemoHash, MemoReturn, } from '@stellar/stellar-sdk'; + import { BigNumber } from '@trezor/utils/src/bigNumber'; /** diff --git a/packages/connect-popup/e2e/tests/analytics.test.ts b/packages/connect-popup/e2e/tests/analytics.test.ts index 9a9b20b049b..380347e5099 100644 --- a/packages/connect-popup/e2e/tests/analytics.test.ts +++ b/packages/connect-popup/e2e/tests/analytics.test.ts @@ -1,6 +1,7 @@ import { test, expect } from '@playwright/test'; import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; + import { waitAndClick } from '../support/helpers'; const url = process.env.URL || 'http://localhost:8088/'; diff --git a/packages/connect-popup/e2e/tests/browser-support.test.ts b/packages/connect-popup/e2e/tests/browser-support.test.ts index 58cca779072..8bab9442706 100644 --- a/packages/connect-popup/e2e/tests/browser-support.test.ts +++ b/packages/connect-popup/e2e/tests/browser-support.test.ts @@ -1,6 +1,8 @@ import { test, expect, Page, devices } from '@playwright/test'; + import { ensureDirectoryExists } from '@trezor/node-utils'; import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; + import { formatUrl, log, waitAndClick } from '../support/helpers'; const url = process.env.URL || 'http://localhost:8088/'; diff --git a/packages/connect-popup/e2e/tests/methods.test.ts b/packages/connect-popup/e2e/tests/methods.test.ts index 68b77f2a3be..986145f7a68 100644 --- a/packages/connect-popup/e2e/tests/methods.test.ts +++ b/packages/connect-popup/e2e/tests/methods.test.ts @@ -1,9 +1,10 @@ import { expect, test } from '@playwright/test'; import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; +import { ensureDirectoryExists } from '@trezor/node-utils'; + import { fixtures } from './__fixtures__/methods'; import { buildOverview } from '../support/buildOverview'; -import { ensureDirectoryExists } from '@trezor/node-utils'; import { getContexts, log, formatUrl, openPopup, setConnectSettings } from '../support/helpers'; const url = process.env.URL || 'http://localhost:8088/'; diff --git a/packages/connect-popup/e2e/tests/passphrase.test.ts b/packages/connect-popup/e2e/tests/passphrase.test.ts index 645d7d8637f..df3f759854b 100644 --- a/packages/connect-popup/e2e/tests/passphrase.test.ts +++ b/packages/connect-popup/e2e/tests/passphrase.test.ts @@ -1,5 +1,7 @@ import { test, Page, BrowserContext } from '@playwright/test'; + import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; + import { findElementByDataTest, formatUrl, diff --git a/packages/connect-popup/e2e/tests/permissions.test.ts b/packages/connect-popup/e2e/tests/permissions.test.ts index 3d6837c3803..f5d8dc8d1b2 100644 --- a/packages/connect-popup/e2e/tests/permissions.test.ts +++ b/packages/connect-popup/e2e/tests/permissions.test.ts @@ -1,5 +1,7 @@ import { test, chromium, Page } from '@playwright/test'; + import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; + import { setConnectSettings, waitAndClick } from '../support/helpers'; const url = process.env.URL || 'http://localhost:8088/'; diff --git a/packages/connect-popup/e2e/tests/popup-close.test.ts b/packages/connect-popup/e2e/tests/popup-close.test.ts index f116f540d11..2849a75021b 100644 --- a/packages/connect-popup/e2e/tests/popup-close.test.ts +++ b/packages/connect-popup/e2e/tests/popup-close.test.ts @@ -1,6 +1,8 @@ import { test, Page, BrowserContext } from '@playwright/test'; + import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; import { addDashesToSpaces, createTimeoutPromise } from '@trezor/utils'; + import { findElementByDataTest, waitAndClick, diff --git a/packages/connect-popup/e2e/tests/popup-pages.test.ts b/packages/connect-popup/e2e/tests/popup-pages.test.ts index 84b3ed32ff3..fcae9e676f3 100644 --- a/packages/connect-popup/e2e/tests/popup-pages.test.ts +++ b/packages/connect-popup/e2e/tests/popup-pages.test.ts @@ -1,5 +1,8 @@ import { test, Page, BrowserContext, expect } from '@playwright/test'; +import fs from 'fs'; + import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; + import { getContexts, openPopup, @@ -9,7 +12,6 @@ import { waitAndClick, } from '../support/helpers'; -import fs from 'fs'; const url = process.env.URL || 'http://localhost:8088/'; diff --git a/packages/connect-popup/e2e/tests/transport.test.ts b/packages/connect-popup/e2e/tests/transport.test.ts index f4297de5c29..21bb1d86059 100644 --- a/packages/connect-popup/e2e/tests/transport.test.ts +++ b/packages/connect-popup/e2e/tests/transport.test.ts @@ -1,9 +1,11 @@ import { test, expect, firefox, chromium, Page, BrowserContext } from '@playwright/test'; -import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; -import { waitAndClick, log, formatUrl } from '../support/helpers'; import http from 'http'; import https from 'https'; +import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; + +import { waitAndClick, log, formatUrl } from '../support/helpers'; + const url = process.env.URL || 'http://localhost:8088/'; // different origin URL for testing cross-origin requests diff --git a/packages/connect-popup/e2e/tests/unchained.test.ts b/packages/connect-popup/e2e/tests/unchained.test.ts index 068a29d9a44..099829b8ff9 100644 --- a/packages/connect-popup/e2e/tests/unchained.test.ts +++ b/packages/connect-popup/e2e/tests/unchained.test.ts @@ -1,6 +1,7 @@ /* eslint no-await-in-loop: 0 */ import { test, expect, Page } from '@playwright/test'; + import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; const connectUrl = process.env.URL ? process.env.URL : 'https://connect.trezor.io/9/'; diff --git a/packages/connect-popup/src/deeplink.tsx b/packages/connect-popup/src/deeplink.tsx index df7bcd3b47f..ae9e7c2dd30 100644 --- a/packages/connect-popup/src/deeplink.tsx +++ b/packages/connect-popup/src/deeplink.tsx @@ -1,4 +1,5 @@ import React from 'react'; + import styled, { ThemeProvider } from 'styled-components'; import { createRoot } from 'react-dom/client'; diff --git a/packages/connect-popup/src/index.tsx b/packages/connect-popup/src/index.tsx index 026c976504f..fa6ab80e55a 100644 --- a/packages/connect-popup/src/index.tsx +++ b/packages/connect-popup/src/index.tsx @@ -22,11 +22,12 @@ import type { Core } from '@trezor/connect/src/core'; import { config } from '@trezor/connect/src/data/config'; import { parseConnectSettings } from '@trezor/connect-iframe/src/connectSettings'; import { initLogWriterWithSrcPath } from '@trezor/connect-iframe/src/sharedLoggerUtils'; - import { reactEventBus } from '@trezor/connect-ui/src/utils/eventBus'; import { ErrorViewProps } from '@trezor/connect-ui/src/views/Error'; import { analytics, EventType } from '@trezor/connect-analytics'; import { getSystemInfo } from '@trezor/connect-common'; +import { initLog, setLogWriter, LogWriter } from '@trezor/connect/src/utils/debug'; +import { DEFAULT_DOMAIN } from '@trezor/connect/src/data/version'; import * as view from './view'; import { @@ -38,8 +39,6 @@ import { showView, } from './view/common'; import { isPhishingDomain } from './utils/isPhishingDomain'; -import { initLog, setLogWriter, LogWriter } from '@trezor/connect/src/utils/debug'; -import { DEFAULT_DOMAIN } from '@trezor/connect/src/data/version'; const INTERVAL_CHECK_PARENT_ALIVE_MS = 1000; const INTERVAL_HANDSHAKE_TIMEOUT_MS = 90 * 1000; diff --git a/packages/connect-popup/src/log.tsx b/packages/connect-popup/src/log.tsx index 601fdb993c4..95397127d8c 100644 --- a/packages/connect-popup/src/log.tsx +++ b/packages/connect-popup/src/log.tsx @@ -1,4 +1,5 @@ import React, { useEffect, useState } from 'react'; + import styled, { ThemeProvider } from 'styled-components'; import { createRoot } from 'react-dom/client'; diff --git a/packages/connect-popup/src/view/browser.ts b/packages/connect-popup/src/view/browser.ts index 782170d5c52..c193b80efc1 100644 --- a/packages/connect-popup/src/view/browser.ts +++ b/packages/connect-popup/src/view/browser.ts @@ -2,6 +2,7 @@ import { SystemInfo } from '@trezor/connect'; import { storage } from '@trezor/connect-common'; + import { container, showView } from './common'; export const initBrowserView = (systemInfo: SystemInfo): Promise => { diff --git a/packages/connect-popup/src/view/common.tsx b/packages/connect-popup/src/view/common.tsx index 9310a129b36..f5eeb9d3124 100644 --- a/packages/connect-popup/src/view/common.tsx +++ b/packages/connect-popup/src/view/common.tsx @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/view/common.js +import { createRoot } from 'react-dom/client'; + import { POPUP, ERRORS, @@ -8,12 +10,11 @@ import { CoreRequestMessage, CoreEventMessage, } from '@trezor/connect'; -import { createRoot } from 'react-dom/client'; - import { ConnectUI, State, getDefaultState } from '@trezor/connect-ui'; -import { StyleSheetWrapper } from './react/StylesSheetWrapper'; import { reactEventBus } from '@trezor/connect-ui/src/utils/eventBus'; +import { StyleSheetWrapper } from './react/StylesSheetWrapper'; + export const header: HTMLElement = document.getElementsByTagName('header')[0]; export const container: HTMLElement = document.getElementById('container')!; export const views: HTMLElement = document.getElementById('views')!; diff --git a/packages/connect-popup/src/view/confirmation.ts b/packages/connect-popup/src/view/confirmation.ts index 8bf81d8f8a7..f5806df33cf 100644 --- a/packages/connect-popup/src/view/confirmation.ts +++ b/packages/connect-popup/src/view/confirmation.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/view/confirmation.js import { UI, createUiResponse, UiRequestConfirmation } from '@trezor/connect'; + import { container, showView, postMessage } from './common'; export const initConfirmationView = (data: UiRequestConfirmation['payload']) => { diff --git a/packages/connect-popup/src/view/firmwareNotCompatible.ts b/packages/connect-popup/src/view/firmwareNotCompatible.ts index 5844b275cf3..1378f0f6ba7 100644 --- a/packages/connect-popup/src/view/firmwareNotCompatible.ts +++ b/packages/connect-popup/src/view/firmwareNotCompatible.ts @@ -1,9 +1,10 @@ // origin https://github.com/trezor/connect/blob/develop/src/js/popup/view/firmwareNotCompatible.js import { UI, createUiResponse, UiRequestUnexpectedDeviceMode } from '@trezor/connect'; -import { showView, postMessage, getState } from './common'; import { getFirmwareVersion } from '@trezor/device-utils'; +import { showView, postMessage, getState } from './common'; + export const firmwareNotCompatible = (device: UiRequestUnexpectedDeviceMode['payload']) => { const view = showView('firmware-not-compatible'); diff --git a/packages/connect-popup/src/view/firmwareNotSupported.ts b/packages/connect-popup/src/view/firmwareNotSupported.ts index f59ad2fd9d3..5ada49d8373 100644 --- a/packages/connect-popup/src/view/firmwareNotSupported.ts +++ b/packages/connect-popup/src/view/firmwareNotSupported.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/view/firmwareNotSupported.js import { UiRequestUnexpectedDeviceMode } from '@trezor/connect'; + import { showView } from './common'; export const firmwareNotSupported = (device: UiRequestUnexpectedDeviceMode['payload']) => { diff --git a/packages/connect-popup/src/view/firmwareRequiredUpdate.ts b/packages/connect-popup/src/view/firmwareRequiredUpdate.ts index 4d7001a708f..411d740b419 100644 --- a/packages/connect-popup/src/view/firmwareRequiredUpdate.ts +++ b/packages/connect-popup/src/view/firmwareRequiredUpdate.ts @@ -2,6 +2,7 @@ import { UiRequestUnexpectedDeviceMode } from '@trezor/connect'; import { SUITE_FIRMWARE_URL } from '@trezor/urls'; + import { showView } from './common'; export const firmwareRequiredUpdate = (device: UiRequestUnexpectedDeviceMode['payload']) => { diff --git a/packages/connect-popup/src/view/invalidPassphrase.ts b/packages/connect-popup/src/view/invalidPassphrase.ts index f33978b16fb..5924c0e6333 100644 --- a/packages/connect-popup/src/view/invalidPassphrase.ts +++ b/packages/connect-popup/src/view/invalidPassphrase.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/view/invalidPassphrase.js import { UI, createUiResponse, UiRequestDeviceAction } from '@trezor/connect'; + import { container, showView, postMessage } from './common'; export const initInvalidPassphraseView = (_payload: UiRequestDeviceAction['payload']) => { diff --git a/packages/connect-popup/src/view/passphraseOnDevice.ts b/packages/connect-popup/src/view/passphraseOnDevice.ts index 36f4cbd2e54..09776bdfa97 100644 --- a/packages/connect-popup/src/view/passphraseOnDevice.ts +++ b/packages/connect-popup/src/view/passphraseOnDevice.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/view/passphraseOnDevice.js import { UiRequestDeviceAction } from '@trezor/connect'; + import { container, showView } from './common'; export const passphraseOnDeviceView = (payload: UiRequestDeviceAction['payload']) => { diff --git a/packages/connect-popup/src/view/permissions.ts b/packages/connect-popup/src/view/permissions.ts index dfaf71a6499..cc2d80f2b95 100644 --- a/packages/connect-popup/src/view/permissions.ts +++ b/packages/connect-popup/src/view/permissions.ts @@ -2,6 +2,7 @@ import { UI, createUiResponse, UiRequestPermission } from '@trezor/connect'; import { analytics, EventType } from '@trezor/connect-analytics'; + import { container, showView, postMessage, createTooltip, getState } from './common'; const getPermissionText = (permissionType: string, _deviceName: string) => { diff --git a/packages/connect-popup/src/view/pin.ts b/packages/connect-popup/src/view/pin.ts index 65c4a592197..826769368e2 100644 --- a/packages/connect-popup/src/view/pin.ts +++ b/packages/connect-popup/src/view/pin.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/view/pin.js import { UI, createUiResponse, UiRequestDeviceAction } from '@trezor/connect'; + import { container, showView, postMessage } from './common'; const isSubmitButtonDisabled = (isDisabled: boolean) => { diff --git a/packages/connect-popup/src/view/react/StylesSheetWrapper.tsx b/packages/connect-popup/src/view/react/StylesSheetWrapper.tsx index 403b9af421e..a9b2af0faf5 100644 --- a/packages/connect-popup/src/view/react/StylesSheetWrapper.tsx +++ b/packages/connect-popup/src/view/react/StylesSheetWrapper.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import { StyleSheetManager } from 'styled-components'; interface StyleSheetWrapperProps { diff --git a/packages/connect-popup/src/view/requestButton.ts b/packages/connect-popup/src/view/requestButton.ts index 5f2a0e5fe83..44924f86d71 100644 --- a/packages/connect-popup/src/view/requestButton.ts +++ b/packages/connect-popup/src/view/requestButton.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/view/requestButton.js import { UiRequestButton } from '@trezor/connect'; + import { container, showView } from './common'; let toastTimeout: NodeJS.Timeout | undefined; diff --git a/packages/connect-popup/src/view/selectAccount.ts b/packages/connect-popup/src/view/selectAccount.ts index 25765e34e0a..32a0f6cf51c 100644 --- a/packages/connect-popup/src/view/selectAccount.ts +++ b/packages/connect-popup/src/view/selectAccount.ts @@ -7,6 +7,7 @@ import { UiRequestSelectAccount, DiscoveryAccountType, } from '@trezor/connect'; + import { container, showView, postMessage } from './common'; const setHeader = (payload: UiRequestSelectAccount['payload']) => { diff --git a/packages/connect-popup/src/view/selectDevice.ts b/packages/connect-popup/src/view/selectDevice.ts index 5f46ad7f5bd..593c7b88f1a 100644 --- a/packages/connect-popup/src/view/selectDevice.ts +++ b/packages/connect-popup/src/view/selectDevice.ts @@ -12,9 +12,10 @@ import { } from '@trezor/connect'; import { TREZOR_USB_DESCRIPTORS } from '@trezor/transport/src/constants'; import { SUITE_URL, SUITE_UDEV_URL, TREZOR_SUPPORT_URL } from '@trezor/urls'; -import { container, getState, showView, postMessage } from './common'; import { reactEventBus } from '@trezor/connect-ui/src/utils/eventBus'; +import { container, getState, showView, postMessage } from './common'; + const initWebUsbButton = (showLoader: boolean) => { const webusbContainer = container.getElementsByClassName('webusb')[0] as HTMLElement; webusbContainer.style.display = 'flex'; diff --git a/packages/connect-popup/src/view/selectFee.ts b/packages/connect-popup/src/view/selectFee.ts index 255f110009c..41baf35336c 100644 --- a/packages/connect-popup/src/view/selectFee.ts +++ b/packages/connect-popup/src/view/selectFee.ts @@ -9,6 +9,7 @@ import { SelectFeeLevel, } from '@trezor/connect'; import { formatAmount, formatTime } from '@trezor/connect/src/utils/formatUtils'; + import { container, showView, postMessage } from './common'; const fees: SelectFeeLevel[] = []; diff --git a/packages/connect-popup/src/view/word.ts b/packages/connect-popup/src/view/word.ts index 0db8f117ae3..4c91de58cab 100644 --- a/packages/connect-popup/src/view/word.ts +++ b/packages/connect-popup/src/view/word.ts @@ -1,9 +1,10 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/view/word.js import { UI, createUiResponse, UiRequestDeviceAction } from '@trezor/connect'; -import { container, showView, postMessage } from './common'; import { bip39 } from '@trezor/crypto-utils'; +import { container, showView, postMessage } from './common'; + const initWordPlainView = (payload: UiRequestDeviceAction['payload']) => { showView('word-plain'); diff --git a/packages/connect-popup/webpack/dev.webpack.config.ts b/packages/connect-popup/webpack/dev.webpack.config.ts index 0455850df4b..cf1a1440b5b 100644 --- a/packages/connect-popup/webpack/dev.webpack.config.ts +++ b/packages/connect-popup/webpack/dev.webpack.config.ts @@ -1,6 +1,7 @@ import path from 'path'; import { merge } from 'webpack-merge'; import { WebpackPluginServe } from 'webpack-plugin-serve'; + import prod from './prod.webpack.config'; const dev = { diff --git a/packages/connect-popup/webpack/prod.webpack.config.ts b/packages/connect-popup/webpack/prod.webpack.config.ts index 81300ba31a9..7e6649d07de 100644 --- a/packages/connect-popup/webpack/prod.webpack.config.ts +++ b/packages/connect-popup/webpack/prod.webpack.config.ts @@ -3,10 +3,12 @@ import webpack, { DefinePlugin } from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import TerserPlugin from 'terser-webpack-plugin'; import CopyPlugin from 'copy-webpack-plugin'; +import { execSync } from 'child_process'; + import * as URLS from '@trezor/urls'; import { DEEPLINK_VERSION } from '@trezor/connect/src/data/version'; + import { version } from '../package.json'; -import { execSync } from 'child_process'; const STATIC_SRC = path.join(__dirname, '../src/static'); const DIST = path.resolve(__dirname, '../build'); diff --git a/packages/connect-web/src/iframe/index.ts b/packages/connect-web/src/iframe/index.ts index bb620bdcea9..da4fd0b4cd1 100644 --- a/packages/connect-web/src/iframe/index.ts +++ b/packages/connect-web/src/iframe/index.ts @@ -6,6 +6,7 @@ import { IFRAME, CoreRequestMessage } from '@trezor/connect/src/events'; import type { ConnectSettings } from '@trezor/connect/src/types'; import { getOrigin } from '@trezor/connect/src/utils/urlUtils'; import { setLogWriter, LogMessage, LogWriter } from '@trezor/connect/src/utils/debug'; + import css from './inlineStyles'; export let instance: HTMLIFrameElement | null; diff --git a/packages/connect-web/src/impl/core-in-iframe.ts b/packages/connect-web/src/impl/core-in-iframe.ts index 99e91b488d4..a4e19acbd26 100644 --- a/packages/connect-web/src/impl/core-in-iframe.ts +++ b/packages/connect-web/src/impl/core-in-iframe.ts @@ -29,12 +29,12 @@ import { ConnectFactoryDependencies, factory } from '@trezor/connect/src/factory import { Log, initLog } from '@trezor/connect/src/utils/debug'; import { config } from '@trezor/connect/src/data/config'; import { DeferredManager, createDeferredManager } from '@trezor/utils/src/createDeferredManager'; +import { InitFullSettings } from '@trezor/connect/src/types/api/init'; import * as iframe from '../iframe'; import * as popup from '../popup'; import webUSBButton from '../webusb/button'; import { parseConnectSettings } from '../connectSettings'; -import { InitFullSettings } from '@trezor/connect/src/types/api/init'; export class CoreInIframe implements ConnectFactoryDependencies { public eventEmitter = new EventEmitter(); diff --git a/packages/connect-web/src/impl/core-in-popup.ts b/packages/connect-web/src/impl/core-in-popup.ts index da2fe68df67..966b202c94b 100644 --- a/packages/connect-web/src/impl/core-in-popup.ts +++ b/packages/connect-web/src/impl/core-in-popup.ts @@ -19,13 +19,13 @@ import type { } from '@trezor/connect/src/types'; import { ConnectFactoryDependencies, factory } from '@trezor/connect/src/factory'; import { initLog, setLogWriter, LogMessage, LogWriter, Log } from '@trezor/connect/src/utils/debug'; -import * as popup from '../popup'; - -import { parseConnectSettings } from '../connectSettings'; import { Login } from '@trezor/connect/src/types/api/requestLogin'; import { createDeferred } from '@trezor/utils'; import { InitFullSettings } from '@trezor/connect/src/types/api/init'; +import { parseConnectSettings } from '../connectSettings'; +import * as popup from '../popup'; + /** * Base class for CoreInPopup methods for TrezorConnect factory. * This implementation is directly used here in connect-web, but it is also extended in connect-webextension. diff --git a/packages/connect-web/src/index.ts b/packages/connect-web/src/index.ts index b1d74503dd6..052bf1c0994 100644 --- a/packages/connect-web/src/index.ts +++ b/packages/connect-web/src/index.ts @@ -1,8 +1,9 @@ import { ConnectFactoryDependencies, factory } from '@trezor/connect/src/factory'; import { TrezorConnectDynamic } from '@trezor/connect/src/impl/dynamic'; +import type { ConnectSettingsPublic, ConnectSettingsWeb } from '@trezor/connect'; + import { CoreInIframe } from './impl/core-in-iframe'; import { CoreInPopup } from './impl/core-in-popup'; -import type { ConnectSettingsPublic, ConnectSettingsWeb } from '@trezor/connect'; import { getEnv } from './connectSettings'; const IFRAME_ERRORS = ['Init_IframeBlocked', 'Init_IframeTimeout', 'Transport_Missing']; diff --git a/packages/connect-web/src/popup/index.ts b/packages/connect-web/src/popup/index.ts index b76e095c326..1019596eb3f 100644 --- a/packages/connect-web/src/popup/index.ts +++ b/packages/connect-web/src/popup/index.ts @@ -1,19 +1,20 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/popup/PopupManager.js import EventEmitter from 'events'; + import { createDeferred, Deferred, scheduleAction } from '@trezor/utils'; import { POPUP, IFRAME, UI, CoreEventMessage, IFrameLoaded } from '@trezor/connect/src/events'; import type { ConnectSettings } from '@trezor/connect/src/types'; import { getOrigin } from '@trezor/connect/src/utils/urlUtils'; import { CONTENT_SCRIPT_VERSION, VERSION } from '@trezor/connect/src/data/version'; -import { showPopupRequest } from './showPopupRequest'; import { Log } from '@trezor/connect/src/utils/debug'; - -import { ServiceWorkerWindowChannel } from '../channels/serviceworker-window'; import { AbstractMessageChannel, Message, } from '@trezor/connect-common/src/messageChannel/abstract'; + +import { showPopupRequest } from './showPopupRequest'; +import { ServiceWorkerWindowChannel } from '../channels/serviceworker-window'; import { WindowWindowChannel } from '../channels/window-window'; // Util diff --git a/packages/connect-web/webpack/inline.webpack.config.ts b/packages/connect-web/webpack/inline.webpack.config.ts index 1dd8abc4874..0e5101d024e 100644 --- a/packages/connect-web/webpack/inline.webpack.config.ts +++ b/packages/connect-web/webpack/inline.webpack.config.ts @@ -1,6 +1,7 @@ import webpack from 'webpack'; import path from 'path'; import TerserPlugin from 'terser-webpack-plugin'; + import prod from './prod.webpack.config'; // Generate inline script hosted on https://connect.trezor.io/X/trezor-connect.js diff --git a/packages/connect/e2e/__fixtures__/cardanoGetAddress.ts b/packages/connect/e2e/__fixtures__/cardanoGetAddress.ts index 62fccdbc29b..8317204bf99 100644 --- a/packages/connect/e2e/__fixtures__/cardanoGetAddress.ts +++ b/packages/connect/e2e/__fixtures__/cardanoGetAddress.ts @@ -1,6 +1,7 @@ -import { NETWORK_IDS, PROTOCOL_MAGICS } from '../../src/constants/cardano'; import { MessagesSchema } from '@trezor/protobuf'; +import { NETWORK_IDS, PROTOCOL_MAGICS } from '../../src/constants/cardano'; + const { CardanoAddressType } = MessagesSchema; const legacyResults = { diff --git a/packages/connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts b/packages/connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts index e8d483c6676..e8669f19e36 100644 --- a/packages/connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts +++ b/packages/connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/prefer-ts-expect-error */ // @ts-ignore +import { MessagesSchema } from '@trezor/protobuf'; + import commonFixtures from '../../../../submodules/trezor-common/tests/fixtures/cardano/get_base_address.derivations.json'; -import { MessagesSchema } from '@trezor/protobuf'; const { CardanoAddressType, CardanoDerivationType } = MessagesSchema; diff --git a/packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts b/packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts index 5381f9696cb..8c580fa03e4 100644 --- a/packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts +++ b/packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts @@ -1,6 +1,7 @@ +import { MessagesSchema } from '@trezor/protobuf'; + import { NETWORK_IDS, PROTOCOL_MAGICS } from '../../src/constants/cardano'; -import { MessagesSchema } from '@trezor/protobuf'; const { CardanoAddressType, diff --git a/packages/connect/e2e/__fixtures__/ethereumSignMessage.ts b/packages/connect/e2e/__fixtures__/ethereumSignMessage.ts index c0f7f676937..5dc85eea401 100644 --- a/packages/connect/e2e/__fixtures__/ethereumSignMessage.ts +++ b/packages/connect/e2e/__fixtures__/ethereumSignMessage.ts @@ -1,4 +1,5 @@ import { arrayPartition } from '@trezor/utils'; + /* eslint-disable @typescript-eslint/prefer-ts-expect-error */ // @ts-ignore import commonFixtures from '../../../../submodules/trezor-common/tests/fixtures/ethereum/signmessage.json'; diff --git a/packages/connect/e2e/__fixtures__/stellarSignTransaction.ts b/packages/connect/e2e/__fixtures__/stellarSignTransaction.ts index 22818af2705..6171e2adc41 100644 --- a/packages/connect/e2e/__fixtures__/stellarSignTransaction.ts +++ b/packages/connect/e2e/__fixtures__/stellarSignTransaction.ts @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/prefer-ts-expect-error */ // @ts-ignore -import commonFixtures from '../../../../submodules/trezor-common/tests/fixtures/stellar/sign_tx.json'; import * as Messages from '@trezor/protobuf/src/messages'; +import commonFixtures from '../../../../submodules/trezor-common/tests/fixtures/stellar/sign_tx.json'; + // operations are in protobuf format (snake_case) const transformAsset = (asset: any) => ({ diff --git a/packages/connect/e2e/__txcache__/gen-reftx.ts b/packages/connect/e2e/__txcache__/gen-reftx.ts index 468a2ca1cb0..0b064064c70 100644 --- a/packages/connect/e2e/__txcache__/gen-reftx.ts +++ b/packages/connect/e2e/__txcache__/gen-reftx.ts @@ -1,6 +1,7 @@ import * as BitcoinJs from '@trezor/utxo-lib'; import type { TxInput, TxOutput } from '@trezor/utxo-lib/src/transaction/base'; import { bufferUtils } from '@trezor/utils'; + import { RefTransaction } from '../../src'; // Referenced transaction generator script. diff --git a/packages/connect/e2e/__wscache__/server.js b/packages/connect/e2e/__wscache__/server.js index f02878e8b0c..9837576a51d 100644 --- a/packages/connect/e2e/__wscache__/server.js +++ b/packages/connect/e2e/__wscache__/server.js @@ -1,4 +1,5 @@ const WebSocket = require('ws'); + const { blockbookFixtures } = require('./blockbook'); const { rippleFixtures } = require('./ripple'); const { blockfrostFixtures } = require('./blockfrost'); diff --git a/packages/connect/e2e/common.setup.ts b/packages/connect/e2e/common.setup.ts index 53dd39e2672..ef055bb644e 100644 --- a/packages/connect/e2e/common.setup.ts +++ b/packages/connect/e2e/common.setup.ts @@ -1,6 +1,4 @@ -import TrezorConnect from '../src'; import { versionUtils } from '@trezor/utils'; -import { UI } from '../src/events'; import { TrezorUserEnvLink, type TrezorUserEnvLinkClass, @@ -9,6 +7,9 @@ import { } from '@trezor/trezor-user-env-link'; import { ApplySettings } from '@trezor/protobuf/src/messages-schema'; +import { UI } from '../src/events'; +import TrezorConnect from '../src'; + const emulatorStartOpts = (process.env.emulatorStartOpts as StartEmu) || global.emulatorStartOpts || {}; diff --git a/packages/connect/e2e/tests/device/authenticateDevice.test.ts b/packages/connect/e2e/tests/device/authenticateDevice.test.ts index d2b002f8f4f..8bc7c083ed0 100644 --- a/packages/connect/e2e/tests/device/authenticateDevice.test.ts +++ b/packages/connect/e2e/tests/device/authenticateDevice.test.ts @@ -1,6 +1,6 @@ import { DeviceAuthenticityConfig } from '@trezor/connect/src/data/deviceAuthenticityConfigTypes'; -import TrezorConnect from '../../../src'; +import TrezorConnect from '../../../src'; import { getController, setup, initTrezorConnect } from '../../common.setup'; const controller = getController(); diff --git a/packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts b/packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts index 8d83cd42785..2935255ada6 100644 --- a/packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts +++ b/packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts @@ -1,5 +1,4 @@ import TrezorConnect from '../../../src'; - import { getController, setup, conditionalTest, initTrezorConnect } from '../../common.setup'; const controller = getController(); diff --git a/packages/connect/e2e/tests/device/cancel.test.ts b/packages/connect/e2e/tests/device/cancel.test.ts index 10f0338cd5d..1cd9ed9d9d9 100644 --- a/packages/connect/e2e/tests/device/cancel.test.ts +++ b/packages/connect/e2e/tests/device/cancel.test.ts @@ -1,4 +1,5 @@ import { StartEmu, SetupEmu } from '@trezor/trezor-user-env-link'; + import { getController, initTrezorConnect } from '../../common.setup'; import TrezorConnect from '../../../src'; diff --git a/packages/connect/e2e/tests/device/cancelCoinjoinAuthorization.test.ts b/packages/connect/e2e/tests/device/cancelCoinjoinAuthorization.test.ts index f83dcc1c2c3..6f1e2d3114f 100644 --- a/packages/connect/e2e/tests/device/cancelCoinjoinAuthorization.test.ts +++ b/packages/connect/e2e/tests/device/cancelCoinjoinAuthorization.test.ts @@ -1,5 +1,4 @@ import TrezorConnect, { Success, PROTO, Unsuccessful } from '../../../src'; - import { getController, setup, conditionalTest, initTrezorConnect } from '../../common.setup'; describe('TrezorConnect.cancelCoinjoinAuthorization', () => { diff --git a/packages/connect/e2e/tests/device/keepSession.test.ts b/packages/connect/e2e/tests/device/keepSession.test.ts index dfbae507985..a6c6f20e644 100644 --- a/packages/connect/e2e/tests/device/keepSession.test.ts +++ b/packages/connect/e2e/tests/device/keepSession.test.ts @@ -1,5 +1,4 @@ import TrezorConnect, { StaticSessionId } from '../../../src'; - import { getController, setup, conditionalTest, initTrezorConnect } from '../../common.setup'; const controller = getController(); diff --git a/packages/connect/e2e/tests/device/methods.test.ts b/packages/connect/e2e/tests/device/methods.test.ts index 8491b81269c..f03352a8b21 100644 --- a/packages/connect/e2e/tests/device/methods.test.ts +++ b/packages/connect/e2e/tests/device/methods.test.ts @@ -1,6 +1,5 @@ import TrezorConnect from '../../../src'; import * as fixtures from '../../__fixtures__'; - import { getController, skipTest, diff --git a/packages/connect/e2e/tests/device/override.test.ts b/packages/connect/e2e/tests/device/override.test.ts index b3b2ac42410..1e21737c221 100644 --- a/packages/connect/e2e/tests/device/override.test.ts +++ b/packages/connect/e2e/tests/device/override.test.ts @@ -1,5 +1,4 @@ import TrezorConnect from '../../../src'; - import { getController, setup, initTrezorConnect } from '../../common.setup'; const controller = getController(); diff --git a/packages/connect/e2e/tests/device/passphrase.test.ts b/packages/connect/e2e/tests/device/passphrase.test.ts index 8aa03fad36a..02a0786bf32 100644 --- a/packages/connect/e2e/tests/device/passphrase.test.ts +++ b/packages/connect/e2e/tests/device/passphrase.test.ts @@ -1,5 +1,4 @@ import TrezorConnect from '../../../src'; - import { getController, setup, conditionalTest, initTrezorConnect } from '../../common.setup'; const controller = getController(); diff --git a/packages/connect/e2e/tests/device/setBusy.test.ts b/packages/connect/e2e/tests/device/setBusy.test.ts index f3ffdc504f9..0dc2f69077f 100644 --- a/packages/connect/e2e/tests/device/setBusy.test.ts +++ b/packages/connect/e2e/tests/device/setBusy.test.ts @@ -1,5 +1,4 @@ import TrezorConnect from '../../../src'; - import { getController, setup, conditionalTest, initTrezorConnect } from '../../common.setup'; const controller = getController(); diff --git a/packages/connect/e2e/tests/device/unlockPath.test.ts b/packages/connect/e2e/tests/device/unlockPath.test.ts index 3c41c7cae8f..4a7506401b7 100644 --- a/packages/connect/e2e/tests/device/unlockPath.test.ts +++ b/packages/connect/e2e/tests/device/unlockPath.test.ts @@ -1,5 +1,4 @@ import TrezorConnect from '../../../src'; - import { getController, setup, conditionalTest, initTrezorConnect } from '../../common.setup'; const controller = getController(); diff --git a/packages/connect/setupJest.ts b/packages/connect/setupJest.ts index 8ddfa9e6ac7..893737511e1 100644 --- a/packages/connect/setupJest.ts +++ b/packages/connect/setupJest.ts @@ -1,6 +1,7 @@ /* WARNING! This file should be imported ONLY in tests! */ import { AbstractApiTransport, UsbApi } from '@trezor/transport'; + import { DeviceModelInternal, type Features, type FirmwareRelease } from './src/types'; class TestTransport extends AbstractApiTransport { diff --git a/packages/connect/src/api/applyFlags.ts b/packages/connect/src/api/applyFlags.ts index a342871ed2c..0a728ef7186 100644 --- a/packages/connect/src/api/applyFlags.ts +++ b/packages/connect/src/api/applyFlags.ts @@ -1,8 +1,9 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/ApplyFlags.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; export default class ApplyFlags extends AbstractMethod<'applyFlags', PROTO.ApplyFlags> { init() { diff --git a/packages/connect/src/api/applySettings.ts b/packages/connect/src/api/applySettings.ts index c49067919b9..94391678170 100644 --- a/packages/connect/src/api/applySettings.ts +++ b/packages/connect/src/api/applySettings.ts @@ -1,8 +1,9 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/ApplySettings.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; import { ApplySettings as ApplySettingsSchema } from '../types/api/applySettings'; export default class ApplySettings extends AbstractMethod<'applySettings', PROTO.ApplySettings> { diff --git a/packages/connect/src/api/authenticateDevice.ts b/packages/connect/src/api/authenticateDevice.ts index 6d0afb7a925..5bbe34ed379 100644 --- a/packages/connect/src/api/authenticateDevice.ts +++ b/packages/connect/src/api/authenticateDevice.ts @@ -1,10 +1,11 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { UI } from '../events'; import { getFirmwareRange } from './common/paramsValidator'; import { deviceAuthenticityConfig } from '../data/deviceAuthenticityConfig'; import { AuthenticateDeviceParams } from '../types/api/authenticateDevice'; import { getRandomChallenge, verifyAuthenticityProof } from './firmware/verifyAuthenticityProof'; -import { Assert } from '@trezor/schema-utils'; export default class AuthenticateDevice extends AbstractMethod< 'authenticateDevice', diff --git a/packages/connect/src/api/authorizeCoinjoin.ts b/packages/connect/src/api/authorizeCoinjoin.ts index 5053c309429..4d1be821cea 100644 --- a/packages/connect/src/api/authorizeCoinjoin.ts +++ b/packages/connect/src/api/authorizeCoinjoin.ts @@ -1,9 +1,10 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { validatePath, getScriptType } from '../utils/pathUtils'; import { getBitcoinNetwork } from '../data/coinInfo'; import { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; import { AuthorizeCoinjoin as AuthorizeCoinjoinSchema } from '../types/api/authorizeCoinjoin'; export default class AuthorizeCoinjoin extends AbstractMethod< diff --git a/packages/connect/src/api/backupDevice.ts b/packages/connect/src/api/backupDevice.ts index 93f002cbdd6..68d3c0479db 100644 --- a/packages/connect/src/api/backupDevice.ts +++ b/packages/connect/src/api/backupDevice.ts @@ -1,8 +1,9 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/BackupDevice.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; export default class BackupDevice extends AbstractMethod<'backupDevice', PROTO.BackupDevice> { init() { diff --git a/packages/connect/src/api/binance/api/binanceGetAddress.ts b/packages/connect/src/api/binance/api/binanceGetAddress.ts index 800492fe84a..7ae967f1ea4 100644 --- a/packages/connect/src/api/binance/api/binanceGetAddress.ts +++ b/packages/connect/src/api/binance/api/binanceGetAddress.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/BinanceGetAddress.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { PROTO, ERRORS } from '../../../constants'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { GetAddress as GetAddressSchema } from '../../../types/api/getAddress'; diff --git a/packages/connect/src/api/binance/api/binanceGetPublicKey.ts b/packages/connect/src/api/binance/api/binanceGetPublicKey.ts index dd5aa42ecbe..c9f15a1eb0b 100644 --- a/packages/connect/src/api/binance/api/binanceGetPublicKey.ts +++ b/packages/connect/src/api/binance/api/binanceGetPublicKey.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/BinanceGetPublicKey.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { UI, createUiMessage } from '../../../events'; import type { PROTO } from '../../../constants'; -import { Assert } from '@trezor/schema-utils'; import { Bundle, GetPublicKey as GetPublicKeySchema } from '../../../types'; export default class BinanceGetPublicKey extends AbstractMethod< diff --git a/packages/connect/src/api/binance/api/binanceSignTransaction.ts b/packages/connect/src/api/binance/api/binanceSignTransaction.ts index ca186d0ec5c..9b82cb0f509 100644 --- a/packages/connect/src/api/binance/api/binanceSignTransaction.ts +++ b/packages/connect/src/api/binance/api/binanceSignTransaction.ts @@ -1,13 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/BinanceSignTransaction.js +import { AssertWeak } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath } from '../../../utils/pathUtils'; import * as helper from '../binanceSignTx'; import { BinanceSignTransaction as BinanceSignTransactionSchema } from '../../../types/api/binance'; -import { AssertWeak } from '@trezor/schema-utils'; - import type { BinancePreparedTransaction } from '../../../types/api/binance'; type Params = { diff --git a/packages/connect/src/api/binance/binanceSignTx.ts b/packages/connect/src/api/binance/binanceSignTx.ts index aec5165114b..e38dd384352 100644 --- a/packages/connect/src/api/binance/binanceSignTx.ts +++ b/packages/connect/src/api/binance/binanceSignTx.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/binanceSignTx.js +import { Assert } from '@trezor/schema-utils'; + import { PROTO, ERRORS } from '../../constants'; import { BinanceSDKTransaction, @@ -7,7 +9,6 @@ import { BinancePreparedTransaction, } from '../../types/api/binance'; import type { TypedCall } from '../../device/DeviceCommands'; -import { Assert } from '@trezor/schema-utils'; const processTxRequest = async ( typedCall: TypedCall, diff --git a/packages/connect/src/api/bitcoin/Fees.ts b/packages/connect/src/api/bitcoin/Fees.ts index 67b14605a28..1f41d03f33d 100644 --- a/packages/connect/src/api/bitcoin/Fees.ts +++ b/packages/connect/src/api/bitcoin/Fees.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/tx/Fees.js import { BigNumber } from '@trezor/utils/src/bigNumber'; + import { Blockchain } from '../../backend/BlockchainLink'; import type { CoinInfo, FeeLevel } from '../../types'; diff --git a/packages/connect/src/api/bitcoin/TransactionComposer.ts b/packages/connect/src/api/bitcoin/TransactionComposer.ts index f6538a200d7..31de94c5c57 100644 --- a/packages/connect/src/api/bitcoin/TransactionComposer.ts +++ b/packages/connect/src/api/bitcoin/TransactionComposer.ts @@ -2,6 +2,7 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; import { composeTx, ComposeOutput, TransactionInputOutputSortingStrategy } from '@trezor/utxo-lib'; + import { FeeLevels } from './Fees'; import { Blockchain } from '../../backend/BlockchainLink'; import type { BitcoinNetworkInfo, DiscoveryAccount, SelectFeeLevel } from '../../types'; diff --git a/packages/connect/src/api/bitcoin/__fixtures__/refTx.ts b/packages/connect/src/api/bitcoin/__fixtures__/refTx.ts index 0b4bb35c6d5..8156d40ed15 100644 --- a/packages/connect/src/api/bitcoin/__fixtures__/refTx.ts +++ b/packages/connect/src/api/bitcoin/__fixtures__/refTx.ts @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/prefer-ts-expect-error */ import { networks } from '@trezor/utxo-lib'; + // @ts-ignore import tx43d273 from '../../../../e2e/__txcache__/testnet/43d273d3caf41759ad843474f960fbf80ff2ec961135d018b61e9fab3ad1fc06.json'; // @ts-ignore diff --git a/packages/connect/src/api/bitcoin/__tests__/Fees.test.ts b/packages/connect/src/api/bitcoin/__tests__/Fees.test.ts index fc7a9bc29f1..401dc0c1156 100644 --- a/packages/connect/src/api/bitcoin/__tests__/Fees.test.ts +++ b/packages/connect/src/api/bitcoin/__tests__/Fees.test.ts @@ -1,6 +1,7 @@ import coinsJSON from '@trezor/connect-common/files/coins.json'; import coinsJSONEth from '@trezor/connect-common/files/coins-eth.json'; import BlockchainLink from '@trezor/blockchain-link'; + import { parseCoinsJson, getBitcoinNetwork } from '../../../data/coinInfo'; import { initBlockchain } from '../../../backend/BlockchainLink'; import { FeeLevels } from '../Fees'; diff --git a/packages/connect/src/api/bitcoin/__tests__/inputs.test.ts b/packages/connect/src/api/bitcoin/__tests__/inputs.test.ts index dce271afdf1..2eaf7207c9f 100644 --- a/packages/connect/src/api/bitcoin/__tests__/inputs.test.ts +++ b/packages/connect/src/api/bitcoin/__tests__/inputs.test.ts @@ -1,4 +1,5 @@ import { networks } from '@trezor/utxo-lib'; + import { validateTrezorInputs } from '../inputs'; import * as fixtures from '../__fixtures__/inputs'; diff --git a/packages/connect/src/api/bitcoin/__tests__/signtxVerify.test.ts b/packages/connect/src/api/bitcoin/__tests__/signtxVerify.test.ts index 07c89977778..1ad323d7136 100644 --- a/packages/connect/src/api/bitcoin/__tests__/signtxVerify.test.ts +++ b/packages/connect/src/api/bitcoin/__tests__/signtxVerify.test.ts @@ -1,4 +1,5 @@ import { networks } from '@trezor/utxo-lib'; + import { verifyTx } from '../signtxVerify'; import fixtures from '../__fixtures__/signtxVerify'; diff --git a/packages/connect/src/api/bitcoin/createPendingTx.ts b/packages/connect/src/api/bitcoin/createPendingTx.ts index 4ea0724950e..d5daedbbb07 100644 --- a/packages/connect/src/api/bitcoin/createPendingTx.ts +++ b/packages/connect/src/api/bitcoin/createPendingTx.ts @@ -1,9 +1,8 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; - import { Transaction as BitcoinJsTransaction } from '@trezor/utxo-lib'; + import { getSerializedPath } from '../../utils/pathUtils'; import { PROTO } from '../../constants'; - import type { AccountAddresses } from '../../types'; export const createPendingTransaction = ( diff --git a/packages/connect/src/api/bitcoin/inputs.ts b/packages/connect/src/api/bitcoin/inputs.ts index 856cbe01306..062834e8221 100644 --- a/packages/connect/src/api/bitcoin/inputs.ts +++ b/packages/connect/src/api/bitcoin/inputs.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/tx/inputs.js import { Transaction as BitcoinJsTransaction } from '@trezor/utxo-lib'; + import { validatePath, isSegwitPath, diff --git a/packages/connect/src/api/bitcoin/outputs.ts b/packages/connect/src/api/bitcoin/outputs.ts index 99e25ea4145..dd23bee93dc 100644 --- a/packages/connect/src/api/bitcoin/outputs.ts +++ b/packages/connect/src/api/bitcoin/outputs.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/tx/outputs.js import { ComposeOutput as ComposeOutputBase } from '@trezor/utxo-lib'; + import { getOutputScriptType, fixPath, getHDPath } from '../../utils/pathUtils'; import { isValidAddress } from '../../utils/addressUtils'; import { convertMultisigPubKey } from '../../utils/hdnodeUtils'; diff --git a/packages/connect/src/api/bitcoin/refTx.ts b/packages/connect/src/api/bitcoin/refTx.ts index 27cd7bedc46..778663b7efc 100644 --- a/packages/connect/src/api/bitcoin/refTx.ts +++ b/packages/connect/src/api/bitcoin/refTx.ts @@ -7,12 +7,14 @@ import { Network, } from '@trezor/utxo-lib'; import { bufferUtils } from '@trezor/utils'; -import { getHDPath, getScriptType, getOutputScriptType } from '../../utils/pathUtils'; -import { TypedError } from '../../constants/errors'; import type { TxInput as BitcoinJsInput, TxOutput as BitcoinJsOutput, } from '@trezor/utxo-lib/src/transaction/base'; +import { Assert, Type } from '@trezor/schema-utils'; + +import { getHDPath, getScriptType, getOutputScriptType } from '../../utils/pathUtils'; +import { TypedError } from '../../constants/errors'; import type { CoinInfo, AccountAddresses, @@ -21,7 +23,7 @@ import type { } from '../../types'; import type { RefTransaction, TransactionOptions } from '../../types/api/bitcoin'; import { PROTO } from '../../constants'; -import { Assert, Type } from '@trezor/schema-utils'; + // Referenced transactions are not required if: // - all internal inputs script_type === SPENDTAPROOT diff --git a/packages/connect/src/api/bitcoin/signtxVerify.ts b/packages/connect/src/api/bitcoin/signtxVerify.ts index 10c70aa63cc..29887f26ea6 100644 --- a/packages/connect/src/api/bitcoin/signtxVerify.ts +++ b/packages/connect/src/api/bitcoin/signtxVerify.ts @@ -6,8 +6,8 @@ import { payments as BitcoinJsPayments, Transaction as BitcoinJsTransaction, } from '@trezor/utxo-lib'; -import { PROTO, ERRORS } from '../../constants'; +import { PROTO, ERRORS } from '../../constants'; import type { BitcoinNetworkInfo } from '../../types'; import type { DeviceCommands } from '../../device/DeviceCommands'; diff --git a/packages/connect/src/api/blockchainDisconnect.ts b/packages/connect/src/api/blockchainDisconnect.ts index e3fafc4c422..ee21a745969 100644 --- a/packages/connect/src/api/blockchainDisconnect.ts +++ b/packages/connect/src/api/blockchainDisconnect.ts @@ -1,11 +1,12 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/blockchain/BlockchainDisconnect.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { ERRORS } from '../constants'; import { isBackendSupported, findBackend } from '../backend/BlockchainLink'; import { getCoinInfo } from '../data/coinInfo'; import { CoinObj, CoinInfo } from '../types'; -import { Assert } from '@trezor/schema-utils'; type Params = { coinInfo: CoinInfo; diff --git a/packages/connect/src/api/cancelCoinjoinAuthorization.ts b/packages/connect/src/api/cancelCoinjoinAuthorization.ts index 102a7caa0a6..c1f57db01d1 100644 --- a/packages/connect/src/api/cancelCoinjoinAuthorization.ts +++ b/packages/connect/src/api/cancelCoinjoinAuthorization.ts @@ -1,7 +1,8 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; import { CancelCoinjoinAuthorization as CancelCoinjoinAuthorizationSchema } from '../types/api/cancelCoinjoinAuthorization'; export default class CancelCoinjoinAuthorization extends AbstractMethod< diff --git a/packages/connect/src/api/cardano/api/cardanoGetAddress.ts b/packages/connect/src/api/cardano/api/cardanoGetAddress.ts index 5e41845a17e..e78ade2771a 100644 --- a/packages/connect/src/api/cardano/api/cardanoGetAddress.ts +++ b/packages/connect/src/api/cardano/api/cardanoGetAddress.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/CardanoGetAddress.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; @@ -12,7 +14,6 @@ import { } from '../cardanoAddressParameters'; import { PROTO, ERRORS } from '../../../constants'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { CardanoGetAddress as CardanoGetAddressSchema } from '../../../types/api/cardano'; diff --git a/packages/connect/src/api/cardano/api/cardanoGetNativeScriptHash.ts b/packages/connect/src/api/cardano/api/cardanoGetNativeScriptHash.ts index a90c0394191..57f616642bc 100644 --- a/packages/connect/src/api/cardano/api/cardanoGetNativeScriptHash.ts +++ b/packages/connect/src/api/cardano/api/cardanoGetNativeScriptHash.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/CardanoGetNativeScriptHash.js +import { Assert } from '@trezor/schema-utils'; + import { PROTO } from '../../../constants'; import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; @@ -9,7 +11,6 @@ import { CardanoGetNativeScriptHash as CardanoGetNativeScriptHashSchema, CardanoNativeScript, } from '../../../types/api/cardano'; -import { Assert } from '@trezor/schema-utils'; export default class CardanoGetNativeScriptHash extends AbstractMethod< 'cardanoGetNativeScriptHash', diff --git a/packages/connect/src/api/cardano/api/cardanoGetPublicKey.ts b/packages/connect/src/api/cardano/api/cardanoGetPublicKey.ts index efc7ff47ada..78a8fadff90 100644 --- a/packages/connect/src/api/cardano/api/cardanoGetPublicKey.ts +++ b/packages/connect/src/api/cardano/api/cardanoGetPublicKey.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/CardanoGetPublicKey.js +import { Assert } from '@trezor/schema-utils'; + import { PROTO } from '../../../constants'; import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { CardanoGetPublicKey as CardanoGetPublicKeySchema } from '../../../types/api/cardano'; diff --git a/packages/connect/src/api/cardano/api/cardanoSignTransaction.ts b/packages/connect/src/api/cardano/api/cardanoSignTransaction.ts index 9d7eb66cd2b..c780e77c505 100644 --- a/packages/connect/src/api/cardano/api/cardanoSignTransaction.ts +++ b/packages/connect/src/api/cardano/api/cardanoSignTransaction.ts @@ -4,6 +4,8 @@ import { trezorUtils } from '@fivebinaries/coin-selection'; +import { AssertWeak, Type } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; @@ -35,7 +37,6 @@ import { import { gatherWitnessPaths } from '../cardanoWitnesses'; import type { AssetGroupWithTokens } from '../cardanoTokenBundle'; import { tokenBundleToProto } from '../cardanoTokenBundle'; -import { AssertWeak, Type } from '@trezor/schema-utils'; const CardanoSignTransactionFeatures = Object.freeze({ // FW <2.6.0 is not supported by Connect at all diff --git a/packages/connect/src/api/cardano/cardanoAddressParameters.ts b/packages/connect/src/api/cardano/cardanoAddressParameters.ts index 7c5e76c71ff..2695f8eac57 100644 --- a/packages/connect/src/api/cardano/cardanoAddressParameters.ts +++ b/packages/connect/src/api/cardano/cardanoAddressParameters.ts @@ -1,9 +1,10 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/cardanoAddressParameters.js +import { Assert } from '@trezor/schema-utils'; + import { validatePath } from '../../utils/pathUtils'; import { PROTO, ERRORS } from '../../constants'; import { CardanoAddressParameters } from '../../types/api/cardano'; -import { Assert } from '@trezor/schema-utils'; export const validateAddressParameters = (addressParameters: CardanoAddressParameters) => { Assert(CardanoAddressParameters, addressParameters); diff --git a/packages/connect/src/api/cardano/cardanoAuxiliaryData.ts b/packages/connect/src/api/cardano/cardanoAuxiliaryData.ts index bb92b3557c3..e625c3c4d9a 100644 --- a/packages/connect/src/api/cardano/cardanoAuxiliaryData.ts +++ b/packages/connect/src/api/cardano/cardanoAuxiliaryData.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/cardanoAuxiliaryData.js +import { Assert } from '@trezor/schema-utils'; + import { addressParametersToProto, modifyAddressParametersForBackwardsCompatibility, @@ -12,7 +14,6 @@ import { CardanoCVoteRegistrationDelegation, CardanoCVoteRegistrationParameters, } from '../../types/api/cardano'; -import { Assert } from '@trezor/schema-utils'; const MAX_DELEGATION_COUNT = 32; diff --git a/packages/connect/src/api/cardano/cardanoCertificate.ts b/packages/connect/src/api/cardano/cardanoCertificate.ts index 92998d7545f..29d39b3db0a 100644 --- a/packages/connect/src/api/cardano/cardanoCertificate.ts +++ b/packages/connect/src/api/cardano/cardanoCertificate.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/cardanoCertificate.js +import { Assert } from '@trezor/schema-utils'; + import { validatePath } from '../../utils/pathUtils'; import { PROTO, ERRORS } from '../../constants'; import { @@ -9,7 +11,6 @@ import { CardanoPoolRelay, CardanoDRep, } from '../../types/api/cardano'; -import { Assert } from '@trezor/schema-utils'; const ipv4AddressToHex = (ipv4Address: string) => Buffer.from(ipv4Address.split('.').map(ipPart => parseInt(ipPart, 10))).toString('hex'); diff --git a/packages/connect/src/api/cardano/cardanoInputs.ts b/packages/connect/src/api/cardano/cardanoInputs.ts index fe24e2940f8..86c80a830a4 100644 --- a/packages/connect/src/api/cardano/cardanoInputs.ts +++ b/packages/connect/src/api/cardano/cardanoInputs.ts @@ -1,8 +1,9 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/cardanoInputs.js +import { Assert, Type, Static } from '@trezor/schema-utils'; + import { validatePath } from '../../utils/pathUtils'; import { PROTO } from '../../constants'; -import { Assert, Type, Static } from '@trezor/schema-utils'; import { DerivationPath } from '../../exports'; export type Path = number[]; diff --git a/packages/connect/src/api/cardano/cardanoOutputs.ts b/packages/connect/src/api/cardano/cardanoOutputs.ts index aa6638936d1..97ece64e515 100644 --- a/packages/connect/src/api/cardano/cardanoOutputs.ts +++ b/packages/connect/src/api/cardano/cardanoOutputs.ts @@ -2,12 +2,13 @@ // allow for...of statements +import { Assert, Type } from '@trezor/schema-utils'; + import { addressParametersToProto, validateAddressParameters } from './cardanoAddressParameters'; import { tokenBundleToProto, AssetGroupWithTokens } from './cardanoTokenBundle'; import { PROTO } from '../../constants'; import { hexStringByteLength, sendChunkedHexString } from './cardanoUtils'; import { CardanoAssetGroup, CardanoAddressParameters } from '../../types/api/cardano'; -import { Assert, Type } from '@trezor/schema-utils'; export type OutputWithData = { output: PROTO.CardanoTxOutput; diff --git a/packages/connect/src/api/cardano/cardanoTokenBundle.ts b/packages/connect/src/api/cardano/cardanoTokenBundle.ts index 9916c5d0f52..ac98219e5e6 100644 --- a/packages/connect/src/api/cardano/cardanoTokenBundle.ts +++ b/packages/connect/src/api/cardano/cardanoTokenBundle.ts @@ -1,8 +1,9 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/cardanoTokenBundle.js +import { Assert, Type, Static } from '@trezor/schema-utils'; + import { PROTO } from '../../constants'; import { CardanoAssetGroup, CardanoToken } from '../../types/api/cardano'; -import { Assert, Type, Static } from '@trezor/schema-utils'; export type AssetGroupWithTokens = Static; export const AssetGroupWithTokens = Type.Object({ diff --git a/packages/connect/src/api/changeLanguage.ts b/packages/connect/src/api/changeLanguage.ts index 472da0522b3..d4576253e1d 100644 --- a/packages/connect/src/api/changeLanguage.ts +++ b/packages/connect/src/api/changeLanguage.ts @@ -1,8 +1,9 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/ChangeLanguage.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { UI } from '../events'; -import { Assert } from '@trezor/schema-utils'; import { ChangeLanguage as ChangeLanguageSchema } from '../types/api/changeLanguage'; export default class ChangeLanguage extends AbstractMethod<'changeLanguage', ChangeLanguageSchema> { diff --git a/packages/connect/src/api/changePin.ts b/packages/connect/src/api/changePin.ts index 932130fdddf..b0d094026f2 100644 --- a/packages/connect/src/api/changePin.ts +++ b/packages/connect/src/api/changePin.ts @@ -1,7 +1,8 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/ChangePin.js -import { AbstractMethod } from '../core/AbstractMethod'; import { Assert } from '@trezor/schema-utils'; + +import { AbstractMethod } from '../core/AbstractMethod'; import { PROTO } from '../constants'; export default class ChangePin extends AbstractMethod<'changePin', PROTO.ChangePin> { diff --git a/packages/connect/src/api/cipherKeyValue.ts b/packages/connect/src/api/cipherKeyValue.ts index a7efc79921d..4a45b211928 100644 --- a/packages/connect/src/api/cipherKeyValue.ts +++ b/packages/connect/src/api/cipherKeyValue.ts @@ -1,11 +1,12 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/CipherKeyValue.js +import { Assert } from '@trezor/schema-utils'; + import { UI, createUiMessage } from '../events'; import { AbstractMethod } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { validatePath } from '../utils/pathUtils'; import type { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../types/params'; import { CipherKeyValue as CipherKeyValueSchema } from '../types/api/cipherKeyValue'; diff --git a/packages/connect/src/api/common/Discovery.ts b/packages/connect/src/api/common/Discovery.ts index 7d4fafdeb63..d4251abd52e 100644 --- a/packages/connect/src/api/common/Discovery.ts +++ b/packages/connect/src/api/common/Discovery.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/Discovery.js import EventEmitter from 'events'; + import { PROTO, ERRORS } from '../../constants'; import { Blockchain } from '../../backend/BlockchainLink'; import { DeviceCommands } from '../../device/DeviceCommands'; diff --git a/packages/connect/src/api/composeTransaction.ts b/packages/connect/src/api/composeTransaction.ts index 2aac36bef60..f72749c222d 100644 --- a/packages/connect/src/api/composeTransaction.ts +++ b/packages/connect/src/api/composeTransaction.ts @@ -1,6 +1,8 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/ComposeTransaction.js import { BigNumber } from '@trezor/utils/src/bigNumber'; +import type { ComposeOutput, TransactionInputOutputSortingStrategy } from '@trezor/utxo-lib'; + import { AbstractMethod } from '../core/AbstractMethod'; import { ERRORS } from '../constants'; import { UI, createUiMessage } from '../events'; @@ -25,7 +27,6 @@ import { verifyTx, parseTransactionHexes, } from './bitcoin'; -import type { ComposeOutput, TransactionInputOutputSortingStrategy } from '@trezor/utxo-lib'; import type { BitcoinNetworkInfo, DiscoveryAccount, AccountUtxo } from '../types'; import type { SignedTransaction, diff --git a/packages/connect/src/api/eos/api/eosGetPublicKey.ts b/packages/connect/src/api/eos/api/eosGetPublicKey.ts index f5718336369..e4a61d2e140 100644 --- a/packages/connect/src/api/eos/api/eosGetPublicKey.ts +++ b/packages/connect/src/api/eos/api/eosGetPublicKey.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/EosGetPublicKey.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { UI, createUiMessage } from '../../../events'; import type { PROTO } from '../../../constants'; -import { Assert } from '@trezor/schema-utils'; import { Bundle, GetPublicKey as GetPublicKeySchema } from '../../../types'; export default class EosGetPublicKey extends AbstractMethod< diff --git a/packages/connect/src/api/eos/api/eosSignTransaction.ts b/packages/connect/src/api/eos/api/eosSignTransaction.ts index 54aa8c19098..67d3653764d 100644 --- a/packages/connect/src/api/eos/api/eosSignTransaction.ts +++ b/packages/connect/src/api/eos/api/eosSignTransaction.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/EosSignTransaction.js +import { AssertWeak } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath } from '../../../utils/pathUtils'; import * as helper from '../eosSignTx'; import type { PROTO } from '../../../constants'; -import { AssertWeak } from '@trezor/schema-utils'; import { EosSignTransaction as EosSignTransactionSchema } from '../../../types/api/eos'; type Params = { diff --git a/packages/connect/src/api/ethereum/__fixtures__/ethereumSignTypedData.ts b/packages/connect/src/api/ethereum/__fixtures__/ethereumSignTypedData.ts index d28b3e5d9ca..11bf052d59d 100644 --- a/packages/connect/src/api/ethereum/__fixtures__/ethereumSignTypedData.ts +++ b/packages/connect/src/api/ethereum/__fixtures__/ethereumSignTypedData.ts @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/prefer-ts-expect-error */ import { BigNumber } from '@trezor/utils/src/bigNumber'; + import { TrezorError } from '../../../constants/errors'; import { PROTO } from '../../../constants'; diff --git a/packages/connect/src/api/ethereum/__tests__/ethereumSignTx.test.ts b/packages/connect/src/api/ethereum/__tests__/ethereumSignTx.test.ts index a0c6f3d58ff..b218957b39c 100644 --- a/packages/connect/src/api/ethereum/__tests__/ethereumSignTx.test.ts +++ b/packages/connect/src/api/ethereum/__tests__/ethereumSignTx.test.ts @@ -2,7 +2,6 @@ import { TransactionFactory } from '@ethereumjs/tx'; import { keccak256, toHex } from 'web3-utils'; import { serializeEthereumTx } from '../ethereumSignTx'; - import * as fixtures from '../__fixtures__/ethereumSignTx'; describe('helpers/ethereumSignTx', () => { diff --git a/packages/connect/src/api/ethereum/api/ethereumGetAddress.ts b/packages/connect/src/api/ethereum/api/ethereumGetAddress.ts index bb5f1194a9a..03c46401a43 100644 --- a/packages/connect/src/api/ethereum/api/ethereumGetAddress.ts +++ b/packages/connect/src/api/ethereum/api/ethereumGetAddress.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/EthereumGetAddress.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { validatePath, getSerializedPath, getSlip44ByPath } from '../../../utils/pathUtils'; @@ -14,7 +16,6 @@ import { decodeEthereumDefinition, ethereumNetworkInfoFromDefinition, } from '../ethereumDefinitions'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { GetAddress as GetAddressSchema } from '../../../types/api/getAddress'; diff --git a/packages/connect/src/api/ethereum/api/ethereumGetPublicKey.ts b/packages/connect/src/api/ethereum/api/ethereumGetPublicKey.ts index c6f5960e758..f0f7d919bf8 100644 --- a/packages/connect/src/api/ethereum/api/ethereumGetPublicKey.ts +++ b/packages/connect/src/api/ethereum/api/ethereumGetPublicKey.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/EthereumGetPublicKey.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { validatePath } from '../../../utils/pathUtils'; @@ -8,7 +10,6 @@ import { getEthereumNetwork, getUniqueNetworks } from '../../../data/coinInfo'; import { UI, createUiMessage } from '../../../events'; import type { PROTO } from '../../../constants'; import type { EthereumNetworkInfo } from '../../../types'; -import { Assert } from '@trezor/schema-utils'; import { Bundle, GetPublicKey as GetPublicKeySchema } from '../../../types'; type Params = PROTO.EthereumGetPublicKey & { diff --git a/packages/connect/src/api/ethereum/api/ethereumSignMessage.ts b/packages/connect/src/api/ethereum/api/ethereumSignMessage.ts index 00ec9164cba..2b5d9a23437 100644 --- a/packages/connect/src/api/ethereum/api/ethereumSignMessage.ts +++ b/packages/connect/src/api/ethereum/api/ethereumSignMessage.ts @@ -1,5 +1,8 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/EthereumSignMessage.js +import { MessagesSchema } from '@trezor/protobuf'; +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getSlip44ByPath, validatePath } from '../../../utils/pathUtils'; @@ -12,8 +15,6 @@ import { EthereumNetworkInfo, EthereumSignMessage as EthereumSignMessageSchema, } from '../../../types'; -import { MessagesSchema } from '@trezor/protobuf'; -import { Assert } from '@trezor/schema-utils'; type Params = PROTO.EthereumSignMessage & { network?: EthereumNetworkInfo; diff --git a/packages/connect/src/api/ethereum/api/ethereumSignTransaction.ts b/packages/connect/src/api/ethereum/api/ethereumSignTransaction.ts index 7e6661d3a9c..0a40ebf6e4b 100644 --- a/packages/connect/src/api/ethereum/api/ethereumSignTransaction.ts +++ b/packages/connect/src/api/ethereum/api/ethereumSignTransaction.ts @@ -1,5 +1,10 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/EthereumSignTransaction.js +import { FeeMarketEIP1559TxData, LegacyTxData } from '@ethereumjs/tx'; + +import { MessagesSchema } from '@trezor/protobuf'; +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getSlip44ByPath, validatePath } from '../../../utils/pathUtils'; @@ -17,9 +22,7 @@ import { EthereumNetworkInfo, EthereumSignTransaction as EthereumSignTransactionSchema, } from '../../../types'; -import { MessagesSchema } from '@trezor/protobuf'; -import { Assert } from '@trezor/schema-utils'; -import { FeeMarketEIP1559TxData, LegacyTxData } from '@ethereumjs/tx'; + type Params = { path: number[]; diff --git a/packages/connect/src/api/ethereum/api/ethereumSignTypedData.ts b/packages/connect/src/api/ethereum/api/ethereumSignTypedData.ts index 810c1fa5a46..ab27f21c2e2 100644 --- a/packages/connect/src/api/ethereum/api/ethereumSignTypedData.ts +++ b/packages/connect/src/api/ethereum/api/ethereumSignTypedData.ts @@ -1,5 +1,8 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/EthereumSignTypedData.js +import { MessagesSchema } from '@trezor/protobuf'; +import { Assert, Type } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getSlip44ByPath, validatePath } from '../../../utils/pathUtils'; @@ -15,8 +18,6 @@ import { getFieldType, parseArrayType, encodeData } from '../ethereumSignTypedDa import { messageToHex } from '../../../utils/formatUtils'; import { getEthereumDefinitions } from '../ethereumDefinitions'; import { EthereumNetworkInfo, DeviceModelInternal } from '../../../types'; -import { MessagesSchema } from '@trezor/protobuf'; -import { Assert, Type } from '@trezor/schema-utils'; // This type is not inferred, because it internally uses types that are generic type Params = ( diff --git a/packages/connect/src/api/ethereum/api/ethereumVerifyMessage.ts b/packages/connect/src/api/ethereum/api/ethereumVerifyMessage.ts index 1edad2cb798..ba89fa88e77 100644 --- a/packages/connect/src/api/ethereum/api/ethereumVerifyMessage.ts +++ b/packages/connect/src/api/ethereum/api/ethereumVerifyMessage.ts @@ -1,10 +1,11 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/EthereumVerifyMessage.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { stripHexPrefix, messageToHex } from '../../../utils/formatUtils'; import type { PROTO } from '../../../constants'; -import { Assert } from '@trezor/schema-utils'; import { EthereumVerifyMessage as EthereumVerifyMessageSchema } from '../../../types'; export default class EthereumVerifyMessage extends AbstractMethod< diff --git a/packages/connect/src/api/ethereum/ethereumDefinitions.ts b/packages/connect/src/api/ethereum/ethereumDefinitions.ts index 0601766d188..3a1aaf98501 100644 --- a/packages/connect/src/api/ethereum/ethereumDefinitions.ts +++ b/packages/connect/src/api/ethereum/ethereumDefinitions.ts @@ -2,10 +2,11 @@ import fetch from 'cross-fetch'; import { MessagesSchema, parseConfigure, decode as decodeProtobuf } from '@trezor/protobuf'; import { trzd } from '@trezor/protocol'; +import { Type, Static, Assert } from '@trezor/schema-utils'; + import { DataManager } from '../../data/DataManager'; import { EthereumNetworkInfo } from '../../types'; import { ethereumNetworkInfoBase } from '../../data/coinInfo'; -import { Type, Static, Assert } from '@trezor/schema-utils'; interface GetEthereumDefinitions { chainId?: number; diff --git a/packages/connect/src/api/ethereum/ethereumSignTx.ts b/packages/connect/src/api/ethereum/ethereumSignTx.ts index 82205b30d9b..a844bc1d308 100644 --- a/packages/connect/src/api/ethereum/ethereumSignTx.ts +++ b/packages/connect/src/api/ethereum/ethereumSignTx.ts @@ -4,6 +4,7 @@ import { Common, Chain, Hardfork } from '@ethereumjs/common'; import { FeeMarketEIP1559TxData, TransactionFactory, LegacyTxData } from '@ethereumjs/tx'; import { MessagesSchema } from '@trezor/protobuf'; + import { PROTO, ERRORS } from '../../constants'; import type { TypedCall } from '../../device/DeviceCommands'; import type { EthereumAccessList } from '../../types/api/ethereum'; diff --git a/packages/connect/src/api/ethereum/ethereumSignTypedData.ts b/packages/connect/src/api/ethereum/ethereumSignTypedData.ts index de0979f0a62..b65dbaa1975 100644 --- a/packages/connect/src/api/ethereum/ethereumSignTypedData.ts +++ b/packages/connect/src/api/ethereum/ethereumSignTypedData.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/ethereumSignTypedData.js import { BigNumber } from '@trezor/utils/src/bigNumber'; + import { PROTO, ERRORS } from '../../constants'; import { messageToHex } from '../../utils/formatUtils'; import type { EthereumSignTypedDataTypes } from '../../types/api/ethereum'; diff --git a/packages/connect/src/api/firmware/verifyAuthenticityProof.ts b/packages/connect/src/api/firmware/verifyAuthenticityProof.ts index 33e28ea740e..f86cd6d2a4b 100644 --- a/packages/connect/src/api/firmware/verifyAuthenticityProof.ts +++ b/packages/connect/src/api/firmware/verifyAuthenticityProof.ts @@ -1,4 +1,5 @@ import * as crypto from 'crypto'; + import { bufferUtils } from '@trezor/utils'; import { PROTO } from '../../constants'; diff --git a/packages/connect/src/api/getAccountDescriptor.ts b/packages/connect/src/api/getAccountDescriptor.ts index a78ba51ea53..1e5417a4916 100644 --- a/packages/connect/src/api/getAccountDescriptor.ts +++ b/packages/connect/src/api/getAccountDescriptor.ts @@ -1,3 +1,5 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType, DEFAULT_FIRMWARE_RANGE } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { validatePath, getSerializedPath } from '../utils/pathUtils'; @@ -10,7 +12,6 @@ import { GetAccountDescriptorParams, GetAccountDescriptorResponse, } from '../types/api/getAccountDescriptor'; -import { Assert } from '@trezor/schema-utils'; type Request = GetAccountDescriptorParams & { address_n: number[]; coinInfo: CoinInfo }; diff --git a/packages/connect/src/api/getAddress.ts b/packages/connect/src/api/getAddress.ts index d759a9ad7ac..bdf7140ecb3 100644 --- a/packages/connect/src/api/getAddress.ts +++ b/packages/connect/src/api/getAddress.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/GetAddress.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../core/AbstractMethod'; import { validateCoinPath, getFirmwareRange } from './common/paramsValidator'; import { validatePath, getLabel, getSerializedPath } from '../utils/pathUtils'; @@ -7,7 +9,6 @@ import { getBitcoinNetwork, fixCoinInfoNetwork, getUniqueNetworks } from '../dat import { PROTO, ERRORS } from '../constants'; import { UI, createUiMessage } from '../events'; import { Bundle, type BitcoinNetworkInfo } from '../types'; -import { Assert } from '@trezor/schema-utils'; import { GetAddress as GetAddressSchema } from '../types/api/getAddress'; type Params = PROTO.GetAddress & { diff --git a/packages/connect/src/api/getCoinInfo.ts b/packages/connect/src/api/getCoinInfo.ts index a948e487062..2b32220bb92 100644 --- a/packages/connect/src/api/getCoinInfo.ts +++ b/packages/connect/src/api/getCoinInfo.ts @@ -1,10 +1,11 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/GetCoinInfo.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { ERRORS } from '../constants'; import { getCoinInfo } from '../data/coinInfo'; import { CoinObj, CoinInfo } from '../types'; -import { Assert } from '@trezor/schema-utils'; type Params = { coinInfo: CoinInfo; diff --git a/packages/connect/src/api/getFirmwareHash.ts b/packages/connect/src/api/getFirmwareHash.ts index e44ef009d6f..933ba5c4384 100644 --- a/packages/connect/src/api/getFirmwareHash.ts +++ b/packages/connect/src/api/getFirmwareHash.ts @@ -1,8 +1,9 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { PROTO } from '../constants'; import { UI } from '../events'; import { getFirmwareRange } from './common/paramsValidator'; -import { Assert } from '@trezor/schema-utils'; export default class GetFirmwareHash extends AbstractMethod< 'getFirmwareHash', diff --git a/packages/connect/src/api/getOwnershipId.ts b/packages/connect/src/api/getOwnershipId.ts index f36d2615d1e..440fbea6423 100644 --- a/packages/connect/src/api/getOwnershipId.ts +++ b/packages/connect/src/api/getOwnershipId.ts @@ -1,10 +1,11 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { validatePath, getScriptType, getSerializedPath } from '../utils/pathUtils'; import { getBitcoinNetwork } from '../data/coinInfo'; import { PROTO } from '../constants'; import { UI, createUiMessage } from '../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../exports'; import { GetOwnershipId as GetOwnershipIdSchema } from '../types/api/getOwnershipId'; diff --git a/packages/connect/src/api/getOwnershipProof.ts b/packages/connect/src/api/getOwnershipProof.ts index 6e923cb69f5..eb8c4c7a195 100644 --- a/packages/connect/src/api/getOwnershipProof.ts +++ b/packages/connect/src/api/getOwnershipProof.ts @@ -1,10 +1,11 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { validatePath, getScriptType, getSerializedPath } from '../utils/pathUtils'; import { getBitcoinNetwork } from '../data/coinInfo'; import { PROTO } from '../constants'; import { UI, createUiMessage } from '../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../exports'; import { GetOwnershipProof as GetOwnershipProofSchema } from '../types/api/getOwnershipProof'; diff --git a/packages/connect/src/api/getPublicKey.ts b/packages/connect/src/api/getPublicKey.ts index d04b2aed617..c21b4a0455e 100644 --- a/packages/connect/src/api/getPublicKey.ts +++ b/packages/connect/src/api/getPublicKey.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/GetPublicKey.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../core/AbstractMethod'; import { validateCoinPath, getFirmwareRange } from './common/paramsValidator'; import { validatePath } from '../utils/pathUtils'; @@ -8,7 +10,6 @@ import { getBitcoinNetwork } from '../data/coinInfo'; import { getPublicKeyLabel } from '../utils/accountUtils'; import type { BitcoinNetworkInfo } from '../types'; import type { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../types'; import { GetPublicKey as GetPublicKeySchema } from '../types/api/getPublicKey'; diff --git a/packages/connect/src/api/loadDevice.ts b/packages/connect/src/api/loadDevice.ts index 04a6eca2809..53827718a22 100644 --- a/packages/connect/src/api/loadDevice.ts +++ b/packages/connect/src/api/loadDevice.ts @@ -1,8 +1,9 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { UI } from '../events'; import { getFirmwareRange } from './common/paramsValidator'; import { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; export default class LoadDevice extends AbstractMethod<'loadDevice', PROTO.LoadDevice> { init() { diff --git a/packages/connect/src/api/nem/api/nemGetAddress.ts b/packages/connect/src/api/nem/api/nemGetAddress.ts index 0d8a6b1b02a..931aea0c0be 100644 --- a/packages/connect/src/api/nem/api/nemGetAddress.ts +++ b/packages/connect/src/api/nem/api/nemGetAddress.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/NEMGetAddress.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { PROTO, ERRORS } from '../../../constants'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { GetAddress as GetAddressSchema } from '../../../types/api/getAddress'; diff --git a/packages/connect/src/api/nem/api/nemSignTransaction.ts b/packages/connect/src/api/nem/api/nemSignTransaction.ts index 6fb693e8d95..086371e2b02 100644 --- a/packages/connect/src/api/nem/api/nemSignTransaction.ts +++ b/packages/connect/src/api/nem/api/nemSignTransaction.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/NEMSignTransaction.js +import { AssertWeak } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath } from '../../../utils/pathUtils'; import * as helper from '../nemSignTx'; import type { PROTO } from '../../../constants'; -import { AssertWeak } from '@trezor/schema-utils'; import { NEMSignTransaction as NEMSignTransactionSchema } from '../../../types/api/nem'; export default class NEMSignTransaction extends AbstractMethod< diff --git a/packages/connect/src/api/pushTransaction.ts b/packages/connect/src/api/pushTransaction.ts index 14369bcdf2d..277624e9b3d 100644 --- a/packages/connect/src/api/pushTransaction.ts +++ b/packages/connect/src/api/pushTransaction.ts @@ -1,11 +1,12 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/PushTransaction.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { getCoinInfo } from '../data/coinInfo'; import { ERRORS } from '../constants'; import { isBackendSupported, initBlockchain } from '../backend/BlockchainLink'; import type { CoinInfo } from '../types'; -import { Assert } from '@trezor/schema-utils'; import { PushTransaction as PushTransactionSchema } from '../types/api/pushTransaction'; type Params = { diff --git a/packages/connect/src/api/rebootToBootloader.ts b/packages/connect/src/api/rebootToBootloader.ts index e8036de919d..e3f25c3729d 100644 --- a/packages/connect/src/api/rebootToBootloader.ts +++ b/packages/connect/src/api/rebootToBootloader.ts @@ -1,9 +1,10 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/RebootToBootloader.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { UI } from '../events'; -import { Assert } from '@trezor/schema-utils'; import { PROTO } from '../constants'; export default class RebootToBootloader extends AbstractMethod< diff --git a/packages/connect/src/api/recoveryDevice.ts b/packages/connect/src/api/recoveryDevice.ts index 337557d7a70..559d7d9abe2 100644 --- a/packages/connect/src/api/recoveryDevice.ts +++ b/packages/connect/src/api/recoveryDevice.ts @@ -1,8 +1,9 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/RecoveryDevice.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { UI } from '../events'; -import { Assert } from '@trezor/schema-utils'; import type { PROTO } from '../constants'; import { RecoveryDevice as RecoveryDeviceSchema } from '../types/api/recoveryDevice'; diff --git a/packages/connect/src/api/requestLogin.ts b/packages/connect/src/api/requestLogin.ts index b835cf6d1dd..0dbf2e8d719 100644 --- a/packages/connect/src/api/requestLogin.ts +++ b/packages/connect/src/api/requestLogin.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/RequestLogin.js +import { Assert, Type } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { ERRORS } from '../constants'; @@ -7,7 +9,6 @@ import { UI, createUiMessage } from '../events'; import { DataManager } from '../data/DataManager'; import type { ConnectSettings } from '../types'; import type { PROTO } from '../constants'; -import { Assert, Type } from '@trezor/schema-utils'; import { RequestLoginSchema } from '../types/api/requestLogin'; export default class RequestLogin extends AbstractMethod<'requestLogin', PROTO.SignIdentity> { diff --git a/packages/connect/src/api/resetDevice.ts b/packages/connect/src/api/resetDevice.ts index 4edad293580..d19f695c271 100644 --- a/packages/connect/src/api/resetDevice.ts +++ b/packages/connect/src/api/resetDevice.ts @@ -1,10 +1,11 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/ResetDevice.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { UI } from '../events'; import { getFirmwareRange } from './common/paramsValidator'; import { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; export default class ResetDevice extends AbstractMethod<'resetDevice', PROTO.ResetDevice> { init() { diff --git a/packages/connect/src/api/ripple/api/rippleGetAddress.ts b/packages/connect/src/api/ripple/api/rippleGetAddress.ts index d71e8acb8ce..d8ca192d78e 100644 --- a/packages/connect/src/api/ripple/api/rippleGetAddress.ts +++ b/packages/connect/src/api/ripple/api/rippleGetAddress.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/RippleGetAddress.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { PROTO, ERRORS } from '../../../constants'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { GetAddress as GetAddressSchema } from '../../../types/api/getAddress'; diff --git a/packages/connect/src/api/ripple/api/rippleSignTransaction.ts b/packages/connect/src/api/ripple/api/rippleSignTransaction.ts index 034e3033bbb..a53e64a3971 100644 --- a/packages/connect/src/api/ripple/api/rippleSignTransaction.ts +++ b/packages/connect/src/api/ripple/api/rippleSignTransaction.ts @@ -1,11 +1,12 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/RippleSignTransaction.js +import { AssertWeak } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath } from '../../../utils/pathUtils'; import type { PROTO } from '../../../constants'; -import { AssertWeak } from '@trezor/schema-utils'; import { RippleSignTransaction as RippleSignTransactionSchema } from '../../../types/api/ripple'; export default class RippleSignTransaction extends AbstractMethod< diff --git a/packages/connect/src/api/setBrightness.ts b/packages/connect/src/api/setBrightness.ts index 97a8fb89f71..ee0665c7eec 100644 --- a/packages/connect/src/api/setBrightness.ts +++ b/packages/connect/src/api/setBrightness.ts @@ -1,8 +1,9 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/SetBrightness.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { PROTO } from '../constants'; -import { Assert } from '@trezor/schema-utils'; export default class SetBrightness extends AbstractMethod<'setBrightness', PROTO.SetBrightness> { init() { diff --git a/packages/connect/src/api/setBusy.ts b/packages/connect/src/api/setBusy.ts index 576aac81b1a..67940bbfedb 100644 --- a/packages/connect/src/api/setBusy.ts +++ b/packages/connect/src/api/setBusy.ts @@ -1,8 +1,9 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { DEVICE, createDeviceMessage } from '../events'; import { PROTO } from '../constants'; import { getFirmwareRange } from './common/paramsValidator'; -import { Assert } from '@trezor/schema-utils'; export default class SetBusy extends AbstractMethod<'setBusy', PROTO.SetBusy> { init() { diff --git a/packages/connect/src/api/signMessage.ts b/packages/connect/src/api/signMessage.ts index 3bf9e74b80a..d8c9b2eefa7 100644 --- a/packages/connect/src/api/signMessage.ts +++ b/packages/connect/src/api/signMessage.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/SignMessage.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { validateCoinPath, getFirmwareRange } from './common/paramsValidator'; import { validatePath, getLabel, getScriptType } from '../utils/pathUtils'; @@ -8,7 +10,6 @@ import { messageToHex } from '../utils/formatUtils'; import type { BitcoinNetworkInfo } from '../types'; import type { PROTO } from '../constants'; import { SignMessage as SignMessageSchema } from '../types'; -import { Assert } from '@trezor/schema-utils'; export default class SignMessage extends AbstractMethod<'signMessage', PROTO.SignMessage> { init() { diff --git a/packages/connect/src/api/solana/additionalInfo.ts b/packages/connect/src/api/solana/additionalInfo.ts index c49490af41d..5a86efabeb9 100644 --- a/packages/connect/src/api/solana/additionalInfo.ts +++ b/packages/connect/src/api/solana/additionalInfo.ts @@ -1,4 +1,5 @@ import { Assert } from '@trezor/schema-utils'; + import { SolanaTxAdditionalInfo } from '../../types/api/solana'; export const transformAdditionalInfo = (additionalInfo?: SolanaTxAdditionalInfo) => { diff --git a/packages/connect/src/api/solana/api/solanaGetAddress.ts b/packages/connect/src/api/solana/api/solanaGetAddress.ts index 5a575cefcf7..793954c9cca 100644 --- a/packages/connect/src/api/solana/api/solanaGetAddress.ts +++ b/packages/connect/src/api/solana/api/solanaGetAddress.ts @@ -1,10 +1,11 @@ +import { Assert } from '@trezor/schema-utils'; + import { ERRORS, PROTO } from '../../../constants'; import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { GetAddress as GetAddressSchema } from '../../../types/api/getAddress'; diff --git a/packages/connect/src/api/solana/api/solanaGetPublicKey.ts b/packages/connect/src/api/solana/api/solanaGetPublicKey.ts index ab427c90d01..de1fcc753ec 100644 --- a/packages/connect/src/api/solana/api/solanaGetPublicKey.ts +++ b/packages/connect/src/api/solana/api/solanaGetPublicKey.ts @@ -1,10 +1,11 @@ +import { Assert } from '@trezor/schema-utils'; + import { PROTO } from '../../../constants'; import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle, GetPublicKey as GetPublicKeySchema } from '../../../types'; export default class SolanaGetPublicKey extends AbstractMethod< diff --git a/packages/connect/src/api/solana/api/solanaSignTransaction.ts b/packages/connect/src/api/solana/api/solanaSignTransaction.ts index f3daf36535a..26a64d3fb5f 100644 --- a/packages/connect/src/api/solana/api/solanaSignTransaction.ts +++ b/packages/connect/src/api/solana/api/solanaSignTransaction.ts @@ -1,10 +1,11 @@ +import { AssertWeak } from '@trezor/schema-utils'; + import { PROTO } from '../../../constants'; import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath } from '../../../utils/pathUtils'; import { transformAdditionalInfo } from '../additionalInfo'; -import { AssertWeak } from '@trezor/schema-utils'; import { SolanaSignTransaction as SolanaSignTransactionSchema } from '../../../types/api/solana'; export default class SolanaSignTransaction extends AbstractMethod< diff --git a/packages/connect/src/api/stellar/api/stellarGetAddress.ts b/packages/connect/src/api/stellar/api/stellarGetAddress.ts index a7b1558cbb3..4cf73a86675 100644 --- a/packages/connect/src/api/stellar/api/stellarGetAddress.ts +++ b/packages/connect/src/api/stellar/api/stellarGetAddress.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/StellarGetAddress.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { PROTO, ERRORS } from '../../../constants'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { GetAddress as GetAddressSchema } from '../../../types/api/getAddress'; diff --git a/packages/connect/src/api/stellar/api/stellarSignTransaction.ts b/packages/connect/src/api/stellar/api/stellarSignTransaction.ts index cb9bca69ef0..1bd087a8347 100644 --- a/packages/connect/src/api/stellar/api/stellarSignTransaction.ts +++ b/packages/connect/src/api/stellar/api/stellarSignTransaction.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/StellarSignTransaction.js +import { AssertWeak } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; @@ -10,7 +12,6 @@ import { StellarTransaction, StellarSignTransaction as StellarSignTransactionSchema, } from '../../../types/api/stellar'; -import { AssertWeak } from '@trezor/schema-utils'; type Params = { path: number[]; diff --git a/packages/connect/src/api/stellar/stellarSignTx.ts b/packages/connect/src/api/stellar/stellarSignTx.ts index c7b8197437c..9cf84b881dc 100644 --- a/packages/connect/src/api/stellar/stellarSignTx.ts +++ b/packages/connect/src/api/stellar/stellarSignTx.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/helpers/stellarSignTx.js +import { Assert } from '@trezor/schema-utils'; + import { PROTO, ERRORS } from '../../constants'; import type { TypedCall } from '../../device/DeviceCommands'; import { @@ -7,7 +9,6 @@ import { StellarOperation, StellarOperationMessage, } from '../../types/api/stellar'; -import { Assert } from '@trezor/schema-utils'; const processTxRequest = async ( typedCall: TypedCall, diff --git a/packages/connect/src/api/tezos/api/tezosGetAddress.ts b/packages/connect/src/api/tezos/api/tezosGetAddress.ts index 05911319e3c..07862cfa696 100644 --- a/packages/connect/src/api/tezos/api/tezosGetAddress.ts +++ b/packages/connect/src/api/tezos/api/tezosGetAddress.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/TezosGetAddress.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { PROTO, ERRORS } from '../../../constants'; import { UI, createUiMessage } from '../../../events'; -import { Assert } from '@trezor/schema-utils'; import { Bundle } from '../../../types'; import { GetAddress as GetAddressSchema } from '../../../types/api/getAddress'; diff --git a/packages/connect/src/api/tezos/api/tezosGetPublicKey.ts b/packages/connect/src/api/tezos/api/tezosGetPublicKey.ts index df4146120b9..beb8a5a1700 100644 --- a/packages/connect/src/api/tezos/api/tezosGetPublicKey.ts +++ b/packages/connect/src/api/tezos/api/tezosGetPublicKey.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/TezosGetPublicKey.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod, MethodReturnType } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath, fromHardened, getSerializedPath } from '../../../utils/pathUtils'; import { UI, createUiMessage } from '../../../events'; import type { PROTO } from '../../../constants'; -import { Assert } from '@trezor/schema-utils'; import { Bundle, GetPublicKey as GetPublicKeySchema } from '../../../types'; export default class TezosGetPublicKey extends AbstractMethod< diff --git a/packages/connect/src/api/tezos/api/tezosSignTransaction.ts b/packages/connect/src/api/tezos/api/tezosSignTransaction.ts index 2c906cc3193..f2200be4f1a 100644 --- a/packages/connect/src/api/tezos/api/tezosSignTransaction.ts +++ b/packages/connect/src/api/tezos/api/tezosSignTransaction.ts @@ -1,12 +1,13 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/TezosSignTransaction.js +import { AssertWeak } from '@trezor/schema-utils'; + import { AbstractMethod } from '../../../core/AbstractMethod'; import { getFirmwareRange } from '../../common/paramsValidator'; import { getMiscNetwork } from '../../../data/coinInfo'; import { validatePath } from '../../../utils/pathUtils'; import * as helper from '../tezosSignTx'; import type { PROTO } from '../../../constants'; -import { AssertWeak } from '@trezor/schema-utils'; import { TezosSignTransaction as TezosSignTransactionSchema } from '../../../types/api/tezos'; export default class TezosSignTransaction extends AbstractMethod< diff --git a/packages/connect/src/api/tezos/tezosSignTx.ts b/packages/connect/src/api/tezos/tezosSignTx.ts index 268f2198c00..68951bb79b7 100644 --- a/packages/connect/src/api/tezos/tezosSignTx.ts +++ b/packages/connect/src/api/tezos/tezosSignTx.ts @@ -1,7 +1,9 @@ import bs58check from 'bs58check'; + +import { Assert } from '@trezor/schema-utils'; + import { PROTO, ERRORS } from '../../constants'; import { TezosOperation } from '../../types/api/tezos'; -import { Assert } from '@trezor/schema-utils'; const PREFIX = { B: new Uint8Array([1, 52]), diff --git a/packages/connect/src/api/unlockPath.ts b/packages/connect/src/api/unlockPath.ts index a445a67807b..89e852f3037 100644 --- a/packages/connect/src/api/unlockPath.ts +++ b/packages/connect/src/api/unlockPath.ts @@ -1,8 +1,9 @@ +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { PROTO } from '../constants'; import { validatePath } from '../utils/pathUtils'; import { getFirmwareRange } from './common/paramsValidator'; -import { Assert } from '@trezor/schema-utils'; import { UnlockPathParams } from '../types/api/unlockPath'; export default class UnlockPath extends AbstractMethod<'unlockPath', PROTO.UnlockPath> { diff --git a/packages/connect/src/api/verifyMessage.ts b/packages/connect/src/api/verifyMessage.ts index 08a90a81a6f..9c6be6ff739 100644 --- a/packages/connect/src/api/verifyMessage.ts +++ b/packages/connect/src/api/verifyMessage.ts @@ -1,5 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/core/methods/VerifyMessage.js +import { Assert } from '@trezor/schema-utils'; + import { AbstractMethod } from '../core/AbstractMethod'; import { getFirmwareRange } from './common/paramsValidator'; import { getBitcoinNetwork } from '../data/coinInfo'; @@ -7,7 +9,6 @@ import { getLabel } from '../utils/pathUtils'; import { messageToHex } from '../utils/formatUtils'; import { PROTO, ERRORS } from '../constants'; import { VerifyMessage as VerifyMessageSchema } from '../types'; -import { Assert } from '@trezor/schema-utils'; export default class VerifyMessage extends AbstractMethod<'verifyMessage', PROTO.VerifyMessage> { init() { diff --git a/packages/connect/src/backend/BackendManager.ts b/packages/connect/src/backend/BackendManager.ts index d2457e10358..fbe4767963f 100644 --- a/packages/connect/src/backend/BackendManager.ts +++ b/packages/connect/src/backend/BackendManager.ts @@ -2,7 +2,6 @@ import { DataManager } from '../data/DataManager'; import { ERRORS } from '../constants'; import { Blockchain, BlockchainOptions } from './Blockchain'; import { createBlockchainMessage, BLOCKCHAIN } from '../events'; - import type { CoinInfo, BlockchainLink } from '../types'; type CoinShortcut = CoinInfo['shortcut']; diff --git a/packages/connect/src/backend/Blockchain.ts b/packages/connect/src/backend/Blockchain.ts index 8f42f4a2f92..a20ed76536c 100644 --- a/packages/connect/src/backend/Blockchain.ts +++ b/packages/connect/src/backend/Blockchain.ts @@ -4,6 +4,7 @@ import BlockchainLink, { BlockchainLinkParams, BlockchainLinkResponse, } from '@trezor/blockchain-link'; + import { createBlockchainMessage, BLOCKCHAIN, CoreEventMessage } from '../events'; import { ERRORS } from '../constants'; import { @@ -13,7 +14,6 @@ import { ElectrumWorker, SolanaWorker, } from '../workers/workers'; - import type { CoinInfo, Proxy } from '../types'; const getWorker = (type: string) => { diff --git a/packages/connect/src/backend/BlockchainLink.ts b/packages/connect/src/backend/BlockchainLink.ts index 7efc4df87ab..3b57ed5e2c8 100644 --- a/packages/connect/src/backend/BlockchainLink.ts +++ b/packages/connect/src/backend/BlockchainLink.ts @@ -1,5 +1,4 @@ import { BackendManager } from './BackendManager'; - import type { BlockchainOptions as Options } from './Blockchain'; import type { CoinInfo } from '../types'; diff --git a/packages/connect/src/backend/__tests__/Blockchain.test.ts b/packages/connect/src/backend/__tests__/Blockchain.test.ts index 363307a7a78..3d8e4086bd0 100644 --- a/packages/connect/src/backend/__tests__/Blockchain.test.ts +++ b/packages/connect/src/backend/__tests__/Blockchain.test.ts @@ -1,6 +1,7 @@ import coinsJSON from '@trezor/connect-common/files/coins.json'; import coinsJSONEth from '@trezor/connect-common/files/coins-eth.json'; import BlockchainLink from '@trezor/blockchain-link'; + import { parseCoinsJson, getBitcoinNetwork, getEthereumNetwork } from '../../data/coinInfo'; import { initBlockchain } from '../BlockchainLink'; diff --git a/packages/connect/src/core/AbstractMethod.ts b/packages/connect/src/core/AbstractMethod.ts index a584336585c..95713119a46 100644 --- a/packages/connect/src/core/AbstractMethod.ts +++ b/packages/connect/src/core/AbstractMethod.ts @@ -1,5 +1,7 @@ import { storage } from '@trezor/connect-common'; import { versionUtils } from '@trezor/utils'; +import { Capability } from '@trezor/protobuf/src/messages'; + import { NETWORK, ERRORS } from '../constants'; import { UI, @@ -21,7 +23,6 @@ import type { DeviceUniquePath, ConnectSettings, } from '../types'; -import { Capability } from '@trezor/protobuf/src/messages'; import { config } from '../data/config'; export type Payload = Extract & { override?: boolean }; diff --git a/packages/connect/src/core/onCallFirmwareUpdate.ts b/packages/connect/src/core/onCallFirmwareUpdate.ts index fb8aa29a5ee..cc9531ea04b 100644 --- a/packages/connect/src/core/onCallFirmwareUpdate.ts +++ b/packages/connect/src/core/onCallFirmwareUpdate.ts @@ -1,6 +1,7 @@ import { randomBytes } from 'crypto'; import { createTimeoutPromise } from '@trezor/utils'; +import { isNewer } from '@trezor/utils/src/versionUtils'; import { DeviceList } from '../device/DeviceList'; import { UI, DEVICE, createUiMessage, createDeviceMessage, CoreEventMessage } from '../events'; @@ -18,7 +19,6 @@ import { CommonParams, DeviceUniquePath, IntermediaryVersion } from '../types'; import { FIRMWARE, PROTO, ERRORS } from '../constants'; import type { Log } from '../utils/debug'; import type { Device } from '../device/Device'; -import { isNewer } from '@trezor/utils/src/versionUtils'; type PostMessage = (message: CoreEventMessage) => void; diff --git a/packages/connect/src/data/DataManager.ts b/packages/connect/src/data/DataManager.ts index d72c1a59412..2413c2037e7 100644 --- a/packages/connect/src/data/DataManager.ts +++ b/packages/connect/src/data/DataManager.ts @@ -4,7 +4,6 @@ import { httpRequest } from '../utils/assets'; import { parseCoinsJson } from './coinInfo'; import { parseFirmware } from './firmwareInfo'; import { parseBridgeJSON } from './transportInfo'; - import { ConnectSettings, DeviceModelInternal } from '../types'; type AssetCollection = { [key: string]: Record }; diff --git a/packages/connect/src/data/__tests__/coinInfo.test.ts b/packages/connect/src/data/__tests__/coinInfo.test.ts index ec23950cd45..da5b40e139b 100644 --- a/packages/connect/src/data/__tests__/coinInfo.test.ts +++ b/packages/connect/src/data/__tests__/coinInfo.test.ts @@ -1,4 +1,5 @@ import coinsJSON from '@trezor/connect-common/files/coins.json'; + import { parseCoinsJson, getCoinInfo, getUniqueNetworks, getAllNetworks } from '../coinInfo'; describe('data/coinInfo', () => { diff --git a/packages/connect/src/data/__tests__/firmwareInfo.test.ts b/packages/connect/src/data/__tests__/firmwareInfo.test.ts index 469b77fb26b..d345601e503 100644 --- a/packages/connect/src/data/__tests__/firmwareInfo.test.ts +++ b/packages/connect/src/data/__tests__/firmwareInfo.test.ts @@ -1,5 +1,6 @@ -import { getReleases, parseFirmware, getFirmwareStatus } from '../firmwareInfo'; import * as releases2 from '@trezor/connect-common/files/firmware/t2t1/releases.json'; + +import { getReleases, parseFirmware, getFirmwareStatus } from '../firmwareInfo'; import { DeviceModelInternal } from '../../types'; describe('data/firmwareInfo', () => { diff --git a/packages/connect/src/data/__tests__/transportInfo.test.ts b/packages/connect/src/data/__tests__/transportInfo.test.ts index c70d4348667..83add78dfca 100644 --- a/packages/connect/src/data/__tests__/transportInfo.test.ts +++ b/packages/connect/src/data/__tests__/transportInfo.test.ts @@ -1,6 +1,7 @@ -import { parseBridgeJSON } from '../transportInfo'; import * as releases from '@trezor/connect-common/files/bridge/releases.json'; +import { parseBridgeJSON } from '../transportInfo'; + describe('data/transportInfo', () => { test('parseBridgeJSON', () => { expect(parseBridgeJSON(releases)).toEqual({ diff --git a/packages/connect/src/data/analyticsInfo.ts b/packages/connect/src/data/analyticsInfo.ts index da59ded02ef..b6cdf34b55b 100644 --- a/packages/connect/src/data/analyticsInfo.ts +++ b/packages/connect/src/data/analyticsInfo.ts @@ -1,4 +1,5 @@ import { EventType } from '@trezor/connect-analytics'; + import { CoreEventMessage, UI_REQUEST } from '../events'; import type { Device } from '../types'; diff --git a/packages/connect/src/data/coinInfo.ts b/packages/connect/src/data/coinInfo.ts index e937b9c08fc..92216cdf56c 100644 --- a/packages/connect/src/data/coinInfo.ts +++ b/packages/connect/src/data/coinInfo.ts @@ -1,5 +1,6 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/data/CoinInfo.js import { cloneObject } from '@trezor/utils'; + import { getBitcoinFeeLevels, getEthereumFeeLevels, getMiscFeeLevels } from './defaultFeeLevels'; import { ERRORS } from '../constants'; import { toHardened, fromHardened } from '../utils/pathUtils'; diff --git a/packages/connect/src/data/deviceAuthenticityConfigTypes.ts b/packages/connect/src/data/deviceAuthenticityConfigTypes.ts index 7f61ba02d1a..004b30612c8 100644 --- a/packages/connect/src/data/deviceAuthenticityConfigTypes.ts +++ b/packages/connect/src/data/deviceAuthenticityConfigTypes.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import { PROTO } from '../constants'; type CertPubKeys = Static; diff --git a/packages/connect/src/data/firmwareInfo.ts b/packages/connect/src/data/firmwareInfo.ts index de9b904a450..76fd97eace7 100644 --- a/packages/connect/src/data/firmwareInfo.ts +++ b/packages/connect/src/data/firmwareInfo.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/data/FirmwareInfo.js import { versionUtils } from '@trezor/utils'; + import { filterSafeListByFirmware, filterSafeListByBootloader, diff --git a/packages/connect/src/device/Device.ts b/packages/connect/src/device/Device.ts index 6fc81cf5fe6..39d46ce77d4 100644 --- a/packages/connect/src/device/Device.ts +++ b/packages/connect/src/device/Device.ts @@ -1,4 +1,6 @@ // original file https://github.com/trezor/connect/blob/develop/src/js/device/Device.js +import { randomBytes } from 'crypto'; + import { versionUtils, createDeferred, @@ -8,6 +10,8 @@ import { } from '@trezor/utils'; import { Session } from '@trezor/transport'; import { TransportProtocol, v1 as v1Protocol } from '@trezor/protocol'; +import { type Transport, type Descriptor, TRANSPORT_ERROR } from '@trezor/transport'; + import { DeviceCommands } from './DeviceCommands'; import { PROTO, ERRORS, FIRMWARE } from '../constants'; import { @@ -28,7 +32,6 @@ import { ensureInternalModelFeature, } from '../utils/deviceFeaturesUtils'; import { initLog } from '../utils/debug'; -import { type Transport, type Descriptor, TRANSPORT_ERROR } from '@trezor/transport'; import { Device as DeviceTyped, DeviceFirmwareStatus, @@ -51,7 +54,6 @@ import { checkFirmwareRevision } from './checkFirmwareRevision'; import { IStateStorage } from './StateStorage'; import type { PromptCallback } from './prompts'; import { calculateFirmwareHash, getBinaryOptional, stripFwHeaders } from '../api/firmware'; -import { randomBytes } from 'crypto'; // custom log const _log = initLog('Device'); diff --git a/packages/connect/src/device/DeviceCommands.ts b/packages/connect/src/device/DeviceCommands.ts index 3cbce3a7840..ae99de4c7e3 100644 --- a/packages/connect/src/device/DeviceCommands.ts +++ b/packages/connect/src/device/DeviceCommands.ts @@ -1,9 +1,12 @@ // original file https://github.com/trezor/connect/blob/develop/src/js/device/DeviceCommands.js import { randomBytes } from 'crypto'; + import { Transport, Session } from '@trezor/transport'; import { MessagesSchema as Messages } from '@trezor/protobuf'; import { createTimeoutPromise, versionUtils } from '@trezor/utils'; +import { Assert } from '@trezor/schema-utils'; + import { ERRORS } from '../constants'; import { DEVICE } from '../events'; import * as hdnodeUtils from '../utils/hdnodeUtils'; @@ -11,11 +14,9 @@ import { isTaprootPath, getSerializedPath, getScriptType, toHardened } from '../ import { getAccountAddressN } from '../utils/accountUtils'; import { getSegwitNetwork, getBech32Network } from '../data/coinInfo'; import { initLog } from '../utils/debug'; - import { Device } from './Device'; import type { CoinInfo, BitcoinNetworkInfo, Network } from '../types'; import type { HDNodeResponse } from '../types/api/getPublicKey'; -import { Assert } from '@trezor/schema-utils'; import { resolveDescriptorForTaproot } from './resolveDescriptorForTaproot'; import { promptPin, promptPassphrase, promptWord, cancelPrompt } from './prompts'; diff --git a/packages/connect/src/device/DeviceList.ts b/packages/connect/src/device/DeviceList.ts index 401a883a91b..476d8ad60b6 100644 --- a/packages/connect/src/device/DeviceList.ts +++ b/packages/connect/src/device/DeviceList.ts @@ -10,16 +10,16 @@ import { TRANSPORT, isTransportInstance, } from '@trezor/transport'; +import { Descriptor, PathPublic } from '@trezor/transport/src/types'; + import { ERRORS } from '../constants'; import { DEVICE, TransportInfo } from '../events'; import { Device } from './Device'; import { ConnectSettings, DeviceUniquePath, Device as DeviceTyped } from '../types'; - import { getBridgeInfo } from '../data/transportInfo'; import { initLog } from '../utils/debug'; import { resolveAfter } from '../utils/promiseUtils'; import { typedObjectKeys } from '../types/utils'; -import { Descriptor, PathPublic } from '@trezor/transport/src/types'; // custom log const _log = initLog('DeviceList'); diff --git a/packages/connect/src/device/StateStorage.ts b/packages/connect/src/device/StateStorage.ts index f030c0c0007..7b13cd5a794 100644 --- a/packages/connect/src/device/StateStorage.ts +++ b/packages/connect/src/device/StateStorage.ts @@ -1,6 +1,7 @@ +import { storage } from '@trezor/connect-common'; + import { DeviceState } from '../types'; import { Device } from './Device'; -import { storage } from '@trezor/connect-common'; export interface IStateStorage { saveState(device: Device, state: DeviceState): void; diff --git a/packages/connect/src/device/__tests__/checkFirmwareRevision.test.ts b/packages/connect/src/device/__tests__/checkFirmwareRevision.test.ts index d5ad53d5c91..e54f5350669 100644 --- a/packages/connect/src/device/__tests__/checkFirmwareRevision.test.ts +++ b/packages/connect/src/device/__tests__/checkFirmwareRevision.test.ts @@ -1,6 +1,7 @@ import { FetchError } from 'node-fetch'; import { DeviceModelInternal } from '@trezor/protobuf'; + import { checkFirmwareRevision, CheckFirmwareRevisionParams } from '../checkFirmwareRevision'; import { FirmwareRelease, FirmwareRevisionCheckResult } from '../../exports'; import * as utilsAssets from '../../utils/assets'; diff --git a/packages/connect/src/device/__tests__/resolveDescriptorForTaproot.test.ts b/packages/connect/src/device/__tests__/resolveDescriptorForTaproot.test.ts index 4d2fe5ccb67..b7e2a936a0a 100644 --- a/packages/connect/src/device/__tests__/resolveDescriptorForTaproot.test.ts +++ b/packages/connect/src/device/__tests__/resolveDescriptorForTaproot.test.ts @@ -1,6 +1,7 @@ +import { MessagesSchema as Messages } from '@trezor/protobuf'; + import { resolveDescriptorForTaproot } from '../resolveDescriptorForTaproot'; import { HDNodeResponse } from '../../types/api/getPublicKey'; -import { MessagesSchema as Messages } from '@trezor/protobuf'; const originalResponse: HDNodeResponse = { path: [2147483734, 2147483648, 2147483648], diff --git a/packages/connect/src/device/calculateRevisionForDevice.ts b/packages/connect/src/device/calculateRevisionForDevice.ts index a8d46948dae..93cfd5283b0 100644 --- a/packages/connect/src/device/calculateRevisionForDevice.ts +++ b/packages/connect/src/device/calculateRevisionForDevice.ts @@ -1,4 +1,5 @@ import { isNewer } from '@trezor/utils/src/versionUtils'; + import { VersionArray } from '../exports'; type calculateRevisionForDeviceParams = { diff --git a/packages/connect/src/device/checkFirmwareRevision.ts b/packages/connect/src/device/checkFirmwareRevision.ts index ade88aa48f1..e7da0dcdfc4 100644 --- a/packages/connect/src/device/checkFirmwareRevision.ts +++ b/packages/connect/src/device/checkFirmwareRevision.ts @@ -1,4 +1,5 @@ import { isEqual } from '@trezor/utils/src/versionUtils'; + import { PROTO } from '../constants'; import { downloadReleasesMetadata } from '../data/downloadReleasesMetadata'; import { FirmwareRelease, VersionArray } from '../types'; diff --git a/packages/connect/src/device/resolveDescriptorForTaproot.ts b/packages/connect/src/device/resolveDescriptorForTaproot.ts index 275212c437d..28bb8ec2e74 100644 --- a/packages/connect/src/device/resolveDescriptorForTaproot.ts +++ b/packages/connect/src/device/resolveDescriptorForTaproot.ts @@ -1,6 +1,7 @@ -import { HDNodeResponse } from '../types/api/getPublicKey'; import { MessagesSchema as Messages } from '@trezor/protobuf'; +import { HDNodeResponse } from '../types/api/getPublicKey'; + interface Params { response: HDNodeResponse; publicKey: Messages.PublicKey; diff --git a/packages/connect/src/events/blockchain.ts b/packages/connect/src/events/blockchain.ts index a7a3cecb20b..624c7a06aed 100644 --- a/packages/connect/src/events/blockchain.ts +++ b/packages/connect/src/events/blockchain.ts @@ -4,6 +4,7 @@ import type { FiatRatesBySymbol, NotificationEvent, } from '@trezor/blockchain-link'; + import type { CoinInfo } from '../types/coinInfo'; import type { MessageFactoryFn } from '../types/utils'; diff --git a/packages/connect/src/events/transport.ts b/packages/connect/src/events/transport.ts index 38cb887e3be..b1157bbbbce 100644 --- a/packages/connect/src/events/transport.ts +++ b/packages/connect/src/events/transport.ts @@ -1,8 +1,9 @@ +import type { Transport } from '@trezor/transport'; +import { TRANSPORT } from '@trezor/transport/src/constants'; + import { serializeError } from '../constants/errors'; import type { MessageFactoryFn } from '../types/utils'; -import type { Transport } from '@trezor/transport'; -import { TRANSPORT } from '@trezor/transport/src/constants'; export { TRANSPORT } from '@trezor/transport/src/constants'; diff --git a/packages/connect/src/events/ui-promise.ts b/packages/connect/src/events/ui-promise.ts index 6604a6b7e2e..af125d0d9c7 100644 --- a/packages/connect/src/events/ui-promise.ts +++ b/packages/connect/src/events/ui-promise.ts @@ -1,4 +1,5 @@ import type { Deferred } from '@trezor/utils'; + import type { DEVICE } from './device'; import type { Device } from '../device/Device'; import type { UiResponseEvent } from './ui-response'; diff --git a/packages/connect/src/factory.ts b/packages/connect/src/factory.ts index b948447e2b9..5fec9ca04ff 100644 --- a/packages/connect/src/factory.ts +++ b/packages/connect/src/factory.ts @@ -1,5 +1,6 @@ -import { UI } from './events'; import type { EventEmitter } from 'events'; + +import { UI } from './events'; import type { TrezorConnect } from './types'; import type { CallMethod } from './events/call'; import type { InitType } from './types/api/init'; diff --git a/packages/connect/src/impl/dynamic.ts b/packages/connect/src/impl/dynamic.ts index f39393648ea..30a13f388f7 100644 --- a/packages/connect/src/impl/dynamic.ts +++ b/packages/connect/src/impl/dynamic.ts @@ -4,7 +4,6 @@ import { ConnectFactoryDependencies } from '../factory'; import type { Manifest } from '../types/settings'; import { CallMethodPayload } from '../events'; import { ERRORS } from '../constants'; - import { ProxyEventEmitter } from '../utils/proxy-event-emitter'; import { InitFullSettings } from '../types/api/init'; diff --git a/packages/connect/src/types/api/applySettings.ts b/packages/connect/src/types/api/applySettings.ts index e004e802b75..cd46568e8f3 100644 --- a/packages/connect/src/types/api/applySettings.ts +++ b/packages/connect/src/types/api/applySettings.ts @@ -1,4 +1,5 @@ import { Type, Static } from '@trezor/schema-utils'; + import { PROTO } from '../../constants'; import type { Params, Response } from '../params'; diff --git a/packages/connect/src/types/api/authenticateDevice.ts b/packages/connect/src/types/api/authenticateDevice.ts index f81852dc68e..8a0cd30485c 100644 --- a/packages/connect/src/types/api/authenticateDevice.ts +++ b/packages/connect/src/types/api/authenticateDevice.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import type { Params, Response } from '../params'; import { DeviceAuthenticityConfig } from '../../data/deviceAuthenticityConfigTypes'; diff --git a/packages/connect/src/types/api/authorizeCoinjoin.ts b/packages/connect/src/types/api/authorizeCoinjoin.ts index a1aea105f65..ed0b47b17a9 100644 --- a/packages/connect/src/types/api/authorizeCoinjoin.ts +++ b/packages/connect/src/types/api/authorizeCoinjoin.ts @@ -1,6 +1,6 @@ -import type { Params, Response } from '../params'; - import { Static, Type } from '@trezor/schema-utils'; + +import type { Params, Response } from '../params'; import { DerivationPath } from '../params'; import { PROTO } from '../../constants'; diff --git a/packages/connect/src/types/api/binance/index.ts b/packages/connect/src/types/api/binance/index.ts index 503c1ef1038..89497418438 100644 --- a/packages/connect/src/types/api/binance/index.ts +++ b/packages/connect/src/types/api/binance/index.ts @@ -1,6 +1,7 @@ +import { Type, Static } from '@trezor/schema-utils'; + import { PROTO } from '../../../constants'; import { DerivationPath } from '../../params'; -import { Type, Static } from '@trezor/schema-utils'; // BinanceSDKTransaction from https://github.com/binance-chain/javascript-sdk/blob/master/src/tx/index.js diff --git a/packages/connect/src/types/api/bitcoin/index.ts b/packages/connect/src/types/api/bitcoin/index.ts index 4877c0189bb..d7a1c33974e 100644 --- a/packages/connect/src/types/api/bitcoin/index.ts +++ b/packages/connect/src/types/api/bitcoin/index.ts @@ -1,9 +1,10 @@ import type { AccountAddresses } from '@trezor/blockchain-link'; import type { Transaction as BlockbookTransaction } from '@trezor/blockchain-link-types/src/blockbook'; +import { Static, Type } from '@trezor/schema-utils'; + import type { PROTO } from '../../../constants'; import type { AccountTransaction } from '../../account'; import { DerivationPath, ProtoWithDerivationPath } from '../../params'; -import { Static, Type } from '@trezor/schema-utils'; // signMessage diff --git a/packages/connect/src/types/api/blockchainEstimateFee.ts b/packages/connect/src/types/api/blockchainEstimateFee.ts index a3e36f5efb5..e46fa9ebcaa 100644 --- a/packages/connect/src/types/api/blockchainEstimateFee.ts +++ b/packages/connect/src/types/api/blockchainEstimateFee.ts @@ -1,4 +1,5 @@ import type { BlockchainLinkParams, BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { FeeLevel, FeeInfo } from '../fees'; import type { CommonParamsWithCoin, Response } from '../params'; diff --git a/packages/connect/src/types/api/blockchainEvmRpcCall.ts b/packages/connect/src/types/api/blockchainEvmRpcCall.ts index 5c0f7874582..4573be6583c 100644 --- a/packages/connect/src/types/api/blockchainEvmRpcCall.ts +++ b/packages/connect/src/types/api/blockchainEvmRpcCall.ts @@ -1,4 +1,5 @@ import { BlockchainLinkParams, BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { CommonParamsWithCoin, Response } from '../params'; export declare function blockchainEvmRpcCall( diff --git a/packages/connect/src/types/api/blockchainGetAccountBalanceHistory.ts b/packages/connect/src/types/api/blockchainGetAccountBalanceHistory.ts index f2782d7f292..7e61b91450f 100644 --- a/packages/connect/src/types/api/blockchainGetAccountBalanceHistory.ts +++ b/packages/connect/src/types/api/blockchainGetAccountBalanceHistory.ts @@ -1,4 +1,5 @@ import type { BlockchainLinkParams, BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { CommonParamsWithCoin, Response } from '../params'; export declare function blockchainGetAccountBalanceHistory( diff --git a/packages/connect/src/types/api/blockchainGetCurrentFiatRates.ts b/packages/connect/src/types/api/blockchainGetCurrentFiatRates.ts index 08035337f1e..d98612dbd4a 100644 --- a/packages/connect/src/types/api/blockchainGetCurrentFiatRates.ts +++ b/packages/connect/src/types/api/blockchainGetCurrentFiatRates.ts @@ -1,4 +1,5 @@ import type { BlockchainLinkParams, BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { CommonParamsWithCoin, Response } from '../params'; export declare function blockchainGetCurrentFiatRates( diff --git a/packages/connect/src/types/api/blockchainGetFiatRatesForTimestamps.ts b/packages/connect/src/types/api/blockchainGetFiatRatesForTimestamps.ts index 6f9617afdd3..0c44f7c06c6 100644 --- a/packages/connect/src/types/api/blockchainGetFiatRatesForTimestamps.ts +++ b/packages/connect/src/types/api/blockchainGetFiatRatesForTimestamps.ts @@ -1,4 +1,5 @@ import type { BlockchainLinkParams, BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { CommonParamsWithCoin, Response } from '../params'; export declare function blockchainGetFiatRatesForTimestamps( diff --git a/packages/connect/src/types/api/blockchainGetTransactions.ts b/packages/connect/src/types/api/blockchainGetTransactions.ts index 51c2a9eeaed..294cef72b98 100644 --- a/packages/connect/src/types/api/blockchainGetTransactions.ts +++ b/packages/connect/src/types/api/blockchainGetTransactions.ts @@ -1,4 +1,5 @@ import type { Transaction } from '@trezor/blockchain-link'; + import type { CommonParamsWithCoin, Response } from '../params'; export type BlockchainGetTransactions = CommonParamsWithCoin & { diff --git a/packages/connect/src/types/api/blockchainSubscribe.ts b/packages/connect/src/types/api/blockchainSubscribe.ts index 63be8510669..ab66828cd3b 100644 --- a/packages/connect/src/types/api/blockchainSubscribe.ts +++ b/packages/connect/src/types/api/blockchainSubscribe.ts @@ -1,4 +1,5 @@ import type { SubscriptionAccountInfo, BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { CommonParamsWithCoin, Response } from '../params'; export type BlockchainSubscribe = CommonParamsWithCoin & { diff --git a/packages/connect/src/types/api/blockchainSubscribeFiatRates.ts b/packages/connect/src/types/api/blockchainSubscribeFiatRates.ts index 77c2312baa1..13e0d01af11 100644 --- a/packages/connect/src/types/api/blockchainSubscribeFiatRates.ts +++ b/packages/connect/src/types/api/blockchainSubscribeFiatRates.ts @@ -1,4 +1,5 @@ import type { BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { CommonParamsWithCoin, Response } from '../params'; export type BlockchainSubscribeFiatRates = CommonParamsWithCoin & { diff --git a/packages/connect/src/types/api/blockchainUnsubscribe.ts b/packages/connect/src/types/api/blockchainUnsubscribe.ts index 66c1290ea90..4b30fa3088a 100644 --- a/packages/connect/src/types/api/blockchainUnsubscribe.ts +++ b/packages/connect/src/types/api/blockchainUnsubscribe.ts @@ -1,4 +1,5 @@ import type { BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { Response } from '../params'; import type { BlockchainSubscribe } from './blockchainSubscribe'; diff --git a/packages/connect/src/types/api/blockchainUnsubscribeFiatRates.ts b/packages/connect/src/types/api/blockchainUnsubscribeFiatRates.ts index f7b5052e83f..88e8d87dd17 100644 --- a/packages/connect/src/types/api/blockchainUnsubscribeFiatRates.ts +++ b/packages/connect/src/types/api/blockchainUnsubscribeFiatRates.ts @@ -1,4 +1,5 @@ import type { BlockchainLinkResponse } from '@trezor/blockchain-link'; + import type { Response } from '../params'; import type { BlockchainSubscribeFiatRates } from './blockchainSubscribeFiatRates'; diff --git a/packages/connect/src/types/api/cancelCoinjoinAuthorization.ts b/packages/connect/src/types/api/cancelCoinjoinAuthorization.ts index 56de14b2300..c8faf394f3c 100644 --- a/packages/connect/src/types/api/cancelCoinjoinAuthorization.ts +++ b/packages/connect/src/types/api/cancelCoinjoinAuthorization.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import type { PROTO } from '../../constants'; import type { Params, Response } from '../params'; diff --git a/packages/connect/src/types/api/cardano/index.ts b/packages/connect/src/types/api/cardano/index.ts index 7170a522713..8a836516863 100644 --- a/packages/connect/src/types/api/cardano/index.ts +++ b/packages/connect/src/types/api/cardano/index.ts @@ -1,4 +1,5 @@ import { Type, Static } from '@trezor/schema-utils'; + import { PROTO } from '../../../constants'; import { GetPublicKey, PublicKey, DerivationPath } from '../../params'; diff --git a/packages/connect/src/types/api/cardanoComposeTransaction.ts b/packages/connect/src/types/api/cardanoComposeTransaction.ts index a9f01b7eef1..418d45f7e07 100644 --- a/packages/connect/src/types/api/cardanoComposeTransaction.ts +++ b/packages/connect/src/types/api/cardanoComposeTransaction.ts @@ -1,4 +1,5 @@ import type { types, trezorUtils } from '@fivebinaries/coin-selection'; + import type { AccountAddresses, AccountUtxo } from '../../exports'; import type { Params, Response } from '../params'; import type { CardanoCertificate, CardanoInput, CardanoOutput } from './cardano'; diff --git a/packages/connect/src/types/api/changeLanguage.ts b/packages/connect/src/types/api/changeLanguage.ts index 5709faaf2bf..1d1d2a37e52 100644 --- a/packages/connect/src/types/api/changeLanguage.ts +++ b/packages/connect/src/types/api/changeLanguage.ts @@ -1,4 +1,5 @@ import { Type, Static } from '@trezor/schema-utils'; + import type { Params, Response } from '../params'; import { PROTO } from '../../constants'; diff --git a/packages/connect/src/types/api/cipherKeyValue.ts b/packages/connect/src/types/api/cipherKeyValue.ts index dff6e40e849..1a652d5b76a 100644 --- a/packages/connect/src/types/api/cipherKeyValue.ts +++ b/packages/connect/src/types/api/cipherKeyValue.ts @@ -1,6 +1,7 @@ -import { Params, BundledParams, Response, DerivationPath } from '../params'; import { Static, Type } from '@trezor/schema-utils'; +import { Params, BundledParams, Response, DerivationPath } from '../params'; + export type CipherKeyValue = Static; export const CipherKeyValue = Type.Object({ path: DerivationPath, diff --git a/packages/connect/src/types/api/composeTransaction.ts b/packages/connect/src/types/api/composeTransaction.ts index 72180c477c6..fae24cb4adb 100644 --- a/packages/connect/src/types/api/composeTransaction.ts +++ b/packages/connect/src/types/api/composeTransaction.ts @@ -11,6 +11,7 @@ import type { ComposeResultNonFinal as ComposeResultNonFinalBase, TransactionInputOutputSortingStrategy, } from '@trezor/utxo-lib'; + import type { PROTO } from '../../constants'; import type { Params, Response } from '../params'; diff --git a/packages/connect/src/types/api/eos/index.ts b/packages/connect/src/types/api/eos/index.ts index 468b0405dee..2e005b1578c 100644 --- a/packages/connect/src/types/api/eos/index.ts +++ b/packages/connect/src/types/api/eos/index.ts @@ -1,6 +1,7 @@ +import { Type, Static } from '@trezor/schema-utils'; + import { PROTO } from '../../../constants'; import { DerivationPath } from '../../params'; -import { Type, Static } from '@trezor/schema-utils'; // eosGetPublicKey diff --git a/packages/connect/src/types/api/ethereum/index.ts b/packages/connect/src/types/api/ethereum/index.ts index 777a78055f4..97de567044f 100644 --- a/packages/connect/src/types/api/ethereum/index.ts +++ b/packages/connect/src/types/api/ethereum/index.ts @@ -1,4 +1,5 @@ import { Type, Static } from '@trezor/schema-utils'; + import { DerivationPath } from '../../params'; // ethereumSignMessage diff --git a/packages/connect/src/types/api/firmwareUpdate.ts b/packages/connect/src/types/api/firmwareUpdate.ts index b2aaf881692..ff5238e53af 100644 --- a/packages/connect/src/types/api/firmwareUpdate.ts +++ b/packages/connect/src/types/api/firmwareUpdate.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import type { Params, Response } from '../params'; export type FirmwareUpdate = Static; diff --git a/packages/connect/src/types/api/getAccountDescriptor.ts b/packages/connect/src/types/api/getAccountDescriptor.ts index f80e193e8a7..80f043b37fe 100644 --- a/packages/connect/src/types/api/getAccountDescriptor.ts +++ b/packages/connect/src/types/api/getAccountDescriptor.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import { PROTO } from '../../constants'; import { Params, BundledParams, Response, DerivationPath } from '../params'; diff --git a/packages/connect/src/types/api/getAccountInfo.ts b/packages/connect/src/types/api/getAccountInfo.ts index 4c607b989d9..5d0d540d7a0 100644 --- a/packages/connect/src/types/api/getAccountInfo.ts +++ b/packages/connect/src/types/api/getAccountInfo.ts @@ -1,4 +1,5 @@ import type { BlockchainLinkParams } from '@trezor/blockchain-link'; + import type { PROTO } from '../../constants'; import type { Params, BundledParams, Response } from '../params'; import type { AccountInfo, DiscoveryAccountType } from '../account'; diff --git a/packages/connect/src/types/api/getAddress.ts b/packages/connect/src/types/api/getAddress.ts index 6ab2e1e2b1f..162196f3407 100644 --- a/packages/connect/src/types/api/getAddress.ts +++ b/packages/connect/src/types/api/getAddress.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import { PROTO } from '../../constants'; import { GetAddress as GetAddressShared, diff --git a/packages/connect/src/types/api/getOwnershipId.ts b/packages/connect/src/types/api/getOwnershipId.ts index 81e7b77e057..9d7b4cda194 100644 --- a/packages/connect/src/types/api/getOwnershipId.ts +++ b/packages/connect/src/types/api/getOwnershipId.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import { PROTO } from '../../constants'; import { Params, BundledParams, Response, DerivationPath } from '../params'; diff --git a/packages/connect/src/types/api/getOwnershipProof.ts b/packages/connect/src/types/api/getOwnershipProof.ts index a14d1879050..682588682a2 100644 --- a/packages/connect/src/types/api/getOwnershipProof.ts +++ b/packages/connect/src/types/api/getOwnershipProof.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import { PROTO } from '../../constants'; import { Params, BundledParams, Response, DerivationPath } from '../params'; diff --git a/packages/connect/src/types/api/getPublicKey.ts b/packages/connect/src/types/api/getPublicKey.ts index a7a07d115b7..2d0eaacb7a9 100644 --- a/packages/connect/src/types/api/getPublicKey.ts +++ b/packages/connect/src/types/api/getPublicKey.ts @@ -1,6 +1,7 @@ +import { Type, Static } from '@trezor/schema-utils'; + import { PROTO } from '../../constants'; import { GetPublicKey as GetPublicKeyShared, Params, BundledParams, Response } from '../params'; -import { Type, Static } from '@trezor/schema-utils'; export type GetPublicKey = Static; export const GetPublicKey = Type.Intersect([ diff --git a/packages/connect/src/types/api/nem/index.ts b/packages/connect/src/types/api/nem/index.ts index 4aac576f3ea..56b13a9f8e7 100644 --- a/packages/connect/src/types/api/nem/index.ts +++ b/packages/connect/src/types/api/nem/index.ts @@ -1,6 +1,7 @@ +import { Type, Static } from '@trezor/schema-utils'; + import { PROTO, NEM } from '../../../constants'; import { DerivationPath } from '../../params'; -import { Type, Static } from '@trezor/schema-utils'; // NEM types from nem-sdk // https://nemproject.github.io/#transferTransaction diff --git a/packages/connect/src/types/api/nemGetAddress.ts b/packages/connect/src/types/api/nemGetAddress.ts index 9c4c25041b5..80d10b409e0 100644 --- a/packages/connect/src/types/api/nemGetAddress.ts +++ b/packages/connect/src/types/api/nemGetAddress.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import { GetAddress, Address, Params, BundledParams, Response } from '../params'; export type NEMGetAddress = Static; diff --git a/packages/connect/src/types/api/pushTransaction.ts b/packages/connect/src/types/api/pushTransaction.ts index f62a9abaf76..aa991098b95 100644 --- a/packages/connect/src/types/api/pushTransaction.ts +++ b/packages/connect/src/types/api/pushTransaction.ts @@ -3,6 +3,7 @@ * Broadcasts the transaction to the selected network. */ import { Static, Type } from '@trezor/schema-utils'; + import type { Params, Response } from '../params'; export type PushTransaction = Static; diff --git a/packages/connect/src/types/api/recoveryDevice.ts b/packages/connect/src/types/api/recoveryDevice.ts index e1cd1350607..1316f77ca99 100644 --- a/packages/connect/src/types/api/recoveryDevice.ts +++ b/packages/connect/src/types/api/recoveryDevice.ts @@ -3,6 +3,7 @@ */ import { Static, Type } from '@trezor/schema-utils'; + import { PROTO } from '../../constants'; import type { Params, Response } from '../params'; diff --git a/packages/connect/src/types/api/requestLogin.ts b/packages/connect/src/types/api/requestLogin.ts index f5acbd76a8b..ba6acf441e8 100644 --- a/packages/connect/src/types/api/requestLogin.ts +++ b/packages/connect/src/types/api/requestLogin.ts @@ -6,6 +6,7 @@ */ import { Static, Type } from '@trezor/schema-utils'; + import type { Params, Response } from '../params'; export type LoginChallenge = Static; diff --git a/packages/connect/src/types/api/ripple/index.ts b/packages/connect/src/types/api/ripple/index.ts index fa9d3955344..6ccf8d4f524 100644 --- a/packages/connect/src/types/api/ripple/index.ts +++ b/packages/connect/src/types/api/ripple/index.ts @@ -1,6 +1,7 @@ -import { DerivationPath } from '../../params'; import { Type, Static } from '@trezor/schema-utils'; +import { DerivationPath } from '../../params'; + export type RipplePayment = Static; export const RipplePayment = Type.Object({ amount: Type.String(), diff --git a/packages/connect/src/types/api/solana/index.ts b/packages/connect/src/types/api/solana/index.ts index 1e9e5d2b1a2..f1498e78359 100644 --- a/packages/connect/src/types/api/solana/index.ts +++ b/packages/connect/src/types/api/solana/index.ts @@ -1,6 +1,7 @@ -import { PublicKey } from '../../params'; import { Type, Static } from '@trezor/schema-utils'; +import { PublicKey } from '../../params'; + // solanaGetPublicKey export type SolanaPublicKey = Static; diff --git a/packages/connect/src/types/api/stellar/index.ts b/packages/connect/src/types/api/stellar/index.ts index bf26040150c..33247e2f72b 100644 --- a/packages/connect/src/types/api/stellar/index.ts +++ b/packages/connect/src/types/api/stellar/index.ts @@ -1,9 +1,10 @@ // Stellar types from stellar-sdk // https://github.com/stellar/js-stellar-base +import { Type, Static } from '@trezor/schema-utils'; + import { PROTO } from '../../../constants'; import { DerivationPath } from '../../params'; -import { Type, Static } from '@trezor/schema-utils'; export type StellarAsset = Static; export const StellarAsset = Type.Object({ diff --git a/packages/connect/src/types/api/tezos/index.ts b/packages/connect/src/types/api/tezos/index.ts index 4f50db8e2d7..7630a640a34 100644 --- a/packages/connect/src/types/api/tezos/index.ts +++ b/packages/connect/src/types/api/tezos/index.ts @@ -1,6 +1,7 @@ -import { DerivationPath } from '../../params'; import { Type, Static } from '@trezor/schema-utils'; +import { DerivationPath } from '../../params'; + export type TezosRevealOperation = Static; export const TezosRevealOperation = Type.Object({ source: Type.String(), diff --git a/packages/connect/src/types/api/unlockPath.ts b/packages/connect/src/types/api/unlockPath.ts index 9e83ed30a5b..705648e71d3 100644 --- a/packages/connect/src/types/api/unlockPath.ts +++ b/packages/connect/src/types/api/unlockPath.ts @@ -1,4 +1,5 @@ import { Static, Type } from '@trezor/schema-utils'; + import { Params, Response, DerivationPath } from '../params'; import type { PROTO } from '../../constants'; diff --git a/packages/connect/src/types/coinInfo.ts b/packages/connect/src/types/coinInfo.ts index f7afdf736d7..933d67595a5 100644 --- a/packages/connect/src/types/coinInfo.ts +++ b/packages/connect/src/types/coinInfo.ts @@ -1,4 +1,5 @@ import { Type, Static } from '@trezor/schema-utils'; + import { FeeLevel } from './fees'; import { DeviceModelInternal } from './device'; diff --git a/packages/connect/src/types/device.ts b/packages/connect/src/types/device.ts index 55f5ecb5d29..405a9c2a477 100644 --- a/packages/connect/src/types/device.ts +++ b/packages/connect/src/types/device.ts @@ -1,4 +1,5 @@ import { Descriptor } from '@trezor/transport'; + import type { PROTO } from '../constants'; import type { ReleaseInfo } from './firmware'; diff --git a/packages/connect/src/types/params.ts b/packages/connect/src/types/params.ts index 7d8ad171dff..21b86638679 100644 --- a/packages/connect/src/types/params.ts +++ b/packages/connect/src/types/params.ts @@ -1,6 +1,7 @@ // API params import { Type, TSchema, Static } from '@trezor/schema-utils'; + import { DeviceState, DeviceUniquePath } from './device'; import { ErrorCode } from '../constants/errors'; diff --git a/packages/connect/src/utils/__fixtures__/accountUtils.ts b/packages/connect/src/utils/__fixtures__/accountUtils.ts index bb875aacee5..367b60e0154 100644 --- a/packages/connect/src/utils/__fixtures__/accountUtils.ts +++ b/packages/connect/src/utils/__fixtures__/accountUtils.ts @@ -2,7 +2,6 @@ import coinsJSON from '@trezor/connect-common/files/coins.json'; import coinsJSONEth from '@trezor/connect-common/files/coins-eth.json'; import { getAccountLabel, isUtxoBased } from '../accountUtils'; - import { parseCoinsJson, getBitcoinNetwork, diff --git a/packages/connect/src/utils/__fixtures__/ethereumUtils.ts b/packages/connect/src/utils/__fixtures__/ethereumUtils.ts index d796759e323..cb2e164f79d 100644 --- a/packages/connect/src/utils/__fixtures__/ethereumUtils.ts +++ b/packages/connect/src/utils/__fixtures__/ethereumUtils.ts @@ -2,7 +2,6 @@ import coinsJSON from '@trezor/connect-common/files/coins.json'; import coinsJSONEth from '@trezor/connect-common/files/coins-eth.json'; import { getNetworkLabel } from '../ethereumUtils'; - import { parseCoinsJson, getEthereumNetwork } from '../../data/coinInfo'; parseCoinsJson({ diff --git a/packages/connect/src/utils/__fixtures__/formatUtils.ts b/packages/connect/src/utils/__fixtures__/formatUtils.ts index 52d9a6fd123..1bcab841b21 100644 --- a/packages/connect/src/utils/__fixtures__/formatUtils.ts +++ b/packages/connect/src/utils/__fixtures__/formatUtils.ts @@ -1,7 +1,6 @@ import coinsJSON from '@trezor/connect-common/files/coins.json'; import { formatAmount } from '../formatUtils'; - import { parseCoinsJson, getBitcoinNetwork } from '../../data/coinInfo'; parseCoinsJson(coinsJSON); diff --git a/packages/connect/src/utils/__tests__/accountUtils.test.ts b/packages/connect/src/utils/__tests__/accountUtils.test.ts index 34453f8db5d..6136ef991a1 100644 --- a/packages/connect/src/utils/__tests__/accountUtils.test.ts +++ b/packages/connect/src/utils/__tests__/accountUtils.test.ts @@ -1,5 +1,4 @@ import { getAccountLabel, isUtxoBased } from '../accountUtils'; - import * as fixtures from '../__fixtures__/accountUtils'; describe('utils/accountUtils', () => { diff --git a/packages/connect/src/utils/__tests__/addressUtils.test.ts b/packages/connect/src/utils/__tests__/addressUtils.test.ts index 392d87fb38f..2676b5e00d4 100644 --- a/packages/connect/src/utils/__tests__/addressUtils.test.ts +++ b/packages/connect/src/utils/__tests__/addressUtils.test.ts @@ -1,4 +1,5 @@ import coinsJSON from '@trezor/connect-common/files/coins.json'; + import { parseCoinsJson, getBitcoinNetwork } from '../../data/coinInfo'; import * as utils from '../addressUtils'; import * as fixtures from '../__fixtures__/addressUtils'; diff --git a/packages/connect/src/utils/__tests__/deviceFeaturesUtils.test.ts b/packages/connect/src/utils/__tests__/deviceFeaturesUtils.test.ts index 768d7dbc8e1..5f851c0450e 100644 --- a/packages/connect/src/utils/__tests__/deviceFeaturesUtils.test.ts +++ b/packages/connect/src/utils/__tests__/deviceFeaturesUtils.test.ts @@ -2,7 +2,6 @@ import coinsJSON from '@trezor/connect-common/files/coins.json'; import coinsJSONEth from '@trezor/connect-common/files/coins-eth.json'; import { parseCoinsJson, getAllNetworks } from '../../data/coinInfo'; - import { getUnavailableCapabilities, parseCapabilities, diff --git a/packages/connect/src/utils/__tests__/ethereumUtils.test.ts b/packages/connect/src/utils/__tests__/ethereumUtils.test.ts index b2b628f5594..4d9eff7f02c 100644 --- a/packages/connect/src/utils/__tests__/ethereumUtils.test.ts +++ b/packages/connect/src/utils/__tests__/ethereumUtils.test.ts @@ -1,5 +1,4 @@ import { getNetworkLabel } from '../ethereumUtils'; - import * as fixtures from '../__fixtures__/ethereumUtils'; describe('utils/ethereumUtils', () => { diff --git a/packages/connect/src/utils/__tests__/formatUtils.test.ts b/packages/connect/src/utils/__tests__/formatUtils.test.ts index a37413155c5..5d9d24ecbc7 100644 --- a/packages/connect/src/utils/__tests__/formatUtils.test.ts +++ b/packages/connect/src/utils/__tests__/formatUtils.test.ts @@ -1,5 +1,4 @@ import { formatAmount } from '../formatUtils'; - import * as fixtures from '../__fixtures__/formatUtils'; describe('utils/formatUtils', () => { diff --git a/packages/connect/src/utils/addressUtils.ts b/packages/connect/src/utils/addressUtils.ts index a92cef74860..339ff1f4672 100644 --- a/packages/connect/src/utils/addressUtils.ts +++ b/packages/connect/src/utils/addressUtils.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/utils/addressUtils.js import { address as BitcoinJSAddress } from '@trezor/utxo-lib'; + import type { BitcoinNetworkInfo } from '../types'; // Base58 diff --git a/packages/connect/src/utils/assetUtils.ts b/packages/connect/src/utils/assetUtils.ts index c8d3a88720b..1a6b182bc47 100644 --- a/packages/connect/src/utils/assetUtils.ts +++ b/packages/connect/src/utils/assetUtils.ts @@ -1,4 +1,5 @@ import { isArrayMember } from '@trezor/utils'; + import { DeviceModelInternal } from '../types'; const isDeviceModel = (model: string): model is DeviceModelInternal => diff --git a/packages/connect/src/utils/assets.ts b/packages/connect/src/utils/assets.ts index ac62bf5b07d..457970ada86 100644 --- a/packages/connect/src/utils/assets.ts +++ b/packages/connect/src/utils/assets.ts @@ -2,6 +2,7 @@ import fetch from 'cross-fetch'; import { promises as fs } from 'fs'; + import { httpRequest as browserHttpRequest } from './assets-browser'; import { tryLocalAssetRequire } from './assetUtils'; diff --git a/packages/connect/src/utils/deviceFeaturesUtils.ts b/packages/connect/src/utils/deviceFeaturesUtils.ts index e48d51cb2c7..84fbc4f002e 100644 --- a/packages/connect/src/utils/deviceFeaturesUtils.ts +++ b/packages/connect/src/utils/deviceFeaturesUtils.ts @@ -1,4 +1,5 @@ import { isArrayMember, versionUtils } from '@trezor/utils'; + import { PROTO } from '../constants'; import { config } from '../data/config'; import { Features, CoinInfo, UnavailableCapabilities, DeviceModelInternal } from '../types'; diff --git a/packages/connect/src/utils/firmwareUtils.ts b/packages/connect/src/utils/firmwareUtils.ts index 73d82126e05..85a7656fccf 100644 --- a/packages/connect/src/utils/firmwareUtils.ts +++ b/packages/connect/src/utils/firmwareUtils.ts @@ -1,4 +1,5 @@ import { versionUtils } from '@trezor/utils'; + import type { Features, StrictFeatures, FirmwareRelease, VersionArray } from '../types'; export const isStrictFeatures = (extFeatures: Features): extFeatures is StrictFeatures => diff --git a/packages/connect/src/utils/formatUtils.ts b/packages/connect/src/utils/formatUtils.ts index 47d92ae34f5..dce493ca259 100644 --- a/packages/connect/src/utils/formatUtils.ts +++ b/packages/connect/src/utils/formatUtils.ts @@ -1,6 +1,7 @@ // origin: https://github.com/trezor/connect/blob/develop/src/js/utils/formatUtils.js import { BigNumber } from '@trezor/utils/src/bigNumber'; + import type { CoinInfo } from '../types'; export const formatAmount = (n: string, coinInfo: CoinInfo) => diff --git a/packages/connect/src/utils/hdnodeUtils.ts b/packages/connect/src/utils/hdnodeUtils.ts index 6f4b29f5067..87a4c2e92b5 100644 --- a/packages/connect/src/utils/hdnodeUtils.ts +++ b/packages/connect/src/utils/hdnodeUtils.ts @@ -2,6 +2,7 @@ import { bip32 } from '@trezor/utxo-lib'; import type { Network, BIP32Interface } from '@trezor/utxo-lib'; + import { PROTO, ERRORS } from '../constants'; const pubNode2bjsNode = (node: PROTO.HDNodeType, network?: Network) => { diff --git a/packages/connect/src/utils/uiPromiseManager.ts b/packages/connect/src/utils/uiPromiseManager.ts index 6f6a7ad8e37..18c73e37b68 100644 --- a/packages/connect/src/utils/uiPromiseManager.ts +++ b/packages/connect/src/utils/uiPromiseManager.ts @@ -1,5 +1,6 @@ -import { DEVICE, UiPromise, AnyUiPromise, UiPromiseCreator, UiPromiseResponse } from '../events'; import { createDeferred, arrayPartition } from '@trezor/utils'; + +import { DEVICE, UiPromise, AnyUiPromise, UiPromiseCreator, UiPromiseResponse } from '../events'; import { DeviceUniquePath } from '../types/device'; export const createUiPromiseManager = (interactionTimeout: () => void) => { diff --git a/packages/product-components/src/components/AssetShareIndicator/AssetShareIndicator.tsx b/packages/product-components/src/components/AssetShareIndicator/AssetShareIndicator.tsx index 83d2984c9c8..f9c7aa89215 100644 --- a/packages/product-components/src/components/AssetShareIndicator/AssetShareIndicator.tsx +++ b/packages/product-components/src/components/AssetShareIndicator/AssetShareIndicator.tsx @@ -1,11 +1,14 @@ import { SVGProps } from 'react'; + import { motion, AnimationProps, SVGMotionProps } from 'framer-motion'; import styled, { useTheme } from 'styled-components'; + import { coinsColors } from '@trezor/theme'; -import { CoinLogo, CoinLogoProps } from '../CoinLogo/CoinLogo'; import { motionEasing } from '@trezor/components'; import { NetworkSymbol } from '@suite-common/wallet-config'; +import { CoinLogo, CoinLogoProps } from '../CoinLogo/CoinLogo'; + const Container = styled.div` position: relative; align-items: center; diff --git a/packages/product-components/src/components/CoinLogo/CoinLogo.stories.tsx b/packages/product-components/src/components/CoinLogo/CoinLogo.stories.tsx index a3ee39f8c51..c98a9adee7e 100644 --- a/packages/product-components/src/components/CoinLogo/CoinLogo.stories.tsx +++ b/packages/product-components/src/components/CoinLogo/CoinLogo.stories.tsx @@ -1,5 +1,6 @@ import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; + import { CoinLogo as CoinLogoComponent } from '../../index'; import { COINS } from './coins'; import { CoinLogoProps } from './CoinLogo'; diff --git a/packages/product-components/src/components/CoinLogo/CoinLogo.tsx b/packages/product-components/src/components/CoinLogo/CoinLogo.tsx index 33d59b114d3..7f60f9927a2 100644 --- a/packages/product-components/src/components/CoinLogo/CoinLogo.tsx +++ b/packages/product-components/src/components/CoinLogo/CoinLogo.tsx @@ -1,9 +1,12 @@ import { ImgHTMLAttributes } from 'react'; import { ReactSVG } from 'react-svg'; + import styled from 'styled-components'; -import { COINS, LegacyNetworkSymbol } from './coins'; + import { NetworkSymbol } from '@suite-common/wallet-config'; +import { COINS, LegacyNetworkSymbol } from './coins'; + export interface CoinLogoProps extends ImgHTMLAttributes { symbol: NetworkSymbol | LegacyNetworkSymbol; className?: string; diff --git a/packages/product-components/src/components/CoinLogo/coinLogos.stories.tsx b/packages/product-components/src/components/CoinLogo/coinLogos.stories.tsx index 0df5feb64f6..04218cb39d2 100644 --- a/packages/product-components/src/components/CoinLogo/coinLogos.stories.tsx +++ b/packages/product-components/src/components/CoinLogo/coinLogos.stories.tsx @@ -1,10 +1,13 @@ import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; -import { CoinLogo } from '../../index'; + import { StoryColumn } from '@trezor/components'; -import { COINS } from './coins'; import { NetworkSymbol } from '@suite-common/wallet-config'; +import { CoinLogo } from '../../index'; +import { COINS } from './coins'; + + const CoinName = styled.div` margin-bottom: 0.5rem; color: ${({ theme }) => theme.legacy.TYPE_LIGHT_GREY}; diff --git a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDevice.stories.tsx b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDevice.stories.tsx index c4f92df9694..95ea5762569 100644 --- a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDevice.stories.tsx +++ b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDevice.stories.tsx @@ -1,8 +1,10 @@ import { Meta, StoryFn } from '@storybook/react'; + import { DeviceModelInternal } from '@trezor/connect'; -import { ConfirmOnDevice as ConfirmOnDeviceComponent } from './ConfirmOnDevice'; import { StoryColumn } from '@trezor/components'; +import { ConfirmOnDevice as ConfirmOnDeviceComponent } from './ConfirmOnDevice'; + const meta: Meta = { title: 'ConfirmOnDevice', parameters: { diff --git a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDevice.tsx b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDevice.tsx index 4e188c2363d..15cbb77f71b 100644 --- a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDevice.tsx +++ b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDevice.tsx @@ -1,9 +1,11 @@ import { ReactNode } from 'react'; + import styled, { css, keyframes } from 'styled-components'; + import { DeviceModelInternal } from '@trezor/connect'; import { borders, spacingsPx } from '@trezor/theme'; - import { ElevationUp } from '@trezor/components'; + import { ConfirmOnDeviceContent } from './ConfirmOnDeviceContent'; enum AnimationDirection { diff --git a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx index a255793cb07..db4dd80d225 100644 --- a/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx +++ b/packages/product-components/src/components/ConfirmOnDevice/ConfirmOnDeviceContent.tsx @@ -1,5 +1,7 @@ import { ReactNode } from 'react'; + import styled, { css, useTheme } from 'styled-components'; + import { Icon, useElevation } from '@trezor/components'; import { DeviceModelInternal } from '@trezor/connect'; import { @@ -9,6 +11,7 @@ import { spacingsPx, typography, } from '@trezor/theme'; + import { RotateDeviceImage } from '../RotateDeviceImage/RotateDeviceImage'; const Column = styled.div` diff --git a/packages/product-components/src/components/PassphraseTypeCard/EnterOnTrezorButton.tsx b/packages/product-components/src/components/PassphraseTypeCard/EnterOnTrezorButton.tsx index e578675beb5..ec7a22d5f2f 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/EnterOnTrezorButton.tsx +++ b/packages/product-components/src/components/PassphraseTypeCard/EnterOnTrezorButton.tsx @@ -1,5 +1,7 @@ import { FormattedMessage } from 'react-intl'; + import styled, { useTheme } from 'styled-components'; + import { Image, Card, Text, Row, Icon } from '@trezor/components'; import { DeviceModelInternal } from '@trezor/connect'; import { spacings } from '@trezor/theme'; diff --git a/packages/product-components/src/components/PassphraseTypeCard/NonAsciiBanner.tsx b/packages/product-components/src/components/PassphraseTypeCard/NonAsciiBanner.tsx index 05a4ec58118..1d328866a43 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/NonAsciiBanner.tsx +++ b/packages/product-components/src/components/PassphraseTypeCard/NonAsciiBanner.tsx @@ -1,6 +1,8 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; + import styled from 'styled-components'; + import { Banner, Button, Code, Text } from '@trezor/components'; import { BannerVariant } from '@trezor/components/src/components/Banner/types'; import { borders, spacingsPx, typography } from '@trezor/theme'; diff --git a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCard.stories.tsx b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCard.stories.tsx index 53cbfe46649..c9dfae10a63 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCard.stories.tsx +++ b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCard.stories.tsx @@ -1,9 +1,11 @@ import { IntlProvider } from 'react-intl'; + +import { Meta, StoryObj } from '@storybook/react'; + import { PassphraseTypeCard as PassphraseTypeCardComponent, PassphraseTypeCardProps, } from './PassphraseTypeCard'; -import { Meta, StoryObj } from '@storybook/react'; const meta: Meta = { title: 'PassphraseTypeCard', diff --git a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCard.tsx b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCard.tsx index 7ca579ae4c4..699bcfa4680 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCard.tsx +++ b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCard.tsx @@ -1,18 +1,21 @@ import { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; + import { AnimatePresence } from 'framer-motion'; +import styled, { css } from 'styled-components'; + import { useKeyPress } from '@trezor/react-utils'; import { setCaretPosition } from '@trezor/dom-utils'; -import styled, { css } from 'styled-components'; import { countBytesInString } from '@trezor/utils'; import { formInputsMaxLength } from '@suite-common/validators'; import { TooltipProps } from '@trezor/components'; -import { EnterOnTrezorButton } from './EnterOnTrezorButton'; import { DeviceModelInternal, Features } from '@trezor/connect'; +import { borders, spacingsPx } from '@trezor/theme'; + +import { EnterOnTrezorButton } from './EnterOnTrezorButton'; import { PassphraseTypeCardHeading } from './PassphraseTypeCardHeading'; import { WalletType } from './types'; import { PassphraseTypeCardContent } from './PassphraseTypeCardContent'; import { DOT } from './consts'; -import { borders, spacingsPx } from '@trezor/theme'; import { useNonAsciiChars } from './useNonAsciiChars'; import { getSubmitLabel } from './getSubmitLabel'; diff --git a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardContent.tsx b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardContent.tsx index 7de621161e1..75790169091 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardContent.tsx +++ b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardContent.tsx @@ -1,14 +1,17 @@ -import { isAndroid } from '@trezor/env-utils'; -import { AnimatePresence, motion } from 'framer-motion'; import { FormattedMessage, useIntl } from 'react-intl'; +import { ChangeEvent, MutableRefObject, ReactNode, RefObject } from 'react'; + +import { AnimatePresence, motion } from 'framer-motion'; +import styled, { useTheme } from 'styled-components'; + +import { isAndroid } from '@trezor/env-utils'; import { Button, Card, Column, Icon, Input, motionAnimation, Row } from '@trezor/components'; import { ButtonVariant } from '@trezor/components/src/components/buttons/buttonStyleUtils'; import { BannerVariant } from '@trezor/components/src/components/Banner/types'; -import { PasswordStrengthIndicator } from '../PasswordStrengthIndicator/PasswordStrengthIndicator'; -import styled, { useTheme } from 'styled-components'; import { spacings, spacingsPx, typography } from '@trezor/theme'; import { useKeyPress } from '@trezor/react-utils'; -import { ChangeEvent, MutableRefObject, ReactNode, RefObject } from 'react'; + +import { PasswordStrengthIndicator } from '../PasswordStrengthIndicator/PasswordStrengthIndicator'; import { WalletType } from './types'; import { DOT } from './consts'; import { NonAsciiBanner } from './NonAsciiBanner'; diff --git a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx index a4b4f913cc6..f3e2f3131a2 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx +++ b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx @@ -1,9 +1,13 @@ -import { borders, spacings, spacingsPx, typography } from '@trezor/theme'; import { FormattedMessage } from 'react-intl'; +import { ReactNode } from 'react'; + import styled, { useTheme } from 'styled-components'; + +import { borders, spacings, spacingsPx, typography } from '@trezor/theme'; import { Tooltip, TooltipProps, Column, Row, Icon } from '@trezor/components'; + import { WalletType } from './types'; -import { ReactNode } from 'react'; + const IconWrapper = styled.div<{ $type: WalletType }>` width: 38px; diff --git a/packages/product-components/src/components/PassphraseTypeCard/useNonAsciiChars.ts b/packages/product-components/src/components/PassphraseTypeCard/useNonAsciiChars.ts index b57c583ce7c..292ffe3d426 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/useNonAsciiChars.ts +++ b/packages/product-components/src/components/PassphraseTypeCard/useNonAsciiChars.ts @@ -1,4 +1,5 @@ import { useEffect, useMemo, useState } from 'react'; + import { getNonAsciiChars } from '@trezor/utils'; export const useNonAsciiChars = (value: string) => { diff --git a/packages/product-components/src/components/PasswordStrengthIndicator/PasswordStrengthIndicator.stories.tsx b/packages/product-components/src/components/PasswordStrengthIndicator/PasswordStrengthIndicator.stories.tsx index 2cfa25c4087..c6a4dcd54d4 100644 --- a/packages/product-components/src/components/PasswordStrengthIndicator/PasswordStrengthIndicator.stories.tsx +++ b/packages/product-components/src/components/PasswordStrengthIndicator/PasswordStrengthIndicator.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { PasswordStrengthIndicatorProps, PasswordStrengthIndicator as PasswordStrengthIndicatorComponent, diff --git a/packages/product-components/src/components/PasswordStrengthIndicator/PasswordStrengthIndicator.tsx b/packages/product-components/src/components/PasswordStrengthIndicator/PasswordStrengthIndicator.tsx index b9ce15f084e..97c06047cca 100644 --- a/packages/product-components/src/components/PasswordStrengthIndicator/PasswordStrengthIndicator.tsx +++ b/packages/product-components/src/components/PasswordStrengthIndicator/PasswordStrengthIndicator.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; -import styled from 'styled-components'; +import styled from 'styled-components'; import type { ZXCVBNScore } from 'zxcvbn'; interface WrapperProps { diff --git a/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.stories.tsx b/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.stories.tsx index 6103f698957..797c7d210ec 100644 --- a/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.stories.tsx +++ b/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.stories.tsx @@ -1,9 +1,11 @@ import { Meta, StoryObj } from '@storybook/react'; + +import { DeviceModelInternal } from '@trezor/connect'; + import { RotateDeviceImage as RotateDeviceImageComponent, RotateDeviceImageProps, } from './RotateDeviceImage'; -import { DeviceModelInternal } from '@trezor/connect'; const meta: Meta = { title: 'RotateDeviceImage', diff --git a/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx b/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx index 3340ca80c65..7c6407a3dc0 100644 --- a/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx +++ b/packages/product-components/src/components/RotateDeviceImage/RotateDeviceImage.tsx @@ -1,7 +1,9 @@ import React from 'react'; + +import styled from 'styled-components'; + import { DeviceAnimation, Image } from '@trezor/components'; import { DeviceModelInternal } from '@trezor/connect'; -import styled from 'styled-components'; export type RotateDeviceImageProps = { deviceModel?: DeviceModelInternal; diff --git a/packages/product-components/src/components/SelectAssetModal/AssetItem.tsx b/packages/product-components/src/components/SelectAssetModal/AssetItem.tsx index f0e060b91ef..a547042bf9e 100644 --- a/packages/product-components/src/components/SelectAssetModal/AssetItem.tsx +++ b/packages/product-components/src/components/SelectAssetModal/AssetItem.tsx @@ -1,6 +1,7 @@ +import styled, { useTheme } from 'styled-components'; + import { spacings, spacingsPx } from '@trezor/theme'; import { Badge, Column, Icon, Row, Text } from '@trezor/components'; -import styled, { useTheme } from 'styled-components'; const ClickableContainer = styled.div` cursor: pointer; diff --git a/packages/product-components/src/components/SelectAssetModal/AssetItemNotFound.tsx b/packages/product-components/src/components/SelectAssetModal/AssetItemNotFound.tsx index dd49d68e646..dc74a0bbc0a 100644 --- a/packages/product-components/src/components/SelectAssetModal/AssetItemNotFound.tsx +++ b/packages/product-components/src/components/SelectAssetModal/AssetItemNotFound.tsx @@ -1,8 +1,11 @@ -import { Column, Paragraph, Text } from '@trezor/components'; import { FormattedMessage } from 'react-intl'; -import { SelectAssetNetworkProps, SelectAssetSearchCategoryType } from './SelectAssetModal'; + +import { Column, Paragraph, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { SelectAssetNetworkProps, SelectAssetSearchCategoryType } from './SelectAssetModal'; + + interface AssetItemNotFoundProps { searchCategory: SelectAssetSearchCategoryType; networkCategories: SelectAssetNetworkProps[]; diff --git a/packages/product-components/src/components/SelectAssetModal/CheckableTag.tsx b/packages/product-components/src/components/SelectAssetModal/CheckableTag.tsx index 60d836cba8b..2ad8fc28648 100644 --- a/packages/product-components/src/components/SelectAssetModal/CheckableTag.tsx +++ b/packages/product-components/src/components/SelectAssetModal/CheckableTag.tsx @@ -1,3 +1,5 @@ +import styled, { DefaultTheme } from 'styled-components'; + import { UIVariant } from '@trezor/components/src/config/types'; import { borders, @@ -7,7 +9,6 @@ import { spacingsPx, typography, } from '@trezor/theme'; -import styled, { DefaultTheme } from 'styled-components'; export const tagVariants = ['primary', 'tertiary'] as const; export type TagVariant = Extract; diff --git a/packages/product-components/src/components/SelectAssetModal/NetworkTabs.tsx b/packages/product-components/src/components/SelectAssetModal/NetworkTabs.tsx index 9792e71f9c3..ddfe9308405 100644 --- a/packages/product-components/src/components/SelectAssetModal/NetworkTabs.tsx +++ b/packages/product-components/src/components/SelectAssetModal/NetworkTabs.tsx @@ -1,8 +1,11 @@ +import { FormattedMessage } from 'react-intl'; + +import styled from 'styled-components'; + import { AssetLogo, Row, Tooltip, useElevation } from '@trezor/components'; import { Elevation, mapElevationToBorder, spacings, spacingsPx } from '@trezor/theme'; + import { SelectAssetNetworkProps, SelectAssetSearchCategoryType } from './SelectAssetModal'; -import styled from 'styled-components'; -import { FormattedMessage } from 'react-intl'; import { CheckableTag } from './CheckableTag'; interface NetworkTabsWrapperProps { diff --git a/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.stories.tsx b/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.stories.tsx index 6a74a3394bf..8047029142d 100644 --- a/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.stories.tsx +++ b/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.stories.tsx @@ -1,9 +1,12 @@ +import { IntlProvider } from 'react-intl'; + import { Meta, StoryObj } from '@storybook/react'; -import { SelectAssetModal as SelectAssetModalComponent, SelectAssetModalProps } from '../../index'; import { ThemeProvider } from 'styled-components'; -import { intermediaryTheme, NewModal } from '@trezor/components'; import { action } from '@storybook/addon-actions'; -import { IntlProvider } from 'react-intl'; + +import { intermediaryTheme, NewModal } from '@trezor/components'; + +import { SelectAssetModal as SelectAssetModalComponent, SelectAssetModalProps } from '../../index'; import { selectAssetModalOptions, selectAssetModalNetworks } from './mockData'; const meta: Meta = { diff --git a/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx b/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx index f47e9a3acdc..d169d6b5b0d 100644 --- a/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx +++ b/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx @@ -1,4 +1,6 @@ import { useMemo, useState } from 'react'; +import { useIntl } from 'react-intl'; + import { AssetLogo, Column, @@ -9,11 +11,12 @@ import { VirtualizedList, } from '@trezor/components'; import { mapElevationToBackgroundToken, spacings } from '@trezor/theme'; +import { getNetworkByCoingeckoId, Network } from '@suite-common/wallet-config'; + import { AssetItem } from './AssetItem'; import { NetworkTabs } from './NetworkTabs'; -import { useIntl } from 'react-intl'; import { AssetItemNotFound } from './AssetItemNotFound'; -import { getNetworkByCoingeckoId, Network } from '@suite-common/wallet-config'; + export interface SelectAssetOptionCurrencyProps { type: 'currency'; diff --git a/packages/product-components/src/components/TokenIconSet/TokenIconSet.stories.tsx b/packages/product-components/src/components/TokenIconSet/TokenIconSet.stories.tsx index 0b8705b9356..9593ac33187 100644 --- a/packages/product-components/src/components/TokenIconSet/TokenIconSet.stories.tsx +++ b/packages/product-components/src/components/TokenIconSet/TokenIconSet.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { TokenIconSet as TokenIconSetComponent, TokenIconSetProps } from './TokenIconSet'; const getToken = (contract: string, symbol: string, decimals: number) => ({ diff --git a/packages/product-components/src/components/TokenIconSet/TokenIconSet.tsx b/packages/product-components/src/components/TokenIconSet/TokenIconSet.tsx index 29157d8d551..4a23a768c6f 100644 --- a/packages/product-components/src/components/TokenIconSet/TokenIconSet.tsx +++ b/packages/product-components/src/components/TokenIconSet/TokenIconSet.tsx @@ -1,9 +1,9 @@ +import styled, { css } from 'styled-components'; + import { AssetLogo, useElevation } from '@trezor/components'; import { getCoingeckoId, NetworkSymbol } from '@suite-common/wallet-config'; import { TokenInfo } from '@trezor/connect'; import { getContractAddressForNetwork } from '@suite-common/wallet-utils'; - -import styled, { css } from 'styled-components'; import { borders, Elevation, mapElevationToBackground, mapElevationToBorder } from '@trezor/theme'; export type TokenIconSetProps = { diff --git a/packages/product-components/src/components/TrezorLogo/TrezorLogo.stories.tsx b/packages/product-components/src/components/TrezorLogo/TrezorLogo.stories.tsx index 35990acb837..88e043b585b 100644 --- a/packages/product-components/src/components/TrezorLogo/TrezorLogo.stories.tsx +++ b/packages/product-components/src/components/TrezorLogo/TrezorLogo.stories.tsx @@ -1,4 +1,5 @@ import { Meta, StoryObj } from '@storybook/react'; + import { TrezorLogoProps, TrezorLogo as TrezorLogoComponent } from './TrezorLogo'; const meta: Meta = { diff --git a/packages/product-components/src/components/TrezorLogo/TrezorLogo.tsx b/packages/product-components/src/components/TrezorLogo/TrezorLogo.tsx index 5d94bf063eb..056cb3429a3 100644 --- a/packages/product-components/src/components/TrezorLogo/TrezorLogo.tsx +++ b/packages/product-components/src/components/TrezorLogo/TrezorLogo.tsx @@ -1,5 +1,7 @@ import { ReactSVG } from 'react-svg'; + import styled, { useTheme } from 'styled-components'; + import { LOGOS } from './trezorLogos'; export type TrezorLogoType = diff --git a/packages/product-components/src/components/TrezorLogo/trezorLogos.stories.tsx b/packages/product-components/src/components/TrezorLogo/trezorLogos.stories.tsx index 53415f80ee5..494737ab363 100644 --- a/packages/product-components/src/components/TrezorLogo/trezorLogos.stories.tsx +++ b/packages/product-components/src/components/TrezorLogo/trezorLogos.stories.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; import { Meta, StoryObj } from '@storybook/react'; -import { TrezorLogo } from './TrezorLogo'; + import { StoryColumn } from '@trezor/components'; +import { TrezorLogo } from './TrezorLogo'; + interface WrapperProps { isDark?: boolean; } diff --git a/packages/product-components/styled.d.ts b/packages/product-components/styled.d.ts index ff56311cfb2..83b3a85013a 100644 --- a/packages/product-components/styled.d.ts +++ b/packages/product-components/styled.d.ts @@ -1,6 +1,7 @@ // import original module declarations import 'styled-components'; import { BoxShadows, Colors } from '@trezor/theme'; + import { SuiteThemeColors } from './src/config/colors'; declare module 'styled-components' { diff --git a/packages/request-manager/e2e/identities-stress.ts b/packages/request-manager/e2e/identities-stress.ts index e8d2bc647e5..7d32df87dca 100644 --- a/packages/request-manager/e2e/identities-stress.ts +++ b/packages/request-manager/e2e/identities-stress.ts @@ -1,4 +1,5 @@ import path from 'path'; + import { createInterceptor, TorController } from '../src'; import { torRunner } from './torRunner'; diff --git a/packages/request-manager/src/httpPool.ts b/packages/request-manager/src/httpPool.ts index 7bf2450b825..fd678cc7756 100644 --- a/packages/request-manager/src/httpPool.ts +++ b/packages/request-manager/src/httpPool.ts @@ -1,4 +1,5 @@ import http from 'http'; + import { InterceptorOptions } from './types'; export const createRequestPool = (interceptorOptions: InterceptorOptions) => { diff --git a/packages/request-manager/src/interceptor.ts b/packages/request-manager/src/interceptor.ts index 00af5aef024..63afdabd7d5 100644 --- a/packages/request-manager/src/interceptor.ts +++ b/packages/request-manager/src/interceptor.ts @@ -2,7 +2,9 @@ import net from 'net'; import http from 'http'; import https from 'https'; import tls from 'tls'; + import { getWeakRandomId } from '@trezor/utils'; + import { TorIdentities } from './torIdentities'; import { InterceptorOptions } from './types'; import { createRequestPool } from './httpPool'; diff --git a/packages/request-manager/src/torControlPort.ts b/packages/request-manager/src/torControlPort.ts index b9f5b96492d..a309a2b3d97 100644 --- a/packages/request-manager/src/torControlPort.ts +++ b/packages/request-manager/src/torControlPort.ts @@ -3,7 +3,9 @@ import fs from 'fs'; import crypto from 'crypto'; import util from 'util'; import path from 'path'; + import { promiseAllSequence } from '@trezor/utils'; + import { TorConnectionOptions, TorCommandResponse } from './types'; const readFile = util.promisify(fs.readFile); diff --git a/packages/request-manager/src/torIdentities.ts b/packages/request-manager/src/torIdentities.ts index fd593ef17f0..0039c36d4a2 100644 --- a/packages/request-manager/src/torIdentities.ts +++ b/packages/request-manager/src/torIdentities.ts @@ -1,4 +1,5 @@ import { SocksProxyAgent } from 'socks-proxy-agent'; + import type { TorSettings } from './types'; export class TorIdentities { diff --git a/packages/suite-data/src/guide/parser.ts b/packages/suite-data/src/guide/parser.ts index c84a7fdd9e0..3dfaf61eb33 100644 --- a/packages/suite-data/src/guide/parser.ts +++ b/packages/suite-data/src/guide/parser.ts @@ -1,9 +1,10 @@ import { join } from 'path'; import * as fs from 'fs-extra'; +import type { GuideNode, GuideCategory } from '@suite-common/suite-types'; + import { GITBOOK_ASSETS_DIR_PREFIX } from './constants'; import { transformImagesMarkdown } from './transformer'; -import type { GuideNode, GuideCategory } from '@suite-common/suite-types'; /** @returns true if given path is a directory. */ const isDirectory = (path: string): boolean => fs.lstatSync(path).isDirectory(); diff --git a/packages/suite-desktop-api/src/__tests__/ipcRenderer.ts b/packages/suite-desktop-api/src/__tests__/ipcRenderer.ts index 4e7378355ca..16e27430450 100644 --- a/packages/suite-desktop-api/src/__tests__/ipcRenderer.ts +++ b/packages/suite-desktop-api/src/__tests__/ipcRenderer.ts @@ -1,7 +1,8 @@ import { EventEmitter } from 'events'; -import { StrictIpcRenderer } from '../ipc'; import type { IpcRendererEvent } from 'electron'; +import { StrictIpcRenderer } from '../ipc'; + class IpcRendererMock extends EventEmitter implements StrictIpcRenderer { send(..._args: any[]) {} invoke(...args: any[]) { diff --git a/packages/suite-desktop-api/src/factory.ts b/packages/suite-desktop-api/src/factory.ts index d4bbf4c07e4..4c04d51e30f 100644 --- a/packages/suite-desktop-api/src/factory.ts +++ b/packages/suite-desktop-api/src/factory.ts @@ -1,4 +1,5 @@ import type { IpcRendererEvent } from 'electron'; + import { DesktopApi, RendererChannels } from './api'; import { StrictIpcRenderer } from './ipc'; import * as validation from './validation'; diff --git a/packages/suite-storage/src/native/index.ts b/packages/suite-storage/src/native/index.ts index 6cf170be1c8..99f803780ff 100644 --- a/packages/suite-storage/src/native/index.ts +++ b/packages/suite-storage/src/native/index.ts @@ -7,6 +7,7 @@ import { IDBPDatabase, IDBPTransaction, } from 'idb'; + import { StorageMessageEvent } from './types'; export type OnUpgradeFunc = ( diff --git a/packages/suite-storage/src/web/index.ts b/packages/suite-storage/src/web/index.ts index 7fb56c31f6c..59dce9af61e 100644 --- a/packages/suite-storage/src/web/index.ts +++ b/packages/suite-storage/src/web/index.ts @@ -11,6 +11,7 @@ import { deleteDB, } from 'idb'; import { BroadcastChannel } from 'broadcast-channel'; + import { isFirefox } from '@trezor/env-utils'; import { createLazy } from '@trezor/utils'; diff --git a/packages/suite-web/e2e/cypress.config.ts b/packages/suite-web/e2e/cypress.config.ts index 38fd9d6da4a..7e992ade4b4 100644 --- a/packages/suite-web/e2e/cypress.config.ts +++ b/packages/suite-web/e2e/cypress.config.ts @@ -1,14 +1,12 @@ import { defineConfig } from 'cypress'; - import fs from 'fs'; import path from 'path'; import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin'; + import { BridgeTransport } from '@trezor/transport'; import * as messages from '@trezor/protobuf/src/messages'; - import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; import * as metadataUtils from '@trezor/suite/src/utils/suite/metadata'; - import { TrezorBridgeMock, DropboxMock, diff --git a/packages/suite-web/e2e/run_tests.ts b/packages/suite-web/e2e/run_tests.ts index 05a22837623..199f38f503e 100644 --- a/packages/suite-web/e2e/run_tests.ts +++ b/packages/suite-web/e2e/run_tests.ts @@ -7,6 +7,7 @@ import child_process from 'child_process'; import yargs from 'yargs/yargs'; import path from 'path'; import fs from 'fs'; + import { TrezorUserEnvLink } from '@trezor/trezor-user-env-link'; import cypressConfig from './cypress.config'; diff --git a/packages/suite-web/e2e/support/commands.ts b/packages/suite-web/e2e/support/commands.ts index db31c32eadb..6df886c3848 100644 --- a/packages/suite-web/e2e/support/commands.ts +++ b/packages/suite-web/e2e/support/commands.ts @@ -1,6 +1,8 @@ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-var-requires */ +import { SuiteAnalyticsEvent } from '@trezor/suite-analytics'; + import { onboardingShouldLoad, dashboardShouldLoad, @@ -30,7 +32,6 @@ import { clearInput, } from './utils/shortcuts'; import { interceptInvityApi } from './utils/intercept-invity-api'; -import { SuiteAnalyticsEvent } from '@trezor/suite-analytics'; import { EventPayload, Requests } from './types'; const command = require('cypress-image-snapshot/command'); diff --git a/packages/suite-web/e2e/support/utils/shortcuts.ts b/packages/suite-web/e2e/support/utils/shortcuts.ts index eaa5023ad20..cf8f47200a1 100644 --- a/packages/suite-web/e2e/support/utils/shortcuts.ts +++ b/packages/suite-web/e2e/support/utils/shortcuts.ts @@ -1,6 +1,7 @@ import { SuiteAnalyticsEvent } from '@trezor/suite-analytics'; import { urlSearchParams } from '@trezor/suite/src/utils/suite/metadata'; import { SUITE as SuiteActions } from '@trezor/suite/src/actions/suite/constants'; + import { EventPayload, Requests } from '../types'; import { onNavBar } from '../pageObjects/topBarObject'; diff --git a/packages/suite-web/e2e/tests/analytics/events.test.ts b/packages/suite-web/e2e/tests/analytics/events.test.ts index ec87ce0d797..e7d55f7c943 100644 --- a/packages/suite-web/e2e/tests/analytics/events.test.ts +++ b/packages/suite-web/e2e/tests/analytics/events.test.ts @@ -3,6 +3,7 @@ // @retry=2 import { EventType } from '@trezor/suite-analytics'; + import { ExtractByEventType, Requests } from '../../support/types'; import { onNavBar } from '../../support/pageObjects/topBarObject'; import { forceLightMode } from '../../support/utils/shortcuts'; diff --git a/packages/suite-web/e2e/tests/analytics/toggle.test.ts b/packages/suite-web/e2e/tests/analytics/toggle.test.ts index 97762f77f14..12ffc12e00f 100644 --- a/packages/suite-web/e2e/tests/analytics/toggle.test.ts +++ b/packages/suite-web/e2e/tests/analytics/toggle.test.ts @@ -3,6 +3,7 @@ import { EventType } from '@trezor/suite-analytics'; import { urlSearchParams } from '@trezor/suite/src/utils/suite/metadata'; + import { onNavBar } from '../../support/pageObjects/topBarObject'; type Requests = ReturnType[]; diff --git a/packages/suite-web/e2e/tests/backup/t2t1-fail.test.ts b/packages/suite-web/e2e/tests/backup/t2t1-fail.test.ts index 019ea0a1379..636ca378a06 100644 --- a/packages/suite-web/e2e/tests/backup/t2t1-fail.test.ts +++ b/packages/suite-web/e2e/tests/backup/t2t1-fail.test.ts @@ -1,4 +1,5 @@ import { EventType } from '@trezor/suite-analytics'; + import { ExtractByEventType, Requests } from '../../support/types'; // @group_device-management diff --git a/packages/suite-web/e2e/tests/backup/t2t1-success.test.ts b/packages/suite-web/e2e/tests/backup/t2t1-success.test.ts index d969fa7bccd..df63e5243e0 100644 --- a/packages/suite-web/e2e/tests/backup/t2t1-success.test.ts +++ b/packages/suite-web/e2e/tests/backup/t2t1-success.test.ts @@ -1,4 +1,5 @@ import { EventType } from '@trezor/suite-analytics'; + import { ExtractByEventType, Requests } from '../../support/types'; // @group_device-management diff --git a/packages/suite-web/e2e/tests/dashboard/assets.test.ts b/packages/suite-web/e2e/tests/dashboard/assets.test.ts index ba070871341..d3760702813 100644 --- a/packages/suite-web/e2e/tests/dashboard/assets.test.ts +++ b/packages/suite-web/e2e/tests/dashboard/assets.test.ts @@ -2,6 +2,7 @@ // @retry=2 import { EventType } from '@trezor/suite-analytics'; + import { ExtractByEventType, Requests } from '../../support/types'; import { onNavBar } from '../../support/pageObjects/topBarObject'; diff --git a/packages/suite-web/e2e/tests/dashboard/discreet-mode.test.ts b/packages/suite-web/e2e/tests/dashboard/discreet-mode.test.ts index a872815465d..7f88d021a3b 100644 --- a/packages/suite-web/e2e/tests/dashboard/discreet-mode.test.ts +++ b/packages/suite-web/e2e/tests/dashboard/discreet-mode.test.ts @@ -2,6 +2,7 @@ // @retry=2 import { EventType } from '@trezor/suite-analytics'; + import { ExtractByEventType, Requests } from '../../support/types'; let requests: Requests; diff --git a/packages/suite-web/e2e/tests/settings/coins.test.ts b/packages/suite-web/e2e/tests/settings/coins.test.ts index 061aff3b6e2..84827cc992a 100644 --- a/packages/suite-web/e2e/tests/settings/coins.test.ts +++ b/packages/suite-web/e2e/tests/settings/coins.test.ts @@ -2,6 +2,7 @@ // @retry=2 import { EventType } from '@trezor/suite-analytics'; + import { ExtractByEventType, Requests } from '../../support/types'; import { onNavBar } from '../../support/pageObjects/topBarObject'; diff --git a/packages/suite-web/e2e/tests/settings/general.test.ts b/packages/suite-web/e2e/tests/settings/general.test.ts index bebcc949876..644cc5ef681 100644 --- a/packages/suite-web/e2e/tests/settings/general.test.ts +++ b/packages/suite-web/e2e/tests/settings/general.test.ts @@ -3,6 +3,7 @@ // @retry=2 import { EventType } from '@trezor/suite-analytics'; + import { ExtractByEventType, Requests } from '../../support/types'; import { onNavBar } from '../../support/pageObjects/topBarObject'; import { onSettingGeneralPage } from '../../support/pageObjects/settings/settingsGeneralObject'; diff --git a/packages/suite-web/e2e/tests/suite/passphrase.test.ts b/packages/suite-web/e2e/tests/suite/passphrase.test.ts index 6c7bb33332f..68d127f90e6 100644 --- a/packages/suite-web/e2e/tests/suite/passphrase.test.ts +++ b/packages/suite-web/e2e/tests/suite/passphrase.test.ts @@ -1,6 +1,7 @@ // @group_passphrase // @retry=2 import { EventType } from '@trezor/suite-analytics'; + import { ExtractByEventType, Requests } from '../../support/types'; let requests: Requests; diff --git a/packages/suite-web/e2e/tests/wallet/add-account-types.test.ts b/packages/suite-web/e2e/tests/wallet/add-account-types.test.ts index f1780b29533..628e529743f 100644 --- a/packages/suite-web/e2e/tests/wallet/add-account-types.test.ts +++ b/packages/suite-web/e2e/tests/wallet/add-account-types.test.ts @@ -1,11 +1,12 @@ // @group_wallet // @retry=2 +import { NetworkSymbol } from '@suite-common/wallet-config'; +import { EventType } from '@trezor/suite-analytics'; + import { onAccountsPage } from '../../support/pageObjects/accountsObject'; import { onSettingsCryptoPage } from '../../support/pageObjects/settings/settingsCryptoObject'; import { onNavBar } from '../../support/pageObjects/topBarObject'; -import { NetworkSymbol } from '@suite-common/wallet-config'; -import { EventType } from '@trezor/suite-analytics'; import { ExtractByEventType, Requests } from '../../support/types'; let requests: Requests; diff --git a/packages/suite-web/e2e/tests/wallet/check-coins-xpub.test.ts b/packages/suite-web/e2e/tests/wallet/check-coins-xpub.test.ts index f2410270e93..def19b1f335 100644 --- a/packages/suite-web/e2e/tests/wallet/check-coins-xpub.test.ts +++ b/packages/suite-web/e2e/tests/wallet/check-coins-xpub.test.ts @@ -2,6 +2,7 @@ // @retry=2 import { NetworkSymbol } from '@suite-common/wallet-config'; + import { onAccountsPage } from '../../support/pageObjects/accountsObject'; describe('Check coins XPUB', () => { diff --git a/packages/suite-web/e2e/tests/wallet/export-transactions.test.ts b/packages/suite-web/e2e/tests/wallet/export-transactions.test.ts index a6f103b2723..5159a39681c 100644 --- a/packages/suite-web/e2e/tests/wallet/export-transactions.test.ts +++ b/packages/suite-web/e2e/tests/wallet/export-transactions.test.ts @@ -2,6 +2,7 @@ // @retry=2 import { NetworkSymbol } from '@suite-common/wallet-config'; + import { onAccountsPage } from '../../support/pageObjects/accountsObject'; import { onSettingsCryptoPage } from '../../support/pageObjects/settings/settingsCryptoObject'; diff --git a/packages/suite-web/src/Main.tsx b/packages/suite-web/src/Main.tsx index 3edcda628c4..9b13e15d91e 100644 --- a/packages/suite-web/src/Main.tsx +++ b/packages/suite-web/src/Main.tsx @@ -1,12 +1,15 @@ -import { createRoot } from 'react-dom/client'; import { Provider as ReduxProvider } from 'react-redux'; import { Router as RouterProvider } from 'react-router-dom'; +import { HelmetProvider } from 'react-helmet-async'; + +import { createRoot } from 'react-dom/client'; import { init as initSentry } from '@sentry/browser'; -import { initStore } from 'src/reducers/store'; -import { preloadStore } from 'src/support/suite/preloadStore'; import { SENTRY_CONFIG } from '@suite-common/sentry'; +import { FormatterProvider } from '@suite-common/formatters'; +import { initStore } from 'src/reducers/store'; +import { preloadStore } from 'src/support/suite/preloadStore'; import { Metadata, Preloader, ToastContainer } from 'src/components/suite'; import { ConnectedIntlProvider } from 'src/support/suite/ConnectedIntlProvider'; import Resize from 'src/support/suite/Resize'; @@ -24,8 +27,8 @@ import { ModalContextProvider } from 'src/support/suite/ModalContext'; import AppRouter from './support/Router'; import { useCypress } from './support/useCypress'; -import { FormatterProvider } from '@suite-common/formatters'; -import { HelmetProvider } from 'react-helmet-async'; + + const Main = () => { useCypress(); diff --git a/packages/suite-web/src/support/Router.tsx b/packages/suite-web/src/support/Router.tsx index 2a4a8054c1c..5e09600f4b3 100644 --- a/packages/suite-web/src/support/Router.tsx +++ b/packages/suite-web/src/support/Router.tsx @@ -1,9 +1,10 @@ import { lazy, memo, Suspense, LazyExoticComponent, ComponentType } from 'react'; import { Switch, Route } from 'react-router-dom'; +import { PageName } from '@suite-common/suite-types'; + import routes from 'src/constants/suite/routes'; import { BundleLoader } from 'src/components/suite'; -import { PageName } from '@suite-common/suite-types'; const components: Record>> = { 'suite-index': lazy(() => diff --git a/packages/suite-web/src/support/useCypress.ts b/packages/suite-web/src/support/useCypress.ts index 504deccd289..f350a472f15 100644 --- a/packages/suite-web/src/support/useCypress.ts +++ b/packages/suite-web/src/support/useCypress.ts @@ -1,7 +1,8 @@ import { useEffect } from 'react'; -import TrezorConnect from '@trezor/connect'; import { useStore } from 'react-redux'; +import TrezorConnect from '@trezor/connect'; + /** * Utility for running tests in Cypress. * Used to augment window object with redux store and TrezorConnect instance to make it accessible in tests diff --git a/packages/suite/src/actions/onboarding/__tests__/onboardingActions.test.ts b/packages/suite/src/actions/onboarding/__tests__/onboardingActions.test.ts index d1155e68cd8..900caae8c0b 100644 --- a/packages/suite/src/actions/onboarding/__tests__/onboardingActions.test.ts +++ b/packages/suite/src/actions/onboarding/__tests__/onboardingActions.test.ts @@ -1,11 +1,11 @@ import { configureStore } from 'src/support/tests/configureStore'; - import onboardingReducer from 'src/reducers/onboarding/onboardingReducer'; import suiteReducer from 'src/reducers/suite/suiteReducer'; import recoveryReducer from 'src/reducers/recovery/recoveryReducer'; +import { Action } from 'src/types/suite'; + import fixtures from '../__fixtures__/onboardingActions'; -import { Action } from 'src/types/suite'; // todo fighting with typescript here. How to keep string literal being exported from fixtures and not converted // to string? if exported as const, it makes all properties readonly and thus not assignable to reducer which diff --git a/packages/suite/src/actions/recovery/recoveryActions.ts b/packages/suite/src/actions/recovery/recoveryActions.ts index 991ae26435d..512f52e43b1 100644 --- a/packages/suite/src/actions/recovery/recoveryActions.ts +++ b/packages/suite/src/actions/recovery/recoveryActions.ts @@ -8,6 +8,7 @@ import * as routerActions from 'src/actions/suite/routerActions'; import { Dispatch, GetState } from 'src/types/suite'; import { WordCount } from 'src/types/recovery'; import { DEFAULT_PASSPHRASE_PROTECTION } from 'src/constants/suite/device'; + import { isRecoveryInProgress } from '../../utils/device/isRecoveryInProgress'; export type SeedInputStatus = diff --git a/packages/suite/src/actions/settings/__fixtures__/deviceSettings.ts b/packages/suite/src/actions/settings/__fixtures__/deviceSettings.ts index 2b0acce7d4a..159b6ce2095 100644 --- a/packages/suite/src/actions/settings/__fixtures__/deviceSettings.ts +++ b/packages/suite/src/actions/settings/__fixtures__/deviceSettings.ts @@ -1,3 +1,5 @@ +import assert from 'assert'; + import { testMocks } from '@suite-common/test-utils'; import { notificationsActions } from '@suite-common/toast-notifications'; import { @@ -5,14 +7,13 @@ import { deviceActions, prepareDeviceReducer, } from '@suite-common/wallet-core'; -import suiteReducer from 'src/reducers/suite/suiteReducer'; +import { TrezorDevice } from '@suite-common/suite-types'; +import { Response } from '@trezor/connect'; +import suiteReducer from 'src/reducers/suite/suiteReducer'; import { extraDependencies } from 'src/support/extraDependencies'; import * as deviceSettingsActions from '../deviceSettingsActions'; -import { TrezorDevice } from '@suite-common/suite-types'; -import { Response } from '@trezor/connect'; -import assert from 'assert'; const { getSuiteDevice } = testMocks; diff --git a/packages/suite/src/actions/settings/__tests__/walletSettingsActions.test.ts b/packages/suite/src/actions/settings/__tests__/walletSettingsActions.test.ts index 0c163392e49..54c672f6644 100644 --- a/packages/suite/src/actions/settings/__tests__/walletSettingsActions.test.ts +++ b/packages/suite/src/actions/settings/__tests__/walletSettingsActions.test.ts @@ -3,6 +3,7 @@ import { testMocks } from '@suite-common/test-utils'; import { configureStore } from 'src/support/tests/configureStore'; import settingsReducer from 'src/reducers/wallet/settingsReducer'; import suiteReducer from 'src/reducers/suite/suiteReducer'; + import fixtures from '../__fixtures__/walletSettings'; const getInitialState = (settings?: any) => ({ diff --git a/packages/suite/src/actions/settings/deviceSettingsActions.ts b/packages/suite/src/actions/settings/deviceSettingsActions.ts index 38abe426527..fd9e7a22fc9 100644 --- a/packages/suite/src/actions/settings/deviceSettingsActions.ts +++ b/packages/suite/src/actions/settings/deviceSettingsActions.ts @@ -8,12 +8,13 @@ import * as deviceUtils from '@suite-common/suite-utils'; import TrezorConnect, { ERRORS } from '@trezor/connect'; import { analytics, EventType } from '@trezor/suite-analytics'; import { notificationsActions } from '@suite-common/toast-notifications'; +import { createThunk } from '@suite-common/redux-utils'; import * as modalActions from 'src/actions/suite/modalActions'; import * as routerActions from 'src/actions/suite/routerActions'; import { Dispatch, GetState } from 'src/types/suite'; import * as DEVICE from 'src/constants/suite/device'; -import { createThunk } from '@suite-common/redux-utils'; + import { selectSuiteSettings } from '../../reducers/suite/suiteReducer'; export const applySettings = diff --git a/packages/suite/src/actions/settings/walletSettingsActions.ts b/packages/suite/src/actions/settings/walletSettingsActions.ts index 7629af34b78..f3000ecedac 100644 --- a/packages/suite/src/actions/settings/walletSettingsActions.ts +++ b/packages/suite/src/actions/settings/walletSettingsActions.ts @@ -1,13 +1,14 @@ -import * as suiteActions from 'src/actions/suite/suiteActions'; -import { Dispatch, GetState } from 'src/types/suite'; -import { NetworkSymbol } from '@suite-common/wallet-config'; import { createAction } from '@reduxjs/toolkit'; +import { NetworkSymbol } from '@suite-common/wallet-config'; import { UNIT_ABBREVIATIONS } from '@suite-common/suite-constants'; import { FeeLevel, PROTO } from '@trezor/connect'; import { analytics, EventType } from '@trezor/suite-analytics'; import { FiatCurrencyCode } from '@suite-common/suite-config'; +import { Dispatch, GetState } from 'src/types/suite'; +import * as suiteActions from 'src/actions/suite/suiteActions'; + import { WALLET_SETTINGS } from './constants'; export const setLocalCurrency = createAction( diff --git a/packages/suite/src/actions/suite/__tests__/analyticsActions.test.ts b/packages/suite/src/actions/suite/__tests__/analyticsActions.test.ts index f24104682e7..6b61098f2f9 100644 --- a/packages/suite/src/actions/suite/__tests__/analyticsActions.test.ts +++ b/packages/suite/src/actions/suite/__tests__/analyticsActions.test.ts @@ -1,8 +1,9 @@ +import { prepareAnalyticsReducer, analyticsActions } from '@suite-common/analytics'; + import { extraDependencies } from 'src/support/extraDependencies'; import { configureStore } from 'src/support/tests/configureStore'; import { init } from 'src/actions/suite/analyticsActions'; -import { prepareAnalyticsReducer, analyticsActions } from '@suite-common/analytics'; const analyticsReducer = prepareAnalyticsReducer(extraDependencies); diff --git a/packages/suite/src/actions/suite/__tests__/protocolActions.test.ts b/packages/suite/src/actions/suite/__tests__/protocolActions.test.ts index f56ab070b5c..ff920c45a52 100644 --- a/packages/suite/src/actions/suite/__tests__/protocolActions.test.ts +++ b/packages/suite/src/actions/suite/__tests__/protocolActions.test.ts @@ -1,9 +1,9 @@ import { testMocks } from '@suite-common/test-utils'; +import { NETWORK_TO_PROTOCOLS } from '@suite-common/suite-constants'; import { configureStore } from 'src/support/tests/configureStore'; import protocolReducer, { State as ProtocolState } from 'src/reducers/suite/protocolReducer'; -import { NETWORK_TO_PROTOCOLS } from '@suite-common/suite-constants'; import * as protocolActions from '../protocolActions'; import * as protocolConstants from '../constants/protocolConstants'; diff --git a/packages/suite/src/actions/suite/__tests__/resizeActions.test.ts b/packages/suite/src/actions/suite/__tests__/resizeActions.test.ts index a0e82955f65..31a7ab79640 100644 --- a/packages/suite/src/actions/suite/__tests__/resizeActions.test.ts +++ b/packages/suite/src/actions/suite/__tests__/resizeActions.test.ts @@ -1,5 +1,4 @@ import { configureStore } from 'src/support/tests/configureStore'; - import resizeReducer, { State as ResizeState } from 'src/reducers/suite/resizeReducer'; import * as resizeActions from 'src/actions/suite/resizeActions'; diff --git a/packages/suite/src/actions/suite/__tests__/routerActions.test.ts b/packages/suite/src/actions/suite/__tests__/routerActions.test.ts index 46d65e32ae5..d3764856667 100644 --- a/packages/suite/src/actions/suite/__tests__/routerActions.test.ts +++ b/packages/suite/src/actions/suite/__tests__/routerActions.test.ts @@ -1,12 +1,12 @@ /* eslint-disable @typescript-eslint/no-var-requires */ import { configureStore } from 'src/support/tests/configureStore'; - import suiteReducer from 'src/reducers/suite/suiteReducer'; import routerReducer from 'src/reducers/suite/routerReducer'; import modalReducer from 'src/reducers/suite/modalReducer'; +import { AppState } from 'src/reducers/store'; + import * as fixtures from '../__fixtures__/routerActions'; import * as routerActions from '../routerActions'; -import { AppState } from 'src/reducers/store'; type SuiteState = ReturnType; type RouterState = ReturnType; diff --git a/packages/suite/src/actions/suite/analyticsActions.ts b/packages/suite/src/actions/suite/analyticsActions.ts index 222a4423b6a..066fd4ad3b7 100644 --- a/packages/suite/src/actions/suite/analyticsActions.ts +++ b/packages/suite/src/actions/suite/analyticsActions.ts @@ -3,10 +3,7 @@ * @docs docs/misc/analytics.md */ -import { allowSentryReport, setSentryUser } from 'src/utils/suite/sentry'; import { getEnvironment, getCommitHash, isCodesignBuild } from '@trezor/env-utils'; -import type { Dispatch, GetState } from 'src/types/suite'; - import { analyticsActions, selectHasUserAllowedTracking, @@ -17,6 +14,9 @@ import { import { getTrackingRandomId } from '@trezor/analytics'; import { analytics, EventType } from '@trezor/suite-analytics'; +import type { Dispatch, GetState } from 'src/types/suite'; +import { allowSentryReport, setSentryUser } from 'src/utils/suite/sentry'; + export const enableAnalyticsThunk = () => (dispatch: Dispatch) => { analytics.report({ type: EventType.SettingsAnalytics, payload: { value: true } }); allowSentryReport(true); diff --git a/packages/suite/src/actions/suite/desktopUpdateActions.ts b/packages/suite/src/actions/suite/desktopUpdateActions.ts index 5a3c3c046ba..a57299f39ad 100644 --- a/packages/suite/src/actions/suite/desktopUpdateActions.ts +++ b/packages/suite/src/actions/suite/desktopUpdateActions.ts @@ -1,12 +1,12 @@ import { analytics, AppUpdateEventStatus, EventType } from '@trezor/suite-analytics'; +import { desktopApi, UpdateInfo, UpdateProgress } from '@trezor/suite-desktop-api'; +import { notificationsActions } from '@suite-common/toast-notifications'; import { DESKTOP_UPDATE } from 'src/actions/suite/constants'; import { Dispatch, GetState } from 'src/types/suite'; import { UpdateState, UpdateModalVisibility } from 'src/reducers/suite/desktopUpdateReducer'; import { getAppUpdatePayload } from 'src/utils/suite/analytics'; -import { desktopApi, UpdateInfo, UpdateProgress } from '@trezor/suite-desktop-api'; -import { notificationsActions } from '@suite-common/toast-notifications'; export type DesktopUpdateAction = | { type: typeof DESKTOP_UPDATE.CHECKING } diff --git a/packages/suite/src/actions/suite/guideActions.ts b/packages/suite/src/actions/suite/guideActions.ts index 7f714683ec3..86730ea9534 100644 --- a/packages/suite/src/actions/suite/guideActions.ts +++ b/packages/suite/src/actions/suite/guideActions.ts @@ -1,5 +1,4 @@ import { analytics, EventType } from '@trezor/suite-analytics'; - import type { ActiveView, Feedback, @@ -11,6 +10,7 @@ import { notificationsActions } from '@suite-common/toast-notifications'; import { isCodesignBuild } from '@trezor/env-utils'; import { Dispatch } from 'src/types/suite'; + import { GUIDE } from './constants'; export type GuideAction = diff --git a/packages/suite/src/actions/suite/initAction.ts b/packages/suite/src/actions/suite/initAction.ts index 79ae4741804..4afb3b83757 100644 --- a/packages/suite/src/actions/suite/initAction.ts +++ b/packages/suite/src/actions/suite/initAction.ts @@ -8,6 +8,8 @@ import { updateMissingTxFiatRatesThunk, } from '@suite-common/wallet-core'; import { periodicCheckTokenDefinitionsThunk } from '@suite-common/token-definitions'; +import { desktopApi } from '@trezor/suite-desktop-api'; +import { isDesktop } from '@trezor/env-utils'; import * as routerActions from 'src/actions/suite/routerActions'; import * as analyticsActions from 'src/actions/suite/analyticsActions'; @@ -17,8 +19,6 @@ import type { Dispatch, GetState } from 'src/types/suite'; import { SUITE } from './constants'; import { onSuiteReady, setFlag } from './suiteActions'; -import { desktopApi } from '@trezor/suite-desktop-api'; -import { isDesktop } from '@trezor/env-utils'; export const init = () => async (dispatch: Dispatch, getState: GetState) => { const { diff --git a/packages/suite/src/actions/suite/metadataActions.ts b/packages/suite/src/actions/suite/metadataActions.ts index 2cb84a30e0f..d38735df649 100644 --- a/packages/suite/src/actions/suite/metadataActions.ts +++ b/packages/suite/src/actions/suite/metadataActions.ts @@ -1,6 +1,8 @@ import { createAction } from '@reduxjs/toolkit'; import { selectDevices } from '@suite-common/wallet-core'; +import { Account } from '@suite-common/wallet-types'; +import { StaticSessionId } from '@trezor/connect'; import { METADATA, METADATA_LABELING } from 'src/actions/suite/constants'; import { Dispatch, GetState } from 'src/types/suite'; @@ -14,9 +16,8 @@ import { } from 'src/types/suite/metadata'; import * as metadataUtils from 'src/utils/suite/metadata'; import { selectSelectedProviderForLabels } from 'src/reducers/suite/metadataReducer'; -import { Account } from '@suite-common/wallet-types'; import type { AbstractMetadataProvider, PasswordManagerState } from 'src/types/suite/metadata'; -import { StaticSessionId } from '@trezor/connect'; + export type MetadataAction = | { type: typeof METADATA.ENABLE } diff --git a/packages/suite/src/actions/suite/metadataLabelingActions.ts b/packages/suite/src/actions/suite/metadataLabelingActions.ts index 2f0c1f8c1b7..a46740a0607 100644 --- a/packages/suite/src/actions/suite/metadataLabelingActions.ts +++ b/packages/suite/src/actions/suite/metadataLabelingActions.ts @@ -1,6 +1,5 @@ import TrezorConnect, { StaticSessionId } from '@trezor/connect'; import { cloneObject } from '@trezor/utils'; - import { selectDevices, selectDevice, diff --git a/packages/suite/src/actions/suite/metadataPasswordsActions.ts b/packages/suite/src/actions/suite/metadataPasswordsActions.ts index dc801caa908..d025e3b6126 100644 --- a/packages/suite/src/actions/suite/metadataPasswordsActions.ts +++ b/packages/suite/src/actions/suite/metadataPasswordsActions.ts @@ -12,7 +12,6 @@ import { selectSelectedProviderForPasswords } from 'src/reducers/suite/metadataR import * as metadataActions from './metadataActions'; import * as metadataProviderActions from './metadataProviderActions'; - import type { FetchIntervalTrackingId } from './metadataProviderActions'; export const fetchPasswords = diff --git a/packages/suite/src/actions/suite/metadataProviderActions.ts b/packages/suite/src/actions/suite/metadataProviderActions.ts index e6f7bf0ead0..1dac615e0d2 100644 --- a/packages/suite/src/actions/suite/metadataProviderActions.ts +++ b/packages/suite/src/actions/suite/metadataProviderActions.ts @@ -1,6 +1,7 @@ import { analytics, EventType } from '@trezor/suite-analytics'; import { createDeferred } from '@trezor/utils'; import { notificationsActions } from '@suite-common/toast-notifications'; +import { Device } from '@trezor/connect'; import { METADATA, METADATA_PROVIDER } from 'src/actions/suite/constants'; import { Dispatch, GetState } from 'src/types/suite'; @@ -17,10 +18,9 @@ import * as modalActions from 'src/actions/suite/modalActions'; import DropboxProvider from 'src/services/suite/metadata/DropboxProvider'; import GoogleProvider from 'src/services/suite/metadata/GoogleProvider'; import FileSystemProvider from 'src/services/suite/metadata/FileSystemProvider'; -import { InMemoryTestProvider } from '../../services/suite/metadata/InMemoryTestProvider'; +import { InMemoryTestProvider } from '../../services/suite/metadata/InMemoryTestProvider'; import * as metadataActions from './metadataActions'; -import { Device } from '@trezor/connect'; export type MetadataAction = { type: typeof METADATA.SET_SELECTED_PROVIDER; diff --git a/packages/suite/src/actions/suite/protocolActions.ts b/packages/suite/src/actions/suite/protocolActions.ts index 9d5b6fa994f..66104dda02d 100644 --- a/packages/suite/src/actions/suite/protocolActions.ts +++ b/packages/suite/src/actions/suite/protocolActions.ts @@ -1,13 +1,15 @@ -import { PROTOCOL } from './constants'; -import { CoinProtocolInfo, getProtocolInfo } from 'src/utils/suite/protocol'; -import type { Dispatch } from 'src/types/suite'; import { Protocol } from '@suite-common/suite-constants'; import { getNetworkSymbolForProtocol } from '@suite-common/suite-utils'; +import { notificationsActions } from '@suite-common/toast-notifications'; +import { SUITE_BRIDGE_DEEPLINK } from '@trezor/urls'; +import { CoinProtocolInfo, getProtocolInfo } from 'src/utils/suite/protocol'; +import type { Dispatch } from 'src/types/suite'; import type { SendFormState } from 'src/reducers/suite/protocolReducer'; -import { notificationsActions } from '@suite-common/toast-notifications'; import * as routerActions from 'src/actions/suite/routerActions'; -import { SUITE_BRIDGE_DEEPLINK } from '@trezor/urls'; + + +import { PROTOCOL } from './constants'; export type ProtocolAction = | { diff --git a/packages/suite/src/actions/suite/storageActions.ts b/packages/suite/src/actions/suite/storageActions.ts index 495494d4c44..04d67b5a7a6 100644 --- a/packages/suite/src/actions/suite/storageActions.ts +++ b/packages/suite/src/actions/suite/storageActions.ts @@ -1,13 +1,16 @@ import { FieldValues } from 'react-hook-form'; import { cloneObject } from '@trezor/utils'; - import { Discovery, FormDraftKeyPrefix } from '@suite-common/wallet-types'; import { notificationsActions } from '@suite-common/toast-notifications'; import { selectHistoricRatesByTransactions, getFormDraftKey } from '@suite-common/wallet-utils'; import { FormDraftPrefixKeyValues } from '@suite-common/wallet-constants'; import { isDeviceAcquired } from '@suite-common/suite-utils'; import { selectDevices, deviceActions } from '@suite-common/wallet-core'; +import { NetworkSymbol } from '@suite-common/wallet-config'; +import type { FormState, RatesByTimestamps } from '@suite-common/wallet-types'; +import { MetadataState } from '@suite-common/metadata-types'; +import { DefinitionType, TokenManagementAction } from '@suite-common/token-definitions'; import { db } from 'src/storage'; import { @@ -17,8 +20,6 @@ import { } from 'src/utils/suite/storage'; import type { AppState, Dispatch, GetState, TrezorDevice } from 'src/types/suite'; import type { Account } from 'src/types/wallet'; -import { NetworkSymbol } from '@suite-common/wallet-config'; -import type { FormState, RatesByTimestamps } from '@suite-common/wallet-types'; import type { Trade } from 'src/types/wallet/coinmarketCommonTypes'; import type { PreloadStoreAction } from 'src/support/suite/preloadStore'; import { GraphData } from 'src/types/wallet/graph'; @@ -26,8 +27,6 @@ import { deviceGraphDataFilterFn } from 'src/utils/wallet/graph'; import { selectCoinjoinAccountByKey } from 'src/reducers/wallet/coinjoinReducer'; import { STORAGE } from './constants'; -import { MetadataState } from '@suite-common/metadata-types'; -import { DefinitionType, TokenManagementAction } from '@suite-common/token-definitions'; import { selectSuiteSettings } from '../../reducers/suite/suiteReducer'; export type StorageAction = NonNullable; diff --git a/packages/suite/src/actions/wallet/__fixtures__/coinjoinAccountActions.ts b/packages/suite/src/actions/wallet/__fixtures__/coinjoinAccountActions.ts index e7bb0de6411..f47bb195269 100644 --- a/packages/suite/src/actions/wallet/__fixtures__/coinjoinAccountActions.ts +++ b/packages/suite/src/actions/wallet/__fixtures__/coinjoinAccountActions.ts @@ -1,5 +1,6 @@ import { notificationsActions } from '@suite-common/toast-notifications'; import { accountsActions } from '@suite-common/wallet-core'; + import { Account } from 'src/types/wallet'; import * as COINJOIN from 'src/actions/wallet/constants/coinjoinConstants'; diff --git a/packages/suite/src/actions/wallet/__fixtures__/mockCoinjoinService.ts b/packages/suite/src/actions/wallet/__fixtures__/mockCoinjoinService.ts index c0f2af5ea1a..85937678064 100644 --- a/packages/suite/src/actions/wallet/__fixtures__/mockCoinjoinService.ts +++ b/packages/suite/src/actions/wallet/__fixtures__/mockCoinjoinService.ts @@ -1,4 +1,5 @@ import { EventEmitter } from 'events'; + import { NetworkSymbol } from '@suite-common/wallet-config'; export const mockCoinjoinService = () => { diff --git a/packages/suite/src/actions/wallet/__fixtures__/moveLabelsForRbf/moveLabelsForRbfMetadataState.fixture.ts b/packages/suite/src/actions/wallet/__fixtures__/moveLabelsForRbf/moveLabelsForRbfMetadataState.fixture.ts index c1569557cdd..de9bead12bd 100644 --- a/packages/suite/src/actions/wallet/__fixtures__/moveLabelsForRbf/moveLabelsForRbfMetadataState.fixture.ts +++ b/packages/suite/src/actions/wallet/__fixtures__/moveLabelsForRbf/moveLabelsForRbfMetadataState.fixture.ts @@ -1,4 +1,5 @@ import { MetadataState } from '@suite-common/metadata-types'; + import { originalTransactionSpendAccount, chainSpendingReceivedCoins, diff --git a/packages/suite/src/actions/wallet/__fixtures__/moveLabelsForRbf/moveLabelsForRbfTransactions.fixture.ts b/packages/suite/src/actions/wallet/__fixtures__/moveLabelsForRbf/moveLabelsForRbfTransactions.fixture.ts index 90ef5cf22a8..6eeae1c9e02 100644 --- a/packages/suite/src/actions/wallet/__fixtures__/moveLabelsForRbf/moveLabelsForRbfTransactions.fixture.ts +++ b/packages/suite/src/actions/wallet/__fixtures__/moveLabelsForRbf/moveLabelsForRbfTransactions.fixture.ts @@ -1,5 +1,6 @@ import { TransactionsRootState } from '@suite-common/wallet-core'; import { WalletAccountTransaction } from '@suite-common/wallet-types'; + import { accountReceivingCoins, accountSpendingCoins } from './moveLabelsForRbfAccounts.fixture'; export const originalTransactionSpendAccount: WalletAccountTransaction = { diff --git a/packages/suite/src/actions/wallet/__fixtures__/receiveActions.ts b/packages/suite/src/actions/wallet/__fixtures__/receiveActions.ts index 7cb2e22b43e..66f74976dbb 100644 --- a/packages/suite/src/actions/wallet/__fixtures__/receiveActions.ts +++ b/packages/suite/src/actions/wallet/__fixtures__/receiveActions.ts @@ -1,12 +1,12 @@ import { connectInitThunk } from '@suite-common/connect-init'; import { testMocks } from '@suite-common/test-utils'; import { notificationsActions } from '@suite-common/toast-notifications'; +import { confirmAddressOnDeviceThunk } from '@suite-common/wallet-core'; import * as receiveActions from 'src/actions/wallet/receiveActions'; import { MODAL, SUITE } from 'src/actions/suite/constants'; import { RECEIVE } from '../constants'; -import { confirmAddressOnDeviceThunk } from '@suite-common/wallet-core'; const PATH = "m/49'/0'/0'/0/0"; const ADDRESS = 'AddRe5s'; diff --git a/packages/suite/src/actions/wallet/__tests__/cardanoStakingActions.test.ts b/packages/suite/src/actions/wallet/__tests__/cardanoStakingActions.test.ts index fc66de6269a..faea584433b 100644 --- a/packages/suite/src/actions/wallet/__tests__/cardanoStakingActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/cardanoStakingActions.test.ts @@ -1,13 +1,15 @@ +import { getUnixTime } from 'date-fns'; + import { testMocks } from '@suite-common/test-utils'; -import { configureStore } from 'src/support/tests/configureStore'; +import { BlockchainBlock } from '@trezor/connect'; +import { configureStore } from 'src/support/tests/configureStore'; import cardanoStakingReducer from 'src/reducers/wallet/cardanoStakingReducer'; import * as cardanoStakingActions from 'src/actions/wallet/cardanoStakingActions'; -import { CARDANO_STAKING } from '../constants'; import { WalletAccountTransaction } from 'src/types/wallet'; -import { BlockchainBlock } from '@trezor/connect'; import { transactionsReducer } from 'src/reducers/wallet'; -import { getUnixTime } from 'date-fns'; + +import { CARDANO_STAKING } from '../constants'; const { getSuiteDevice } = testMocks; const cardanoAccount = testMocks.getWalletAccount({ diff --git a/packages/suite/src/actions/wallet/__tests__/coinmarketBuyActions.test.ts b/packages/suite/src/actions/wallet/__tests__/coinmarketBuyActions.test.ts index 1a15faaedd5..ca4e4683d0f 100644 --- a/packages/suite/src/actions/wallet/__tests__/coinmarketBuyActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/coinmarketBuyActions.test.ts @@ -1,10 +1,10 @@ -import { configureStore } from 'src/support/tests/configureStore'; +import { BuyTrade, BuyTradeQuoteRequest, CryptoId } from 'invity-api'; +import { configureStore } from 'src/support/tests/configureStore'; import { coinmarketReducer } from 'src/reducers/wallet/coinmarketReducer'; +import invityAPI from 'src/services/suite/invityAPI'; import * as coinmarketBuyActions from '../coinmarketBuyActions'; -import invityAPI from 'src/services/suite/invityAPI'; -import { BuyTrade, BuyTradeQuoteRequest, CryptoId } from 'invity-api'; const getInitialState = () => ({ wallet: { diff --git a/packages/suite/src/actions/wallet/__tests__/coinmarketExchangeActions.test.ts b/packages/suite/src/actions/wallet/__tests__/coinmarketExchangeActions.test.ts index b07aa54a8fa..b8d466dc2f6 100644 --- a/packages/suite/src/actions/wallet/__tests__/coinmarketExchangeActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/coinmarketExchangeActions.test.ts @@ -1,10 +1,10 @@ -import { configureStore } from 'src/support/tests/configureStore'; +import { CryptoId, ExchangeTrade, ExchangeTradeQuoteRequest } from 'invity-api'; +import { configureStore } from 'src/support/tests/configureStore'; import { coinmarketReducer } from 'src/reducers/wallet/coinmarketReducer'; +import invityAPI from 'src/services/suite/invityAPI'; import * as coinmarketExchangeActions from '../coinmarketExchangeActions'; -import invityAPI from 'src/services/suite/invityAPI'; -import { CryptoId, ExchangeTrade, ExchangeTradeQuoteRequest } from 'invity-api'; const getInitialState = () => ({ wallet: { diff --git a/packages/suite/src/actions/wallet/__tests__/discoveryActions.test.ts b/packages/suite/src/actions/wallet/__tests__/discoveryActions.test.ts index 4be1c2bf1fd..4e6c3d03d9a 100644 --- a/packages/suite/src/actions/wallet/__tests__/discoveryActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/discoveryActions.test.ts @@ -18,13 +18,13 @@ import { notificationsActions } from '@suite-common/toast-notifications'; import { DiscoveryStatus } from '@suite-common/wallet-constants'; import * as discoveryActions from '@suite-common/wallet-core'; import TrezorConnect, { ERRORS } from '@trezor/connect'; +import { BITCOIN_ONLY_NETWORKS } from '@suite-common/suite-constants'; import { configureStore, filterThunkActionTypes } from 'src/support/tests/configureStore'; import walletSettingsReducer from 'src/reducers/wallet/settingsReducer'; import { accountsReducer } from 'src/reducers/wallet'; import * as walletSettingsActions from 'src/actions/settings/walletSettingsActions'; import { extraDependencies } from 'src/support/extraDependencies'; -import { BITCOIN_ONLY_NETWORKS } from '@suite-common/suite-constants'; import { paramsError, diff --git a/packages/suite/src/actions/wallet/__tests__/formDraftActions.test.ts b/packages/suite/src/actions/wallet/__tests__/formDraftActions.test.ts index 36dfe93a915..501f20050eb 100644 --- a/packages/suite/src/actions/wallet/__tests__/formDraftActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/formDraftActions.test.ts @@ -1,6 +1,6 @@ import { configureStore } from 'src/support/tests/configureStore'; - import formDraftReducer, { FormDraftState } from 'src/reducers/wallet/formDraftReducer'; + import * as formDraftActions from '../formDraftActions'; const getInitialState = (state?: FormDraftState) => ({ diff --git a/packages/suite/src/actions/wallet/__tests__/moveLabelsForRbfActions.test.ts b/packages/suite/src/actions/wallet/__tests__/moveLabelsForRbfActions.test.ts index b7b4f0fcb7f..6ac89d536f4 100644 --- a/packages/suite/src/actions/wallet/__tests__/moveLabelsForRbfActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/moveLabelsForRbfActions.test.ts @@ -1,6 +1,8 @@ import { combineReducers } from '@reduxjs/toolkit'; -import { accountsReducer, transactionsReducer } from '../../../reducers/wallet'; + import { configureMockStore, initPreloadedState } from '@suite-common/test-utils'; + +import { accountsReducer, transactionsReducer } from '../../../reducers/wallet'; import { findLabelsToBeMovedOrDeleted, moveLabelsForRbfAction } from '../moveLabelsForRbfActions'; import { accountReceivingCoins, diff --git a/packages/suite/src/actions/wallet/__tests__/receiveActions.test.ts b/packages/suite/src/actions/wallet/__tests__/receiveActions.test.ts index d317edb0384..bb008ac20b1 100644 --- a/packages/suite/src/actions/wallet/__tests__/receiveActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/receiveActions.test.ts @@ -1,6 +1,8 @@ import { connectInitThunk } from '@suite-common/connect-init'; import { testMocks } from '@suite-common/test-utils'; import { prepareDeviceReducer } from '@suite-common/wallet-core'; +import { AccountKey } from '@suite-common/wallet-types'; +import { NetworkSymbol, NetworkType } from '@suite-common/wallet-config'; import { configureStore } from 'src/support/tests/configureStore'; import receiveReducer from 'src/reducers/wallet/receiveReducer'; @@ -10,8 +12,6 @@ import * as receiveActions from 'src/actions/wallet/receiveActions'; import { extraDependencies } from 'src/support/extraDependencies'; import fixtures from '../__fixtures__/receiveActions'; -import { AccountKey } from '@suite-common/wallet-types'; -import { NetworkSymbol, NetworkType } from '@suite-common/wallet-config'; const { getSuiteDevice } = testMocks; diff --git a/packages/suite/src/actions/wallet/__tests__/selectedAccountActions.test.ts b/packages/suite/src/actions/wallet/__tests__/selectedAccountActions.test.ts index 46629f7da2c..8d647a2a4ba 100644 --- a/packages/suite/src/actions/wallet/__tests__/selectedAccountActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/selectedAccountActions.test.ts @@ -1,5 +1,4 @@ import { configureStore } from 'src/support/tests/configureStore'; - import selectedAccountReducer from 'src/reducers/wallet/selectedAccountReducer'; import { syncSelectedAccount } from '../selectedAccountActions'; diff --git a/packages/suite/src/actions/wallet/__tests__/signVerifyActions.test.ts b/packages/suite/src/actions/wallet/__tests__/signVerifyActions.test.ts index 15a3cdccf2c..6d353991fef 100644 --- a/packages/suite/src/actions/wallet/__tests__/signVerifyActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/signVerifyActions.test.ts @@ -1,6 +1,6 @@ import { testMocks } from '@suite-common/test-utils'; -import { showAddress, sign, verify } from 'src/actions/wallet/signVerifyActions'; +import { showAddress, sign, verify } from 'src/actions/wallet/signVerifyActions'; import { configureStore } from 'src/support/tests/configureStore'; const PATH = 'PATH'; diff --git a/packages/suite/src/actions/wallet/__tests__/transactionActions.test.ts b/packages/suite/src/actions/wallet/__tests__/transactionActions.test.ts index 5f84694b24e..df765092bbd 100644 --- a/packages/suite/src/actions/wallet/__tests__/transactionActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/transactionActions.test.ts @@ -1,14 +1,16 @@ -import { transactionsReducer } from 'src/reducers/wallet'; +import { configureStore } from '@reduxjs/toolkit'; + import { getAccountTransactions } from '@suite-common/wallet-utils'; import { transactionsActions, transactionsInitialState, TransactionsState, } from '@suite-common/wallet-core'; -import { configureStore } from '@reduxjs/toolkit'; import { getTxsPerPage } from '@suite-common/suite-utils'; import { testMocks } from '@suite-common/test-utils'; +import { transactionsReducer } from 'src/reducers/wallet'; + const { getWalletTransaction } = testMocks; const initStore = (transactionsState?: TransactionsState) => diff --git a/packages/suite/src/actions/wallet/addWalletThunk.ts b/packages/suite/src/actions/wallet/addWalletThunk.ts index 405973d6bd4..4a51f6039bc 100644 --- a/packages/suite/src/actions/wallet/addWalletThunk.ts +++ b/packages/suite/src/actions/wallet/addWalletThunk.ts @@ -9,9 +9,11 @@ import { selectDevices, } from '@suite-common/wallet-core'; import { WalletType } from '@suite-common/wallet-types'; -import { goto } from '../suite/routerActions'; + import { getBackgroundRoute } from 'src/utils/suite/router'; +import { goto } from '../suite/routerActions'; + export const redirectAfterWalletSelectedThunk = createThunk( `${DEVICE_MODULE_PREFIX}/redirectAfterWalletSelectedThunk`, async (_, { dispatch }) => { diff --git a/packages/suite/src/actions/wallet/cardanoStakingActions.ts b/packages/suite/src/actions/wallet/cardanoStakingActions.ts index d756c09b301..2eb4b13990d 100644 --- a/packages/suite/src/actions/wallet/cardanoStakingActions.ts +++ b/packages/suite/src/actions/wallet/cardanoStakingActions.ts @@ -1,15 +1,17 @@ +import { getUnixTime } from 'date-fns'; + import { BlockchainBlock } from '@trezor/connect'; import { CARDANO_STAKE_POOL_PREVIEW_URL, CARDANO_STAKE_POOL_MAINNET_URL } from '@trezor/urls'; -import { CARDANO_STAKING } from 'src/actions/wallet/constants'; -import { PendingStakeTx, PoolsResponse, CardanoNetwork } from 'src/types/wallet/cardanoStaking'; -import { Account, WalletAccountTransaction } from 'src/types/wallet'; -import { Dispatch, GetState } from 'src/types/suite'; -import { getUnixTime } from 'date-fns'; import { isPending, getAccountTransactions } from '@suite-common/wallet-utils'; import { CARDANO_DEFAULT_TTL_OFFSET } from '@suite-common/wallet-constants'; import { transactionsActions } from '@suite-common/wallet-core'; import { getNetworkOptional } from '@suite-common/wallet-config'; +import { CARDANO_STAKING } from 'src/actions/wallet/constants'; +import { PendingStakeTx, PoolsResponse, CardanoNetwork } from 'src/types/wallet/cardanoStaking'; +import { Account, WalletAccountTransaction } from 'src/types/wallet'; +import { Dispatch, GetState } from 'src/types/suite'; + export type CardanoStakingAction = | { type: typeof CARDANO_STAKING.ADD_PENDING_STAKE_TX; pendingStakeTx: PendingStakeTx } | { type: typeof CARDANO_STAKING.REMOVE_PENDING_STAKE_TX; accountKey: string } diff --git a/packages/suite/src/actions/wallet/coinjoinClientActions.ts b/packages/suite/src/actions/wallet/coinjoinClientActions.ts index bc3ee929688..003420d86f0 100644 --- a/packages/suite/src/actions/wallet/coinjoinClientActions.ts +++ b/packages/suite/src/actions/wallet/coinjoinClientActions.ts @@ -16,6 +16,7 @@ import { getUtxoOutpoint } from '@suite-common/wallet-utils'; import { Account, AddressDisplayOptions } from '@suite-common/wallet-types'; import { notificationsActions } from '@suite-common/toast-notifications'; import { getDeviceInstances } from '@suite-common/suite-utils'; +import { Feature, selectIsFeatureDisabled } from '@suite-common/message-system'; import { prepareCoinjoinTransaction, @@ -33,11 +34,10 @@ import { selectRoundsDurationInHours, selectCoinjoinAccounts, } from 'src/reducers/wallet/coinjoinReducer'; +import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; import * as COINJOIN from './constants/coinjoinConstants'; -import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; -import { Feature, selectIsFeatureDisabled } from '@suite-common/message-system'; const clientEnable = (symbol: Account['symbol']) => ({ diff --git a/packages/suite/src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/verifyAddress.ts b/packages/suite/src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/verifyAddress.ts index 78b202e285b..2c040bacafc 100644 --- a/packages/suite/src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/verifyAddress.ts +++ b/packages/suite/src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/verifyAddress.ts @@ -1,8 +1,8 @@ import { testMocks } from '@suite-common/test-utils'; +import { AddressDisplayOptions } from '@suite-common/wallet-types'; import { MODAL } from 'src/actions/suite/constants'; import { COINMARKET_BUY, COINMARKET_EXCHANGE } from 'src/actions/wallet/constants'; -import { AddressDisplayOptions } from '@suite-common/wallet-types'; import { BTC_ACCOUNT, ETH_ACCOUNT, diff --git a/packages/suite/src/actions/wallet/coinmarket/__tests__/coinmarketCommonActions.test.ts b/packages/suite/src/actions/wallet/coinmarket/__tests__/coinmarketCommonActions.test.ts index d4f36d79f03..9fa3912867d 100644 --- a/packages/suite/src/actions/wallet/coinmarket/__tests__/coinmarketCommonActions.test.ts +++ b/packages/suite/src/actions/wallet/coinmarket/__tests__/coinmarketCommonActions.test.ts @@ -1,11 +1,11 @@ -import { configureStore } from 'src/support/tests/configureStore'; +import { State as DeviceState } from '@suite-common/wallet-core'; +import type { DeepPartial } from '@trezor/type-utils'; +import { configureStore } from 'src/support/tests/configureStore'; import { coinmarketReducer, ComposedTransactionInfo } from 'src/reducers/wallet/coinmarketReducer'; import selectedAccountReducer from 'src/reducers/wallet/selectedAccountReducer'; import { transactionsReducer, accountsReducer } from 'src/reducers/wallet'; -import { State as DeviceState } from '@suite-common/wallet-core'; import { SuiteState } from 'src/reducers/suite/suiteReducer'; -import type { DeepPartial } from '@trezor/type-utils'; import { DEFAULT_STORE } from 'src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/store'; import { VERIFY_BUY_ADDRESS_FIXTURES, diff --git a/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts b/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts index b50cfa972d1..384e97cc2ba 100644 --- a/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts +++ b/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts @@ -1,3 +1,5 @@ +import { CryptoId } from 'invity-api'; + import { isDesktop } from '@trezor/env-utils'; import { notificationsActions } from '@suite-common/toast-notifications'; import { PROTO } from '@trezor/connect'; @@ -14,6 +16,7 @@ import { selectDevice, toggleRememberDevice, } from '@suite-common/wallet-core'; + import { GetState, Dispatch } from 'src/types/suite'; import * as modalActions from 'src/actions/suite/modalActions'; import { getUnusedAddressFromAccount } from 'src/utils/wallet/coinmarket/coinmarketUtils'; @@ -22,7 +25,6 @@ import { ComposedTransactionInfo } from 'src/reducers/wallet/coinmarketReducer'; import { submitRequestForm as envSubmitRequestForm } from 'src/utils/suite/env'; import * as formDraftActions from 'src/actions/wallet/formDraftActions'; import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; -import { CryptoId } from 'invity-api'; import { COINMARKET_BUY, COINMARKET_COMMON, diff --git a/packages/suite/src/actions/wallet/coinmarketBuyActions.ts b/packages/suite/src/actions/wallet/coinmarketBuyActions.ts index 74449e4ed76..3d5dedf304a 100644 --- a/packages/suite/src/actions/wallet/coinmarketBuyActions.ts +++ b/packages/suite/src/actions/wallet/coinmarketBuyActions.ts @@ -1,4 +1,3 @@ -import { Account } from 'src/types/wallet'; import { BuyListResponse, BuyProviderInfo, @@ -7,14 +6,17 @@ import { CryptoId, FiatCurrencyCode, } from 'invity-api'; + +import { Account } from 'src/types/wallet'; import invityAPI from 'src/services/suite/invityAPI'; -import { COINMARKET_BUY, COINMARKET_COMMON } from './constants'; import { Dispatch } from 'src/types/suite'; import regional from 'src/constants/wallet/coinmarket/regional'; import * as modalActions from 'src/actions/suite/modalActions'; import { verifyAddress as verifyBuyAddress } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; import { CoinmarketFiatCurrenciesProps } from 'src/types/coinmarket/coinmarket'; +import { COINMARKET_BUY, COINMARKET_COMMON } from './constants'; + export interface BuyInfo { buyInfo: Omit & { defaultAmountsOfFiatCurrencies: CoinmarketFiatCurrenciesProps; diff --git a/packages/suite/src/actions/wallet/coinmarketExchangeActions.ts b/packages/suite/src/actions/wallet/coinmarketExchangeActions.ts index a1106021b0b..d6aa7c9122c 100644 --- a/packages/suite/src/actions/wallet/coinmarketExchangeActions.ts +++ b/packages/suite/src/actions/wallet/coinmarketExchangeActions.ts @@ -1,5 +1,3 @@ -import { Account } from 'src/types/wallet'; -import { Dispatch } from 'src/types/suite'; import { ExchangeListResponse, ExchangeProviderInfo, @@ -7,11 +5,15 @@ import { ExchangeTrade, CryptoId, } from 'invity-api'; + +import { Account } from 'src/types/wallet'; +import { Dispatch } from 'src/types/suite'; import invityAPI from 'src/services/suite/invityAPI'; -import { COINMARKET_EXCHANGE, COINMARKET_COMMON } from './constants'; import * as modalActions from 'src/actions/suite/modalActions'; import { verifyAddress as verifyExchangeAddress } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; +import { COINMARKET_EXCHANGE, COINMARKET_COMMON } from './constants'; + export interface ExchangeInfo { exchangeList?: ExchangeListResponse; providerInfos: { [name: string]: ExchangeProviderInfo }; diff --git a/packages/suite/src/actions/wallet/coinmarketInfoActions.ts b/packages/suite/src/actions/wallet/coinmarketInfoActions.ts index 702052fa4e8..cd5da5d503c 100644 --- a/packages/suite/src/actions/wallet/coinmarketInfoActions.ts +++ b/packages/suite/src/actions/wallet/coinmarketInfoActions.ts @@ -1,4 +1,5 @@ import { InfoResponse } from 'invity-api'; + import { COINMARKET_INFO } from 'src/actions/wallet/constants'; import { CoinmarketPaymentMethodListProps } from 'src/types/coinmarket/coinmarket'; diff --git a/packages/suite/src/actions/wallet/coinmarketSellActions.ts b/packages/suite/src/actions/wallet/coinmarketSellActions.ts index 18d0d4924fb..ea62010e220 100644 --- a/packages/suite/src/actions/wallet/coinmarketSellActions.ts +++ b/packages/suite/src/actions/wallet/coinmarketSellActions.ts @@ -1,4 +1,3 @@ -import { Account } from 'src/types/wallet'; import { CryptoId, SellFiatTrade, @@ -6,9 +5,12 @@ import { SellListResponse, SellProviderInfo, } from 'invity-api'; + +import { Account } from 'src/types/wallet'; import { Dispatch } from 'src/types/suite'; import * as modalActions from 'src/actions/suite/modalActions'; import invityAPI from 'src/services/suite/invityAPI'; + import { COINMARKET_COMMON, COINMARKET_SELL } from './constants'; export interface SellInfo { diff --git a/packages/suite/src/actions/wallet/exportTransactionsActions.ts b/packages/suite/src/actions/wallet/exportTransactionsActions.ts index d5de823d00d..4518db29e77 100644 --- a/packages/suite/src/actions/wallet/exportTransactionsActions.ts +++ b/packages/suite/src/actions/wallet/exportTransactionsActions.ts @@ -8,6 +8,7 @@ import { } from '@suite-common/wallet-core'; import { Account, ExportFileType } from '@suite-common/wallet-types'; import { advancedSearchTransactions, getAccountTransactions } from '@suite-common/wallet-utils'; + import { formatData, getExportedFileName } from 'src/utils/wallet/exportTransactionsUtils'; export const exportTransactionsThunk = createThunk( diff --git a/packages/suite/src/actions/wallet/formDraftActions.ts b/packages/suite/src/actions/wallet/formDraftActions.ts index c58cb085a44..9ade4f324ec 100644 --- a/packages/suite/src/actions/wallet/formDraftActions.ts +++ b/packages/suite/src/actions/wallet/formDraftActions.ts @@ -1,10 +1,13 @@ import { FieldValues } from 'react-hook-form'; -import { Dispatch, GetState } from 'src/types/suite'; import { getFormDraftKey } from '@suite-common/wallet-utils'; -import { FORM_DRAFT } from './constants'; import type { FormDraftKeyPrefix } from '@suite-common/wallet-types'; +import { Dispatch, GetState } from 'src/types/suite'; + +import { FORM_DRAFT } from './constants'; + + export type FormDraftAction = | { type: typeof FORM_DRAFT.STORE_DRAFT; diff --git a/packages/suite/src/actions/wallet/graphActions.ts b/packages/suite/src/actions/wallet/graphActions.ts index c41759871e8..2486b9d52cf 100644 --- a/packages/suite/src/actions/wallet/graphActions.ts +++ b/packages/suite/src/actions/wallet/graphActions.ts @@ -1,10 +1,19 @@ import { isWithinInterval, fromUnixTime } from 'date-fns'; -import { Dispatch, GetState } from 'src/types/suite'; -import { Account } from 'src/types/wallet'; import { tryGetAccountIdentity, isTrezorConnectBackendType } from '@suite-common/wallet-utils'; - import TrezorConnect, { StaticSessionId } from '@trezor/connect'; +import { selectIsElectrumBackendSelected } from '@suite-common/wallet-core'; + +import { Dispatch, GetState } from 'src/types/suite'; +import { Account } from 'src/types/wallet'; +import { GraphData, GraphRange, GraphScale } from 'src/types/wallet/graph'; +import { + ensureHistoryRates, + enhanceBlockchainAccountHistory, + accountGraphDataFilterFn, + deviceGraphDataFilterFn, +} from 'src/utils/wallet/graph'; +import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { ACCOUNT_GRAPH_SUCCESS, @@ -15,15 +24,7 @@ import { SET_SELECTED_RANGE, SET_SELECTED_VIEW, } from './constants/graphConstants'; -import { GraphData, GraphRange, GraphScale } from 'src/types/wallet/graph'; -import { - ensureHistoryRates, - enhanceBlockchainAccountHistory, - accountGraphDataFilterFn, - deviceGraphDataFilterFn, -} from 'src/utils/wallet/graph'; -import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { selectIsElectrumBackendSelected } from '@suite-common/wallet-core'; + export type GraphAction = | { diff --git a/packages/suite/src/actions/wallet/moveLabelsForRbfActions.ts b/packages/suite/src/actions/wallet/moveLabelsForRbfActions.ts index 17e5aba9fad..fd3c16db986 100644 --- a/packages/suite/src/actions/wallet/moveLabelsForRbfActions.ts +++ b/packages/suite/src/actions/wallet/moveLabelsForRbfActions.ts @@ -1,9 +1,10 @@ -import { selectLabelingDataForAccount } from 'src/reducers/suite/metadataReducer'; import { findChainedTransactions, findTransactions } from '@suite-common/wallet-utils'; -import { Dispatch, GetState } from 'src/types/suite'; -import * as metadataLabelingActions from 'src/actions/suite/metadataLabelingActions'; import { AccountLabels, AccountOutputLabels } from '@suite-common/metadata-types'; import { AccountKey, WalletAccountTransaction } from '@suite-common/wallet-types'; + +import { selectLabelingDataForAccount } from 'src/reducers/suite/metadataReducer'; +import { Dispatch, GetState } from 'src/types/suite'; +import * as metadataLabelingActions from 'src/actions/suite/metadataLabelingActions'; import { RbfLabelsToBeUpdated } from 'src/types/wallet/sendForm'; type DeleteAllOutputLabelsParams = { diff --git a/packages/suite/src/actions/wallet/receiveActions.ts b/packages/suite/src/actions/wallet/receiveActions.ts index 9f3f5d4f544..34e70d93995 100644 --- a/packages/suite/src/actions/wallet/receiveActions.ts +++ b/packages/suite/src/actions/wallet/receiveActions.ts @@ -1,12 +1,11 @@ import { notificationsActions } from '@suite-common/toast-notifications'; import { UserContextPayload } from '@suite-common/suite-types'; import { confirmAddressOnDeviceThunk, selectDevice } from '@suite-common/wallet-core'; +import { AddressDisplayOptions } from '@suite-common/wallet-types'; import { RECEIVE } from 'src/actions/wallet/constants'; import * as modalActions from 'src/actions/suite/modalActions'; import { GetState, Dispatch } from 'src/types/suite'; -import { AddressDisplayOptions } from '@suite-common/wallet-types'; - import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; export type ReceiveAction = diff --git a/packages/suite/src/actions/wallet/send/sendFormThunks.ts b/packages/suite/src/actions/wallet/send/sendFormThunks.ts index fcaffdb7259..f7d80adc09b 100644 --- a/packages/suite/src/actions/wallet/send/sendFormThunks.ts +++ b/packages/suite/src/actions/wallet/send/sendFormThunks.ts @@ -26,12 +26,13 @@ import { selectSelectedAccountKey, selectIsSelectedAccountLoaded, } from 'src/reducers/wallet/selectedAccountReducer'; -import { findLabelsToBeMovedOrDeleted, moveLabelsForRbfAction } from '../moveLabelsForRbfActions'; import { selectMetadata } from 'src/reducers/suite/metadataReducer'; import * as metadataLabelingActions from 'src/actions/suite/metadataLabelingActions'; import * as modalActions from 'src/actions/suite/modalActions'; import { RbfLabelsToBeUpdated } from 'src/types/wallet/sendForm'; +import { findLabelsToBeMovedOrDeleted, moveLabelsForRbfAction } from '../moveLabelsForRbfActions'; + export const MODULE_PREFIX = '@send'; export const saveSendFormDraftThunk = createThunk( diff --git a/packages/suite/src/actions/wallet/signVerifyActions.ts b/packages/suite/src/actions/wallet/signVerifyActions.ts index a45a769c094..8e17b2937c3 100644 --- a/packages/suite/src/actions/wallet/signVerifyActions.ts +++ b/packages/suite/src/actions/wallet/signVerifyActions.ts @@ -1,14 +1,14 @@ import TrezorConnect, { Unsuccessful, Success } from '@trezor/connect'; import { notificationsActions } from '@suite-common/toast-notifications'; import { selectDevice } from '@suite-common/wallet-core'; +import { AddressDisplayOptions } from '@suite-common/wallet-types'; import type { Dispatch, GetState, TrezorDevice } from 'src/types/suite'; import type { Account } from 'src/types/wallet'; +import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; import { SIGN_VERIFY } from './constants'; -import { AddressDisplayOptions } from '@suite-common/wallet-types'; -import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; export type SignVerifyAction = | { type: typeof SIGN_VERIFY.SIGN_SUCCESS; signSignature: string } diff --git a/packages/suite/src/actions/wallet/stake/stakeFormEthereumActions.ts b/packages/suite/src/actions/wallet/stake/stakeFormEthereumActions.ts index d88001c459d..81842b4fc9c 100644 --- a/packages/suite/src/actions/wallet/stake/stakeFormEthereumActions.ts +++ b/packages/suite/src/actions/wallet/stake/stakeFormEthereumActions.ts @@ -1,6 +1,6 @@ -import { BigNumber } from '@trezor/utils/src/bigNumber'; import { toWei } from 'web3-utils'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import TrezorConnect, { FeeLevel } from '@trezor/connect'; import { notificationsActions } from '@suite-common/toast-notifications'; import { @@ -26,17 +26,16 @@ import { MIN_ETH_FOR_WITHDRAWALS, } from '@suite-common/wallet-constants'; import { selectDevice, ComposeActionContext } from '@suite-common/wallet-core'; +import { NetworkSymbol } from '@suite-common/wallet-config'; import { Dispatch, GetState } from 'src/types/suite'; import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; - import { getStakeTxGasLimit, prepareClaimEthTx, prepareStakeEthTx, prepareUnstakeEthTx, } from 'src/utils/suite/stake'; -import { NetworkSymbol } from '@suite-common/wallet-config'; const calculate = ( availableBalance: string, diff --git a/packages/suite/src/actions/wallet/stakeActions.ts b/packages/suite/src/actions/wallet/stakeActions.ts index fff7a40d6be..af0a0640b14 100644 --- a/packages/suite/src/actions/wallet/stakeActions.ts +++ b/packages/suite/src/actions/wallet/stakeActions.ts @@ -1,5 +1,4 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; - import TrezorConnect from '@trezor/connect'; import { selectDevice, @@ -14,12 +13,11 @@ import { isRbfTransaction, tryGetAccountIdentity, } from '@suite-common/wallet-utils'; - import { StakeFormState, PrecomposedTransactionFinal, StakeType } from '@suite-common/wallet-types'; -import * as modalActions from '../suite/modalActions'; import { Dispatch, GetState } from 'src/types/suite'; +import * as modalActions from '../suite/modalActions'; import * as stakeFormEthereumActions from './stake/stakeFormEthereumActions'; import { openModal } from '../suite/modalActions'; diff --git a/packages/suite/src/actions/wallet/tokenActions.ts b/packages/suite/src/actions/wallet/tokenActions.ts index 18299fa783b..62879e3a62b 100644 --- a/packages/suite/src/actions/wallet/tokenActions.ts +++ b/packages/suite/src/actions/wallet/tokenActions.ts @@ -1,12 +1,13 @@ import { TokenInfo } from '@trezor/connect'; -import { Account } from 'src/types/wallet'; -import { Dispatch } from 'src/types/suite'; import * as accountUtils from '@suite-common/wallet-utils'; import { notificationsActions } from '@suite-common/toast-notifications'; import { accountsActions, updateFiatRatesThunk } from '@suite-common/wallet-core'; import { Timestamp, TokenAddress } from '@suite-common/wallet-types'; import { FiatCurrencyCode } from '@suite-common/suite-config'; +import { Dispatch } from 'src/types/suite'; +import { Account } from 'src/types/wallet'; + export const addToken = (account: Account, tokenInfo: TokenInfo[], localCurrency: FiatCurrencyCode) => (dispatch: Dispatch) => { diff --git a/packages/suite/src/components/backup/AfterBackupCheckboxes.tsx b/packages/suite/src/components/backup/AfterBackupCheckboxes.tsx index ca81527ff97..5f43007379f 100644 --- a/packages/suite/src/components/backup/AfterBackupCheckboxes.tsx +++ b/packages/suite/src/components/backup/AfterBackupCheckboxes.tsx @@ -1,8 +1,9 @@ +import { spacings } from '@trezor/theme'; +import { Card, Column } from '@trezor/components'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { CheckItem, Translation } from 'src/components/suite'; import { ConfirmKey, toggleCheckboxByKey } from 'src/actions/backup/backupActions'; -import { spacings } from '@trezor/theme'; -import { Card, Column } from '@trezor/components'; export const AfterBackupCheckboxes = () => { const backup = useSelector(state => state.backup); diff --git a/packages/suite/src/components/backup/BackupSeedCard.tsx b/packages/suite/src/components/backup/BackupSeedCard.tsx index 1d72c28d27f..84a505a4f34 100644 --- a/packages/suite/src/components/backup/BackupSeedCard.tsx +++ b/packages/suite/src/components/backup/BackupSeedCard.tsx @@ -1,5 +1,7 @@ import { ReactNode, SyntheticEvent } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { variables, Checkbox, Card, Icon, IconName } from '@trezor/components'; import { spacingsPx, typography } from '@trezor/theme'; diff --git a/packages/suite/src/components/backup/BackupSeedCards.tsx b/packages/suite/src/components/backup/BackupSeedCards.tsx index 1099a079594..5b8e7e05069 100644 --- a/packages/suite/src/components/backup/BackupSeedCards.tsx +++ b/packages/suite/src/components/backup/BackupSeedCards.tsx @@ -1,9 +1,11 @@ import styled from 'styled-components'; +import { variables } from '@trezor/components'; + import { ConfirmKey, toggleCheckboxByKey } from 'src/actions/backup/backupActions'; import { Translation } from 'src/components/suite/Translation'; -import { variables } from '@trezor/components'; import { useSelector, useDispatch } from 'src/hooks/suite'; + import { BackupSeedCard } from './BackupSeedCard'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/backup/PreBackupCheckboxes.tsx b/packages/suite/src/components/backup/PreBackupCheckboxes.tsx index 4b9e223805a..58859f487cf 100644 --- a/packages/suite/src/components/backup/PreBackupCheckboxes.tsx +++ b/packages/suite/src/components/backup/PreBackupCheckboxes.tsx @@ -1,8 +1,9 @@ +import { Card, Column } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { CheckItem, Translation } from 'src/components/suite'; import { ConfirmKey, toggleCheckboxByKey } from 'src/actions/backup/backupActions'; -import { Card, Column } from '@trezor/components'; -import { spacings } from '@trezor/theme'; export const PreBackupCheckboxes = () => { const backup = useSelector(state => state.backup); diff --git a/packages/suite/src/components/dashboard/DashboardSection.tsx b/packages/suite/src/components/dashboard/DashboardSection.tsx index b61741ae248..4057e9f589f 100644 --- a/packages/suite/src/components/dashboard/DashboardSection.tsx +++ b/packages/suite/src/components/dashboard/DashboardSection.tsx @@ -1,5 +1,7 @@ import { Ref, forwardRef, ReactElement, HTMLAttributes } from 'react'; + import styled from 'styled-components'; + import { H3 } from '@trezor/components'; const Wrapper = styled.section` diff --git a/packages/suite/src/components/firmware/Buttons/FirmwareButtonsRow.tsx b/packages/suite/src/components/firmware/Buttons/FirmwareButtonsRow.tsx index 76e5036e5d2..4ce97813349 100644 --- a/packages/suite/src/components/firmware/Buttons/FirmwareButtonsRow.tsx +++ b/packages/suite/src/components/firmware/Buttons/FirmwareButtonsRow.tsx @@ -1,9 +1,10 @@ import styled from 'styled-components'; -import { FirmwareCloseButton } from './FirmwareCloseButton'; import { spacingsPx } from '@trezor/theme'; import { breakpointMediaQueries } from '@trezor/styles'; +import { FirmwareCloseButton } from './FirmwareCloseButton'; + const Row = styled.div` display: flex; gap: ${spacingsPx.lg}; diff --git a/packages/suite/src/components/firmware/Buttons/FirmwareCloseButton.tsx b/packages/suite/src/components/firmware/Buttons/FirmwareCloseButton.tsx index 716d04b8c61..a13359bc188 100644 --- a/packages/suite/src/components/firmware/Buttons/FirmwareCloseButton.tsx +++ b/packages/suite/src/components/firmware/Buttons/FirmwareCloseButton.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Button, ButtonProps } from '@trezor/components'; + import { Translation } from 'src/components/suite'; export const FirmwareCloseButton = (props: Omit) => ( diff --git a/packages/suite/src/components/firmware/Buttons/FirmwareContinueButton.tsx b/packages/suite/src/components/firmware/Buttons/FirmwareContinueButton.tsx index 10c3df4998a..5096c722ca0 100644 --- a/packages/suite/src/components/firmware/Buttons/FirmwareContinueButton.tsx +++ b/packages/suite/src/components/firmware/Buttons/FirmwareContinueButton.tsx @@ -1,6 +1,9 @@ import React from 'react'; + import styled from 'styled-components'; + import { Button, ButtonProps } from '@trezor/components'; + import { Translation } from 'src/components/suite'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/components/firmware/Buttons/FirmwareInstallButton.tsx b/packages/suite/src/components/firmware/Buttons/FirmwareInstallButton.tsx index 15c67471a69..1bc17b4b813 100644 --- a/packages/suite/src/components/firmware/Buttons/FirmwareInstallButton.tsx +++ b/packages/suite/src/components/firmware/Buttons/FirmwareInstallButton.tsx @@ -1,4 +1,5 @@ import { Button, ButtonProps, Tooltip } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useTranslation } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/firmware/Buttons/FirmwareRetryButton.tsx b/packages/suite/src/components/firmware/Buttons/FirmwareRetryButton.tsx index 2262a180e8c..49c100ab877 100644 --- a/packages/suite/src/components/firmware/Buttons/FirmwareRetryButton.tsx +++ b/packages/suite/src/components/firmware/Buttons/FirmwareRetryButton.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Button, ButtonProps } from '@trezor/components'; + import { Translation } from 'src/components/suite'; export const FirmwareRetryButton = (props: Omit) => ( diff --git a/packages/suite/src/components/firmware/CheckSeedStep.tsx b/packages/suite/src/components/firmware/CheckSeedStep.tsx index 18981e8912d..494d29bf1f9 100644 --- a/packages/suite/src/components/firmware/CheckSeedStep.tsx +++ b/packages/suite/src/components/firmware/CheckSeedStep.tsx @@ -1,17 +1,20 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { Button, Checkbox, variables } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; import { selectDeviceLabelOrName } from '@suite-common/wallet-core'; + import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; import { OnboardingStepBox } from 'src/components/onboarding'; -import { FirmwareButtonsRow } from './Buttons/FirmwareButtonsRow'; -import { FirmwareSwitchWarning } from './FirmwareSwitchWarning'; import { goto } from 'src/actions/suite/routerActions'; import { SettingsAnchor } from 'src/constants/suite/anchors'; +import { FirmwareButtonsRow } from './Buttons/FirmwareButtonsRow'; +import { FirmwareSwitchWarning } from './FirmwareSwitchWarning'; + // eslint-disable-next-line local-rules/no-override-ds-component const StyledCheckbox = styled(Checkbox)` margin: ${spacingsPx.md} 0; diff --git a/packages/suite/src/components/firmware/Fingerprint.tsx b/packages/suite/src/components/firmware/Fingerprint.tsx index f31c0731e80..6c95c65aab2 100644 --- a/packages/suite/src/components/firmware/Fingerprint.tsx +++ b/packages/suite/src/components/firmware/Fingerprint.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { TrezorDevice } from 'src/types/suite'; import { getFormattedFingerprint } from 'src/utils/firmware'; diff --git a/packages/suite/src/components/firmware/FirmwareInitial.tsx b/packages/suite/src/components/firmware/FirmwareInitial.tsx index c0239a19497..ffdeac9c2ba 100644 --- a/packages/suite/src/components/firmware/FirmwareInitial.tsx +++ b/packages/suite/src/components/firmware/FirmwareInitial.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { ExtendedMessageDescriptor } from '@suite-common/intl-types'; @@ -8,14 +9,15 @@ import { AcquiredDevice } from '@suite-common/suite-types'; import { getFirmwareVersion, isBitcoinOnlyDevice } from '@trezor/device-utils'; import { FirmwareType } from '@trezor/connect'; import { selectDevices } from '@suite-common/wallet-core'; +import { spacingsPx } from '@trezor/theme'; import { OnboardingStepBox, OnboardingButtonSkip } from 'src/components/onboarding'; -import { PrerequisitesGuide, Translation } from '../suite'; import { useDevice, useFirmware, useOnboarding, useSelector } from 'src/hooks/suite'; import { FirmwareInstallButton, FirmwareOffer } from 'src/components/firmware'; + +import { PrerequisitesGuide, Translation } from '../suite'; import { FirmwareButtonsRow } from './Buttons/FirmwareButtonsRow'; import { FirmwareSwitchWarning } from './FirmwareSwitchWarning'; -import { spacingsPx } from '@trezor/theme'; const Description = styled.div` align-items: center; diff --git a/packages/suite/src/components/firmware/FirmwareInstallation.tsx b/packages/suite/src/components/firmware/FirmwareInstallation.tsx index 30253aa0b0b..bb6232c3b38 100644 --- a/packages/suite/src/components/firmware/FirmwareInstallation.tsx +++ b/packages/suite/src/components/firmware/FirmwareInstallation.tsx @@ -1,5 +1,8 @@ +import styled from 'styled-components'; + import { Button } from '@trezor/components'; import { UI } from '@trezor/connect'; +import { spacingsPx } from '@trezor/theme'; import { Translation, WebUsbButton } from 'src/components/suite'; import { useFirmware } from 'src/hooks/suite'; @@ -8,8 +11,6 @@ import { OnboardingStepBox } from 'src/components/onboarding'; import { TrezorDevice } from 'src/types/suite'; import { selectIsActionAbortable } from 'src/reducers/suite/suiteReducer'; import { useSelector } from 'src/hooks/suite/useSelector'; -import styled from 'styled-components'; -import { spacingsPx } from '@trezor/theme'; const SelectDevice = styled.div` display: flex; diff --git a/packages/suite/src/components/firmware/FirmwareOffer.tsx b/packages/suite/src/components/firmware/FirmwareOffer.tsx index 074199e4f65..351c7c92bcc 100644 --- a/packages/suite/src/components/firmware/FirmwareOffer.tsx +++ b/packages/suite/src/components/firmware/FirmwareOffer.tsx @@ -8,11 +8,11 @@ import { import { Icon, Markdown, Tooltip, variables } from '@trezor/components'; import { getFirmwareVersion } from '@trezor/device-utils'; import { FirmwareType } from '@trezor/connect'; +import { spacingsPx } from '@trezor/theme'; import { Translation, TrezorLink } from 'src/components/suite'; import { useFirmware, useTranslation, useSelector } from 'src/hooks/suite'; import { getSuiteFirmwareTypeString } from 'src/utils/firmware'; -import { spacingsPx } from '@trezor/theme'; const FwVersionWrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/firmware/FirmwareProgressBar.tsx b/packages/suite/src/components/firmware/FirmwareProgressBar.tsx index c8319520b73..e27f541b66e 100644 --- a/packages/suite/src/components/firmware/FirmwareProgressBar.tsx +++ b/packages/suite/src/components/firmware/FirmwareProgressBar.tsx @@ -1,6 +1,8 @@ -import { Icon, ProgressBar, variables } from '@trezor/components'; import styled, { useTheme } from 'styled-components'; + +import { Icon, ProgressBar, variables } from '@trezor/components'; import { borders, spacingsPx } from '@trezor/theme'; + import { useFirmware } from 'src/hooks/suite'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/firmware/FirmwareUpdateHashCheckError.tsx b/packages/suite/src/components/firmware/FirmwareUpdateHashCheckError.tsx index 14541955d7b..14e2ebb6263 100644 --- a/packages/suite/src/components/firmware/FirmwareUpdateHashCheckError.tsx +++ b/packages/suite/src/components/firmware/FirmwareUpdateHashCheckError.tsx @@ -1,4 +1,5 @@ import { INVALID_HASH_ERROR } from '@suite-common/wallet-core'; + import { OnboardingStepBox } from '../onboarding'; import { Translation } from '../suite'; diff --git a/packages/suite/src/components/firmware/ReconnectDevicePrompt.tsx b/packages/suite/src/components/firmware/ReconnectDevicePrompt.tsx index 3756b4ada79..afbc8a49c81 100644 --- a/packages/suite/src/components/firmware/ReconnectDevicePrompt.tsx +++ b/packages/suite/src/components/firmware/ReconnectDevicePrompt.tsx @@ -1,15 +1,17 @@ import * as semver from 'semver'; + import { getFirmwareVersion } from '@trezor/device-utils'; import { H2, DeviceAnimation, NewModal, Paragraph, List, Column } from '@trezor/components'; import { DEVICE, Device, DeviceModelInternal, UI } from '@trezor/connect'; -import { Translation, WebUsbButton } from 'src/components/suite'; -import { DeviceConfirmImage } from 'src/components/suite/DeviceConfirmImage'; -import { useDevice, useFirmware, useSelector } from 'src/hooks/suite'; import { ConfirmOnDevice } from '@trezor/product-components'; import { TranslationKey } from '@suite-common/intl-types'; import { spacings } from '@trezor/theme'; import { selectDeviceLabelOrName } from '@suite-common/wallet-core'; +import { useDevice, useFirmware, useSelector } from 'src/hooks/suite'; +import { DeviceConfirmImage } from 'src/components/suite/DeviceConfirmImage'; +import { Translation, WebUsbButton } from 'src/components/suite'; + const RebootDeviceGraphics = ({ device, isManualRebootRequired, diff --git a/packages/suite/src/components/firmware/SelectCustomFirmware.tsx b/packages/suite/src/components/firmware/SelectCustomFirmware.tsx index 4cd4b9e15ed..38bc670263e 100644 --- a/packages/suite/src/components/firmware/SelectCustomFirmware.tsx +++ b/packages/suite/src/components/firmware/SelectCustomFirmware.tsx @@ -1,4 +1,5 @@ import { Dispatch, SetStateAction } from 'react'; + import styled from 'styled-components'; import { Button } from '@trezor/components'; diff --git a/packages/suite/src/components/guide/Feedback.tsx b/packages/suite/src/components/guide/Feedback.tsx index a0e3b8e59c9..e308e35fc03 100644 --- a/packages/suite/src/components/guide/Feedback.tsx +++ b/packages/suite/src/components/guide/Feedback.tsx @@ -1,13 +1,10 @@ import { useState, useCallback, ReactNode, ChangeEvent } from 'react'; + import styled, { css } from 'styled-components'; + import { analytics, EventType } from '@trezor/suite-analytics'; import { getFirmwareVersion } from '@trezor/device-utils'; - -import { Translation } from 'src/components/suite'; import { Textarea, Select, variables, Button, CollapsibleBox } from '@trezor/components'; -import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; -import { sendFeedback, setView } from 'src/actions/suite/guideActions'; -import { GuideViewWrapper, GuideHeader, GuideContent } from 'src/components/guide'; import { Rating, FeedbackCategory, FeedbackType, UserData } from '@suite-common/suite-types'; import { getEnvironment, @@ -20,6 +17,12 @@ import { } from '@trezor/env-utils'; import { spacingsPx } from '@trezor/theme'; +import { Translation } from 'src/components/suite'; +import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; +import { sendFeedback, setView } from 'src/actions/suite/guideActions'; +import { GuideViewWrapper, GuideHeader, GuideContent } from 'src/components/guide'; + + const Headline = styled.div` font-size: ${variables.FONT_SIZE.TINY}; font-weight: ${variables.FONT_WEIGHT.DEMI_BOLD}; diff --git a/packages/suite/src/components/guide/Guide.tsx b/packages/suite/src/components/guide/Guide.tsx index 3f128b3fbc2..7636ec73778 100644 --- a/packages/suite/src/components/guide/Guide.tsx +++ b/packages/suite/src/components/guide/Guide.tsx @@ -1,7 +1,11 @@ import { useState } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { analytics, EventType } from '@trezor/suite-analytics'; import { spacingsPx, typography, zIndices } from '@trezor/theme'; +import { Column, Divider, Icon } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { setView } from 'src/actions/suite/guideActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; @@ -12,7 +16,6 @@ import { GuideCategories, GuideSearch, } from 'src/components/guide'; -import { Column, Divider, Icon } from '@trezor/components'; const FeedbackLinkWrapper = styled.div` padding: ${spacingsPx.md}; diff --git a/packages/suite/src/components/guide/GuideArticle.tsx b/packages/suite/src/components/guide/GuideArticle.tsx index 8b91eb2ba99..07d1e47f2fe 100644 --- a/packages/suite/src/components/guide/GuideArticle.tsx +++ b/packages/suite/src/components/guide/GuideArticle.tsx @@ -1,11 +1,12 @@ import styled from 'styled-components'; +import { spacingsPx } from '@trezor/theme'; + import { useSelector } from 'src/hooks/suite'; import { GuideHeader, GuideContent, GuideViewWrapper, GuideMarkdown } from 'src/components/guide'; import { Translation } from 'src/components/suite'; import { useGuideLoadArticle } from 'src/hooks/guide'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; -import { spacingsPx } from '@trezor/theme'; const ArticleWrapper = styled.div` padding-bottom: ${spacingsPx.xxl}; diff --git a/packages/suite/src/components/guide/GuideButton.tsx b/packages/suite/src/components/guide/GuideButton.tsx index f2fe52fc22e..c6c04abacff 100644 --- a/packages/suite/src/components/guide/GuideButton.tsx +++ b/packages/suite/src/components/guide/GuideButton.tsx @@ -1,9 +1,11 @@ +import { FreeFocusInside } from 'react-focus-lock'; + import styled from 'styled-components'; import { Icon, useElevation } from '@trezor/components'; import { Elevation, mapElevationToBackground, mapElevationToBorder, zIndices } from '@trezor/theme'; + import { useGuide } from 'src/hooks/guide'; -import { FreeFocusInside } from 'react-focus-lock'; const Wrapper = styled.button<{ $isGuideOpen: boolean; $elevation: Elevation }>` display: flex; diff --git a/packages/suite/src/components/guide/GuideCategories.tsx b/packages/suite/src/components/guide/GuideCategories.tsx index ee47cbca51f..cb1a1e2dcf0 100644 --- a/packages/suite/src/components/guide/GuideCategories.tsx +++ b/packages/suite/src/components/guide/GuideCategories.tsx @@ -1,8 +1,10 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; import { variables } from '@trezor/components'; import { GuideCategory } from '@suite-common/suite-types'; + import { GuideNode } from 'src/components/guide'; const Section = styled.section` diff --git a/packages/suite/src/components/guide/GuideCategory.tsx b/packages/suite/src/components/guide/GuideCategory.tsx index 1801db0543d..ed040e3c6ae 100644 --- a/packages/suite/src/components/guide/GuideCategory.tsx +++ b/packages/suite/src/components/guide/GuideCategory.tsx @@ -1,6 +1,7 @@ import styled from 'styled-components'; import { variables } from '@trezor/components'; + import { GuideHeader, GuideContent, diff --git a/packages/suite/src/components/guide/GuideContent.tsx b/packages/suite/src/components/guide/GuideContent.tsx index 70794a3c5a2..3392bd1fda2 100644 --- a/packages/suite/src/components/guide/GuideContent.tsx +++ b/packages/suite/src/components/guide/GuideContent.tsx @@ -1,5 +1,7 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/guide/GuideHeader.tsx b/packages/suite/src/components/guide/GuideHeader.tsx index 12a40ab9d60..e42b70364b2 100644 --- a/packages/suite/src/components/guide/GuideHeader.tsx +++ b/packages/suite/src/components/guide/GuideHeader.tsx @@ -1,13 +1,16 @@ import { useContext } from 'react'; + import styled, { css } from 'styled-components'; import { transparentize } from 'polished'; + import { analytics, EventType } from '@trezor/suite-analytics'; +import { IconButton, variables } from '@trezor/components'; +import { typography, zIndices } from '@trezor/theme'; import { close } from 'src/actions/suite/guideActions'; import { useDispatch } from 'src/hooks/suite'; -import { IconButton, variables } from '@trezor/components'; import { HeaderBreadcrumb, ContentScrolledContext } from 'src/components/guide'; -import { typography, zIndices } from '@trezor/theme'; + const HeaderWrapper = styled.div<{ $noLabel?: boolean; $isScrolled: boolean }>` display: flex; diff --git a/packages/suite/src/components/guide/GuideHint.tsx b/packages/suite/src/components/guide/GuideHint.tsx index 718e300740f..2ac7e6472f5 100644 --- a/packages/suite/src/components/guide/GuideHint.tsx +++ b/packages/suite/src/components/guide/GuideHint.tsx @@ -1,4 +1,5 @@ import { Children, BlockquoteHTMLAttributes, cloneElement, isValidElement } from 'react'; + import styled from 'styled-components'; import { Banner } from '@trezor/components'; diff --git a/packages/suite/src/components/guide/GuideMarkdown.tsx b/packages/suite/src/components/guide/GuideMarkdown.tsx index b44a417ff13..333009a02ce 100644 --- a/packages/suite/src/components/guide/GuideMarkdown.tsx +++ b/packages/suite/src/components/guide/GuideMarkdown.tsx @@ -1,6 +1,9 @@ import { useEffect, useRef } from 'react'; + import { Markdown } from '@trezor/components'; + import { useGuideOpenNode } from 'src/hooks/guide'; + import { GuideHint } from './GuideHint'; import { TrezorLink } from '../suite'; diff --git a/packages/suite/src/components/guide/GuideNode.tsx b/packages/suite/src/components/guide/GuideNode.tsx index 5025b4fc82d..e8483c31c93 100644 --- a/packages/suite/src/components/guide/GuideNode.tsx +++ b/packages/suite/src/components/guide/GuideNode.tsx @@ -1,14 +1,16 @@ import { ReactNode } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { analytics, EventType } from '@trezor/suite-analytics'; import { resolveStaticPath } from '@suite-common/suite-utils'; - import { Icon, variables } from '@trezor/components'; +import { GuideNode as GuideNodeType } from '@suite-common/suite-types'; +import { borders, spacings } from '@trezor/theme'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { openNode } from 'src/actions/suite/guideActions'; -import { GuideNode as GuideNodeType } from '@suite-common/suite-types'; import { getNodeTitle } from 'src/utils/suite/guide'; -import { borders, spacings } from '@trezor/theme'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; const NodeButton = styled.button` diff --git a/packages/suite/src/components/guide/GuideRouter.tsx b/packages/suite/src/components/guide/GuideRouter.tsx index faccbed45f0..b748d7c0e70 100644 --- a/packages/suite/src/components/guide/GuideRouter.tsx +++ b/packages/suite/src/components/guide/GuideRouter.tsx @@ -1,9 +1,12 @@ +import { FreeFocusInside } from 'react-focus-lock'; + import styled, { css, keyframes } from 'styled-components'; import { AnimatePresence, motion } from 'framer-motion'; -import { FreeFocusInside } from 'react-focus-lock'; import { variables, Backdrop } from '@trezor/components'; import { useOnce } from '@trezor/react-utils'; +import { zIndices } from '@trezor/theme'; + import { useSelector } from 'src/hooks/suite'; import { SupportFeedbackSelection, @@ -13,7 +16,6 @@ import { Feedback, } from 'src/components/guide'; import { useGuide, GUIDE_ANIMATION_DURATION_MS } from 'src/hooks/guide'; -import { zIndices } from '@trezor/theme'; const fullHeightStyle = css` position: absolute; diff --git a/packages/suite/src/components/guide/GuideSearch.tsx b/packages/suite/src/components/guide/GuideSearch.tsx index c7bea547f47..c8f3e22d535 100644 --- a/packages/suite/src/components/guide/GuideSearch.tsx +++ b/packages/suite/src/components/guide/GuideSearch.tsx @@ -1,13 +1,16 @@ import { useState, useEffect } from 'react'; + import styled from 'styled-components'; + import { Icon, Input, Spinner, variables } from '@trezor/components'; +import type { GuideCategory } from '@suite-common/suite-types'; +import { spacingsPx } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useTranslation } from 'src/hooks/suite'; import { GuideNode } from 'src/components/guide'; import { useGuideSearch } from 'src/hooks/guide'; -import type { GuideCategory } from '@suite-common/suite-types'; -import { spacingsPx } from '@trezor/theme'; const Wrapper = styled.div` margin-bottom: ${spacingsPx.xs}; diff --git a/packages/suite/src/components/guide/GuideViewWrapper.tsx b/packages/suite/src/components/guide/GuideViewWrapper.tsx index a73a099cbf9..dd3c2839f5d 100644 --- a/packages/suite/src/components/guide/GuideViewWrapper.tsx +++ b/packages/suite/src/components/guide/GuideViewWrapper.tsx @@ -1,5 +1,7 @@ import { createContext, useCallback, useState, ReactNode, UIEventHandler } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/guide/HeaderBreadcrumb.tsx b/packages/suite/src/components/guide/HeaderBreadcrumb.tsx index af68d428aa3..ade4f6acd67 100644 --- a/packages/suite/src/components/guide/HeaderBreadcrumb.tsx +++ b/packages/suite/src/components/guide/HeaderBreadcrumb.tsx @@ -1,16 +1,16 @@ import styled from 'styled-components'; import { darken } from 'polished'; + import { analytics, EventType } from '@trezor/suite-analytics'; +import { variables } from '@trezor/components'; +import type { GuideCategory } from '@suite-common/suite-types'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { openNode, setView } from 'src/actions/suite/guideActions'; -import { variables } from '@trezor/components'; import { Translation } from 'src/components/suite'; // importing directly, otherwise unit tests fail, seems to be a styled-components issue import { TrezorLink } from 'src/components/suite/TrezorLink'; import { findAncestorNodes, getNodeTitle } from 'src/utils/suite/guide'; - -import type { GuideCategory } from '@suite-common/suite-types'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; const BreadcrumbWrapper = styled.span` diff --git a/packages/suite/src/components/guide/OpenGuideFromTooltip.tsx b/packages/suite/src/components/guide/OpenGuideFromTooltip.tsx index 9c07ae849a1..03eebc2f149 100644 --- a/packages/suite/src/components/guide/OpenGuideFromTooltip.tsx +++ b/packages/suite/src/components/guide/OpenGuideFromTooltip.tsx @@ -1,11 +1,13 @@ import { MouseEvent } from 'react'; + import styled, { useTheme } from 'styled-components'; import { transparentize } from 'polished'; import { borders, spacingsPx, typography } from '@trezor/theme'; +import { Icon } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useGuideOpenNode } from 'src/hooks/guide'; -import { Icon } from '@trezor/components'; const OpenGuideLink = styled.span` display: flex; diff --git a/packages/suite/src/components/guide/SupportFeedbackSelection.tsx b/packages/suite/src/components/guide/SupportFeedbackSelection.tsx index 00e0ca87e45..4f3abe17aca 100644 --- a/packages/suite/src/components/guide/SupportFeedbackSelection.tsx +++ b/packages/suite/src/components/guide/SupportFeedbackSelection.tsx @@ -7,13 +7,13 @@ import { Icon, Link, variables } from '@trezor/components'; import { isDesktop } from '@trezor/env-utils'; import { getFirmwareVersion } from '@trezor/device-utils'; import { selectDevice } from '@suite-common/wallet-core'; +import { borders } from '@trezor/theme'; import { Translation } from 'src/components/suite'; import { setView } from 'src/actions/suite/guideActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { GuideViewWrapper, GuideHeader, GuideContent } from 'src/components/guide'; import { UpdateState } from 'src/reducers/suite/desktopUpdateReducer'; -import { borders } from '@trezor/theme'; const Section = styled.div` & + & { diff --git a/packages/suite/src/components/onboarding/Buttons/OnboardingButtonBack.tsx b/packages/suite/src/components/onboarding/Buttons/OnboardingButtonBack.tsx index d0cce6dc6ad..88e5ed3a1de 100644 --- a/packages/suite/src/components/onboarding/Buttons/OnboardingButtonBack.tsx +++ b/packages/suite/src/components/onboarding/Buttons/OnboardingButtonBack.tsx @@ -1,4 +1,5 @@ import { Button, ButtonProps } from '@trezor/components'; + import { Translation } from 'src/components/suite'; export const OnboardingButtonBack = (props: Omit) => ( diff --git a/packages/suite/src/components/onboarding/Buttons/OnboardingButtonCta.tsx b/packages/suite/src/components/onboarding/Buttons/OnboardingButtonCta.tsx index 9a5e5ea68b4..e0889c411f5 100644 --- a/packages/suite/src/components/onboarding/Buttons/OnboardingButtonCta.tsx +++ b/packages/suite/src/components/onboarding/Buttons/OnboardingButtonCta.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Button, ButtonProps } from '@trezor/components'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/components/onboarding/Buttons/OnboardingButtonSkip.tsx b/packages/suite/src/components/onboarding/Buttons/OnboardingButtonSkip.tsx index 5750beeaf4f..881b646a7d0 100644 --- a/packages/suite/src/components/onboarding/Buttons/OnboardingButtonSkip.tsx +++ b/packages/suite/src/components/onboarding/Buttons/OnboardingButtonSkip.tsx @@ -1,5 +1,7 @@ import { HtmlHTMLAttributes } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; const StyledSpan = styled.span` diff --git a/packages/suite/src/components/onboarding/CollapsibleOnboardingCard.tsx b/packages/suite/src/components/onboarding/CollapsibleOnboardingCard.tsx index c37bd1e7480..ed544405b8c 100644 --- a/packages/suite/src/components/onboarding/CollapsibleOnboardingCard.tsx +++ b/packages/suite/src/components/onboarding/CollapsibleOnboardingCard.tsx @@ -1,6 +1,8 @@ import { ReactNode, HTMLAttributes } from 'react'; + import styled, { css } from 'styled-components'; import { motion } from 'framer-motion'; + import { Elevation, borders, mapElevationToBackground, zIndices, spacings } from '@trezor/theme'; import { ElevationUp, diff --git a/packages/suite/src/components/onboarding/Hologram.tsx b/packages/suite/src/components/onboarding/Hologram.tsx index ab2cdd10e3b..e8e54cb6048 100644 --- a/packages/suite/src/components/onboarding/Hologram.tsx +++ b/packages/suite/src/components/onboarding/Hologram.tsx @@ -1,15 +1,17 @@ +import { useRef } from 'react'; + import styled from 'styled-components'; import { selectDevice } from '@suite-common/wallet-core'; import { getPackagingUrl } from '@suite-common/suite-utils'; import { DeviceAnimation, Banner, variables } from '@trezor/components'; import { TREZOR_RESELLERS_URL, TREZOR_SUPPORT_URL } from '@trezor/urls'; +import { typography } from '@trezor/theme'; +import { DeviceModelInternal } from '@trezor/connect'; import { Translation, TrezorLink } from 'src/components/suite'; -import { useRef } from 'react'; import { useSelector } from 'src/hooks/suite'; -import { typography } from '@trezor/theme'; -import { DeviceModelInternal } from '@trezor/connect'; + const HologramSubHeading = styled.span` font-size: ${variables.FONT_SIZE.SMALL}; diff --git a/packages/suite/src/components/onboarding/OnboardingLayout.tsx b/packages/suite/src/components/onboarding/OnboardingLayout.tsx index 67b5b929ab2..8e778461530 100644 --- a/packages/suite/src/components/onboarding/OnboardingLayout.tsx +++ b/packages/suite/src/components/onboarding/OnboardingLayout.tsx @@ -1,19 +1,23 @@ import { useMemo, ReactNode } from 'react'; + import styled from 'styled-components'; import { Button, variables } from '@trezor/components'; import { TrezorLogo } from '@trezor/product-components'; import { TREZOR_SUPPORT_URL } from '@trezor/urls'; +import { selectBannerMessage } from '@suite-common/message-system'; +import { spacingsPx, zIndices } from '@trezor/theme'; + import { TrezorLink, Translation } from 'src/components/suite'; import { OnboardingProgressBar } from 'src/components/onboarding'; import { useSelector, useOnboarding } from 'src/hooks/suite'; import { MAX_ONBOARDING_WIDTH } from 'src/constants/suite/layout'; import steps from 'src/config/onboarding/steps'; import { GuideButton, GuideRouter } from 'src/components/guide'; -import { selectBannerMessage } from '@suite-common/message-system'; import { MessageSystemBanner } from 'src/components/suite/banners'; import { ModalContextProvider } from 'src/support/suite/ModalContext'; -import { spacingsPx, zIndices } from '@trezor/theme'; + + import { TrafficLightOffset } from '../suite/TrafficLightOffset'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/onboarding/OnboardingOption.tsx b/packages/suite/src/components/onboarding/OnboardingOption.tsx index 40d69739865..f73377d27d9 100644 --- a/packages/suite/src/components/onboarding/OnboardingOption.tsx +++ b/packages/suite/src/components/onboarding/OnboardingOption.tsx @@ -1,5 +1,7 @@ import { ReactNode, HTMLAttributes } from 'react'; + import styled, { css } from 'styled-components'; + import { Icon, IconName, useElevation, variables } from '@trezor/components'; import { Elevation, diff --git a/packages/suite/src/components/onboarding/OnboardingProgressBar.tsx b/packages/suite/src/components/onboarding/OnboardingProgressBar.tsx index 900ae75b2ce..c264037019e 100644 --- a/packages/suite/src/components/onboarding/OnboardingProgressBar.tsx +++ b/packages/suite/src/components/onboarding/OnboardingProgressBar.tsx @@ -1,5 +1,7 @@ import { ReactNode, Fragment } from 'react'; + import styled, { css, useTheme } from 'styled-components'; + import { Icon, variables } from '@trezor/components'; import { spacingsPx, typography } from '@trezor/theme'; diff --git a/packages/suite/src/components/onboarding/OnboardingStepBox.tsx b/packages/suite/src/components/onboarding/OnboardingStepBox.tsx index 0aa0b0beaf7..43530aa48ba 100644 --- a/packages/suite/src/components/onboarding/OnboardingStepBox.tsx +++ b/packages/suite/src/components/onboarding/OnboardingStepBox.tsx @@ -1,17 +1,22 @@ import { ReactNode } from 'react'; +import { useIntl } from 'react-intl'; + import styled from 'styled-components'; + import TrezorConnect from '@trezor/connect'; import { Backdrop } from '@trezor/components'; +import { TrezorDevice } from '@suite-common/suite-types'; +import { spacingsPx, zIndices } from '@trezor/theme'; +import { ConfirmOnDevice } from '@trezor/product-components'; + import { Translation } from 'src/components/suite'; -import { useIntl } from 'react-intl'; import messages from 'src/support/messages'; + import { CollapsibleOnboardingCard, CollapsibleOnboardingCardProps, } from './CollapsibleOnboardingCard'; -import { TrezorDevice } from '@suite-common/suite-types'; -import { spacingsPx, zIndices } from '@trezor/theme'; -import { ConfirmOnDevice } from '@trezor/product-components'; + const WrapperWrapper = styled.div` z-index: ${zIndices.onboardingForeground}; diff --git a/packages/suite/src/components/onboarding/SkipStepConfirmation.tsx b/packages/suite/src/components/onboarding/SkipStepConfirmation.tsx index 3c31bcd46d9..86b33aacf10 100644 --- a/packages/suite/src/components/onboarding/SkipStepConfirmation.tsx +++ b/packages/suite/src/components/onboarding/SkipStepConfirmation.tsx @@ -1,7 +1,9 @@ import { ReactNode } from 'react'; + +import { NewModal } from '@trezor/components'; + import * as STEP from 'src/constants/onboarding/steps'; import { AnyStepId } from 'src/types/onboarding'; -import { NewModal } from '@trezor/components'; import { Translation } from 'src/components/suite'; import { useOnboarding } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/onboarding/index.ts b/packages/suite/src/components/onboarding/index.ts index 32f74581ed9..1c2f868ddbe 100644 --- a/packages/suite/src/components/onboarding/index.ts +++ b/packages/suite/src/components/onboarding/index.ts @@ -1,9 +1,7 @@ import { OnboardingOption, OptionsWrapper, OptionsDivider } from './OnboardingOption'; - import { OnboardingButtonCta } from './Buttons/OnboardingButtonCta'; import { OnboardingButtonBack } from './Buttons/OnboardingButtonBack'; import { OnboardingButtonSkip } from './Buttons/OnboardingButtonSkip'; - import { OnboardingLayout } from './OnboardingLayout'; import { Hologram } from './Hologram'; import { OnboardingStepBox, type OnboardingStepBoxProps } from './OnboardingStepBox'; diff --git a/packages/suite/src/components/settings/DeviceBanner.tsx b/packages/suite/src/components/settings/DeviceBanner.tsx index f5cfd353d76..5b3ef7c8fb6 100644 --- a/packages/suite/src/components/settings/DeviceBanner.tsx +++ b/packages/suite/src/components/settings/DeviceBanner.tsx @@ -1,11 +1,13 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { Card, LottieAnimation, Paragraph, Row, variables, Text } from '@trezor/components'; +import { spacings } from '@trezor/theme'; import { useDevice, useSelector } from 'src/hooks/suite'; import { isWebUsb } from 'src/utils/suite/transport'; import { WebUsbButton } from 'src/components/suite/WebUsbButton'; -import { spacings } from '@trezor/theme'; // eslint-disable-next-line local-rules/no-override-ds-component const StyledLottieAnimation = styled(LottieAnimation)` diff --git a/packages/suite/src/components/settings/SettingsLayout.tsx b/packages/suite/src/components/settings/SettingsLayout.tsx index 2b4169c657b..a4e1788ede1 100644 --- a/packages/suite/src/components/settings/SettingsLayout.tsx +++ b/packages/suite/src/components/settings/SettingsLayout.tsx @@ -1,4 +1,5 @@ import { ReactNode, useMemo } from 'react'; + import { useDiscovery, useDispatch, useLayout, useSelector } from 'src/hooks/suite'; import { SettingsLoading } from 'src/views/settings/SettingsLoader'; import { diff --git a/packages/suite/src/components/settings/SettingsSection.tsx b/packages/suite/src/components/settings/SettingsSection.tsx index 71755c19a57..68684f25675 100644 --- a/packages/suite/src/components/settings/SettingsSection.tsx +++ b/packages/suite/src/components/settings/SettingsSection.tsx @@ -1,5 +1,7 @@ import { ReactNode, ReactElement } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { Paragraph, IconName, Icon, H3, Card, Column } from '@trezor/components'; import { spacings, spacingsPx } from '@trezor/theme'; import { breakpointMediaQueries } from '@trezor/styles'; diff --git a/packages/suite/src/components/suite/AccountLabel.tsx b/packages/suite/src/components/suite/AccountLabel.tsx index c4d55ae4c56..cbe0a4f48c2 100644 --- a/packages/suite/src/components/suite/AccountLabel.tsx +++ b/packages/suite/src/components/suite/AccountLabel.tsx @@ -1,10 +1,13 @@ import styled from 'styled-components'; + import { BadgeSize, Row, TOOLTIP_DELAY_LONG, TruncateWithTooltip } from '@trezor/components'; import { spacings } from '@trezor/theme'; import { AccountType, NetworkSymbol, Bip43Path, NetworkType } from '@suite-common/wallet-config'; -import { AccountTypeBadge } from './AccountTypeBadge'; + import { useDefaultAccountLabel } from 'src/hooks/suite'; +import { AccountTypeBadge } from './AccountTypeBadge'; + const TabularNums = styled.span` font-variant-numeric: tabular-nums; text-overflow: ellipsis; diff --git a/packages/suite/src/components/suite/AccountTypeBadge.tsx b/packages/suite/src/components/suite/AccountTypeBadge.tsx index 3a822cc3b78..1f84ba86562 100644 --- a/packages/suite/src/components/suite/AccountTypeBadge.tsx +++ b/packages/suite/src/components/suite/AccountTypeBadge.tsx @@ -1,8 +1,9 @@ import { Badge, BadgeSize } from '@trezor/components'; -import { Translation } from './Translation'; import { getAccountTypeName } from '@suite-common/wallet-utils'; import { AccountType, Bip43Path, NetworkType } from '@suite-common/wallet-config'; +import { Translation } from './Translation'; + type AccountTypeBadgeProps = { accountType?: AccountType; path?: Bip43Path; diff --git a/packages/suite/src/components/suite/AmountUnitSwitchWrapper.tsx b/packages/suite/src/components/suite/AmountUnitSwitchWrapper.tsx index 5f38dd15719..5ab3bf08591 100644 --- a/packages/suite/src/components/suite/AmountUnitSwitchWrapper.tsx +++ b/packages/suite/src/components/suite/AmountUnitSwitchWrapper.tsx @@ -1,11 +1,16 @@ import { MouseEvent, ReactNode } from 'react'; + import styled from 'styled-components'; + import { TOOLTIP_DELAY_NONE, TOOLTIP_DELAY_NORMAL, Tooltip } from '@trezor/components'; -import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { NetworkSymbol } from '@suite-common/wallet-config'; -import { Translation } from './Translation'; import { mediaQueries } from '@trezor/styles'; +import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; + +import { Translation } from './Translation'; + + const Container = styled.div` position: relative; display: flex; diff --git a/packages/suite/src/components/suite/AppNavigation/AppNavigationTooltip.tsx b/packages/suite/src/components/suite/AppNavigation/AppNavigationTooltip.tsx index 0316a0d162e..21c41ebeaca 100644 --- a/packages/suite/src/components/suite/AppNavigation/AppNavigationTooltip.tsx +++ b/packages/suite/src/components/suite/AppNavigation/AppNavigationTooltip.tsx @@ -1,8 +1,9 @@ import { ReactNode } from 'react'; +import { Tooltip } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; -import { Tooltip } from '@trezor/components'; interface AppNavigationTooltipProps { children: ReactNode; diff --git a/packages/suite/src/components/suite/ChangeDeviceLabel.tsx b/packages/suite/src/components/suite/ChangeDeviceLabel.tsx index a773df1d086..ba0582c1b98 100644 --- a/packages/suite/src/components/suite/ChangeDeviceLabel.tsx +++ b/packages/suite/src/components/suite/ChangeDeviceLabel.tsx @@ -1,17 +1,19 @@ import { useState, ChangeEventHandler } from 'react'; -import { analytics, EventType } from '@trezor/suite-analytics'; + import styled from 'styled-components'; +import { analytics, EventType } from '@trezor/suite-analytics'; import { Button, Input } from '@trezor/components'; -import { Translation } from 'src/components/suite'; -import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; -import { applySettings } from 'src/actions/settings/deviceSettingsActions'; -import { MAX_LABEL_LENGTH } from 'src/constants/suite/device'; import { isAscii } from '@trezor/utils'; import { spacingsPx } from '@trezor/theme'; import { breakpointMediaQueries } from '@trezor/styles'; import { selectDeviceLabel, selectDeviceName } from '@suite-common/wallet-core'; +import { Translation } from 'src/components/suite'; +import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; +import { applySettings } from 'src/actions/settings/deviceSettingsActions'; +import { MAX_LABEL_LENGTH } from 'src/constants/suite/device'; + const Container = styled.div<{ $isVertical?: boolean }>` display: flex; flex-direction: ${({ $isVertical }) => ($isVertical ? 'column' : 'row')}; diff --git a/packages/suite/src/components/suite/CoinGroup/CoinGroup.tsx b/packages/suite/src/components/suite/CoinGroup/CoinGroup.tsx index fb9d1f9ba90..7efd47c2d3a 100644 --- a/packages/suite/src/components/suite/CoinGroup/CoinGroup.tsx +++ b/packages/suite/src/components/suite/CoinGroup/CoinGroup.tsx @@ -1,11 +1,13 @@ import { useState } from 'react'; + import styled from 'styled-components'; +import { Network, NetworkSymbol } from '@suite-common/wallet-config'; + import { useDispatch } from 'src/hooks/suite'; import { changeCoinVisibility } from 'src/actions/settings/walletSettingsActions'; import { openModal } from 'src/actions/suite/modalActions'; import { CoinList } from 'src/components/suite'; -import { Network, NetworkSymbol } from '@suite-common/wallet-config'; import { CoinGroupHeader } from './CoinGroupHeader'; import { CoinListProps } from '../CoinList/CoinList'; diff --git a/packages/suite/src/components/suite/CoinGroup/CoinGroupHeader.tsx b/packages/suite/src/components/suite/CoinGroup/CoinGroupHeader.tsx index f88f5b30ca7..98b345d4ded 100644 --- a/packages/suite/src/components/suite/CoinGroup/CoinGroupHeader.tsx +++ b/packages/suite/src/components/suite/CoinGroup/CoinGroupHeader.tsx @@ -1,6 +1,8 @@ import { transparentize } from 'polished'; import styled, { css } from 'styled-components'; + import { Icon, variables } from '@trezor/components'; + import { Translation } from 'src/components/suite'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/CoinList/Coin.tsx b/packages/suite/src/components/suite/CoinList/Coin.tsx index 6af07736a08..bef1a6c126a 100644 --- a/packages/suite/src/components/suite/CoinList/Coin.tsx +++ b/packages/suite/src/components/suite/CoinList/Coin.tsx @@ -1,13 +1,16 @@ import { MouseEvent } from 'react'; + import { transparentize } from 'polished'; import styled, { css, useTheme } from 'styled-components'; + import { variables, Icon } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { typography } from '@trezor/theme'; import { TranslationKey } from '@suite-common/intl-types'; import { CoinLogo } from '@trezor/product-components'; +import { Translation } from 'src/components/suite'; + const SettingsWrapper = styled.div<{ $toggled: boolean; onClick: ((e: MouseEvent) => void) | undefined; diff --git a/packages/suite/src/components/suite/CoinList/CoinList.tsx b/packages/suite/src/components/suite/CoinList/CoinList.tsx index 94b6f6e132f..4efa7a15d97 100644 --- a/packages/suite/src/components/suite/CoinList/CoinList.tsx +++ b/packages/suite/src/components/suite/CoinList/CoinList.tsx @@ -4,13 +4,13 @@ import { getCoinUnavailabilityMessage } from '@suite-common/suite-utils'; import { Tooltip } from '@trezor/components'; import { getFirmwareVersion, isDeviceInBootloaderMode } from '@trezor/device-utils'; import { versionUtils } from '@trezor/utils'; +import { Network, NetworkSymbol } from '@suite-common/wallet-config'; import { Translation } from 'src/components/suite'; import { useDevice, useDiscovery, useSelector } from 'src/hooks/suite'; -import { Network, NetworkSymbol } from '@suite-common/wallet-config'; +import { getCoinLabel } from 'src/utils/suite/getCoinLabel'; import { Coin } from './Coin'; -import { getCoinLabel } from 'src/utils/suite/getCoinLabel'; const Wrapper = styled.div` width: 100%; diff --git a/packages/suite/src/components/suite/ConnectDevicePrompt.tsx b/packages/suite/src/components/suite/ConnectDevicePrompt.tsx index 20427495e70..70c7ac7acbb 100644 --- a/packages/suite/src/components/suite/ConnectDevicePrompt.tsx +++ b/packages/suite/src/components/suite/ConnectDevicePrompt.tsx @@ -1,4 +1,5 @@ import styled, { useTheme } from 'styled-components'; +import { motion } from 'framer-motion'; import { variables, @@ -9,11 +10,11 @@ import { Icon, } from '@trezor/components'; import { isDesktop } from '@trezor/env-utils'; +import { Elevation, mapElevationToBackground, mapElevationToBorder } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useDevice } from 'src/hooks/suite'; import type { PrerequisiteType } from 'src/types/suite'; -import { motion } from 'framer-motion'; -import { Elevation, mapElevationToBackground, mapElevationToBorder } from '@trezor/theme'; const Wrapper = styled(motion.div)<{ $elevation: Elevation }>` display: flex; diff --git a/packages/suite/src/components/suite/CountdownTimer.tsx b/packages/suite/src/components/suite/CountdownTimer.tsx index 6f46690b8e6..c97a42485be 100644 --- a/packages/suite/src/components/suite/CountdownTimer.tsx +++ b/packages/suite/src/components/suite/CountdownTimer.tsx @@ -1,9 +1,14 @@ -import styled from 'styled-components'; import { FormattedNumber } from 'react-intl'; -import { Translation } from './Translation'; + +import styled from 'styled-components'; + + import { TranslationKey } from '@suite-common/intl-types'; + import { useCountdownTimer } from 'src/hooks/suite'; +import { Translation } from './Translation'; + const UnitWrapper = styled.span` font-variant-numeric: tabular-nums; `; diff --git a/packages/suite/src/components/suite/DeviceAuthenticationExplainer.tsx b/packages/suite/src/components/suite/DeviceAuthenticationExplainer.tsx index 2910cf06a7d..0064216452c 100644 --- a/packages/suite/src/components/suite/DeviceAuthenticationExplainer.tsx +++ b/packages/suite/src/components/suite/DeviceAuthenticationExplainer.tsx @@ -1,9 +1,9 @@ import styled, { css } from 'styled-components'; import { Icon, IconName, variables } from '@trezor/components'; +import { TranslationKey } from '@suite-common/intl-types'; import { Translation } from 'src/components/suite'; -import { TranslationKey } from '@suite-common/intl-types'; const Item = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/DeviceDisplay/DeviceDisplay.tsx b/packages/suite/src/components/suite/DeviceDisplay/DeviceDisplay.tsx index 3713200ca41..05e82cbbaf9 100644 --- a/packages/suite/src/components/suite/DeviceDisplay/DeviceDisplay.tsx +++ b/packages/suite/src/components/suite/DeviceDisplay/DeviceDisplay.tsx @@ -1,13 +1,16 @@ -import styled from 'styled-components'; import { ReactNode } from 'react'; -import { useSelector } from 'src/hooks/suite/useSelector'; +import styled from 'styled-components'; + import { selectDeviceInternalModel } from '@suite-common/wallet-core'; import { DeviceModelInternal } from '@trezor/connect'; + +import { useSelector } from 'src/hooks/suite/useSelector'; +import { DisplayMode } from 'src/types/suite'; + import { DisplayChunks } from './DisplayChunks'; import { DisplayPaginatedText } from './DisplayPaginatedText'; import { DisplaySinglePageWrapText } from './DisplaySinglePageWrapText'; -import { DisplayMode } from 'src/types/suite'; const Display = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/DeviceDisplay/DisplayChunks.tsx b/packages/suite/src/components/suite/DeviceDisplay/DisplayChunks.tsx index ccfa29eeec3..b49afb8afd7 100644 --- a/packages/suite/src/components/suite/DeviceDisplay/DisplayChunks.tsx +++ b/packages/suite/src/components/suite/DeviceDisplay/DisplayChunks.tsx @@ -1,8 +1,11 @@ import styled from 'styled-components'; -import { DeviceDisplayText } from './DeviceDisplayText'; + import { splitStringEveryNCharacters } from '@trezor/utils'; + import { handleOnCopy } from 'src/utils/suite/deviceDisplay'; +import { DeviceDisplayText } from './DeviceDisplayText'; + const Row = styled.div<{ $isAlignedRight?: boolean }>` display: flex; align-items: center; diff --git a/packages/suite/src/components/suite/DeviceDisplay/DisplayPageSeparator.tsx b/packages/suite/src/components/suite/DeviceDisplay/DisplayPageSeparator.tsx index 0c100251e2d..d2d0fdd7bd0 100644 --- a/packages/suite/src/components/suite/DeviceDisplay/DisplayPageSeparator.tsx +++ b/packages/suite/src/components/suite/DeviceDisplay/DisplayPageSeparator.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; -import { Translation } from '../Translation'; + import { typography } from '@trezor/theme'; +import { Translation } from '../Translation'; + const SEPARATOR_LINE_HEIGHT = 32; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/DeviceDisplay/DisplayPaginatedText.tsx b/packages/suite/src/components/suite/DeviceDisplay/DisplayPaginatedText.tsx index 1bffda3c618..eedf007e7bf 100644 --- a/packages/suite/src/components/suite/DeviceDisplay/DisplayPaginatedText.tsx +++ b/packages/suite/src/components/suite/DeviceDisplay/DisplayPaginatedText.tsx @@ -1,12 +1,13 @@ import styled from 'styled-components'; import { DeviceModelInternal } from '@trezor/connect'; +import { Icon, IconName, IconProps } from '@trezor/components'; + +import { handleOnCopy } from 'src/utils/suite/deviceDisplay'; import { ResultRow, parseTextToPagesAndLines } from './parseTextToPagesAndLines'; import { DeviceDisplayText } from './DeviceDisplayText'; import { DisplayPageSeparator } from './DisplayPageSeparator'; -import { handleOnCopy } from 'src/utils/suite/deviceDisplay'; -import { Icon, IconName, IconProps } from '@trezor/components'; // eslint-disable-next-line local-rules/no-override-ds-component const StyledNextIcon = styled(Icon)<{ $isPixelType: boolean }>` diff --git a/packages/suite/src/components/suite/DeviceDisplay/DisplaySinglePageWrapText.tsx b/packages/suite/src/components/suite/DeviceDisplay/DisplaySinglePageWrapText.tsx index ac0fb52f0fb..96e2f0c3d44 100644 --- a/packages/suite/src/components/suite/DeviceDisplay/DisplaySinglePageWrapText.tsx +++ b/packages/suite/src/components/suite/DeviceDisplay/DisplaySinglePageWrapText.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { DeviceDisplayText } from './DeviceDisplayText'; const TextWrapper = styled.div<{ $isPixelType: boolean }>` diff --git a/packages/suite/src/components/suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx b/packages/suite/src/components/suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx index cff234f900d..c5bd163a430 100644 --- a/packages/suite/src/components/suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx +++ b/packages/suite/src/components/suite/DeviceDisplay/__tests__/DeviceDisplay.test.tsx @@ -1,11 +1,12 @@ -import { DisplayMode } from '../../../../types/suite'; -import { DeviceDisplay } from '../DeviceDisplay'; -import { renderWithProviders } from '../../../../support/tests/hooksHelper'; import { configureMockStore } from '@suite-common/test-utils'; import { prepareDeviceReducer } from '@suite-common/wallet-core'; -import { extraDependencies } from '../../../../support/extraDependencies'; import { DeviceModelInternal } from '@trezor/connect'; import { DeepPartial } from '@trezor/type-utils'; + +import { DisplayMode } from '../../../../types/suite'; +import { DeviceDisplay } from '../DeviceDisplay'; +import { renderWithProviders } from '../../../../support/tests/hooksHelper'; +import { extraDependencies } from '../../../../support/extraDependencies'; import suiteReducer from '../../../../reducers/suite/suiteReducer'; const _deviceReducer = prepareDeviceReducer(extraDependencies); diff --git a/packages/suite/src/components/suite/DeviceDisplay/__tests__/parseTextToPagesAndLines.test.ts b/packages/suite/src/components/suite/DeviceDisplay/__tests__/parseTextToPagesAndLines.test.ts index 07007d9babb..45988eac512 100644 --- a/packages/suite/src/components/suite/DeviceDisplay/__tests__/parseTextToPagesAndLines.test.ts +++ b/packages/suite/src/components/suite/DeviceDisplay/__tests__/parseTextToPagesAndLines.test.ts @@ -1,4 +1,5 @@ import { DeviceModelInternal } from '@trezor/connect'; + import { ParseTextToLinesParams, ParseTextToLinesResult, diff --git a/packages/suite/src/components/suite/DeviceMatrixExplanation.tsx b/packages/suite/src/components/suite/DeviceMatrixExplanation.tsx index 19206df20b9..a6ee0bcf7e7 100644 --- a/packages/suite/src/components/suite/DeviceMatrixExplanation.tsx +++ b/packages/suite/src/components/suite/DeviceMatrixExplanation.tsx @@ -1,9 +1,12 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { Icon, IconName, IconProps, Image, variables } from '@trezor/components'; -import { useGuide } from 'src/hooks/guide'; import { DeviceModelInternal } from '@trezor/connect'; +import { useGuide } from 'src/hooks/guide'; + const Wrapper = styled.div<{ $isGuideOpen?: boolean }>` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/suite/DropZone.tsx b/packages/suite/src/components/suite/DropZone.tsx index 5acb62bacee..31f3b87a0fb 100644 --- a/packages/suite/src/components/suite/DropZone.tsx +++ b/packages/suite/src/components/suite/DropZone.tsx @@ -1,9 +1,12 @@ import { useRef, useCallback, useMemo, useState, MouseEvent, DragEvent, ChangeEvent } from 'react'; + import styled from 'styled-components'; + import { Icon, IconName, Paragraph } from '@trezor/components'; +import { borders, spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import type { ExtendedMessageDescriptor } from 'src/types/suite'; -import { borders, spacings } from '@trezor/theme'; interface DropZoneProps { // 'accept' attribute for underlying HTML file input diff --git a/packages/suite/src/components/suite/Error.tsx b/packages/suite/src/components/suite/Error.tsx index cf56148e0e3..e621b9e03c5 100644 --- a/packages/suite/src/components/suite/Error.tsx +++ b/packages/suite/src/components/suite/Error.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { H2, Paragraph, Button, variables } from '@trezor/components'; + import { db } from 'src/storage'; import { reloadApp } from 'src/utils/suite/reload'; diff --git a/packages/suite/src/components/suite/FiatValue.tsx b/packages/suite/src/components/suite/FiatValue.tsx index b1c2d9f6b8f..e11c5b164e9 100644 --- a/packages/suite/src/components/suite/FiatValue.tsx +++ b/packages/suite/src/components/suite/FiatValue.tsx @@ -1,18 +1,22 @@ import { ReactElement } from 'react'; + import styled from 'styled-components'; -import { HiddenPlaceholder } from 'src/components/suite'; -import { useFormatters } from '@suite-common/formatters'; import type { FormatNumberOptions } from '@formatjs/intl'; + +import { useFormatters } from '@suite-common/formatters'; +import { SkeletonRectangle } from '@trezor/components'; +import { selectIsSpecificCoinDefinitionKnown } from '@suite-common/token-definitions'; +import { NetworkSymbol } from '@suite-common/wallet-config'; +import { TokenAddress } from '@suite-common/wallet-types'; + +import { useLoadingSkeleton, useSelector } from 'src/hooks/suite'; import { useFiatFromCryptoValue, useFiatFromCryptoValueParams, } from 'src/hooks/suite/useFiatFromCryptoValue'; +import { HiddenPlaceholder } from 'src/components/suite'; + import { HiddenPlaceholderProps } from './HiddenPlaceholder'; -import { useLoadingSkeleton, useSelector } from 'src/hooks/suite'; -import { SkeletonRectangle } from '@trezor/components'; -import { selectIsSpecificCoinDefinitionKnown } from '@suite-common/token-definitions'; -import { NetworkSymbol } from '@suite-common/wallet-config'; -import { TokenAddress } from '@suite-common/wallet-types'; const StyledHiddenPlaceholder = styled((props: HiddenPlaceholderProps) => ( diff --git a/packages/suite/src/components/suite/FormFractionButtons.tsx b/packages/suite/src/components/suite/FormFractionButtons.tsx index 66ff9f3e03d..5a565888fed 100644 --- a/packages/suite/src/components/suite/FormFractionButtons.tsx +++ b/packages/suite/src/components/suite/FormFractionButtons.tsx @@ -1,10 +1,12 @@ import styled from 'styled-components'; -import { Translation } from 'src/components/suite'; + import { Button, Tooltip } from '@trezor/components'; import { BigNumber } from '@trezor/utils/src/bigNumber'; import { MIN_ETH_AMOUNT_FOR_STAKING } from '@suite-common/wallet-constants'; import { NetworkSymbol } from '@suite-common/wallet-config'; +import { Translation } from 'src/components/suite'; + const Flex = styled.div` display: flex; gap: 4px; diff --git a/packages/suite/src/components/suite/FormattedCryptoAmount.tsx b/packages/suite/src/components/suite/FormattedCryptoAmount.tsx index 3d245971feb..ba12cf3f3cb 100644 --- a/packages/suite/src/components/suite/FormattedCryptoAmount.tsx +++ b/packages/suite/src/components/suite/FormattedCryptoAmount.tsx @@ -1,9 +1,6 @@ import styled from 'styled-components'; -import { HiddenPlaceholder, Sign } from 'src/components/suite'; -import { getNetworkOptional, NetworkSymbol } from '@suite-common/wallet-config'; -import { useSelector } from 'src/hooks/suite'; -import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; +import { getNetworkOptional, NetworkSymbol } from '@suite-common/wallet-config'; import { SignValue } from '@suite-common/suite-types'; import { formatCoinBalance, @@ -11,6 +8,10 @@ import { networkAmountToSmallestUnit, } from '@suite-common/wallet-utils'; import { isSignValuePositive } from '@suite-common/formatters'; + +import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; +import { useSelector } from 'src/hooks/suite'; +import { HiddenPlaceholder, Sign } from 'src/components/suite'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; import { BlurUrls } from 'src/views/wallet/tokens/common/BlurUrls'; diff --git a/packages/suite/src/components/suite/FormattedNftAmount.tsx b/packages/suite/src/components/suite/FormattedNftAmount.tsx index 4388c714ebf..771592ca1ef 100644 --- a/packages/suite/src/components/suite/FormattedNftAmount.tsx +++ b/packages/suite/src/components/suite/FormattedNftAmount.tsx @@ -3,12 +3,12 @@ import styled from 'styled-components'; import { SignValue } from '@suite-common/suite-types'; import { getNftTokenId } from '@suite-common/wallet-utils'; import { TokenTransfer } from '@trezor/connect'; +import { variables } from '@trezor/components'; import { HiddenPlaceholder, Sign } from 'src/components/suite'; // importing directly, otherwise unit tests fail, seems to be a styled-components issue import { TrezorLink } from 'src/components/suite/TrezorLink'; import { useSelector } from 'src/hooks/suite/useSelector'; -import { variables } from '@trezor/components'; const Container = styled.div` max-width: 100%; diff --git a/packages/suite/src/components/suite/HiddenPlaceholder.tsx b/packages/suite/src/components/suite/HiddenPlaceholder.tsx index de3158f2af7..5a62a264d31 100644 --- a/packages/suite/src/components/suite/HiddenPlaceholder.tsx +++ b/packages/suite/src/components/suite/HiddenPlaceholder.tsx @@ -1,8 +1,11 @@ import { ReactNode, useLayoutEffect, useRef, useState } from 'react'; + import styled, { css } from 'styled-components'; + +import { RedactNumbersContext } from '@suite-common/wallet-utils'; + import { useSelector } from 'src/hooks/suite'; import { selectIsDiscreteModeActive } from 'src/reducers/wallet/settingsReducer'; -import { RedactNumbersContext } from '@suite-common/wallet-utils'; type WrapperProps = { $intensity: number; diff --git a/packages/suite/src/components/suite/HoverAnimation.tsx b/packages/suite/src/components/suite/HoverAnimation.tsx index 4f593a02cb0..e4d1b79e166 100644 --- a/packages/suite/src/components/suite/HoverAnimation.tsx +++ b/packages/suite/src/components/suite/HoverAnimation.tsx @@ -1,5 +1,7 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; + import { borders } from '@trezor/theme'; const Wrapper = styled.div<{ $size?: string; $isHoverable?: boolean }>` diff --git a/packages/suite/src/components/suite/InstructionStep.tsx b/packages/suite/src/components/suite/InstructionStep.tsx index 34fc9698330..36c4476d417 100644 --- a/packages/suite/src/components/suite/InstructionStep.tsx +++ b/packages/suite/src/components/suite/InstructionStep.tsx @@ -1,5 +1,7 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; const Container = styled.div` diff --git a/packages/suite/src/components/suite/LearnMoreButton.tsx b/packages/suite/src/components/suite/LearnMoreButton.tsx index b385c653f98..43caa0b64e1 100644 --- a/packages/suite/src/components/suite/LearnMoreButton.tsx +++ b/packages/suite/src/components/suite/LearnMoreButton.tsx @@ -1,9 +1,10 @@ import { ReactNode } from 'react'; import { Button, ButtonProps } from '@trezor/components'; +import { Url } from '@trezor/urls'; import { Translation } from 'src/components/suite'; -import { Url } from '@trezor/urls'; + import { useExternalLink } from '../../hooks/suite'; interface LearnMoreButtonProps extends Omit { diff --git a/packages/suite/src/components/suite/Loading.tsx b/packages/suite/src/components/suite/Loading.tsx index d1705b10005..2b237e01254 100644 --- a/packages/suite/src/components/suite/Loading.tsx +++ b/packages/suite/src/components/suite/Loading.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Spinner } from '@trezor/components'; const LoaderWrapper = styled.div` diff --git a/packages/suite/src/components/suite/Metadata.tsx b/packages/suite/src/components/suite/Metadata.tsx index 333b593a183..85b1a43a0f0 100644 --- a/packages/suite/src/components/suite/Metadata.tsx +++ b/packages/suite/src/components/suite/Metadata.tsx @@ -1,6 +1,8 @@ -import { SUITE_URL } from '@trezor/urls'; import { Helmet } from 'react-helmet-async'; import { useIntl } from 'react-intl'; + +import { SUITE_URL } from '@trezor/urls'; + import messages from 'src/support/messages'; type MetadataProps = { diff --git a/packages/suite/src/components/suite/NotificationCard.tsx b/packages/suite/src/components/suite/NotificationCard.tsx index 1f5daef2324..5e6cb4001ca 100644 --- a/packages/suite/src/components/suite/NotificationCard.tsx +++ b/packages/suite/src/components/suite/NotificationCard.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled, { DefaultTheme, useTheme } from 'styled-components'; import { @@ -12,9 +13,10 @@ import { Icon, } from '@trezor/components'; import { Elevation, borders, spacingsPx, typography } from '@trezor/theme'; -import { TrezorLink } from './TrezorLink'; import { UIVariant } from '@trezor/components/src/config/types'; +import { TrezorLink } from './TrezorLink'; + // TODO: move to components type ButtonType = ButtonProps & { href?: string }; diff --git a/packages/suite/src/components/suite/NumberInput.tsx b/packages/suite/src/components/suite/NumberInput.tsx index b44df569929..237b9af0ff1 100644 --- a/packages/suite/src/components/suite/NumberInput.tsx +++ b/packages/suite/src/components/suite/NumberInput.tsx @@ -7,15 +7,15 @@ import { ClipboardEvent, FormEvent, } from 'react'; - import { Control, FieldValues, useController, UseControllerProps } from 'react-hook-form'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { Input, InputProps } from '@trezor/components'; import { localizeNumber } from '@suite-common/wallet-utils'; +import { getLocaleSeparators } from '@trezor/utils'; + import { Locale } from 'src/config/suite/languages'; import { useSelector } from 'src/hooks/suite'; -import { getLocaleSeparators } from '@trezor/utils'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; const isValidDecimalString = (value: string) => /^([^.]*)\.[^.]+$/.test(value); diff --git a/packages/suite/src/components/suite/PinMatrix/PinInput/InputPin.tsx b/packages/suite/src/components/suite/PinMatrix/PinInput/InputPin.tsx index d2b09b649e3..53c7e459188 100644 --- a/packages/suite/src/components/suite/PinMatrix/PinInput/InputPin.tsx +++ b/packages/suite/src/components/suite/PinMatrix/PinInput/InputPin.tsx @@ -1,5 +1,7 @@ import { MouseEvent } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { variables, Icon, Input } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; diff --git a/packages/suite/src/components/suite/PinMatrix/PinInput/PinInput.tsx b/packages/suite/src/components/suite/PinMatrix/PinInput/PinInput.tsx index 4bfb6f551d2..6617b7a7e42 100644 --- a/packages/suite/src/components/suite/PinMatrix/PinInput/PinInput.tsx +++ b/packages/suite/src/components/suite/PinMatrix/PinInput/PinInput.tsx @@ -1,10 +1,13 @@ import { useCallback, useEffect, useState } from 'react'; + import styled, { css } from 'styled-components'; import { formInputsMaxLength } from '@suite-common/validators'; import { Button, KEYBOARD_CODE, PinButton } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { usePin } from 'src/hooks/suite/usePinModal'; + import { InputPin } from './InputPin'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/PinMatrix/PinMatrix.tsx b/packages/suite/src/components/suite/PinMatrix/PinMatrix.tsx index 525ed9f6a9f..38a4dafeecc 100644 --- a/packages/suite/src/components/suite/PinMatrix/PinMatrix.tsx +++ b/packages/suite/src/components/suite/PinMatrix/PinMatrix.tsx @@ -1,12 +1,16 @@ import { useState, useEffect } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { DeviceModelInternal } from '@trezor/connect'; import { HELP_CENTER_PIN_URL } from '@trezor/urls'; import { variables } from '@trezor/components'; + import { DeviceMatrixExplanation, Translation, TrezorLink } from 'src/components/suite'; import { TrezorDevice } from 'src/types/suite'; import { onPinSubmit } from 'src/actions/suite/modalActions'; import { useDispatch } from 'src/hooks/suite'; + import { PinInput } from './PinInput/PinInput'; export const PIN_MATRIX_MAX_WIDTH = '316px'; diff --git a/packages/suite/src/components/suite/Preloader/InitialLoading.tsx b/packages/suite/src/components/suite/Preloader/InitialLoading.tsx index 64698f7d734..3ee1e5aaadc 100644 --- a/packages/suite/src/components/suite/Preloader/InitialLoading.tsx +++ b/packages/suite/src/components/suite/Preloader/InitialLoading.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react'; + import styled from 'styled-components'; import { Loading } from 'src/components/suite'; diff --git a/packages/suite/src/components/suite/Preloader/Preloader.tsx b/packages/suite/src/components/suite/Preloader/Preloader.tsx index 1e77dd4b58d..235ff32a8a2 100644 --- a/packages/suite/src/components/suite/Preloader/Preloader.tsx +++ b/packages/suite/src/components/suite/Preloader/Preloader.tsx @@ -1,14 +1,16 @@ import { FC, useEffect, PropsWithChildren } from 'react'; +import { + selectDevice, + selectIsFirmwareAuthenticityCheckDismissed, +} from '@suite-common/wallet-core'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { Onboarding } from 'src/views/onboarding'; import { ErrorPage } from 'src/views/suite/ErrorPage'; import { useGuideKeyboard } from 'src/hooks/guide'; import { init } from 'src/actions/suite/initAction'; import type { AppState } from 'src/types/suite'; -import { SuiteLayout } from '../layouts/SuiteLayout/SuiteLayout'; -import { InitialLoading } from './InitialLoading'; -import { DatabaseUpgradeModal } from './DatabaseUpgradeModal'; import { selectPrerequisite, selectIsLoggedOut, @@ -16,14 +18,14 @@ import { selectIsFirmwareAuthenticityCheckEnabledAndFailed, } from 'src/reducers/suite/suiteReducer'; import { SuiteStart } from 'src/views/start/SuiteStart'; +import { ViewOnlyPromo } from 'src/views/view-only/ViewOnlyPromo'; + +import { SuiteLayout } from '../layouts/SuiteLayout/SuiteLayout'; +import { InitialLoading } from './InitialLoading'; +import { DatabaseUpgradeModal } from './DatabaseUpgradeModal'; import { PrerequisitesGuide } from '../PrerequisitesGuide/PrerequisitesGuide'; import { LoggedOutLayout } from '../layouts/LoggedOutLayout'; import { WelcomeLayout } from '../layouts/WelcomeLayout/WelcomeLayout'; -import { ViewOnlyPromo } from 'src/views/view-only/ViewOnlyPromo'; -import { - selectDevice, - selectIsFirmwareAuthenticityCheckDismissed, -} from '@suite-common/wallet-core'; import { DeviceCompromised } from '../SecurityCheck/DeviceCompromised'; import { RouterAppWithParams } from '../../../constants/suite/routes'; diff --git a/packages/suite/src/components/suite/Preloader/__tests__/Preloader.test.tsx b/packages/suite/src/components/suite/Preloader/__tests__/Preloader.test.tsx index 6f1a0096517..6704decb8e0 100644 --- a/packages/suite/src/components/suite/Preloader/__tests__/Preloader.test.tsx +++ b/packages/suite/src/components/suite/Preloader/__tests__/Preloader.test.tsx @@ -1,11 +1,11 @@ import * as envUtils from '@trezor/env-utils'; +import { DeepPartial } from '@trezor/type-utils'; import { configureStore } from 'src/support/tests/configureStore'; import { renderWithProviders, findByTestId } from 'src/support/tests/hooksHelper'; import { Preloader } from '../Preloader'; import { AppState } from '../../../../reducers/store'; -import { DeepPartial } from '@trezor/type-utils'; // render only Translation.id in data-test attribute jest.mock('src/components/suite/Translation', () => ({ diff --git a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceInitialize.tsx b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceInitialize.tsx index a9a34b71a6d..1d96e2cc70b 100644 --- a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceInitialize.tsx +++ b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceInitialize.tsx @@ -1,5 +1,7 @@ import { MouseEvent } from 'react'; + import { Button } from '@trezor/components'; + import { Translation, TroubleshootingTips } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; diff --git a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceNoFirmware.tsx b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceNoFirmware.tsx index 23a02c05101..a0ec44ad5a6 100644 --- a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceNoFirmware.tsx +++ b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceNoFirmware.tsx @@ -1,4 +1,5 @@ import { MouseEventHandler } from 'react'; + import { Button } from '@trezor/components'; import { Translation, TroubleshootingTips } from 'src/components/suite'; diff --git a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceRecoveryMode.tsx b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceRecoveryMode.tsx index 9d5e01a1d95..b059028093c 100644 --- a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceRecoveryMode.tsx +++ b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceRecoveryMode.tsx @@ -1,5 +1,7 @@ import { MouseEventHandler } from 'react'; + import { Button } from '@trezor/components'; + import { Translation, TroubleshootingTips } from 'src/components/suite'; import { rerun } from 'src/actions/recovery/recoveryActions'; import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceUnreadable.tsx b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceUnreadable.tsx index 96e44fda89d..f406ab225de 100644 --- a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceUnreadable.tsx +++ b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceUnreadable.tsx @@ -1,4 +1,5 @@ import { useState, MouseEvent } from 'react'; + import { Button } from '@trezor/components'; import { desktopApi } from '@trezor/suite-desktop-api'; import { isDesktop, isLinux } from '@trezor/env-utils'; diff --git a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceUpdateRequired.tsx b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceUpdateRequired.tsx index d2a079630b4..166a2405940 100644 --- a/packages/suite/src/components/suite/PrerequisitesGuide/DeviceUpdateRequired.tsx +++ b/packages/suite/src/components/suite/PrerequisitesGuide/DeviceUpdateRequired.tsx @@ -1,4 +1,5 @@ import { MouseEventHandler } from 'react'; + import { Button } from '@trezor/components'; import { Translation, TroubleshootingTips } from 'src/components/suite'; diff --git a/packages/suite/src/components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx b/packages/suite/src/components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx index a79186be769..3a9a7c6ddc2 100644 --- a/packages/suite/src/components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx +++ b/packages/suite/src/components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx @@ -10,6 +10,8 @@ import { selectDevices, selectDevice } from '@suite-common/wallet-core'; import { ConnectDevicePrompt, Translation } from 'src/components/suite'; import { isWebUsb } from 'src/utils/suite/transport'; import { useDispatch, useSelector } from 'src/hooks/suite'; +import { selectPrerequisite } from 'src/reducers/suite/suiteReducer'; +import { goto } from 'src/actions/suite/routerActions'; import { Transport } from './Transport'; import { DeviceConnect } from './DeviceConnect'; @@ -23,9 +25,8 @@ import { DeviceBootloader } from './DeviceBootloader'; import { DeviceNoFirmware } from './DeviceNoFirmware'; import { DeviceUpdateRequired } from './DeviceUpdateRequired'; import { DeviceDisconnectRequired } from './DeviceDisconnectRequired'; -import { selectPrerequisite } from 'src/reducers/suite/suiteReducer'; import { MultiShareBackupInProgress } from './MultiShareBackupInProgress'; -import { goto } from 'src/actions/suite/routerActions'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/PrerequisitesGuide/Transport.tsx b/packages/suite/src/components/suite/PrerequisitesGuide/Transport.tsx index 7832438f60e..204b67aba78 100644 --- a/packages/suite/src/components/suite/PrerequisitesGuide/Transport.tsx +++ b/packages/suite/src/components/suite/PrerequisitesGuide/Transport.tsx @@ -1,5 +1,4 @@ import { Translation, TroubleshootingTips } from 'src/components/suite'; - import { TROUBLESHOOTING_TIP_SUITE_DESKTOP, TROUBLESHOOTING_TIP_RESTART_COMPUTER, diff --git a/packages/suite/src/components/suite/QrCode.tsx b/packages/suite/src/components/suite/QrCode.tsx index ff9603cc611..1e36a30755e 100644 --- a/packages/suite/src/components/suite/QrCode.tsx +++ b/packages/suite/src/components/suite/QrCode.tsx @@ -2,9 +2,10 @@ import { QRCodeSVG } from 'qrcode.react'; import styled from 'styled-components'; import { Icon, Tooltip, variables, intermediaryTheme } from '@trezor/components'; -import { Translation } from './Translation'; import { CSSColor } from '@trezor/theme'; +import { Translation } from './Translation'; + export const QRCODE_SIZE = 384; export const QRCODE_PADDING = 12; diff --git a/packages/suite/src/components/suite/QuestionTooltip.tsx b/packages/suite/src/components/suite/QuestionTooltip.tsx index b2e40b141bd..ab4ccc58c93 100644 --- a/packages/suite/src/components/suite/QuestionTooltip.tsx +++ b/packages/suite/src/components/suite/QuestionTooltip.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { Tooltip, H3 } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { ExtendedMessageDescriptor } from 'src/types/suite'; diff --git a/packages/suite/src/components/suite/ReadMoreLink.tsx b/packages/suite/src/components/suite/ReadMoreLink.tsx index 3e188a95b59..7f3c04bc961 100644 --- a/packages/suite/src/components/suite/ReadMoreLink.tsx +++ b/packages/suite/src/components/suite/ReadMoreLink.tsx @@ -1,4 +1,5 @@ import * as URLS from '@trezor/urls'; + import { Translation, TrezorLink } from 'src/components/suite'; import { ExtendedMessageDescriptor } from 'src/types/suite'; diff --git a/packages/suite/src/components/suite/SecurityCheck/DeviceCompromised.tsx b/packages/suite/src/components/suite/SecurityCheck/DeviceCompromised.tsx index a5d71060c31..aa07f5bade0 100644 --- a/packages/suite/src/components/suite/SecurityCheck/DeviceCompromised.tsx +++ b/packages/suite/src/components/suite/SecurityCheck/DeviceCompromised.tsx @@ -1,4 +1,5 @@ import { useEffect } from 'react'; + import { deviceActions } from '@suite-common/wallet-core'; import { Card } from '@trezor/components'; import { getFirmwareVersion } from '@trezor/device-utils'; @@ -11,6 +12,7 @@ import { selectFirmwareHashCheckError, selectFirmwareRevisionCheckError, } from 'src/reducers/suite/suiteReducer'; + import { SecurityCheckFail, SecurityCheckFailProps } from './SecurityCheckFail'; import { softFailureChecklistItems } from './checklistItems'; diff --git a/packages/suite/src/components/suite/SecurityCheck/SecurityCheckFail.tsx b/packages/suite/src/components/suite/SecurityCheck/SecurityCheckFail.tsx index 80c86c7154b..8b1e1fc8b2a 100644 --- a/packages/suite/src/components/suite/SecurityCheck/SecurityCheckFail.tsx +++ b/packages/suite/src/components/suite/SecurityCheck/SecurityCheckFail.tsx @@ -8,6 +8,7 @@ import { Url } from '@trezor/urls'; import { Translation } from 'src/components/suite'; import { SecurityChecklist } from 'src/views/onboarding/steps/SecurityCheck/SecurityChecklist'; import { SecurityChecklistItem } from 'src/views/onboarding/steps/SecurityCheck/types'; + import { SecurityCheckLayout } from './SecurityCheckLayout'; import { hardFailureChecklistItems } from './checklistItems'; diff --git a/packages/suite/src/components/suite/SecurityCheck/checklistItems.tsx b/packages/suite/src/components/suite/SecurityCheck/checklistItems.tsx index 20efc41d08e..8a102333646 100644 --- a/packages/suite/src/components/suite/SecurityCheck/checklistItems.tsx +++ b/packages/suite/src/components/suite/SecurityCheck/checklistItems.tsx @@ -1,6 +1,7 @@ -import { Translation } from '../Translation'; import { SecurityChecklistItem } from 'src/views/onboarding/steps/SecurityCheck/types'; +import { Translation } from '../Translation'; + export const hardFailureChecklistItems: SecurityChecklistItem[] = [ { icon: 'plugs', diff --git a/packages/suite/src/components/suite/Sign.tsx b/packages/suite/src/components/suite/Sign.tsx index 7e5259942fa..3355380e982 100644 --- a/packages/suite/src/components/suite/Sign.tsx +++ b/packages/suite/src/components/suite/Sign.tsx @@ -1,4 +1,5 @@ import styled, { useTheme } from 'styled-components'; + import { SignValue } from '@suite-common/suite-types'; import { isSignValuePositive } from '@suite-common/formatters'; diff --git a/packages/suite/src/components/suite/StakeAmountWrapper.tsx b/packages/suite/src/components/suite/StakeAmountWrapper.tsx index 1dcb76b5443..42637b68fdc 100644 --- a/packages/suite/src/components/suite/StakeAmountWrapper.tsx +++ b/packages/suite/src/components/suite/StakeAmountWrapper.tsx @@ -1,11 +1,15 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { Tooltip, TOOLTIP_DELAY_NONE, TOOLTIP_DELAY_NORMAL } from '@trezor/components'; import { mediaQueries } from '@trezor/styles'; -import { Translation } from './Translation'; + import { goto } from 'src/actions/suite/routerActions'; import { useDispatch } from 'src/hooks/suite'; +import { Translation } from './Translation'; + const Container = styled.div` position: relative; display: flex; diff --git a/packages/suite/src/components/suite/StakingFeature.tsx b/packages/suite/src/components/suite/StakingFeature.tsx index afc5beb2216..cc420a7713f 100644 --- a/packages/suite/src/components/suite/StakingFeature.tsx +++ b/packages/suite/src/components/suite/StakingFeature.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import { H3, Paragraph, IconCircle, IconName } from '@trezor/components'; import { spacings } from '@trezor/theme'; diff --git a/packages/suite/src/components/suite/StakingProcess/InfoRow.tsx b/packages/suite/src/components/suite/StakingProcess/InfoRow.tsx index f7e9b5c9140..6f7ecd6ff5c 100644 --- a/packages/suite/src/components/suite/StakingProcess/InfoRow.tsx +++ b/packages/suite/src/components/suite/StakingProcess/InfoRow.tsx @@ -1,4 +1,5 @@ import { Badge, Column, List, Paragraph, Row } from '@trezor/components'; + import { Subheading } from './Subheading'; import { RowContent, RowSubheading } from './types'; diff --git a/packages/suite/src/components/suite/StakingProcess/StakingInfo.tsx b/packages/suite/src/components/suite/StakingProcess/StakingInfo.tsx index c31d46c826f..6a9cc01263d 100644 --- a/packages/suite/src/components/suite/StakingProcess/StakingInfo.tsx +++ b/packages/suite/src/components/suite/StakingProcess/StakingInfo.tsx @@ -1,4 +1,6 @@ import React from 'react'; +import { useSelector } from 'react-redux'; + import { selectAccountStakeTransactions, selectValidatorsQueue, @@ -6,12 +8,13 @@ import { StakeRootState, selectPoolStatsApyData, } from '@suite-common/wallet-core'; -import { useSelector } from 'react-redux'; + import { Translation } from 'src/components/suite'; import { getDaysToAddToPool } from 'src/utils/suite/stake'; -import { InfoRow } from './InfoRow'; import { CoinjoinRootState } from 'src/reducers/wallet/coinjoinReducer'; +import { InfoRow } from './InfoRow'; + interface StakingInfoProps { isExpanded?: boolean; } diff --git a/packages/suite/src/components/suite/StakingProcess/Subheading.tsx b/packages/suite/src/components/suite/StakingProcess/Subheading.tsx index 31890dff730..0ebca05a2b9 100644 --- a/packages/suite/src/components/suite/StakingProcess/Subheading.tsx +++ b/packages/suite/src/components/suite/StakingProcess/Subheading.tsx @@ -1,6 +1,7 @@ import { Icon, Paragraph, Row } from '@trezor/components'; -import { Translation } from '../Translation'; import { spacings } from '@trezor/theme'; + +import { Translation } from '../Translation'; import { RowSubheading } from './types'; interface SubheadingProps { diff --git a/packages/suite/src/components/suite/StakingProcess/UnstakingInfo.tsx b/packages/suite/src/components/suite/StakingProcess/UnstakingInfo.tsx index 11c9b4387ec..9b73787a541 100644 --- a/packages/suite/src/components/suite/StakingProcess/UnstakingInfo.tsx +++ b/packages/suite/src/components/suite/StakingProcess/UnstakingInfo.tsx @@ -1,16 +1,19 @@ import React from 'react'; +import { useSelector } from 'react-redux'; + import { selectAccountUnstakeTransactions, selectValidatorsQueue, TransactionsRootState, StakeRootState, } from '@suite-common/wallet-core'; + import { Translation } from 'src/components/suite'; -import { InfoRow } from './InfoRow'; -import { useSelector } from 'react-redux'; import { getDaysToUnstake } from 'src/utils/suite/stake'; import { CoinjoinRootState } from 'src/reducers/wallet/coinjoinReducer'; +import { InfoRow } from './InfoRow'; + interface UnstakingInfoProps { isExpanded?: boolean; } diff --git a/packages/suite/src/components/suite/StatusLight.tsx b/packages/suite/src/components/suite/StatusLight.tsx index 14839cb2a29..54c9fa625d1 100644 --- a/packages/suite/src/components/suite/StatusLight.tsx +++ b/packages/suite/src/components/suite/StatusLight.tsx @@ -1,6 +1,7 @@ +import styled, { DefaultTheme } from 'styled-components'; + import { UIVariant } from '@trezor/components/src/config/types'; import { CSSColor, Color } from '@trezor/theme'; -import styled, { DefaultTheme } from 'styled-components'; type StatusLightVariant = Extract; diff --git a/packages/suite/src/components/suite/Ticker/LastUpdateTooltip.tsx b/packages/suite/src/components/suite/Ticker/LastUpdateTooltip.tsx index c56391f0505..99291d926df 100644 --- a/packages/suite/src/components/suite/Ticker/LastUpdateTooltip.tsx +++ b/packages/suite/src/components/suite/Ticker/LastUpdateTooltip.tsx @@ -1,10 +1,13 @@ -import { Translation } from 'src/components/suite'; -import styled from 'styled-components'; -import { Tooltip } from '@trezor/components'; import { FormattedRelativeTime } from 'react-intl'; import { ReactNode } from 'react'; + +import styled from 'styled-components'; import { differenceInMinutes } from 'date-fns'; +import { Tooltip } from '@trezor/components'; + +import { Translation } from 'src/components/suite'; + const LastUpdate = styled.div` text-transform: none; `; diff --git a/packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx b/packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx index fd5c8155900..5040c22aa47 100644 --- a/packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx +++ b/packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx @@ -1,8 +1,12 @@ -import { Translation, TooltipSymbol } from 'src/components/suite'; import styled, { useTheme } from 'styled-components'; -import { TranslationKey } from '../Translation'; + import { typography } from '@trezor/theme'; +import { Translation, TooltipSymbol } from 'src/components/suite'; + +import { TranslationKey } from '../Translation'; + + const NoRatesMessage = styled.div` ${typography.label}; display: flex; diff --git a/packages/suite/src/components/suite/Ticker/PriceTicker.tsx b/packages/suite/src/components/suite/Ticker/PriceTicker.tsx index 50923f3755c..f53c9047d26 100644 --- a/packages/suite/src/components/suite/Ticker/PriceTicker.tsx +++ b/packages/suite/src/components/suite/Ticker/PriceTicker.tsx @@ -1,10 +1,13 @@ import styled from 'styled-components'; +import { typography } from '@trezor/theme'; +import { TokenAddress } from '@suite-common/wallet-types'; + import { FiatValue } from 'src/components/suite'; + import { NoRatesTooltip } from './NoRatesTooltip'; -import { typography } from '@trezor/theme'; import { LastUpdateTooltip } from './LastUpdateTooltip'; -import { TokenAddress } from '@suite-common/wallet-types'; + const FiatRateWrapper = styled.span` ${typography.callout} diff --git a/packages/suite/src/components/suite/Ticker/TrendTicker.tsx b/packages/suite/src/components/suite/Ticker/TrendTicker.tsx index bfdf14c0f2d..e196ff808d9 100644 --- a/packages/suite/src/components/suite/Ticker/TrendTicker.tsx +++ b/packages/suite/src/components/suite/Ticker/TrendTicker.tsx @@ -11,6 +11,7 @@ import { FiatValue } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; + import { NoRatesTooltip } from './NoRatesTooltip'; const PercentageWrapper = styled.div<{ $isRateGoingUp: boolean }>` diff --git a/packages/suite/src/components/suite/TooltipSymbol.tsx b/packages/suite/src/components/suite/TooltipSymbol.tsx index 12371c14bf1..719d2dec381 100644 --- a/packages/suite/src/components/suite/TooltipSymbol.tsx +++ b/packages/suite/src/components/suite/TooltipSymbol.tsx @@ -1,5 +1,7 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { Icon, IconName, Tooltip } from '@trezor/components'; import { CSSColor } from '@trezor/theme'; diff --git a/packages/suite/src/components/suite/TorLoader/TorLoader.tsx b/packages/suite/src/components/suite/TorLoader/TorLoader.tsx index 545451f8e42..4b12b1b1903 100644 --- a/packages/suite/src/components/suite/TorLoader/TorLoader.tsx +++ b/packages/suite/src/components/suite/TorLoader/TorLoader.tsx @@ -1,14 +1,15 @@ import { useState, useEffect, ComponentType } from 'react'; import styled from 'styled-components'; -import { TorStatus } from 'src/types/suite'; +import { Button, ModalProps } from '@trezor/components'; + +import { TorStatus } from 'src/types/suite'; import { Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { selectTorState } from 'src/reducers/suite/suiteReducer'; import { toggleTor, updateTorStatus } from 'src/actions/suite/suiteActions'; -import { Button, ModalProps } from '@trezor/components'; import { TorProgressBar } from './TorProgressBar'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/components/suite/TorLoader/TorProgressBar.tsx b/packages/suite/src/components/suite/TorLoader/TorProgressBar.tsx index 50b7ec4a0e3..179ac4b8d8f 100644 --- a/packages/suite/src/components/suite/TorLoader/TorProgressBar.tsx +++ b/packages/suite/src/components/suite/TorLoader/TorProgressBar.tsx @@ -1,9 +1,9 @@ import styled from 'styled-components'; import { Button, ProgressBar, Icon, variables } from '@trezor/components'; +import { borders } from '@trezor/theme'; import { Translation } from 'src/components/suite'; -import { borders } from '@trezor/theme'; const IconWrapper = styled.div` width: 120px; diff --git a/packages/suite/src/components/suite/TrafficLightOffset.tsx b/packages/suite/src/components/suite/TrafficLightOffset.tsx index 42e398f1a59..92f9356b0f1 100644 --- a/packages/suite/src/components/suite/TrafficLightOffset.tsx +++ b/packages/suite/src/components/suite/TrafficLightOffset.tsx @@ -1,7 +1,9 @@ -import { isDesktop, isMacOs } from '@trezor/env-utils'; import React from 'react'; + import styled from 'styled-components'; +import { isDesktop, isMacOs } from '@trezor/env-utils'; + type Props = { children?: React.ReactNode; offset?: number; diff --git a/packages/suite/src/components/suite/TrezorLink.tsx b/packages/suite/src/components/suite/TrezorLink.tsx index 5554a240efa..41bfdfa616b 100644 --- a/packages/suite/src/components/suite/TrezorLink.tsx +++ b/packages/suite/src/components/suite/TrezorLink.tsx @@ -1,4 +1,5 @@ import { Link, LinkProps } from '@trezor/components'; + import { useExternalLink } from 'src/hooks/suite'; export const TrezorLink = (props: LinkProps) => { diff --git a/packages/suite/src/components/suite/UdevDownload.tsx b/packages/suite/src/components/suite/UdevDownload.tsx index a383ad52053..b6c05a8499c 100644 --- a/packages/suite/src/components/suite/UdevDownload.tsx +++ b/packages/suite/src/components/suite/UdevDownload.tsx @@ -1,9 +1,13 @@ import { useState } from 'react'; + import styled from 'styled-components'; + import { DATA_URL, HELP_CENTER_UDEV_URL } from '@trezor/urls'; -import { Translation } from 'src/components/suite'; import { variables, Button, Select, Link, Spinner } from '@trezor/components'; + +import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; + import { LearnMoreButton } from './LearnMoreButton'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/UnstakingTxAmount.tsx b/packages/suite/src/components/suite/UnstakingTxAmount.tsx index 32652de2f5c..c84fdf0ebe0 100644 --- a/packages/suite/src/components/suite/UnstakingTxAmount.tsx +++ b/packages/suite/src/components/suite/UnstakingTxAmount.tsx @@ -1,10 +1,12 @@ import React from 'react'; + import { WalletAccountTransaction } from '@suite-common/wallet-types'; import { formatNetworkAmount, isUnstakeTx, getUnstakeAmountByEthereumDataHex, } from '@suite-common/wallet-utils'; + import { FormattedCryptoAmount } from './FormattedCryptoAmount'; interface UnstakingTxAmountProps { diff --git a/packages/suite/src/components/suite/WebUsbButton.tsx b/packages/suite/src/components/suite/WebUsbButton.tsx index 20ed0d7cf17..dd65fe3ac91 100644 --- a/packages/suite/src/components/suite/WebUsbButton.tsx +++ b/packages/suite/src/components/suite/WebUsbButton.tsx @@ -1,6 +1,7 @@ import TrezorConnect from '@trezor/connect'; import type TrezorConnectWeb from '@trezor/connect-web'; import { ButtonProps, Button, IconButton, Tooltip } from '@trezor/components'; + import { Translation, TranslationKey } from './Translation'; interface WebUsbButtonProps extends Omit { diff --git a/packages/suite/src/components/suite/WordInput.tsx b/packages/suite/src/components/suite/WordInput.tsx index c8ebdf1e69a..f842cbded50 100644 --- a/packages/suite/src/components/suite/WordInput.tsx +++ b/packages/suite/src/components/suite/WordInput.tsx @@ -1,14 +1,17 @@ import { useEffect, useRef, memo, Children, ReactElement } from 'react'; import { FixedSizeList as List } from 'react-window'; import { MenuListProps, SelectInstance, createFilter } from 'react-select'; +import { useKeyPress } from 'react-use'; + import styled from 'styled-components'; + import { Select, variables } from '@trezor/components'; import { bip39 } from '@trezor/crypto-utils'; -import { useTranslation } from 'src/hooks/suite/useTranslation'; -import { useKeyPress } from 'react-use'; import TrezorConnect, { UI } from '@trezor/connect'; import { createTimeoutPromise } from '@trezor/utils'; +import { useTranslation } from 'src/hooks/suite/useTranslation'; + const options = bip39.map(item => ({ label: item, value: item })); const SelectWrapper = styled.div` diff --git a/packages/suite/src/components/suite/WordInputAdvanced.tsx b/packages/suite/src/components/suite/WordInputAdvanced.tsx index 24b6391837b..04d249577ff 100644 --- a/packages/suite/src/components/suite/WordInputAdvanced.tsx +++ b/packages/suite/src/components/suite/WordInputAdvanced.tsx @@ -1,11 +1,14 @@ import { useEffect, useCallback } from 'react'; + import styled from 'styled-components'; + import { HELP_CENTER_ADVANCED_RECOVERY_URL } from '@trezor/urls'; import { Button, PinButton, KEYBOARD_CODE } from '@trezor/components'; -import { Translation, TrezorLink, DeviceMatrixExplanation } from 'src/components/suite'; import { createTimeoutPromise } from '@trezor/utils'; import TrezorConnect, { DeviceModelInternal, UI } from '@trezor/connect'; +import { Translation, TrezorLink, DeviceMatrixExplanation } from 'src/components/suite'; + const Wrapper = styled.div` display: flex; height: 100%; diff --git a/packages/suite/src/components/suite/__tests__/NumberInput.test.tsx b/packages/suite/src/components/suite/__tests__/NumberInput.test.tsx index 949e4831435..25b218f8c46 100644 --- a/packages/suite/src/components/suite/__tests__/NumberInput.test.tsx +++ b/packages/suite/src/components/suite/__tests__/NumberInput.test.tsx @@ -1,12 +1,17 @@ -import { render } from '@testing-library/react'; import { Provider } from 'react-redux'; +import { useForm } from 'react-hook-form'; + +import { render } from '@testing-library/react'; import { Store } from 'redux'; import userEvent from '@testing-library/user-event'; -import { useForm } from 'react-hook-form'; -import suiteReducer, { SuiteState } from 'src/reducers/suite/suiteReducer'; + + import { configureMockStore } from '@suite-common/test-utils'; + +import suiteReducer, { SuiteState } from 'src/reducers/suite/suiteReducer'; import { ThemeProvider } from 'src/support/suite/ThemeProvider'; import { Locale } from 'src/config/suite/languages'; + import { NumberInput } from '../NumberInput'; const onChangeMock = jest.fn(); diff --git a/packages/suite/src/components/suite/__tests__/Translation.test.tsx b/packages/suite/src/components/suite/__tests__/Translation.test.tsx index ebb796060ee..a10da772870 100644 --- a/packages/suite/src/components/suite/__tests__/Translation.test.tsx +++ b/packages/suite/src/components/suite/__tests__/Translation.test.tsx @@ -1,4 +1,5 @@ import createComponentWithIntl from 'src/support/tests/IntlHelper'; + import { Translation } from '../Translation'; const messages = { diff --git a/packages/suite/src/components/suite/banners/MessageSystemBanner.tsx b/packages/suite/src/components/suite/banners/MessageSystemBanner.tsx index b65a2b8e7c8..cc5243143a8 100644 --- a/packages/suite/src/components/suite/banners/MessageSystemBanner.tsx +++ b/packages/suite/src/components/suite/banners/MessageSystemBanner.tsx @@ -1,12 +1,14 @@ import { useMemo } from 'react'; -import { goto } from 'src/actions/suite/routerActions'; + import { messageSystemActions } from '@suite-common/message-system'; import { Message } from '@suite-common/suite-types'; +import { Row, Banner as WarningComponent, Banner } from '@trezor/components'; + +import { goto } from 'src/actions/suite/routerActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { getTorUrlIfAvailable } from 'src/utils/suite/tor'; - import { selectLanguage, selectTorState } from 'src/reducers/suite/suiteReducer'; -import { Row, Banner as WarningComponent, Banner } from '@trezor/components'; + type MessageSystemBannerProps = { message: Message; diff --git a/packages/suite/src/components/suite/banners/SuiteBanners/FailedBackupBanner.tsx b/packages/suite/src/components/suite/banners/SuiteBanners/FailedBackupBanner.tsx index e4b54e044d7..371ee225593 100644 --- a/packages/suite/src/components/suite/banners/SuiteBanners/FailedBackupBanner.tsx +++ b/packages/suite/src/components/suite/banners/SuiteBanners/FailedBackupBanner.tsx @@ -1,7 +1,8 @@ +import { Banner } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch } from 'src/hooks/suite'; -import { Banner } from '@trezor/components'; import { SettingsAnchor } from 'src/constants/suite/anchors'; export const FailedBackup = () => { diff --git a/packages/suite/src/components/suite/banners/SuiteBanners/FirmwareHashMismatchBanner.tsx b/packages/suite/src/components/suite/banners/SuiteBanners/FirmwareHashMismatchBanner.tsx index 117cb026534..66f1cf3712b 100644 --- a/packages/suite/src/components/suite/banners/SuiteBanners/FirmwareHashMismatchBanner.tsx +++ b/packages/suite/src/components/suite/banners/SuiteBanners/FirmwareHashMismatchBanner.tsx @@ -1,6 +1,7 @@ -import { Translation } from 'src/components/suite'; import { Banner } from '@trezor/components'; +import { Translation } from 'src/components/suite'; + export const FirmwareHashMismatch = () => ( diff --git a/packages/suite/src/components/suite/banners/SuiteBanners/NoBackupBanner.tsx b/packages/suite/src/components/suite/banners/SuiteBanners/NoBackupBanner.tsx index d1e4f325069..7057c4f5eb2 100644 --- a/packages/suite/src/components/suite/banners/SuiteBanners/NoBackupBanner.tsx +++ b/packages/suite/src/components/suite/banners/SuiteBanners/NoBackupBanner.tsx @@ -1,7 +1,8 @@ +import { Banner } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch, useTranslation } from 'src/hooks/suite'; -import { Banner } from '@trezor/components'; export const NoBackup = () => { const dispatch = useDispatch(); diff --git a/packages/suite/src/components/suite/banners/SuiteBanners/NoConnectionBanner.tsx b/packages/suite/src/components/suite/banners/SuiteBanners/NoConnectionBanner.tsx index 1ec6e9209f6..541f23983a0 100644 --- a/packages/suite/src/components/suite/banners/SuiteBanners/NoConnectionBanner.tsx +++ b/packages/suite/src/components/suite/banners/SuiteBanners/NoConnectionBanner.tsx @@ -1,6 +1,7 @@ -import { Translation } from 'src/components/suite'; import { Banner } from '@trezor/components'; +import { Translation } from 'src/components/suite'; + export const NoConnectionBanner = () => ( diff --git a/packages/suite/src/components/suite/banners/SuiteBanners/SafetyChecksBanner.tsx b/packages/suite/src/components/suite/banners/SuiteBanners/SafetyChecksBanner.tsx index 26be76c1aad..9fdaebd1d5b 100644 --- a/packages/suite/src/components/suite/banners/SuiteBanners/SafetyChecksBanner.tsx +++ b/packages/suite/src/components/suite/banners/SuiteBanners/SafetyChecksBanner.tsx @@ -1,8 +1,9 @@ +import { Row, Banner as WarningComponent, Banner } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { Row, Banner as WarningComponent, Banner } from '@trezor/components'; interface SafetyChecksBannerProps { onDismiss?: () => void; diff --git a/packages/suite/src/components/suite/banners/SuiteBanners/SuiteBanners.tsx b/packages/suite/src/components/suite/banners/SuiteBanners/SuiteBanners.tsx index 149799e33e3..f69a07db1b4 100644 --- a/packages/suite/src/components/suite/banners/SuiteBanners/SuiteBanners.tsx +++ b/packages/suite/src/components/suite/banners/SuiteBanners/SuiteBanners.tsx @@ -1,4 +1,5 @@ import { useState, useEffect } from 'react'; + import styled from 'styled-components'; import { selectBannerMessage } from '@suite-common/message-system'; @@ -15,6 +16,7 @@ import { selectFirmwareHashCheckError, selectFirmwareRevisionCheckError, } from 'src/reducers/suite/suiteReducer'; + import { MessageSystemBanner } from '../MessageSystemBanner'; import { NoConnectionBanner } from './NoConnectionBanner'; import { UpdateBridge } from './UpdateBridgeBanner'; diff --git a/packages/suite/src/components/suite/banners/SuiteBanners/TranslationModeBanner.tsx b/packages/suite/src/components/suite/banners/SuiteBanners/TranslationModeBanner.tsx index 4f25737742b..ddd44771981 100644 --- a/packages/suite/src/components/suite/banners/SuiteBanners/TranslationModeBanner.tsx +++ b/packages/suite/src/components/suite/banners/SuiteBanners/TranslationModeBanner.tsx @@ -1,6 +1,7 @@ -import { setTranslationMode } from 'src/utils/suite/l10n'; import { Banner } from '@trezor/components'; +import { setTranslationMode } from 'src/utils/suite/l10n'; + export const TranslationMode = () => ( { const dispatch = useDispatch(); diff --git a/packages/suite/src/components/suite/graph/GraphRangeSelector.tsx b/packages/suite/src/components/suite/graph/GraphRangeSelector.tsx index 20a7ac78388..5847a244763 100644 --- a/packages/suite/src/components/suite/graph/GraphRangeSelector.tsx +++ b/packages/suite/src/components/suite/graph/GraphRangeSelector.tsx @@ -1,8 +1,6 @@ import { useState, useRef } from 'react'; import styled, { css } from 'styled-components'; -import { Translation } from 'src/components/suite'; -import { useGraph, useLocales } from 'src/hooks/suite'; import { startOfDay, startOfToday, @@ -14,6 +12,9 @@ import { } from 'date-fns'; import { variables, Dropdown, DropdownRef, Timerange, intermediaryTheme } from '@trezor/components'; + +import { Translation } from 'src/components/suite'; +import { useGraph, useLocales } from 'src/hooks/suite'; import { GraphRange } from 'src/types/wallet/graph'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/graph/GraphScaleDropdownItem.tsx b/packages/suite/src/components/suite/graph/GraphScaleDropdownItem.tsx index 11a62d8cf4a..b387f43993c 100644 --- a/packages/suite/src/components/suite/graph/GraphScaleDropdownItem.tsx +++ b/packages/suite/src/components/suite/graph/GraphScaleDropdownItem.tsx @@ -1,7 +1,7 @@ +import { SelectBar, SelectBarProps } from '@trezor/components'; + import { useGraph } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; - -import { SelectBar, SelectBarProps } from '@trezor/components'; import { GraphScale } from 'src/types/wallet/graph'; export const GraphScaleDropdownItem = (props: Omit, 'options'>) => { diff --git a/packages/suite/src/components/suite/graph/GraphSkeleton.tsx b/packages/suite/src/components/suite/graph/GraphSkeleton.tsx index d1f75832d28..c03a2614397 100644 --- a/packages/suite/src/components/suite/graph/GraphSkeleton.tsx +++ b/packages/suite/src/components/suite/graph/GraphSkeleton.tsx @@ -1,4 +1,5 @@ import { ComponentProps } from 'react'; + import styled from 'styled-components'; import { SkeletonRectangle, SkeletonSpread, SkeletonStack, variables } from '@trezor/components'; diff --git a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx index 7c120192182..bf97271f1ff 100644 --- a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx +++ b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx @@ -1,14 +1,16 @@ import styled from 'styled-components'; import { TooltipProps } from 'recharts'; -import { FormattedCryptoAmount } from 'src/components/suite/FormattedCryptoAmount'; -import { NetworkSymbol } from '@suite-common/wallet-config'; +import { NetworkSymbol } from '@suite-common/wallet-config'; import { Formatters, useFormatters } from '@suite-common/formatters'; +import { SignOperator } from '@suite-common/suite-types'; + +import { FormattedCryptoAmount } from 'src/components/suite/FormattedCryptoAmount'; +import { CommonAggregatedHistory, GraphRange } from 'src/types/wallet/graph'; import type { CryptoGraphProps } from './TransactionsGraph'; import { GraphTooltipBase } from './GraphTooltipBase'; -import { CommonAggregatedHistory, GraphRange } from 'src/types/wallet/graph'; -import { SignOperator } from '@suite-common/suite-types'; + const StyledCryptoAmount = styled(FormattedCryptoAmount)` margin-right: 2px; diff --git a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipBase.tsx b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipBase.tsx index 7ddf7779e04..88837f7daa9 100644 --- a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipBase.tsx +++ b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipBase.tsx @@ -1,4 +1,5 @@ import { useEffect } from 'react'; + import styled from 'styled-components'; import { TooltipProps } from 'recharts'; diff --git a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphXAxisTick.tsx b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphXAxisTick.tsx index 93912bde74c..f59e6d2e6d6 100644 --- a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphXAxisTick.tsx +++ b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphXAxisTick.tsx @@ -1,7 +1,8 @@ -import { useTheme } from 'styled-components'; import { FormattedDate } from 'react-intl'; +import { useTheme } from 'styled-components'; import { differenceInMonths } from 'date-fns'; + import { GraphRange } from 'src/types/wallet/graph'; const getFormattedDate = (range: GraphRange, date: Date) => { diff --git a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphYAxisTick.tsx b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphYAxisTick.tsx index b56a28949da..2279b12993c 100644 --- a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphYAxisTick.tsx +++ b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphYAxisTick.tsx @@ -1,9 +1,13 @@ -import { useTheme } from 'styled-components'; import { useRef, useLayoutEffect } from 'react'; -import { FormattedCryptoAmount } from 'src/components/suite'; + +import { useTheme } from 'styled-components'; + + import { useFormatters } from '@suite-common/formatters'; import { NetworkSymbol } from '@suite-common/wallet-config'; +import { FormattedCryptoAmount } from 'src/components/suite'; + interface CommonProps { setWidth: (n: number) => void; [k: string]: any; diff --git a/packages/suite/src/components/suite/labeling/AccountLabeling.tsx b/packages/suite/src/components/suite/labeling/AccountLabeling.tsx index 7b34b083045..568bbe84984 100644 --- a/packages/suite/src/components/suite/labeling/AccountLabeling.tsx +++ b/packages/suite/src/components/suite/labeling/AccountLabeling.tsx @@ -1,6 +1,7 @@ import { findAccountDevice } from '@suite-common/wallet-utils'; import { isSelectedDevice } from '@suite-common/suite-utils'; import { selectDevices, selectDevice } from '@suite-common/wallet-core'; +import { BadgeProps } from '@trezor/components'; import { AccountLabel } from 'src/components/suite'; import { Account as WalletAccount } from 'src/types/wallet'; @@ -8,7 +9,6 @@ import { useSelector } from 'src/hooks/suite'; import { selectLabelingDataForAccount } from 'src/reducers/suite/metadataReducer'; import { WalletLabeling } from './WalletLabeling'; -import { BadgeProps } from '@trezor/components'; interface AccountProps { account: WalletAccount | WalletAccount[]; diff --git a/packages/suite/src/components/suite/labeling/AddressLabeling.tsx b/packages/suite/src/components/suite/labeling/AddressLabeling.tsx index 66160ef5cdc..00995d8a25d 100644 --- a/packages/suite/src/components/suite/labeling/AddressLabeling.tsx +++ b/packages/suite/src/components/suite/labeling/AddressLabeling.tsx @@ -1,7 +1,9 @@ import { findAccountsByAddress } from '@suite-common/wallet-utils'; +import { NetworkSymbol } from '@suite-common/wallet-config'; + import { useSelector } from 'src/hooks/suite'; + import { AccountLabeling } from './AccountLabeling'; -import { NetworkSymbol } from '@suite-common/wallet-config'; type AddressLabelingProps = { networkSymbol: NetworkSymbol; diff --git a/packages/suite/src/components/suite/labeling/MetadataLabeling/MetadataLabeling.tsx b/packages/suite/src/components/suite/labeling/MetadataLabeling/MetadataLabeling.tsx index 5206f5e1068..65e2a6f8561 100644 --- a/packages/suite/src/components/suite/labeling/MetadataLabeling/MetadataLabeling.tsx +++ b/packages/suite/src/components/suite/labeling/MetadataLabeling/MetadataLabeling.tsx @@ -1,21 +1,25 @@ import { useEffect, useState, useMemo, useRef } from 'react'; + import styled from 'styled-components'; import { Button, DropdownMenuItemProps, Row } from '@trezor/components'; +import type { Timeout } from '@trezor/type-utils'; +import { StaticSessionId } from '@trezor/connect'; + import { useDiscovery, useDispatch, useSelector } from 'src/hooks/suite'; import { addMetadata, init, setEditing } from 'src/actions/suite/metadataLabelingActions'; import { MetadataAddPayload } from 'src/types/suite/metadata'; import { Translation } from 'src/components/suite'; -import { Props, ExtendedProps } from './definitions'; -import { withEditable } from './withEditable'; -import { withDropdown } from './withDropdown'; import { selectIsLabelingAvailableForEntity, selectIsLabelingInitPossible, } from 'src/reducers/suite/metadataReducer'; -import type { Timeout } from '@trezor/type-utils'; + +import { Props, ExtendedProps } from './definitions'; +import { withEditable } from './withEditable'; +import { withDropdown } from './withDropdown'; import { AccountTypeBadge } from '../../AccountTypeBadge'; -import { StaticSessionId } from '@trezor/connect'; + const LabelValue = styled.div` overflow: hidden; diff --git a/packages/suite/src/components/suite/labeling/MetadataLabeling/definitions.ts b/packages/suite/src/components/suite/labeling/MetadataLabeling/definitions.ts index 6991ffdd152..a01776c289b 100644 --- a/packages/suite/src/components/suite/labeling/MetadataLabeling/definitions.ts +++ b/packages/suite/src/components/suite/labeling/MetadataLabeling/definitions.ts @@ -1,8 +1,10 @@ import { ReactNode } from 'react'; + import { DropdownMenuItemProps } from '@trezor/components'; -import { MetadataAddPayload } from 'src/types/suite/metadata'; import { AccountType, Bip43Path, NetworkType } from '@suite-common/wallet-config'; +import { MetadataAddPayload } from 'src/types/suite/metadata'; + export interface Props { accountType?: AccountType; networkType?: NetworkType; diff --git a/packages/suite/src/components/suite/labeling/MetadataLabeling/withDropdown.tsx b/packages/suite/src/components/suite/labeling/MetadataLabeling/withDropdown.tsx index 2b55c810a50..105f203d17e 100644 --- a/packages/suite/src/components/suite/labeling/MetadataLabeling/withDropdown.tsx +++ b/packages/suite/src/components/suite/labeling/MetadataLabeling/withDropdown.tsx @@ -1,10 +1,12 @@ import { FC } from 'react'; + import styled from 'styled-components'; import { Dropdown } from '@trezor/components'; -import { ExtendedProps } from './definitions'; import { RequiredKey } from '@trezor/type-utils'; +import { ExtendedProps } from './definitions'; + // eslint-disable-next-line local-rules/no-override-ds-component const StyledDropdown = styled(Dropdown)` display: flex; diff --git a/packages/suite/src/components/suite/labeling/MetadataLabeling/withEditable.tsx b/packages/suite/src/components/suite/labeling/MetadataLabeling/withEditable.tsx index afd3e8e8607..e7752c8bbee 100644 --- a/packages/suite/src/components/suite/labeling/MetadataLabeling/withEditable.tsx +++ b/packages/suite/src/components/suite/labeling/MetadataLabeling/withEditable.tsx @@ -8,6 +8,7 @@ import { } from 'react'; import styled, { useTheme } from 'styled-components'; + import { Icon } from '@trezor/components'; import { AutoScalingInput } from '@trezor/components/src/components/AutoScalingInput/AutoScalingInput'; diff --git a/packages/suite/src/components/suite/labeling/WalletLabeling.tsx b/packages/suite/src/components/suite/labeling/WalletLabeling.tsx index 5c477995b88..f0a34b5dd60 100644 --- a/packages/suite/src/components/suite/labeling/WalletLabeling.tsx +++ b/packages/suite/src/components/suite/labeling/WalletLabeling.tsx @@ -1,10 +1,14 @@ +import { useCallback } from 'react'; + +import styled from 'styled-components'; + +import { selectDeviceLabelOrName } from '@suite-common/wallet-core'; + import { TrezorDevice } from 'src/types/suite'; import { useTranslation } from 'src/hooks/suite/useTranslation'; import { useSelector } from 'src/hooks/suite/useSelector'; import { selectLabelingDataForWallet } from 'src/reducers/suite/metadataReducer'; -import { useCallback } from 'react'; -import styled from 'styled-components'; -import { selectDeviceLabelOrName } from '@suite-common/wallet-core'; + interface WalletLabellingProps { device: TrezorDevice; diff --git a/packages/suite/src/components/suite/layouts/LoggedOutLayout.tsx b/packages/suite/src/components/suite/layouts/LoggedOutLayout.tsx index 9f7e51c1ee5..0a84a0979cd 100644 --- a/packages/suite/src/components/suite/layouts/LoggedOutLayout.tsx +++ b/packages/suite/src/components/suite/layouts/LoggedOutLayout.tsx @@ -1,10 +1,14 @@ import { ReactNode, useRef, useState } from 'react'; + +import { ElevationContext, ElevationUp } from '@trezor/components'; + import { LayoutContext, LayoutContextPayload } from 'src/support/suite/LayoutContext'; import { ModalContextProvider } from 'src/support/suite/ModalContext'; import { useResetScrollOnUrl } from 'src/hooks/suite/useResetScrollOnUrl'; import { GuideButton, GuideRouter } from 'src/components/guide'; import { useLayoutSize } from 'src/hooks/suite'; import { useClearAnchorHighlightOnClick } from 'src/hooks/suite/useClearAnchorHighlightOnClick'; + import { Metadata } from '../Metadata'; import { ModalSwitcher } from '../modals/ModalSwitcher/ModalSwitcher'; import { @@ -15,7 +19,6 @@ import { PageWrapper, Wrapper, } from './SuiteLayout/SuiteLayout'; -import { ElevationContext, ElevationUp } from '@trezor/components'; import { TrafficLightOffset } from '../TrafficLightOffset'; interface LoggedOutLayout { diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/CoinjoinBars/CoinjoinBars.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/CoinjoinBars/CoinjoinBars.tsx index c461eaadff8..2707a1c6e55 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/CoinjoinBars/CoinjoinBars.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/CoinjoinBars/CoinjoinBars.tsx @@ -1,7 +1,9 @@ import { useMemo } from 'react'; -import { CoinjoinStatusBar } from './CoinjoinStatusBar'; + import { useSelector } from 'src/hooks/suite'; +import { CoinjoinStatusBar } from './CoinjoinStatusBar'; + export const CoinjoinBars = () => { const coinjoinAccounts = useSelector(state => state.wallet.coinjoin.accounts); diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx index dc4886b62e1..fe9a5518180 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx @@ -1,15 +1,20 @@ import { useState, useEffect, useRef } from 'react'; + import styled, { css } from 'styled-components'; + import { selectDevicesCount, selectDevice } from '@suite-common/wallet-core'; import type { Timeout } from '@trezor/type-utils'; +import { borders, spacingsPx } from '@trezor/theme'; +import { focusStyleTransition, getFocusShadowStyle } from '@trezor/components/src/utils/utils'; +import { Icon } from '@trezor/components'; + import { SHAKE } from 'src/support/suite/styles/animations'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { borders, spacingsPx } from '@trezor/theme'; -import { focusStyleTransition, getFocusShadowStyle } from '@trezor/components/src/utils/utils'; -import { SidebarDeviceStatus } from './SidebarDeviceStatus'; import { ViewOnlyTooltip } from 'src/views/view-only/ViewOnlyTooltip'; -import { Icon } from '@trezor/components'; + +import { SidebarDeviceStatus } from './SidebarDeviceStatus'; + const CaretContainer = styled.div` background: transparent; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceStatus.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceStatus.tsx index 8c0b32d5bef..ff6618ce9b5 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceStatus.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceStatus.tsx @@ -1,14 +1,16 @@ +import { MouseEventHandler } from 'react'; + import styled from 'styled-components'; import { DeviceModelInternal } from '@trezor/connect'; -import { DeviceDetail } from 'src/views/suite/SwitchDevice/DeviceItem/DeviceDetail'; -import { MouseEventHandler } from 'react'; -import { TrezorDevice } from 'src/types/suite'; import { spacings } from '@trezor/theme'; import { Row } from '@trezor/components'; import { RotateDeviceImage } from '@trezor/product-components'; -import { DeviceStatusText } from 'src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText'; import { selectDeviceLabelOrNameById } from '@suite-common/wallet-core'; + +import { DeviceStatusText } from 'src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText'; +import { TrezorDevice } from 'src/types/suite'; +import { DeviceDetail } from 'src/views/suite/SwitchDevice/DeviceItem/DeviceDetail'; import { useSelector } from 'src/hooks/suite'; type DeviceStatusProps = { diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/SidebarDeviceStatus.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/SidebarDeviceStatus.tsx index ef6b70e100c..99e28147351 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/SidebarDeviceStatus.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/SidebarDeviceStatus.tsx @@ -1,7 +1,10 @@ import { MouseEventHandler } from 'react'; + import { acquireDevice, selectDevice, selectDevices } from '@suite-common/wallet-core'; import * as deviceUtils from '@suite-common/suite-utils'; + import { TrezorDevice } from 'src/types/suite'; + import { useDispatch, useSelector } from '../../../../../hooks/suite'; import { DeviceStatus } from './DeviceStatus'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileActionItem.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileActionItem.tsx index e8e917b5a9f..e412e0bae12 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileActionItem.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileActionItem.tsx @@ -1,5 +1,7 @@ import { useMemo, ReactNode, HTMLAttributes } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { Icon, IconName, variables } from '@trezor/components'; import { FADE_IN } from '@trezor/components/src/config/animations'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileMenu.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileMenu.tsx index d909a14b102..22d31307d99 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileMenu.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileMenu.tsx @@ -1,8 +1,10 @@ import { useState } from 'react'; + import styled, { useTheme } from 'styled-components'; import { zIndices } from '@trezor/theme'; import { Icon, variables } from '@trezor/components'; + import { DeviceSelector } from '../DeviceSelector/DeviceSelector'; import { MobileNavigation } from './MobileNavigation'; import { MobileMenuActions } from './MobileMenuActions'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileMenuActions.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileMenuActions.tsx index 74779218350..f0397fae8c0 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileMenuActions.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileMenuActions.tsx @@ -10,10 +10,10 @@ import { Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { useGuide } from 'src/hooks/guide/useGuide'; import { selectIsDiscreteModeActive } from 'src/reducers/wallet/settingsReducer'; +import { selectRouteName } from 'src/reducers/suite/routerReducer'; import { MobileActionItem } from './MobileActionItem'; import { useEnabledBackends } from '../utils'; -import { selectRouteName } from 'src/reducers/suite/routerReducer'; const MobileWrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx index 9e258fb9aec..0cab65a72a5 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx @@ -1,13 +1,15 @@ import { transparentize } from 'polished'; import styled, { css } from 'styled-components'; -import { findRouteByName } from 'src/utils/suite/router'; import { variables } from '@trezor/components'; +import { typography } from '@trezor/theme'; + +import { findRouteByName } from 'src/utils/suite/router'; import { HoverAnimation, Translation } from 'src/components/suite'; import { MAIN_MENU_ITEMS } from 'src/constants/suite/menu'; import { useAccountSearch, useSelector, useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; -import { typography } from '@trezor/theme'; + interface ComponentProps { isActive: boolean; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActionButton.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActionButton.tsx index 0edda90bf7e..40473d1228b 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActionButton.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActionButton.tsx @@ -1,4 +1,5 @@ import { Button, ButtonProps, IconButton, IconButtonProps } from '@trezor/components'; + import { useSelector } from 'src/hooks/suite'; export const HeaderActionButton = ({ diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActions.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActions.tsx index 0d048bcb728..e10ba724bba 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActions.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActions.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { EventType, analytics } from '@trezor/suite-analytics'; import { ButtonGroup, Dropdown, DropdownMenuItemProps, IconName } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; import { hasNetworkFeatures } from '@suite-common/wallet-utils'; + import { WalletParams } from 'src/types/wallet'; import { Translation } from 'src/components/suite/Translation'; import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageHeader.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageHeader.tsx index 87d9bbf5d88..ed17cffffd1 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageHeader.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageHeader.tsx @@ -1,14 +1,17 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; import { Route } from '@suite-common/suite-types'; import { spacingsPx, zIndices } from '@trezor/theme'; + import { useSelector } from 'src/hooks/suite'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { selectIsAccountTabPage, selectRouteName } from 'src/reducers/suite/routerReducer'; +import { TradeActions } from 'src/components/suite/layouts/SuiteLayout/PageHeader/TradeActions'; + import { HeaderActions } from './HeaderActions'; import { PageName } from './PageNames/PageName'; -import { TradeActions } from 'src/components/suite/layouts/SuiteLayout/PageHeader/TradeActions'; const HEADER_HEIGHT = 64; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx index 522d1cf85da..bcd487fa5b0 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountDetails.tsx @@ -1,8 +1,13 @@ import { useState, useEffect } from 'react'; + import styled, { keyframes } from 'styled-components'; + import { Account } from '@suite-common/wallet-types'; import { spacingsPx, zIndices, typography } from '@trezor/theme'; import { H2 } from '@trezor/components'; +import { CoinLogo } from '@trezor/product-components'; +import { isTestnet } from '@suite-common/wallet-utils'; + import { MetadataLabeling, AccountLabel, @@ -12,8 +17,6 @@ import { } from 'src/components/suite'; import { useDefaultAccountLabel, useSelector } from 'src/hooks/suite'; import { selectLabelingDataForSelectedAccount } from 'src/reducers/suite/metadataReducer'; -import { CoinLogo } from '@trezor/product-components'; -import { isTestnet } from '@suite-common/wallet-utils'; const rotateIn = keyframes` from { diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountName.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountName.tsx index c81529afaa9..bea86202091 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountName.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountName.tsx @@ -1,7 +1,10 @@ import { useEffect, useState } from 'react'; + import { spacings } from '@trezor/theme'; import { Account } from '@suite-common/wallet-types'; + import { ACCOUNT_INFO_HEIGHT } from 'src/components/wallet/WalletLayout/AccountTopPanel/AccountTopPanel'; + import { AccountDetails } from './AccountDetails'; import { SCROLL_WRAPPER_ID } from '../../../SuiteLayout'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountSubpageName.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountSubpageName.tsx index 1454512628a..57b82b335ba 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountSubpageName.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/AccountName/AccountSubpageName.tsx @@ -1,11 +1,14 @@ import styled from 'styled-components'; + import { IconButton } from '@trezor/components'; import { Account } from '@suite-common/wallet-types'; import { spacingsPx } from '@trezor/theme'; +import { Route } from '@suite-common/suite-types'; + import { useDispatch } from 'src/hooks/suite'; -import { AccountDetails } from './AccountDetails'; import { goto } from 'src/actions/suite/routerActions'; -import { Route } from '@suite-common/suite-types'; + +import { AccountDetails } from './AccountDetails'; const Container = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/BasicName.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/BasicName.tsx index 38af0ff431c..15b93699918 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/BasicName.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/BasicName.tsx @@ -1,6 +1,8 @@ import styled from 'styled-components'; + import { H2 } from '@trezor/components'; import { TranslationKey } from '@suite-common/intl-types'; + import { Translation } from 'src/components/suite'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/PageName.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/PageName.tsx index fb49d8a5add..d1d60c89f99 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/PageName.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/PageName.tsx @@ -1,4 +1,5 @@ import { Route } from '@suite-common/suite-types'; + import { useSelector } from 'src/hooks/suite'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { selectIsAccountTabPage } from 'src/reducers/suite/routerReducer'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/SettingsName.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/SettingsName.tsx index 5fdcb1d4915..6a9cc4d8825 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/SettingsName.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/SettingsName.tsx @@ -1,13 +1,17 @@ import { useState } from 'react'; + import styled from 'styled-components'; + import { desktopApi } from '@trezor/suite-desktop-api'; import { IconButton } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; + import { setDebugMode } from 'src/actions/suite/suiteActions'; import { Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { selectIsDebugModeActive, selectIsLoggedOut } from 'src/reducers/suite/suiteReducer'; import { goto } from 'src/actions/suite/routerActions'; + import { HeaderHeading } from './BasicName'; const Container = styled.div` diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/TradeActions.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/TradeActions.tsx index bf59b18ec62..aedea0a871f 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/TradeActions.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/PageHeader/TradeActions.tsx @@ -1,15 +1,17 @@ +import styled, { css } from 'styled-components'; + import { Row, variables } from '@trezor/components'; import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; import { analytics, EventType } from '@trezor/suite-analytics'; +import { selectDevice } from '@suite-common/wallet-core'; +import { spacings } from '@trezor/theme'; +import { SelectedAccountStatus } from '@suite-common/wallet-types'; + import { goto } from 'src/actions/suite/routerActions'; import { AppNavigationTooltip } from 'src/components/suite/AppNavigation/AppNavigationTooltip'; import { Translation } from 'src/components/suite/Translation'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import styled, { css } from 'styled-components'; import { HeaderActionButton } from 'src/components/suite/layouts/SuiteLayout/PageHeader/HeaderActionButton'; -import { selectDevice } from '@suite-common/wallet-core'; -import { spacings } from '@trezor/theme'; -import { SelectedAccountStatus } from '@suite-common/wallet-types'; import { selectIsAccountTabPage, selectRouteName } from 'src/reducers/suite/routerReducer'; // instant without computing the layout diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/Navigation.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/Navigation.tsx index dc81baea00d..9c6bcde8168 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/Navigation.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/Navigation.tsx @@ -1,11 +1,15 @@ import { FC } from 'react'; + import styled from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; -import { NavigationItem, NavigationItemProps } from './NavigationItem'; -import { NotificationDropdown } from './NotificationDropdown'; + import { useSelector } from 'src/hooks/suite'; import { selectHasExperimentalFeature } from 'src/reducers/suite/suiteReducer'; +import { NavigationItem, NavigationItemProps } from './NavigationItem'; +import { NotificationDropdown } from './NotificationDropdown'; + const Nav = styled.nav` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx index f532de1306b..39c0302b74b 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx @@ -1,3 +1,5 @@ +import { MouseEvent } from 'react'; + import styled, { css, useTheme } from 'styled-components'; import { ExtendedMessageDescriptor, TranslationKey } from '@suite-common/intl-types'; @@ -9,13 +11,14 @@ import { TypographyStyle, } from '@trezor/theme'; import { getFocusShadowStyle } from '@trezor/components/src/utils/utils'; -import { Translation } from 'src/components/suite/Translation'; import { Route } from '@suite-common/suite-types'; +import { Icon, IconName, IconSize, useElevation, Paragraph } from '@trezor/components'; + +import { Translation } from 'src/components/suite/Translation'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; -import { MouseEvent } from 'react'; import { selectRouteName } from 'src/reducers/suite/routerReducer'; -import { Icon, IconName, IconSize, useElevation, Paragraph } from '@trezor/components'; + export const NavigationItemBase = styled.div.attrs(() => ({ tabIndex: 0, diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NotificationDropdown.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NotificationDropdown.tsx index bbf2988d770..97b5b75f7b3 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NotificationDropdown.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NotificationDropdown.tsx @@ -1,11 +1,15 @@ import { useRef, useCallback } from 'react'; + import styled, { css } from 'styled-components'; + import { breakpointMediaQueries } from '@trezor/styles'; import { DropdownRef, Dropdown } from '@trezor/components'; import { analytics, EventType } from '@trezor/suite-analytics'; import { notificationsActions } from '@suite-common/toast-notifications'; + import { Notifications } from 'src/components/suite/notifications'; import { useDispatch } from 'src/hooks/suite'; + import { NavigationItem, NavigationItemProps } from './NavigationItem'; const NotificationsWrapper = styled.div` diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/CustomBackend.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/CustomBackend.tsx index a7bdcd5cbd2..9dec46e258d 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/CustomBackend.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/CustomBackend.tsx @@ -1,7 +1,9 @@ import { useTheme } from 'styled-components'; + +import { ComponentWithSubIcon, Icon, iconSizes } from '@trezor/components'; + import { useTranslation } from '../../../../../../hooks/suite'; import { useEnabledBackends } from '../../utils'; -import { ComponentWithSubIcon, Icon, iconSizes } from '@trezor/components'; import { NavBackends } from './NavBackends'; import { QuickActionButton } from './QuickActionButton'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/DebugAndExperimental.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/DebugAndExperimental.tsx index 6847a110e05..d9715a6e11a 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/DebugAndExperimental.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/DebugAndExperimental.tsx @@ -1,11 +1,14 @@ +import styled from 'styled-components'; + import { Column, getIconSize, Icon, iconSizes } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; import { SettingsAnchor } from 'src/constants/suite/anchors'; + import { QuickActionButton } from './QuickActionButton'; -import styled from 'styled-components'; import { TooltipRow } from './TooltipRow'; -import { spacings } from '@trezor/theme'; import { Translation } from '../../../../Translation'; type DebugAndExperimentalTooltipProps = { diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/HideBalances.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/HideBalances.tsx index 721e1e08032..923b9d115e3 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/HideBalances.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/HideBalances.tsx @@ -1,4 +1,5 @@ import { Icon, iconSizes } from '@trezor/components'; + import { setDiscreetMode } from '../../../../../../actions/settings/walletSettingsActions'; import { useDispatch, useSelector, useTranslation } from '../../../../../../hooks/suite'; import { selectIsDiscreteModeActive } from '../../../../../../reducers/wallet/settingsReducer'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx index 827f2bf538f..1233bb57198 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx @@ -1,15 +1,18 @@ import React, { ReactNode, useRef, useState } from 'react'; + import styled from 'styled-components'; import { Dropdown, DropdownRef } from '@trezor/components'; +import { BlockchainState } from '@suite-common/wallet-core'; +import { spacingsPx, typography } from '@trezor/theme'; +import { CoinLogo } from '@trezor/product-components'; + import { Translation, StatusLight } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; -import { BlockchainState } from '@suite-common/wallet-core'; import type { CustomBackend } from 'src/types/wallet'; import { openModal } from 'src/actions/suite/modalActions'; -import { spacingsPx, typography } from '@trezor/theme'; -import { CoinLogo } from '@trezor/product-components'; + // eslint-disable-next-line local-rules/no-override-ds-component const StyledDropdown = styled(Dropdown)` diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/QuickActionButton.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/QuickActionButton.tsx index 68ada7d9318..5ee6b62005a 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/QuickActionButton.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/QuickActionButton.tsx @@ -1,7 +1,9 @@ import React, { ReactNode } from 'react'; -import { Tooltip } from '@trezor/components'; + import styled from 'styled-components'; +import { Tooltip } from '@trezor/components'; + const Container = styled.div` height: 44px; flex: 1; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/QuickActions.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/QuickActions.tsx index 9684cf39040..687faf8847c 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/QuickActions.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/QuickActions.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; import { Tor } from './Tor'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/TooltipRow.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/TooltipRow.tsx index aeafeca1484..0d0ced88f10 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/TooltipRow.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/TooltipRow.tsx @@ -1,4 +1,7 @@ +import { ReactNode } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { Column, Row, @@ -9,7 +12,6 @@ import { IconVariant, IconName, } from '@trezor/components'; -import { ReactNode } from 'react'; import { borders, spacings, spacingsPx } from '@trezor/theme'; type IconCircleWrapperProps = { diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Tor.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Tor.tsx index 113b4e2f2fa..240147c0351 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Tor.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Tor.tsx @@ -1,7 +1,5 @@ -import { goto } from 'src/actions/suite/routerActions'; -import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { useDispatch, useSelector } from 'src/hooks/suite'; -import { selectTorState } from '../../../../../../reducers/suite/suiteReducer'; +import { useTheme } from 'styled-components'; + import { isDesktop } from '@trezor/env-utils'; import { Column, @@ -11,10 +9,15 @@ import { iconSizes, IconVariant, } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + +import { goto } from 'src/actions/suite/routerActions'; +import { SettingsAnchor } from 'src/constants/suite/anchors'; +import { useDispatch, useSelector } from 'src/hooks/suite'; import { TorStatus } from 'src/types/suite'; -import { useTheme } from 'styled-components'; + +import { selectTorState } from '../../../../../../reducers/suite/suiteReducer'; import { QuickActionButton } from './QuickActionButton'; -import { spacings } from '@trezor/theme'; import { TooltipRow } from './TooltipRow'; import { Translation, TranslationKey } from '../../../../Translation'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateIconGroup.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateIconGroup.tsx index 1d639468b24..f57fe1054c0 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateIconGroup.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateIconGroup.tsx @@ -1,5 +1,7 @@ -import { spacingsPx } from '@trezor/theme'; import styled, { css } from 'styled-components'; + +import { spacingsPx } from '@trezor/theme'; + import { mapVariantToIconBackground, UpdateVariant } from './updateQuickActionTypes'; type UpdateIconGroupProps = { diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateNotificationBanner.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateNotificationBanner.tsx index f42295dfabe..8436a0e8323 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateNotificationBanner.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateNotificationBanner.tsx @@ -1,6 +1,10 @@ +import { MouseEvent } from 'react'; + import styled from 'styled-components'; + import { Column, ElevationContext, Icon, Row, Text } from '@trezor/components'; import { borders, Elevation, mapElevationToBackground, spacingsPx } from '@trezor/theme'; + import { UpdateStatus, UpdateStatusSuite, @@ -10,7 +14,6 @@ import { } from './updateQuickActionTypes'; import { Translation, TranslationKey } from '../../../../../Translation'; import { useDispatch } from '../../../../../../../hooks/suite'; -import { MouseEvent } from 'react'; type ContainerProps = { $elevation: Elevation }; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx index fb53e397bac..b4889bfa6ca 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx @@ -1,9 +1,15 @@ +import { useDispatch } from 'react-redux'; + import styled, { css, DefaultTheme, useTheme } from 'styled-components'; -import { useDevice } from '../../../../../../../hooks/suite'; + import { ComponentWithSubIcon, getIconSize, Icon, IconSize, iconSizes } from '@trezor/components'; +import { borders, Color, CSSColor } from '@trezor/theme'; +import { isDesktop } from '@trezor/env-utils'; +import { mapTrezorModelToIcon } from '@trezor/product-components'; + +import { useDevice } from '../../../../../../../hooks/suite'; import { QuickActionButton } from '../QuickActionButton'; import { UpdateIconGroup } from './UpdateIconGroup'; -import { borders, Color, CSSColor } from '@trezor/theme'; import { useUpdateStatus } from './useUpdateStatus'; import { UpdateTooltip } from './UpdateTooltip'; import { @@ -14,9 +20,7 @@ import { UpdateStatus, UpdateVariant, } from './updateQuickActionTypes'; -import { isDesktop } from '@trezor/env-utils'; -import { useDispatch } from 'react-redux'; -import { mapTrezorModelToIcon } from '@trezor/product-components'; + type MapArgs = { $variant: UpdateVariant; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateTooltip.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateTooltip.tsx index a48c9a71478..584677903d2 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateTooltip.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateTooltip.tsx @@ -1,6 +1,13 @@ import styled, { useTheme } from 'styled-components'; -import { useDevice, useSelector } from '../../../../../../../hooks/suite'; + import { Column, getIconSize, Icon, IconSize, iconSizes } from '@trezor/components'; +import { spacings } from '@trezor/theme'; +import { TranslationKey } from '@suite-common/intl-types'; +import { getFirmwareVersion } from '@trezor/device-utils'; +import { isDesktop } from '@trezor/env-utils'; +import { mapTrezorModelToIcon } from '@trezor/product-components'; + +import { Translation } from '../../../../../Translation'; import { mapUpdateStatusToIcon, mapUpdateStatusToVariant, @@ -8,12 +15,7 @@ import { UpdateStatusSuite, UpdateStatusDevice, } from './updateQuickActionTypes'; -import { Translation } from '../../../../../Translation'; -import { spacings } from '@trezor/theme'; -import { TranslationKey } from '@suite-common/intl-types'; -import { getFirmwareVersion } from '@trezor/device-utils'; -import { isDesktop } from '@trezor/env-utils'; -import { mapTrezorModelToIcon } from '@trezor/product-components'; +import { useDevice, useSelector } from '../../../../../../../hooks/suite'; import { TooltipRow } from '../TooltipRow'; const SuiteIconRectangle = styled.div<{ $size: IconSize }>` diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/updateQuickActionTypes.ts b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/updateQuickActionTypes.ts index 938651a2f03..4bf7a90698b 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/updateQuickActionTypes.ts +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/updateQuickActionTypes.ts @@ -1,7 +1,9 @@ +import { DefaultTheme } from 'styled-components'; + import { IconName } from '@trezor/components'; import { UIVariant } from '@trezor/components/src/config/types'; import { Color, CSSColor } from '@trezor/theme'; -import { DefaultTheme } from 'styled-components'; + import { goto } from '../../../../../../../actions/suite/routerActions'; import { installUpdate, diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/Sidebar.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/Sidebar.tsx index c55dd90541e..a50d0ab128e 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/Sidebar.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/Sidebar.tsx @@ -1,13 +1,17 @@ import React, { useState } from 'react'; + import styled from 'styled-components'; -import { DeviceSelector } from '../DeviceSelector/DeviceSelector'; -import { Navigation } from './Navigation'; -import { AccountsMenu } from 'src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu'; -import { QuickActions } from './QuickActions/QuickActions'; + import { ElevationUp, ResizableBox, useElevation } from '@trezor/components'; import { Elevation, mapElevationToBackground, mapElevationToBorder, zIndices } from '@trezor/theme'; + +import { AccountsMenu } from 'src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu'; import { useActions, useSelector } from 'src/hooks/suite'; import * as suiteActions from 'src/actions/suite/suiteActions'; + +import { QuickActions } from './QuickActions/QuickActions'; +import { Navigation } from './Navigation'; +import { DeviceSelector } from '../DeviceSelector/DeviceSelector'; import { TrafficLightOffset } from '../../../TrafficLightOffset'; import { UpdateNotificationBanner } from './QuickActions/Update/UpdateNotificationBanner'; import { useUpdateStatus } from './QuickActions/Update/useUpdateStatus'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/SubpageNavigation.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/SubpageNavigation.tsx index def22331241..c224ea429c4 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/SubpageNavigation.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/SubpageNavigation.tsx @@ -1,14 +1,17 @@ import styled from 'styled-components'; import { LayoutGroup, motion } from 'framer-motion'; + import { spacingsPx, zIndices } from '@trezor/theme'; import { motionEasing, variables } from '@trezor/components'; +import { Route } from '@suite-common/suite-types'; + import { useSelector } from 'src/hooks/suite'; import { selectRouteName } from 'src/reducers/suite/routerReducer'; import { SUBPAGE_NAV_HEIGHT } from 'src/constants/suite/layout'; import { selectIsLoggedOut } from 'src/reducers/suite/suiteReducer'; + import { HoverAnimation } from '../../HoverAnimation'; import { AppNavigationTooltip } from '../../AppNavigation/AppNavigationTooltip'; -import { Route } from '@suite-common/suite-types'; const Container = styled.div<{ $isFullWidth: boolean }>` position: sticky; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/SuiteLayout.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/SuiteLayout.tsx index 7937741f67e..bc24b5b84f7 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/SuiteLayout.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/SuiteLayout.tsx @@ -1,4 +1,5 @@ import { useRef, useState, ReactNode } from 'react'; + import styled from 'styled-components'; import { @@ -9,6 +10,7 @@ import { variables, } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; + import { SuiteBanners } from 'src/components/suite/banners'; import { Metadata } from 'src/components/suite'; import { GuideRouter, GuideButton } from 'src/components/guide'; @@ -19,12 +21,13 @@ import { LayoutContext, LayoutContextPayload } from 'src/support/suite/LayoutCon import { useResetScrollOnUrl } from 'src/hooks/suite/useResetScrollOnUrl'; import { useClearAnchorHighlightOnClick } from 'src/hooks/suite/useClearAnchorHighlightOnClick'; import { ModalContextProvider } from 'src/support/suite/ModalContext'; +import { MobileAccountsMenu } from 'src/components/wallet/WalletLayout/AccountsMenu/MobileAccountsMenu'; +import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; + import { ModalSwitcher } from '../../modals/ModalSwitcher/ModalSwitcher'; import { MobileMenu } from './MobileMenu/MobileMenu'; import { Sidebar } from './Sidebar/Sidebar'; import { CoinjoinBars } from './CoinjoinBars/CoinjoinBars'; -import { MobileAccountsMenu } from 'src/components/wallet/WalletLayout/AccountsMenu/MobileAccountsMenu'; -import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { useAppShortcuts } from './useAppShortcuts'; export const SCROLL_WRAPPER_ID = 'layout-scroll'; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/useAppShortcuts.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/useAppShortcuts.tsx index 92fb0072db3..7f058414dc9 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/useAppShortcuts.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/useAppShortcuts.tsx @@ -1,9 +1,12 @@ -import { selectDevice } from '@suite-common/wallet-core'; import { useEvent } from 'react-use'; + +import { selectDevice } from '@suite-common/wallet-core'; +import { KEYBOARD_CODE } from '@trezor/components'; + import { closeModalApp, goto } from 'src/actions/suite/routerActions'; import { addWalletThunk } from 'src/actions/wallet/addWalletThunk'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { KEYBOARD_CODE } from '@trezor/components'; + export const useAppShortcuts = () => { const selectedDevice = useSelector(selectDevice); diff --git a/packages/suite/src/components/suite/layouts/WelcomeLayout/NavSettings.tsx b/packages/suite/src/components/suite/layouts/WelcomeLayout/NavSettings.tsx index a157ffeb581..af81685d8fd 100644 --- a/packages/suite/src/components/suite/layouts/WelcomeLayout/NavSettings.tsx +++ b/packages/suite/src/components/suite/layouts/WelcomeLayout/NavSettings.tsx @@ -1,4 +1,5 @@ import { IconButton } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; diff --git a/packages/suite/src/components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx b/packages/suite/src/components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx index 5f794f4b073..f707f5f5d15 100644 --- a/packages/suite/src/components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx +++ b/packages/suite/src/components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; import { AnimatePresence, motion } from 'framer-motion'; @@ -13,22 +14,25 @@ import { Column, } from '@trezor/components'; import { useOnce } from '@trezor/react-utils'; +import { selectBannerMessage } from '@suite-common/message-system'; +import { isWeb } from '@trezor/env-utils'; +import { TREZOR_URL, SUITE_URL } from '@trezor/urls'; +import { resolveStaticPath } from '@suite-common/suite-utils'; +import { Elevation, mapElevationToBackground, spacingsPx } from '@trezor/theme'; +import { TrezorLogo } from '@trezor/product-components'; + import { Translation } from 'src/components/suite'; // importing directly, otherwise unit tests fail, seems to be a styled-components issue import { TrezorLink } from 'src/components/suite/TrezorLink'; import { useSelector } from 'src/hooks/suite'; -import { selectBannerMessage } from '@suite-common/message-system'; import { MessageSystemBanner } from 'src/components/suite/banners'; -import { isWeb } from '@trezor/env-utils'; -import { TREZOR_URL, SUITE_URL } from '@trezor/urls'; -import { resolveStaticPath } from '@suite-common/suite-utils'; import { GuideButton, GuideRouter } from 'src/components/guide'; import { useGuide } from 'src/hooks/guide'; import { MAX_ONBOARDING_WIDTH } from 'src/constants/suite/layout'; + import { NavSettings } from './NavSettings'; -import { Elevation, mapElevationToBackground, spacingsPx } from '@trezor/theme'; import { TrafficLightOffset } from '../../TrafficLightOffset'; -import { TrezorLogo } from '@trezor/product-components'; + const MessageContainer = styled.div` margin: ${spacingsPx.xxs} ${spacingsPx.xs} ${spacingsPx.xs}; diff --git a/packages/suite/src/components/suite/modals/ConfirmEvmExplanationModal.tsx b/packages/suite/src/components/suite/modals/ConfirmEvmExplanationModal.tsx index 1ee8ab1596c..8c5b3361ecb 100644 --- a/packages/suite/src/components/suite/modals/ConfirmEvmExplanationModal.tsx +++ b/packages/suite/src/components/suite/modals/ConfirmEvmExplanationModal.tsx @@ -1,16 +1,18 @@ import styled from 'styled-components'; -import { Translation } from 'src/components/suite'; -import { useDispatch, useSelector } from 'src/hooks/suite'; import { Image, NewModal, Paragraph } from '@trezor/components'; -import { onCancel } from 'src/actions/suite/modalActions'; import { Account } from '@suite-common/wallet-types'; import { networks } from '@suite-common/wallet-config'; -import { TranslationKey } from 'src/components/suite/Translation'; -import { SUITE } from 'src/actions/suite/constants'; import { spacings } from '@trezor/theme'; import { CoinLogo } from '@trezor/product-components'; +import { Translation } from 'src/components/suite'; +import { useDispatch, useSelector } from 'src/hooks/suite'; +import { onCancel } from 'src/actions/suite/modalActions'; +import { TranslationKey } from 'src/components/suite/Translation'; +import { SUITE } from 'src/actions/suite/constants'; + + const ImageWrapper = styled.div` position: relative; width: 97.5%; diff --git a/packages/suite/src/components/suite/modals/Modal/DefaultRenderer.tsx b/packages/suite/src/components/suite/modals/Modal/DefaultRenderer.tsx index 4a450e33f71..387b8b94196 100644 --- a/packages/suite/src/components/suite/modals/Modal/DefaultRenderer.tsx +++ b/packages/suite/src/components/suite/modals/Modal/DefaultRenderer.tsx @@ -1,9 +1,12 @@ import { ReactPortal } from 'react'; import { createPortal } from 'react-dom'; + import { Modal, ModalProps, Icon, intermediaryTheme } from '@trezor/components'; + import { useGuide } from 'src/hooks/guide'; import { useLayoutSize } from 'src/hooks/suite/useLayoutSize'; import { useModalTarget } from 'src/support/suite/ModalContext'; + import { ModalEnvironment } from '../ModalEnvironment'; /** diff --git a/packages/suite/src/components/suite/modals/Modal/DialogRenderer.tsx b/packages/suite/src/components/suite/modals/Modal/DialogRenderer.tsx index d7b7367f2c2..043638a9229 100644 --- a/packages/suite/src/components/suite/modals/Modal/DialogRenderer.tsx +++ b/packages/suite/src/components/suite/modals/Modal/DialogRenderer.tsx @@ -1,7 +1,10 @@ -import { DialogModal as BaseDialogModal, DialogModalProps } from '@trezor/components'; import { ReactPortal } from 'react'; import { createPortal } from 'react-dom'; + +import { DialogModal as BaseDialogModal, DialogModalProps } from '@trezor/components'; + import { useModalTarget } from 'src/support/suite/ModalContext'; + import { ModalEnvironment } from '../ModalEnvironment'; import { ModalProps, Modal } from './Modal'; diff --git a/packages/suite/src/components/suite/modals/Modal/Modal.tsx b/packages/suite/src/components/suite/modals/Modal/Modal.tsx index 50c12435053..6aff6f9f55b 100644 --- a/packages/suite/src/components/suite/modals/Modal/Modal.tsx +++ b/packages/suite/src/components/suite/modals/Modal/Modal.tsx @@ -1,5 +1,7 @@ import { ComponentType } from 'react'; + import { Modal as TrezorModal, ModalProps as TrezorModalProps } from '@trezor/components'; + import { DefaultRenderer } from './DefaultRenderer'; export type ModalProps = TrezorModalProps & { diff --git a/packages/suite/src/components/suite/modals/ModalEnvironment.tsx b/packages/suite/src/components/suite/modals/ModalEnvironment.tsx index cdb952c751c..f7ddaaba023 100644 --- a/packages/suite/src/components/suite/modals/ModalEnvironment.tsx +++ b/packages/suite/src/components/suite/modals/ModalEnvironment.tsx @@ -1,5 +1,6 @@ import { ReactNode } from 'react'; import FocusLock from 'react-focus-lock'; + import { Backdrop, ModalAlignment } from '@trezor/components'; type ModalEnvironmentProps = { diff --git a/packages/suite/src/components/suite/modals/ModalSwitcher/DiscoveryLoader.tsx b/packages/suite/src/components/suite/modals/ModalSwitcher/DiscoveryLoader.tsx index b4e39c8356f..642adb33a3e 100644 --- a/packages/suite/src/components/suite/modals/ModalSwitcher/DiscoveryLoader.tsx +++ b/packages/suite/src/components/suite/modals/ModalSwitcher/DiscoveryLoader.tsx @@ -1,10 +1,11 @@ import { H3, Spinner, Column } from '@trezor/components'; +import { selectDevice } from '@suite-common/wallet-core'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { CardWithDevice } from 'src/views/suite/SwitchDevice/CardWithDevice'; import { SwitchDeviceModal } from 'src/views/suite/SwitchDevice/SwitchDeviceModal'; import { useSelector } from 'src/hooks/suite'; -import { selectDevice } from '@suite-common/wallet-core'; -import { spacings } from '@trezor/theme'; export const DiscoveryLoader = () => { const device = useSelector(selectDevice); diff --git a/packages/suite/src/components/suite/modals/ModalSwitcher/ForegroundAppModal.tsx b/packages/suite/src/components/suite/modals/ModalSwitcher/ForegroundAppModal.tsx index 3a422142ceb..632aa6ed3f4 100644 --- a/packages/suite/src/components/suite/modals/ModalSwitcher/ForegroundAppModal.tsx +++ b/packages/suite/src/components/suite/modals/ModalSwitcher/ForegroundAppModal.tsx @@ -1,3 +1,5 @@ +import { FunctionComponent } from 'react'; + import { FirmwareUpdate } from 'src/views/firmware/FirmwareUpdate'; import { FirmwareCustom } from 'src/views/firmware/FirmwareCustom'; import { Recovery } from 'src/views/recovery'; @@ -9,10 +11,11 @@ import { UdevRules } from 'src/views/suite/udev'; import { Version } from 'src/views/suite/version'; import { SwitchDevice } from 'src/views/suite/SwitchDevice/SwitchDevice'; import type { ForegroundAppRoute } from 'src/types/suite'; -import { FunctionComponent } from 'react'; -import { MultiShareBackupModal } from '../ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal'; import { BridgeRequested } from 'src/views/suite/bridge-requested'; +import { MultiShareBackupModal } from '../ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal'; + + // would not work if defined directly in the switch const FirmwareType = () => ; diff --git a/packages/suite/src/components/suite/modals/ModalSwitcher/ModalSwitcher.tsx b/packages/suite/src/components/suite/modals/ModalSwitcher/ModalSwitcher.tsx index 840952b9e0e..be17cf14e3e 100644 --- a/packages/suite/src/components/suite/modals/ModalSwitcher/ModalSwitcher.tsx +++ b/packages/suite/src/components/suite/modals/ModalSwitcher/ModalSwitcher.tsx @@ -1,4 +1,5 @@ import { usePreferredModal } from 'src/hooks/suite/usePreferredModal'; + import { ReduxModal } from '../ReduxModal/ReduxModal'; import { ForegroundAppModal } from './ForegroundAppModal'; import { DiscoveryLoader } from './DiscoveryLoader'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmAddressModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmAddressModal.tsx index ad0cfd45a9a..642078cf3a8 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmAddressModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmAddressModal.tsx @@ -1,4 +1,5 @@ import { useCallback } from 'react'; + import { showAddress } from 'src/actions/wallet/receiveActions'; import { Translation } from 'src/components/suite'; import { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx index 48e78a0b828..076227fbcd8 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx @@ -13,18 +13,20 @@ import { } from '@trezor/components'; import { copyToClipboard } from '@trezor/dom-utils'; import { selectDevice, selectDeviceLabelOrName } from '@suite-common/wallet-core'; +import { Account } from '@suite-common/wallet-types'; +import { palette, spacings } from '@trezor/theme'; +import { getNetworkFeatures } from '@suite-common/wallet-config'; +import { ConfirmOnDevice } from '@trezor/product-components'; + import { selectIsActionAbortable } from 'src/reducers/suite/suiteReducer'; import { QrCode } from 'src/components/suite/QrCode'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; import { MODAL } from 'src/actions/suite/constants'; import { DisplayMode, ThunkAction } from 'src/types/suite'; + import { TransactionReviewStepIndicator } from '../TransactionReviewModal/TransactionReviewOutputList/TransactionReviewStepIndicator'; import { TransactionReviewOutputElement } from '../TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputElement'; -import { Account } from '@suite-common/wallet-types'; -import { palette, spacings } from '@trezor/theme'; -import { getNetworkFeatures } from '@suite-common/wallet-config'; -import { ConfirmOnDevice } from '@trezor/product-components'; export interface ConfirmValueModalProps extends Pick { account: Account; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/DeviceDisconnected.tsx b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/DeviceDisconnected.tsx index cd51299d28f..fcfb3f256dd 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/DeviceDisconnected.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/DeviceDisconnected.tsx @@ -1,9 +1,10 @@ import styled from 'styled-components'; import { Paragraph, Image, variables } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { borders } from '@trezor/theme'; +import { Translation } from 'src/components/suite'; + const Wrapper = styled.div` display: flex; text-align: left; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmXpubModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmXpubModal.tsx index 0533d6bf25d..1cd75690bb5 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmXpubModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmXpubModal.tsx @@ -1,11 +1,12 @@ import { Translation } from 'src/components/suite'; -import { ConfirmValueModal, ConfirmValueModalProps } from './ConfirmValueModal/ConfirmValueModal'; import { showXpub } from 'src/actions/wallet/publicKeyActions'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { selectLabelingDataForSelectedAccount } from 'src/reducers/suite/metadataReducer'; import { useSelector } from 'src/hooks/suite'; import { DisplayMode } from 'src/types/suite'; +import { ConfirmValueModal, ConfirmValueModalProps } from './ConfirmValueModal/ConfirmValueModal'; + export const ConfirmXpubModal = ( props: Pick, ) => { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/CopyAddressModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/CopyAddressModal.tsx index 9a7dab5aede..22c88220ec2 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/CopyAddressModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/CopyAddressModal.tsx @@ -1,12 +1,13 @@ +import { useState } from 'react'; + import { copyToClipboard } from '@trezor/dom-utils'; import { notificationsActions } from '@suite-common/toast-notifications'; - -import { Translation } from 'src/components/suite'; -import { useDispatch } from 'src/hooks/suite/useDispatch'; import { H2, Card, Paragraph, NewModal, Checkbox } from '@trezor/components'; import { AddressType } from '@suite-common/wallet-types'; import { spacings } from '@trezor/theme'; -import { useState } from 'react'; + +import { useDispatch } from 'src/hooks/suite/useDispatch'; +import { Translation } from 'src/components/suite'; import { setFlag } from 'src/actions/suite/suiteActions'; const getAddressTypeText = (addressType: AddressType) => { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx index 59cc0a88f1e..1d3304920fe 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx @@ -1,10 +1,12 @@ +import { NewModal, Paragraph, H2 } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { onReceiveConfirmation } from 'src/actions/suite/modalActions'; import { goto } from 'src/actions/suite/routerActions'; import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite/useDispatch'; -import { NewModal, Paragraph, H2 } from '@trezor/components'; import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { spacings } from '@trezor/theme'; + export const NoBackupModal = () => { const dispatch = useDispatch(); diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/ConfirmActionModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/ConfirmActionModal.tsx index 12a11c35444..1a83d6c6f21 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/ConfirmActionModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/ConfirmActionModal.tsx @@ -1,13 +1,15 @@ -import styled from 'styled-components'; import { useIntl } from 'react-intl'; +import styled from 'styled-components'; + import TrezorConnect from '@trezor/connect'; import { H2, NewModal } from '@trezor/components'; import { ConfirmOnDevice } from '@trezor/product-components'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite/Translation'; import { DeviceConfirmImage } from 'src/components/suite'; import { TrezorDevice } from 'src/types/suite'; -import { spacings } from '@trezor/theme'; import messages from 'src/support/messages'; const ImageWrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/ConfirmFingerprintModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/ConfirmFingerprintModal.tsx index 8c2b356bc7d..3fdc5ded1ed 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/ConfirmFingerprintModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/ConfirmFingerprintModal.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + +import { ConfirmOnDevice } from '@trezor/product-components'; + import { Translation, Modal, ModalProps } from 'src/components/suite'; import { TrezorDevice } from 'src/types/suite'; import { Fingerprint } from 'src/components/firmware'; -import { ConfirmOnDevice } from '@trezor/product-components'; const StyledModal = styled(Modal)` width: 360px; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/DeviceContextModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/DeviceContextModal.tsx index 2ab21feae58..7ae08c00a0e 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/DeviceContextModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/DeviceContextModal.tsx @@ -2,6 +2,7 @@ import { useIntl } from 'react-intl'; import TrezorConnect, { UI } from '@trezor/connect'; import { selectDevice } from '@suite-common/wallet-core'; + import messages from 'src/support/messages'; import { MODAL } from 'src/actions/suite/constants'; import { useSelector } from 'src/hooks/suite'; @@ -18,6 +19,7 @@ import { ConfirmAddressModal, ConfirmXpubModal, } from 'src/components/suite/modals'; + import type { ReduxModalProps } from '../ReduxModal'; /** Modals requested by Device from `trezor-connect` */ diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseModal.tsx index b39fe31d3f7..703bea9e817 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseModal.tsx @@ -10,15 +10,17 @@ import TrezorConnect from '@trezor/connect'; import { spacings } from '@trezor/theme'; import { HELP_CENTER_PASSPHRASE_URL } from '@trezor/urls'; import { PassphraseTypeCard } from '@trezor/product-components'; + import { useSelector, useDispatch } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; import type { TrezorDevice } from 'src/types/suite'; import { OpenGuideFromTooltip } from 'src/components/guide'; import { CardWithDevice } from 'src/views/suite/SwitchDevice/CardWithDevice'; -import { PassphraseWalletConfirmation } from './PassphraseWalletConfirmation'; import { SwitchDeviceModal } from 'src/views/suite/SwitchDevice/SwitchDeviceModal'; import { TrezorLink } from 'src/components/suite/TrezorLink'; +import { PassphraseWalletConfirmation } from './PassphraseWalletConfirmation'; + interface PassphraseModalProps { device: TrezorDevice; } diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseOnDeviceModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseOnDeviceModal.tsx index c66bc862992..e73673c53b2 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseOnDeviceModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseOnDeviceModal.tsx @@ -1,6 +1,7 @@ -import styled from 'styled-components'; import { useIntl } from 'react-intl'; +import styled from 'styled-components'; + import { H2, NewModal, Paragraph } from '@trezor/components'; import { ConfirmOnDevice } from '@trezor/product-components'; import { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmation.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmation.tsx index 26ede6c296b..e4761045849 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmation.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmation.tsx @@ -1,7 +1,10 @@ -import { TrezorDevice } from '@suite-common/suite-types'; import { Dispatch, SetStateAction, useState } from 'react'; + +import { TrezorDevice } from '@suite-common/suite-types'; + import { CardWithDevice } from 'src/views/suite/SwitchDevice/CardWithDevice'; import { SwitchDeviceModal } from 'src/views/suite/SwitchDevice/SwitchDeviceModal'; + import { PassphraseWalletConfirmationStep1 } from './PassphraseWalletConfirmationStep1'; import { PassphraseWalletConfirmationStep2 } from './PassphraseWalletConfirmationStep2'; import { PassphraseWalletConfirmationStep3 } from './PassphraseWalletConfirmationStep3'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep1.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep1.tsx index 3e007e7f4c7..5826a9b82c6 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep1.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep1.tsx @@ -1,4 +1,5 @@ import { Dispatch } from 'react'; + import { spacings } from '@trezor/theme'; import { Column, Card, Row, Button, H3, Paragraph } from '@trezor/components'; import { HELP_CENTER_PASSPHRASE_URL } from '@trezor/urls'; @@ -6,13 +7,14 @@ import { CoinLogo } from '@trezor/product-components'; import { Translation } from 'src/components/suite/Translation'; import { TrezorLink } from 'src/components/suite/TrezorLink'; -import { ContentType } from './types'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; import { onCancel as onCancelModal } from 'src/actions/suite/modalActions'; import { useNetworkSupport } from 'src/hooks/settings/useNetworkSupport'; import { selectEnabledNetworks } from 'src/reducers/wallet/settingsReducer'; +import { ContentType } from './types'; + type PassphraseWalletConfirmationStep1Props = { setContentType: Dispatch>; onRetry: () => void; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep2.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep2.tsx index 8b9a34b4602..84006102d63 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep2.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep2.tsx @@ -1,8 +1,11 @@ +import { Dispatch } from 'react'; + import { Button, Text, Banner, Card, Icon, H3, Column, List } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite/Translation'; + import { ContentType } from './types'; -import { Dispatch } from 'react'; -import { spacings } from '@trezor/theme'; type PassphraseWalletConfirmationStep2Props = { setContentType: Dispatch>; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep3.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep3.tsx index da1237c1973..9310dc69f55 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep3.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep3.tsx @@ -1,9 +1,10 @@ import { Banner, Column, H3 } from '@trezor/components'; import { PassphraseTypeCard } from '@trezor/product-components'; import { spacings } from '@trezor/theme'; +import { selectDeviceModel, selectDeviceFeatures } from '@suite-common/wallet-core'; + import { Translation } from 'src/components/suite/Translation'; import { OpenGuideFromTooltip } from 'src/components/guide'; -import { selectDeviceModel, selectDeviceFeatures } from '@suite-common/wallet-core'; import { useSelector } from 'src/hooks/suite'; type PassphraseWalletConfirmationStep3Props = { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PinInvalidModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PinInvalidModal.tsx index 6c3a50d8c47..e034f3806f0 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PinInvalidModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PinInvalidModal.tsx @@ -2,6 +2,7 @@ import styled from 'styled-components'; import { selectDeviceLabelOrName } from '@suite-common/wallet-core'; import { Paragraph } from '@trezor/components'; + import { Translation } from 'src/components/suite/Translation'; import { DeviceConfirmImage, Modal, ModalProps } from 'src/components/suite'; import { TrezorDevice } from 'src/types/suite'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PinModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PinModal.tsx index e4bf5bd6d96..2efa9c811b3 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PinModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PinModal.tsx @@ -1,7 +1,8 @@ -import TrezorConnect from '@trezor/connect'; import styled from 'styled-components'; +import TrezorConnect from '@trezor/connect'; import { selectDeviceLabelOrName } from '@suite-common/wallet-core'; + import { Modal, ModalProps, PinMatrix, Translation } from 'src/components/suite'; import { PIN_MATRIX_MAX_WIDTH } from 'src/components/suite/PinMatrix/PinMatrix'; import { usePin } from 'src/hooks/suite/usePinModal'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/WordAdvancedModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/WordAdvancedModal.tsx index 6b24cd48f1a..5ba6017d01a 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/WordAdvancedModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/WordAdvancedModal.tsx @@ -1,7 +1,11 @@ +import { useIntl } from 'react-intl'; + import styled from 'styled-components'; + import TrezorConnect from '@trezor/connect'; import { Paragraph } from '@trezor/components'; import { HELP_CENTER_ADVANCED_RECOVERY_URL } from '@trezor/urls'; + import { Translation, WordInputAdvanced, @@ -9,7 +13,6 @@ import { Modal, ModalProps, } from 'src/components/suite'; -import { useIntl } from 'react-intl'; import messages from 'src/support/messages'; const ContentWrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/WordModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/WordModal.tsx index a0ea07f7c11..41a6cc7e43e 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/WordModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/WordModal.tsx @@ -1,7 +1,10 @@ +import { useIntl } from 'react-intl'; + +import styled from 'styled-components'; + import TrezorConnect from '@trezor/connect'; + import { Translation, WordInput, Modal, ModalProps } from 'src/components/suite'; -import styled from 'styled-components'; -import { useIntl } from 'react-intl'; import messages from 'src/support/messages'; const StyledModal = styled(Modal)` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/ReduxModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/ReduxModal.tsx index a8a7d52cc52..debac0d4ce0 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/ReduxModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/ReduxModal.tsx @@ -1,5 +1,6 @@ import { MODAL } from 'src/actions/suite/constants'; import type { AppState } from 'src/types/suite'; + import type { ModalProps } from '../Modal/Modal'; import { DeviceContextModal } from './DeviceContextModal/DeviceContextModal'; import { DeviceConfirmationModal } from './DeviceConfirmationModal/DeviceConfirmationModal'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewEvmExplanation.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewEvmExplanation.tsx index 641730b86d7..02077fb292d 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewEvmExplanation.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewEvmExplanation.tsx @@ -1,10 +1,11 @@ import { Banner } from '@trezor/components'; -import { Translation } from 'src/components/suite'; -import { Account } from 'src/types/wallet'; import { networks } from '@suite-common/wallet-config'; import { spacings } from '@trezor/theme'; import { StakeType } from '@suite-common/wallet-types'; +import { Account } from 'src/types/wallet'; +import { Translation } from 'src/components/suite'; + type TransactionReviewEvmExplanationProps = { account: Account; ethereumStakeType: StakeType | null; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModal.tsx index 47d29fbc8ca..8cea753405d 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModal.tsx @@ -1,9 +1,11 @@ import { UserContextPayload } from '@suite-common/suite-types'; import { selectStake, cancelSignSendFormTransactionThunk } from '@suite-common/wallet-core'; + import { cancelSignTx as cancelSignStakingTx } from 'src/actions/wallet/stakeActions'; -import { TransactionReviewModalContent } from './TransactionReviewModalContent'; import { useDispatch, useSelector } from 'src/hooks/suite'; +import { TransactionReviewModalContent } from './TransactionReviewModalContent'; + // This modal is opened either in Device (button request) or User (push tx) context // contexts are distinguished by `type` prop type TransactionReviewModalProps = diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModalContent.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModalContent.tsx index 31ecb7f23a9..e6552baa8f2 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModalContent.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModalContent.tsx @@ -1,5 +1,7 @@ import { useState } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; import { Deferred } from '@trezor/utils'; import { @@ -17,16 +19,19 @@ import { isRbfTransaction, getTxStakeNameByDataHex, } from '@suite-common/wallet-utils'; +import { ConfirmOnDevice } from '@trezor/product-components'; +import { networks } from '@suite-common/wallet-config'; + import { useSelector } from 'src/hooks/suite'; import { selectIsActionAbortable } from 'src/reducers/suite/suiteReducer'; import { getTransactionReviewModalActionText } from 'src/utils/suite/transactionReview'; import { Modal, Translation } from 'src/components/suite'; +import { selectAccountIncludingChosenInCoinmarket } from 'src/reducers/wallet/selectedAccountReducer'; + import { TransactionReviewSummary } from './TransactionReviewSummary'; import { TransactionReviewOutputList } from './TransactionReviewOutputList/TransactionReviewOutputList'; import { TransactionReviewEvmExplanation } from './TransactionReviewEvmExplanation'; -import { ConfirmOnDevice } from '@trezor/product-components'; -import { networks } from '@suite-common/wallet-config'; -import { selectAccountIncludingChosenInCoinmarket } from 'src/reducers/wallet/selectedAccountReducer'; + const StyledModal = styled(Modal)` ${Modal.Body} { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewDetails.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewDetails.tsx index 546f9669abc..ef47c1ed585 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewDetails.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewDetails.tsx @@ -1,10 +1,11 @@ import styled, { useTheme } from 'styled-components'; -import { Translation } from 'src/components/suite'; import { variables, Card, Icon } from '@trezor/components'; import { GeneralPrecomposedTransactionFinal } from '@suite-common/wallet-types'; import { borders, typography, zIndices } from '@trezor/theme'; +import { Translation } from 'src/components/suite'; + const TransactionDetailsWrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutput.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutput.tsx index 8694dacf71b..95eab9ff959 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutput.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutput.tsx @@ -1,10 +1,16 @@ import { ReactNode, forwardRef } from 'react'; + import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { Translation } from 'src/components/suite'; import { formatNetworkAmount, formatAmount, isTestnet } from '@suite-common/wallet-utils'; import { BTC_LOCKTIME_VALUE } from '@suite-common/wallet-constants'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { ReviewOutput, StakeType } from '@suite-common/wallet-types'; +import { TranslationKey } from '@suite-common/intl-types'; + +import type { Account } from 'src/types/wallet'; +import { useDisplayMode, useTranslation } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; + import { TransactionReviewStepIndicator, TransactionReviewStepIndicatorProps, @@ -13,9 +19,8 @@ import { TransactionReviewOutputElement, OutputElementLine, } from './TransactionReviewOutputElement'; -import type { Account } from 'src/types/wallet'; -import { useDisplayMode, useTranslation } from 'src/hooks/suite'; -import { TranslationKey } from '@suite-common/intl-types'; + + const getFeeLabel = (networkType: Account['networkType']) => { switch (networkType) { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputElement.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputElement.tsx index dc37416b82e..ab6a1bbb3c5 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputElement.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputElement.tsx @@ -1,17 +1,20 @@ import { forwardRef, ReactNode } from 'react'; + import styled from 'styled-components'; import { variables } from '@trezor/components'; -import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; -import { Account } from 'src/types/wallet'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { TokenInfo } from '@trezor/connect'; import { amountToSmallestUnit } from '@suite-common/wallet-utils'; -import { TransactionReviewStepIndicatorProps } from './TransactionReviewStepIndicator'; import { zIndices } from '@trezor/theme'; -import { DeviceDisplay } from '../../../../DeviceDisplay/DeviceDisplay'; + +import { Account } from 'src/types/wallet'; +import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; import { DisplayMode } from 'src/types/suite'; +import { TransactionReviewStepIndicatorProps } from './TransactionReviewStepIndicator'; +import { DeviceDisplay } from '../../../../DeviceDisplay/DeviceDisplay'; + const TYPES_TO_BE_DISPLAYED_IN_SCREEN_BOX = ['address', 'regular_legacy', 'data', 'opreturn']; const OutputWrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputList.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputList.tsx index 94480e89c91..604881c1712 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputList.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutputList.tsx @@ -1,22 +1,25 @@ import { useEffect, useRef } from 'react'; + import styled from 'styled-components'; import { analytics, EventType } from '@trezor/suite-analytics'; import { Button, variables, Banner } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { notificationsActions } from '@suite-common/toast-notifications'; import { TranslationKey } from '@suite-common/intl-types'; import { copyToClipboard, download } from '@trezor/dom-utils'; -import { useDispatch } from 'src/hooks/suite'; -import { TransactionReviewDetails } from './TransactionReviewDetails'; -import { TransactionReviewOutput } from './TransactionReviewOutput'; -import type { Account } from 'src/types/wallet'; import type { FormState, GeneralPrecomposedTransactionFinal } from '@suite-common/wallet-types'; import { getTransactionReviewOutputState } from '@suite-common/wallet-utils'; -import { TransactionReviewTotalOutput } from './TransactionReviewTotalOutput'; import { ReviewOutput, StakeFormState, StakeType } from '@suite-common/wallet-types'; import { spacingsPx } from '@trezor/theme'; +import type { Account } from 'src/types/wallet'; +import { useDispatch } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; + +import { TransactionReviewTotalOutput } from './TransactionReviewTotalOutput'; +import { TransactionReviewOutput } from './TransactionReviewOutput'; +import { TransactionReviewDetails } from './TransactionReviewDetails'; + const Content = styled.div` display: flex; padding: 0; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewStepIndicator.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewStepIndicator.tsx index 471c2e8fb72..dd7163e9a48 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewStepIndicator.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewStepIndicator.tsx @@ -1,4 +1,5 @@ import styled, { useTheme } from 'styled-components'; + import { Icon } from '@trezor/components'; const IndicatorWrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewTotalOutput.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewTotalOutput.tsx index 11be00b6fb2..2e9c18ed4d1 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewTotalOutput.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewTotalOutput.tsx @@ -1,6 +1,6 @@ import { forwardRef } from 'react'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { formatAmount, formatNetworkAmount, @@ -10,16 +10,18 @@ import { getIsUpdatedEthereumSendFlow, } from '@suite-common/wallet-utils'; import { selectDevice } from '@suite-common/wallet-core'; +import { StakeType } from '@suite-common/wallet-types'; + import { TrezorDevice } from 'src/types/suite'; import { Translation } from 'src/components/suite/Translation'; import { useSelector } from 'src/hooks/suite/useSelector'; + import { TransactionReviewStepIndicator } from './TransactionReviewStepIndicator'; import { TransactionReviewOutputElement, OutputElementLine, } from './TransactionReviewOutputElement'; import type { TransactionReviewOutputListProps } from './TransactionReviewOutputList'; -import { StakeType } from '@suite-common/wallet-types'; type StepIndicatorProps = Pick< TransactionReviewOutputListProps, diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewSummary.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewSummary.tsx index 68134c5cbfa..2320a7fa48b 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewSummary.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewSummary.tsx @@ -1,17 +1,20 @@ import styled, { useTheme } from 'styled-components'; + import { BigNumber } from '@trezor/utils/src/bigNumber'; import { getFeeUnits, formatNetworkAmount, formatAmount, getFee } from '@suite-common/wallet-utils'; import { Icon, variables } from '@trezor/components'; import { formatDuration } from '@suite-common/suite-utils'; import { borders, spacingsPx, typography } from '@trezor/theme'; import { TranslationKey } from '@suite-common/intl-types'; -import { Translation, FormattedCryptoAmount, AccountLabel } from 'src/components/suite'; -import { Account } from 'src/types/wallet'; import { Network, NetworkType } from '@suite-common/wallet-config'; import { GeneralPrecomposedTransactionFinal, StakeType } from '@suite-common/wallet-types'; +import { CoinLogo } from '@trezor/product-components'; + +import { Translation, FormattedCryptoAmount, AccountLabel } from 'src/components/suite'; +import { Account } from 'src/types/wallet'; import { useSelector } from 'src/hooks/suite/useSelector'; import { selectLabelingDataForSelectedAccount } from 'src/reducers/suite/metadataReducer'; -import { CoinLogo } from '@trezor/product-components'; + const Wrapper = styled.div` padding: 20px 15px 12px; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UnhideTokenModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UnhideTokenModal.tsx index 36ec369072b..8f3d5ecd172 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UnhideTokenModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UnhideTokenModal.tsx @@ -1,15 +1,17 @@ -import { Translation } from 'src/components/suite'; -import { useDispatch } from 'src/hooks/suite/useDispatch'; +import { useState } from 'react'; + import { H2, Paragraph, Card, Checkbox, NewModal } from '@trezor/components'; import { DefinitionType, tokenDefinitionsActions, TokenManagementAction, } from '@suite-common/token-definitions'; +import { spacings } from '@trezor/theme'; + +import { Translation } from 'src/components/suite'; +import { useDispatch } from 'src/hooks/suite/useDispatch'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { useSelector } from 'src/hooks/suite'; -import { useState } from 'react'; -import { spacings } from '@trezor/theme'; import { setFlag } from 'src/actions/suite/suiteActions'; interface UnhideTokenModalProps { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx index 57b76aa36e6..2438a02266f 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx @@ -1,16 +1,18 @@ import { Paragraph, Column } from '@trezor/components'; import { Bip43PathTemplate, AccountType, NetworkType } from '@suite-common/wallet-config'; -import { Translation } from 'src/components/suite'; import { getAccountTypeDesc, getAccountTypeUrl, getTitleForNetwork, } from '@suite-common/wallet-utils'; -import { LearnMoreButton } from 'src/components/suite/LearnMoreButton'; -import { useTranslation } from 'src/hooks/suite'; import { spacings } from '@trezor/theme'; import { Account } from '@suite-common/wallet-types'; +import { Translation } from 'src/components/suite'; +import { LearnMoreButton } from 'src/components/suite/LearnMoreButton'; +import { useTranslation } from 'src/hooks/suite'; + + interface AccountTypeDescriptionProps { bip43Path: Bip43PathTemplate; accountType?: AccountType; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeSelect.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeSelect.tsx index 0010667ad81..7a2caf35f7a 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeSelect.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeSelect.tsx @@ -1,11 +1,14 @@ import styled from 'styled-components'; + import { Column, Select } from '@trezor/components'; -import { Translation } from 'src/components/suite/Translation'; import { getAccountTypeName, getAccountTypeTech } from '@suite-common/wallet-utils'; -import { AccountTypeDescription } from './AccountTypeDescription'; import { NetworkAccount, NetworkSymbol, NetworkType } from '@suite-common/wallet-config'; import { spacings, typography } from '@trezor/theme'; +import { Translation } from 'src/components/suite/Translation'; + +import { AccountTypeDescription } from './AccountTypeDescription'; + const LabelWrapper = styled.div` display: flex; align-items: baseline; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddAccountButton.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddAccountButton.tsx index edeae875d3d..6f021f478ba 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddAccountButton.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddAccountButton.tsx @@ -3,10 +3,12 @@ import { useCallback } from 'react'; import { analytics, EventType } from '@trezor/suite-analytics'; import { UnavailableCapability } from '@trezor/connect'; import { selectDevice } from '@suite-common/wallet-core'; -import { Account } from 'src/types/wallet'; import { Network, NetworkAccount } from '@suite-common/wallet-config'; + +import { Account } from 'src/types/wallet'; import { Translation } from 'src/components/suite'; import { useAccountSearch, useSelector } from 'src/hooks/suite'; + import { AddCoinjoinAccountButton } from './AddCoinjoinAccountButton'; import { AddButton } from './AddButton'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddButton.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddButton.tsx index 23b990ffcb8..64a40b715b6 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddButton.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddButton.tsx @@ -1,8 +1,10 @@ import { ReactNode } from 'react'; + import { ButtonProps, Tooltip, NewModal } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { Network } from '@suite-common/wallet-config'; +import { Translation } from 'src/components/suite'; + interface AddButtonProps extends Omit { disabledMessage: ReactNode; networkName: Network['name']; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddCoinjoinAccountButton.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddCoinjoinAccountButton.tsx index 5465ffc1f7a..28d53bf7284 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddCoinjoinAccountButton.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountButton/AddCoinjoinAccountButton.tsx @@ -6,6 +6,7 @@ import { isDesktop } from '@trezor/env-utils'; import { isDevEnv } from '@suite-common/suite-utils'; import { RequestEnableTorResponse } from '@suite-common/suite-config'; import { selectDevice } from '@suite-common/wallet-core'; +import { Network, NetworkAccount, NetworkSymbol } from '@suite-common/wallet-config'; import { Translation } from 'src/components/suite'; import { useSelector, useDispatch } from 'src/hooks/suite'; @@ -13,7 +14,6 @@ import { createCoinjoinAccount } from 'src/actions/wallet/coinjoinAccountActions import { toggleTor } from 'src/actions/suite/suiteActions'; import { openDeferredModal, openModal } from 'src/actions/suite/modalActions'; import { Account } from 'src/types/wallet'; -import { Network, NetworkAccount, NetworkSymbol } from '@suite-common/wallet-config'; import { selectTorState } from 'src/reducers/suite/suiteReducer'; import { AddButton } from './AddButton'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountModal.tsx index 264be3a80ed..84db86ee6d1 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AddAccountModal.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { accountsActions, selectDeviceModel } from '@suite-common/wallet-core'; @@ -7,6 +8,8 @@ import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; import { networks, Network, NetworkSymbol, NetworkAccount } from '@suite-common/wallet-config'; import { CollapsibleBox, NewModal, Tooltip } from '@trezor/components'; import { spacings, spacingsPx } from '@trezor/theme'; +import { DeviceModelInternal } from '@trezor/connect'; + import { Translation, CoinList } from 'src/components/suite'; import { Account } from 'src/types/wallet'; import { TrezorDevice } from 'src/types/suite'; @@ -15,12 +18,12 @@ import { changeCoinVisibility } from 'src/actions/settings/walletSettingsActions import { goto } from 'src/actions/suite/routerActions'; import { selectIsPublic } from 'src/reducers/wallet/coinjoinReducer'; import { useNetworkSupport } from 'src/hooks/settings/useNetworkSupport'; +import { selectIsDebugModeActive } from 'src/reducers/suite/suiteReducer'; +import { selectEnabledNetworks } from 'src/reducers/wallet/settingsReducer'; + import { AccountTypeSelect } from './AccountTypeSelect/AccountTypeSelect'; import { SelectNetwork } from './SelectNetwork'; import { AddAccountButton } from './AddAccountButton/AddAccountButton'; -import { DeviceModelInternal } from '@trezor/connect'; -import { selectIsDebugModeActive } from 'src/reducers/suite/suiteReducer'; -import { selectEnabledNetworks } from 'src/reducers/wallet/settingsReducer'; const NetworksWrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddTokenModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddTokenModal.tsx index 7cf9fde30e9..38e2d5eda27 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddTokenModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddTokenModal.tsx @@ -1,13 +1,14 @@ import { useCallback, useEffect, useState, ChangeEvent } from 'react'; + import TrezorConnect, { TokenInfo } from '@trezor/connect'; import { analytics, EventType } from '@trezor/suite-analytics'; - import { Input, Button } from '@trezor/components'; +import { tryGetAccountIdentity, isAddressValid } from '@suite-common/wallet-utils'; + import { addToken } from 'src/actions/wallet/tokenActions'; import { Modal } from 'src/components/suite'; import { Translation } from 'src/components/suite/Translation'; import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; -import { tryGetAccountIdentity, isAddressValid } from '@suite-common/wallet-utils'; import { Account } from 'src/types/wallet'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx index 619c5594a4e..970be85f2e7 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx @@ -1,11 +1,15 @@ import styled from 'styled-components'; + import { variables } from '@trezor/components'; -import { Modal, Translation } from 'src/components/suite'; import { networks, NetworkSymbol } from '@suite-common/wallet-config'; -import { CustomBackends } from './CustomBackends/CustomBackends'; +import { CoinLogo } from '@trezor/product-components'; + +import { Modal, Translation } from 'src/components/suite'; import { getCoinLabel } from 'src/utils/suite/getCoinLabel'; import { useSelector } from 'src/hooks/suite'; -import { CoinLogo } from '@trezor/product-components'; + +import { CustomBackends } from './CustomBackends/CustomBackends'; + const Section = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/BackendInput.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/BackendInput.tsx index 6c4a25052c5..2322144cd89 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/BackendInput.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/BackendInput.tsx @@ -1,4 +1,5 @@ import { Input, Spinner, Tooltip } from '@trezor/components'; + import { Translation, StatusLight } from 'src/components/suite'; const ActiveStatus = ( diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/BackendTypeSelect.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/BackendTypeSelect.tsx index 8e21f3e9098..d03c0fa3fb2 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/BackendTypeSelect.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/BackendTypeSelect.tsx @@ -1,11 +1,12 @@ import { useMemo } from 'react'; + import styled from 'styled-components'; import { Select } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { isDesktop } from '@trezor/env-utils'; - import { Network } from '@suite-common/wallet-config'; + +import { Translation } from 'src/components/suite'; import type { BackendOption } from 'src/hooks/settings/backends'; const Capitalize = styled.span` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/ConnectionInfo.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/ConnectionInfo.tsx index e49f8324784..3543b4ebdad 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/ConnectionInfo.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/ConnectionInfo.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { Paragraph } from '@trezor/components'; +import { NetworkSymbol } from '@suite-common/wallet-config'; + import { useSelector } from 'src/hooks/suite'; import { Translation } from 'src/components/suite/Translation'; -import { NetworkSymbol } from '@suite-common/wallet-config'; // eslint-disable-next-line local-rules/no-override-ds-component const Wrapper = styled(Paragraph)` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/CustomBackends.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/CustomBackends.tsx index be770a2075e..7f4905d801e 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/CustomBackends.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/CustomBackends.tsx @@ -1,18 +1,22 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { Input, Button, H3, CollapsibleBox } from '@trezor/components'; +import { Network } from '@suite-common/wallet-config'; +import { spacings } from '@trezor/theme'; + import { Translation, TooltipSymbol } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { toggleTor } from 'src/actions/suite/suiteActions'; import { useDefaultUrls, useBackendsForm } from 'src/hooks/settings/backends'; +import { selectTorState } from 'src/reducers/suite/suiteReducer'; + import ConnectionInfo from './ConnectionInfo'; import { BackendInput } from './BackendInput'; import { BackendTypeSelect } from './BackendTypeSelect'; import { TorModal, TorResult } from './TorModal'; -import { Network } from '@suite-common/wallet-config'; -import { selectTorState } from 'src/reducers/suite/suiteReducer'; -import { spacings } from '@trezor/theme'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/TorModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/TorModal.tsx index 61a47dfa928..416052bb980 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/TorModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/TorModal.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; + import { Button, Paragraph } from '@trezor/components'; -import { Modal, Translation } from 'src/components/suite'; import { isDesktop } from '@trezor/env-utils'; + +import { Modal, Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite/useSelector'; import { getIsTorLoading } from 'src/utils/suite/tor'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ApplicationLogModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ApplicationLogModal.tsx index aa777df045a..20b63bba831 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ApplicationLogModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ApplicationLogModal.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { selectLogs } from '@suite-common/logger'; @@ -14,11 +15,11 @@ import { variables, useScrollShadow, } from '@trezor/components'; +import { spacings, spacingsPx } from '@trezor/theme'; import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { getApplicationInfo, getApplicationLog, prettifyLog } from 'src/utils/suite/logsUtils'; -import { spacings, spacingsPx } from '@trezor/theme'; const ScrollContainer = styled.div` overflow: auto; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AuthenticateDeviceFailModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AuthenticateDeviceFailModal.tsx index 6f58c39d687..9788bc9483a 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AuthenticateDeviceFailModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AuthenticateDeviceFailModal.tsx @@ -1,8 +1,9 @@ import styled from 'styled-components'; +import { TREZOR_SUPPORT_DEVICE_AUTHENTICATION_FAILED_URL } from '@trezor/urls'; + import { Modal } from 'src/components/suite'; import { SecurityCheckFail } from 'src/components/suite/SecurityCheck/SecurityCheckFail'; -import { TREZOR_SUPPORT_DEVICE_AUTHENTICATION_FAILED_URL } from '@trezor/urls'; const StyledModal = styled(Modal)` text-align: left; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CancelCoinjoinModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CancelCoinjoinModal.tsx index ea9e8d7de46..0add1860480 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CancelCoinjoinModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CancelCoinjoinModal.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { Button } from '@trezor/components'; + import { useSelector } from 'src/hooks/suite/useSelector'; import { Modal, Translation } from 'src/components/suite'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimEthForm.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimEthForm.tsx index 7444cdd335d..af99701b6b7 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimEthForm.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimEthForm.tsx @@ -1,16 +1,20 @@ import { useEffect } from 'react'; + import styled from 'styled-components'; + import { Button, Paragraph, Tooltip, Banner } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; +import { getAccountEverstakeStakingPool } from '@suite-common/wallet-utils'; + import { Translation, FiatValue, FormattedCryptoAmount } from 'src/components/suite'; import { useDevice, useSelector } from 'src/hooks/suite'; import { useClaimEthFormContext } from 'src/hooks/wallet/useClaimEthForm'; import { CRYPTO_INPUT } from 'src/types/wallet/stakeForms'; -import { spacingsPx } from '@trezor/theme'; -import ClaimFees from './Fees'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { getAccountEverstakeStakingPool } from '@suite-common/wallet-utils'; import { useMessageSystemStaking } from 'src/hooks/suite/useMessageSystemStaking'; +import ClaimFees from './Fees'; + const AmountInfo = styled.div` display: flex; justify-content: space-between; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimModal.tsx index 035b069e14d..ce45d30c33a 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimModal.tsx @@ -1,6 +1,8 @@ import styled from 'styled-components'; + import { useSelector } from 'src/hooks/suite'; import { Modal, Translation } from 'src/components/suite'; + import { ClaimModalContent } from './ClaimModalContent'; const StyledModal = styled(Modal)` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimModalContent.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimModalContent.tsx index 4505fdfbca5..14b23016c5d 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimModalContent.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/ClaimModalContent.tsx @@ -1,5 +1,7 @@ import { SelectedAccountLoaded } from '@suite-common/wallet-types'; + import { ClaimEthFormContext, useClaimEthForm } from 'src/hooks/wallet/useClaimEthForm'; + import { ClaimEthForm } from './ClaimEthForm'; interface ClaimModalContentProps { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/Fees.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/Fees.tsx index b6406676b65..760f7319b75 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/Fees.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ClaimModal/Fees.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Fees } from 'src/components/wallet/Fees/Fees'; import { useClaimEthFormContext } from 'src/hooks/wallet/useClaimEthForm'; import { Translation } from 'src/components/suite'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CoinjoinSuccessModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CoinjoinSuccessModal.tsx index 837af051e7a..e3c3f5409d9 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CoinjoinSuccessModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CoinjoinSuccessModal.tsx @@ -1,10 +1,11 @@ import styled from 'styled-components'; -import { useDispatch } from 'src/hooks/suite'; import { transparentize } from 'polished'; import { Button, Icon, variables } from '@trezor/components'; import { selectAccountByKey } from '@suite-common/wallet-core'; import { WalletParams } from '@suite-common/wallet-types'; + +import { useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; import { useSelector } from 'src/hooks/suite/useSelector'; import { selectRouterParams } from 'src/reducers/suite/routerReducer'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CoinmarketTermsModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CoinmarketTermsModal.tsx index 7e2f6fad30e..059589648f7 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CoinmarketTermsModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CoinmarketTermsModal.tsx @@ -1,9 +1,11 @@ +import { CryptoId } from 'invity-api'; + import { Column, IconCircle, Paragraph, NewModal, List, H4 } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import type { Deferred } from '@trezor/utils'; -import { CryptoId } from 'invity-api'; -import { useDevice } from 'src/hooks/suite'; import { spacings } from '@trezor/theme'; + +import { Translation } from 'src/components/suite'; +import { useDevice } from 'src/hooks/suite'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; type CoinmarketTermsModalProps = { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedAddressModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedAddressModal.tsx index ae6a4a04483..0251ea62dff 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedAddressModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedAddressModal.tsx @@ -1,6 +1,7 @@ import { useCallback } from 'react'; import { openAddressModal, showAddress } from 'src/actions/wallet/receiveActions'; + import { ConfirmUnverifiedModal } from './ConfirmUnverifiedModal'; interface ConfirmUnverifiedAddressModalProps { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx index e880097f858..2a31ddb16d6 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx @@ -1,12 +1,15 @@ +import { useEffect } from 'react'; + +import { Button, H3, NewModal, Paragraph } from '@trezor/components'; +import { selectDeviceLabelOrName } from '@suite-common/wallet-core'; + import { Translation } from 'src/components/suite'; import { TranslationKey } from 'src/components/suite/Translation'; import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; import { Dispatch, GetState } from 'src/types/suite'; -import { Button, H3, NewModal, Paragraph } from '@trezor/components'; import { onCancel } from 'src/actions/suite/modalActions'; -import { selectDeviceLabelOrName } from '@suite-common/wallet-core'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; -import { useEffect } from 'react'; + interface ConfirmUnverifiedModalProps { action: { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedProceedModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedProceedModal.tsx index 07f6d76fb9c..87bd02a247c 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedProceedModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedProceedModal.tsx @@ -1,7 +1,8 @@ -import { ConfirmUnverifiedModal } from './ConfirmUnverifiedModal'; import { COINMARKET_BUY } from 'src/actions/wallet/constants'; import { Dispatch } from 'src/types/suite'; +import { ConfirmUnverifiedModal } from './ConfirmUnverifiedModal'; + interface ConfirmUnverifiedProceedModalProps { value: string; } diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedXpubModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedXpubModal.tsx index 2ac4149b6b5..900f9aa0a57 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedXpubModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedXpubModal.tsx @@ -1,8 +1,9 @@ import { useCallback } from 'react'; -import { ConfirmUnverifiedModal } from './ConfirmUnverifiedModal'; import { openXpubModal, showXpub } from 'src/actions/wallet/publicKeyActions'; +import { ConfirmUnverifiedModal } from './ConfirmUnverifiedModal'; + export const ConfirmUnverifiedXpubModal = () => { const event = useCallback(() => openXpubModal(), []); const verifyProcess = useCallback(() => showXpub(), []); diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/AutoStopButton.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/AutoStopButton.tsx index 2ebd19e43da..057a998e77f 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/AutoStopButton.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/AutoStopButton.tsx @@ -1,13 +1,16 @@ import { useState } from 'react'; + import styled, { css, useTheme } from 'styled-components'; + import { Icon, IconName } from '@trezor/components'; import { TranslationKey } from '@suite-common/intl-types'; +import { borders, typography } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite/useSelector'; import { selectIsSessionAutostopped } from 'src/reducers/wallet/coinjoinReducer'; import { useDispatch } from 'src/hooks/suite/useDispatch'; import { toggleAutostopCoinjoin } from 'src/actions/wallet/coinjoinAccountActions'; -import { borders, typography } from '@trezor/theme'; const TRANSITION_CONFIG = '0.1s ease'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx index 3643217e56e..0429e72ee79 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx @@ -1,11 +1,14 @@ import styled, { useTheme } from 'styled-components'; -import { CoinjoinSession, SessionPhase } from 'src/types/wallet/coinjoin'; + import { Spinner, Icon } from '@trezor/components'; +import { RoundPhase } from '@trezor/coinjoin'; +import { spacingsPx, typography } from '@trezor/theme'; + +import { CoinjoinSession, SessionPhase } from 'src/types/wallet/coinjoin'; import { SESSION_PHASE_MESSAGES } from 'src/constants/suite/coinjoin'; import { Translation } from 'src/components/suite/Translation'; import { CountdownTimer } from 'src/components/suite/CountdownTimer'; -import { RoundPhase } from '@trezor/coinjoin'; -import { spacingsPx, typography } from '@trezor/theme'; + const Container = styled.div` padding: ${spacingsPx.xxl} ${spacingsPx.xxxl} 0; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CriticalCoinjoinPhaseModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CriticalCoinjoinPhaseModal.tsx index 10e7030c2d4..6781a3896c4 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CriticalCoinjoinPhaseModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CriticalCoinjoinPhaseModal.tsx @@ -1,13 +1,16 @@ import styled from 'styled-components'; + import { variables, Image } from '@trezor/components'; +import { spacingsPx, typography } from '@trezor/theme'; + import { Modal, Translation } from 'src/components/suite'; import { useSelector, useDevice } from 'src/hooks/suite'; import { selectCoinjoinAccountByKey } from 'src/reducers/wallet/coinjoinReducer'; -import { CoinjoinPhaseProgress } from './CoinjoinPhaseProgress'; import { ROUND_PHASE_MESSAGES } from 'src/constants/suite/coinjoin'; import { useCoinjoinSessionPhase } from 'src/hooks/coinjoin'; + +import { CoinjoinPhaseProgress } from './CoinjoinPhaseProgress'; import { AutoStopButton } from './AutoStopButton'; -import { spacingsPx, typography } from '@trezor/theme'; const StyledModal = styled(Modal)` width: 520px; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DeviceAuthenticityOptOutModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DeviceAuthenticityOptOutModal.tsx index 9eec4af1cc0..f2fd15d65d2 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DeviceAuthenticityOptOutModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DeviceAuthenticityOptOutModal.tsx @@ -1,10 +1,11 @@ import { useState } from 'react'; import { Column, NewModal, Card, Banner, H3, Paragraph } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation, CheckItem } from 'src/components/suite'; import { deviceAuthenticityOptOut } from 'src/actions/suite/suiteActions'; import { useDispatch } from 'src/hooks/suite'; -import { spacings } from '@trezor/theme'; type DeviceAuthenticityOptOutModalProps = { onCancel: () => void; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DisableTorModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DisableTorModal.tsx index 264bcfdee71..65e745c1d3f 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DisableTorModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DisableTorModal.tsx @@ -1,17 +1,20 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { Button, H3, Paragraph, variables } from '@trezor/components'; import { getTitleForNetwork } from '@suite-common/wallet-utils'; import { UserContextPayload } from '@suite-common/suite-types'; import { blockchainActions } from '@suite-common/wallet-core'; +import { NetworkSymbol } from '@suite-common/wallet-config'; +import { CoinLogo } from '@trezor/product-components'; + import { Modal, Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { isOnionUrl } from 'src/utils/suite/tor'; import { useCustomBackends } from 'src/hooks/settings/backends'; -import { NetworkSymbol } from '@suite-common/wallet-config'; import { AdvancedCoinSettingsModal } from 'src/components/suite/modals'; -import { CoinLogo } from '@trezor/product-components'; + const BackendRowWrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/FirmwareRevisionOptOutModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/FirmwareRevisionOptOutModal.tsx index 01dc67dc185..aaac59499de 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/FirmwareRevisionOptOutModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/FirmwareRevisionOptOutModal.tsx @@ -1,10 +1,11 @@ import { useState } from 'react'; import { Column, NewModal, Banner, Card, H3, Paragraph } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation, CheckItem } from 'src/components/suite'; import { toggleCheckFirmwareAuthenticity } from 'src/actions/suite/suiteActions'; import { useDispatch } from 'src/hooks/suite'; -import { spacings } from '@trezor/theme'; type DeviceAuthenticityOptOutModalProps = { onCancel: () => void; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/DelimiterForm.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/DelimiterForm.tsx index 73f40710b43..74361ba357b 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/DelimiterForm.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/DelimiterForm.tsx @@ -1,6 +1,9 @@ import { useState, useRef, useEffect } from 'react'; + import styled from 'styled-components'; + import { Switch, Input, variables } from '@trezor/components'; + import { Translation } from 'src/components/suite'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/ExampleCSV.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/ExampleCSV.tsx index 9c7be63c7be..de8f11fdd34 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/ExampleCSV.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/ExampleCSV.tsx @@ -1,11 +1,14 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { motion, AnimatePresence } from 'framer-motion'; + import { Paragraph, Icon, motionAnimation } from '@trezor/components'; +import { borders, spacingsPx, typography } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useSelector, useTranslation } from 'src/hooks/suite'; import { selectIsLabelingAvailable } from 'src/reducers/suite/metadataReducer'; -import { borders, spacingsPx, typography } from '@trezor/theme'; const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/ImportTransactionModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/ImportTransactionModal.tsx index a9a385fac52..a616945e2ba 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/ImportTransactionModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/ImportTransactionModal.tsx @@ -1,11 +1,14 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { UserContextPayload } from '@suite-common/suite-types'; import { parseCSV } from '@suite-common/wallet-utils'; + import { Translation, Modal } from 'src/components/suite'; import type { ExtendedMessageDescriptor } from 'src/types/suite'; import { DropZone } from 'src/components/suite/DropZone'; + import { DelimiterForm } from './DelimiterForm'; import { ExampleCSV } from './ExampleCSV'; import { TabSelection, TabId } from './TabSelection'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/InputCSV.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/InputCSV.tsx index 47d55a34a81..4f657d3308e 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/InputCSV.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/InputCSV.tsx @@ -1,5 +1,7 @@ import { useRef } from 'react'; + import styled from 'styled-components'; + import { Textarea, Button } from '@trezor/components'; import { Translation } from 'src/components/suite'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/TabSelection.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/TabSelection.tsx index f01e9a69fe3..7d1099cdbf7 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/TabSelection.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ImportTransactionModal/TabSelection.tsx @@ -1,8 +1,11 @@ import { Dispatch, SetStateAction } from 'react'; + import styled from 'styled-components'; -import { Translation } from 'src/components/suite'; + import { variables } from '@trezor/components'; +import { Translation } from 'src/components/suite'; + const TabSelector = styled.div` width: 100%; text-align: left; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MetadataProviderModal/MetadataProviderModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MetadataProviderModal/MetadataProviderModal.tsx index ca502290700..f529a9d0182 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MetadataProviderModal/MetadataProviderModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MetadataProviderModal/MetadataProviderModal.tsx @@ -1,13 +1,16 @@ import { useState } from 'react'; + import { Button, NewModal, Row, Paragraph } from '@trezor/components'; +import type { Deferred } from '@trezor/utils'; +import { isFeatureFlagEnabled } from '@suite-common/suite-utils'; +import { spacings } from '@trezor/theme'; import { Translation } from 'src/components/suite/index'; import { useDispatch } from 'src/hooks/suite'; import { connectProvider } from 'src/actions/suite/metadataProviderActions'; -import type { Deferred } from '@trezor/utils'; import { MetadataProviderType } from 'src/types/suite/metadata'; -import { isFeatureFlagEnabled } from '@suite-common/suite-utils'; -import { spacings } from '@trezor/theme'; + + import { DropboxLogo } from './DropboxLogo'; import { GoogleDriveLogo } from './GoogleDriveLogo'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MoreRoundsNeededModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MoreRoundsNeededModal.tsx index 9f3fa23802c..68e27f135ca 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MoreRoundsNeededModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MoreRoundsNeededModal.tsx @@ -1,6 +1,8 @@ import styled, { useTheme } from 'styled-components'; -import { useDispatch } from 'src/hooks/suite'; + import { Button, Icon, variables } from '@trezor/components'; + +import { useDispatch } from 'src/hooks/suite'; import { onCancel as closeModal } from 'src/actions/suite/modalActions'; import { Modal, Translation } from 'src/components/suite'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/BackupInstructionsCard.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/BackupInstructionsCard.tsx index 7f14a9b9f99..00ee7c35312 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/BackupInstructionsCard.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/BackupInstructionsCard.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; import { Card, Icon, IconName } from '@trezor/components'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/BackupInstructionsStep.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/BackupInstructionsStep.tsx index 822486030d0..1d0d9baaef2 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/BackupInstructionsStep.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/BackupInstructionsStep.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; import { TranslationKey } from '@suite-common/intl-types'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal.tsx index fae960a71f4..6766cfc9946 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal.tsx @@ -1,24 +1,26 @@ import { useState } from 'react'; -import { selectDevice } from '@suite-common/wallet-core'; +import { selectDevice } from '@suite-common/wallet-core'; import { Button, ModalProps } from '@trezor/components'; import { HELP_CENTER_KEEPING_SEED_SAFE_URL, TREZOR_SUPPORT_RECOVERY_ISSUES_URL, HELP_CENTER_UPGRADING_TO_MULTI_SHARE_URL, } from '@trezor/urls'; +import TrezorConnect, { PROTO } from '@trezor/connect'; +import { EventType, analytics } from '@trezor/suite-analytics'; import { useSelector } from 'src/hooks/suite'; import { Modal, Translation } from 'src/components/suite'; import { LearnMoreButton } from 'src/components/suite/LearnMoreButton'; + import { MultiShareBackupStep1FirstInfo } from './MultiShareBackupStep1FirstInfo'; import { MultiShareBackupStep2SecondInfo } from './MultiShareBackupStep2SecondInfo'; -import TrezorConnect, { PROTO } from '@trezor/connect'; import { MultiShareBackupStep5Done } from './MultiShareBackupStep5Done'; import { isAdditionalShamirBackupInProgress } from '../../../../../../utils/device/isRecoveryInProgress'; import { MultiShareBackupStep3VerifyOwnership } from './MultiShareBackupStep3VerifyOwnership'; import { MultiShareBackupStep4BackupSeed } from './MultiShareBackupStep4BackupSeed'; -import { EventType, analytics } from '@trezor/suite-analytics'; + type Steps = 'first-info' | 'second-info' | 'verify-ownership' | 'backup-seed' | 'done'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep1FirstInfo.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep1FirstInfo.tsx index 43a5e5877ee..e3ab51099c2 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep1FirstInfo.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep1FirstInfo.tsx @@ -1,10 +1,12 @@ import { Dispatch, SetStateAction } from 'react'; + import styled from 'styled-components'; import { Checkbox, Image, Paragraph } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; import { Translation } from 'src/components/suite'; + import { Body, Section } from './multiShareModalLayout'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep5Done.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep5Done.tsx index 27a084f6f39..741cf8d7199 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep5Done.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep5Done.tsx @@ -1,11 +1,15 @@ +import { ReactNode } from 'react'; + +import styled from 'styled-components'; + import { Card, Row, Column, Text, Icon } from '@trezor/components'; +import { borders, spacings, spacingsPx } from '@trezor/theme'; +import { TranslationKey } from '@suite-common/intl-types'; import { Translation } from 'src/components/suite'; + import { Body, Section } from './multiShareModalLayout'; -import { borders, spacings, spacingsPx } from '@trezor/theme'; -import { ReactNode } from 'react'; -import { TranslationKey } from '@suite-common/intl-types'; -import styled from 'styled-components'; + const GradientCallout = styled.div` background-image: linear-gradient( diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx index 7a70242e4e5..917e52bc47d 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/instructionSteps.tsx @@ -1,10 +1,11 @@ -import { Row, Image, Text } from '@trezor/components'; import styled from 'styled-components'; +import { Row, Image, Text } from '@trezor/components'; import { borders, spacings, spacingsPx } from '@trezor/theme'; import { ESHOP_KEEP_METAL_SINGLE_SHARE_URL, HELP_CENTER_SEED_CARD_URL } from '@trezor/urls'; import { Translation, TrezorLink } from 'src/components/suite'; + import { BackupInstructionsCard } from './BackupInstructionsCard'; import { BackupInstructionsStepProps } from './BackupInstructionsStep'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/multiShareModalLayout.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/multiShareModalLayout.tsx index 9cf32071099..2d4719259da 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/multiShareModalLayout.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/multiShareModalLayout.tsx @@ -1,6 +1,7 @@ +import { ReactNode } from 'react'; + import { Column } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { ReactNode } from 'react'; export const Body = ({ children }: { children: ReactNode }) => ( diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PassphraseDuplicateModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PassphraseDuplicateModal.tsx index bb65f9c6680..fa905b01333 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PassphraseDuplicateModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PassphraseDuplicateModal.tsx @@ -1,5 +1,4 @@ import { Button, Column, H3, Text } from '@trezor/components'; - import { authorizeDeviceThunk, switchDuplicatedDevice } from '@suite-common/wallet-core'; import { spacings } from '@trezor/theme'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PassphraseMismatchModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PassphraseMismatchModal.tsx index 63e85c150ac..c09273e6559 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PassphraseMismatchModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PassphraseMismatchModal.tsx @@ -1,17 +1,18 @@ import { Button, H3, Column, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { passwordMismatchResetThunk } from '@suite-common/wallet-core'; +import { WalletType } from '@suite-common/wallet-types'; import { useDevice, useDispatch } from 'src/hooks/suite'; import { CardWithDevice } from 'src/views/suite/SwitchDevice/CardWithDevice'; -import { Translation } from '../../../Translation'; -import { passwordMismatchResetThunk } from '@suite-common/wallet-core'; import { addWalletThunk, redirectAfterWalletSelectedThunk, } from 'src/actions/wallet/addWalletThunk'; -import { WalletType } from '@suite-common/wallet-types'; import { SwitchDeviceModal } from 'src/views/suite/SwitchDevice/SwitchDeviceModal'; +import { Translation } from '../../../Translation'; + export const PassphraseMismatchModal = ({ onCancel }: { onCancel: () => void }) => { const { isLocked, device: selectDevice } = useDevice(); const dispatch = useDispatch(); diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PinMismatchModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PinMismatchModal.tsx index 3bbc9353164..ab636e11977 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PinMismatchModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/PinMismatchModal.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { Button, Image } from '@trezor/components'; + import { Translation, Modal, ModalProps } from 'src/components/suite'; import { changePin } from 'src/actions/settings/deviceSettingsActions'; import { useDispatch } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/QrScannerModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/QrScannerModal.tsx index 41b3977c20d..66b5bc015ab 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/QrScannerModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/QrScannerModal.tsx @@ -1,4 +1,5 @@ import { lazy, Suspense, useState } from 'react'; + import styled from 'styled-components'; import { UserContextPayload } from '@suite-common/suite-types'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx index 3dc206cfd12..b76230c324a 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { useDevice, useDispatch } from 'src/hooks/suite'; + import { Radio, Paragraph, @@ -10,9 +10,12 @@ import { Card, Text, } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + +import { useDevice, useDispatch } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; -import { spacings } from '@trezor/theme'; + /** * A Modal that allows user to set the `safety_checks` feature of connected Trezor. diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeEthInANutshellModal/StakeEthInANutshellModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeEthInANutshellModal/StakeEthInANutshellModal.tsx index 56ed954761d..36cefc901ab 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeEthInANutshellModal/StakeEthInANutshellModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeEthInANutshellModal/StakeEthInANutshellModal.tsx @@ -13,14 +13,15 @@ import { Divider, CollapsibleBox, } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { TranslationKey } from '@suite-common/intl-types'; +import { spacings } from '@trezor/theme'; +import { selectValidatorsQueueData } from '@suite-common/wallet-core'; + +import { Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; -import { spacings } from '@trezor/theme'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { getUnstakingPeriodInDays } from 'src/utils/suite/stake'; -import { selectValidatorsQueueData } from '@suite-common/wallet-core'; import { StakingInfo } from 'src/components/suite/StakingProcess/StakingInfo'; import { UnstakingInfo } from 'src/components/suite/StakingProcess/UnstakingInfo'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/AvailableBalance.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/AvailableBalance.tsx index 757935ea0c9..5f0dd2d0520 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/AvailableBalance.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/AvailableBalance.tsx @@ -1,6 +1,8 @@ import React from 'react'; + import { Paragraph, Column, Text } from '@trezor/components'; import { NetworkSymbol } from '@suite-common/wallet-config'; + import { Translation, FormattedCryptoAmount, FiatValue } from 'src/components/suite'; interface AvailableBalanceProps { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/ConfirmStakeEthModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/ConfirmStakeEthModal.tsx index dbbc196ee24..ee2d773325d 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/ConfirmStakeEthModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/ConfirmStakeEthModal.tsx @@ -1,12 +1,14 @@ import { useState } from 'react'; + import { Checkbox, NewModal, Column, Banner, Card } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { selectValidatorsQueueData } from '@suite-common/wallet-core'; +import { HELP_CENTER_ETH_STAKING } from '@trezor/urls'; + import { Translation, TrezorLink } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { selectValidatorsQueueData } from '@suite-common/wallet-core'; -import { HELP_CENTER_ETH_STAKING } from '@trezor/urls'; import { getDaysToAddToPoolInitial } from 'src/utils/suite/stake'; interface ConfirmStakeEthModalProps { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/Inputs.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/Inputs.tsx index 86a64debbbc..022ff65a8e0 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/Inputs.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/Inputs.tsx @@ -1,8 +1,12 @@ import styled from 'styled-components'; + import { Icon, Banner, Column, Text } from '@trezor/components'; import { getInputState } from '@suite-common/wallet-utils'; import { useFormatters } from '@suite-common/formatters'; import { formInputsMaxLength } from '@suite-common/validators'; +import { MIN_ETH_FOR_WITHDRAWALS } from '@suite-common/wallet-constants'; +import { spacingsPx } from '@trezor/theme'; + import { NumberInput, Translation } from 'src/components/suite'; import { useTranslation } from 'src/hooks/suite'; import { useStakeEthFormContext } from 'src/hooks/wallet/useStakeEthForm'; @@ -13,8 +17,6 @@ import { validateReserveOrBalance, } from 'src/utils/suite/validation'; import { FIAT_INPUT, CRYPTO_INPUT } from 'src/types/wallet/stakeForms'; -import { MIN_ETH_FOR_WITHDRAWALS } from '@suite-common/wallet-constants'; -import { spacingsPx } from '@trezor/theme'; import { validateStakingMax } from 'src/utils/suite/stake'; const IconWrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/StakeButton.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/StakeButton.tsx index 610c2c2d5a1..30779454531 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/StakeButton.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/StakeButton.tsx @@ -1,4 +1,5 @@ import { Tooltip, NewModal } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useStakeEthFormContext } from 'src/hooks/wallet/useStakeEthForm'; import { useDevice } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/StakeEthForm.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/StakeEthForm.tsx index bad02bf89c8..c88e12fd329 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/StakeEthForm.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeEthForm/StakeEthForm.tsx @@ -1,10 +1,12 @@ import { Button, Column, Row } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useStakeEthFormContext } from 'src/hooks/wallet/useStakeEthForm'; import { FormFractionButtons } from 'src/components/suite/FormFractionButtons'; -import { StakeFees } from './StakeFees'; import { CRYPTO_INPUT, FIAT_INPUT } from 'src/types/wallet/stakeForms'; + +import { StakeFees } from './StakeFees'; import { Inputs } from './Inputs'; import { ConfirmStakeEthModal } from './ConfirmStakeEthModal'; import { AvailableBalance } from './AvailableBalance'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeModal.tsx index 6e3d85cdd5b..eb00ab094d1 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakeModal.tsx @@ -1,12 +1,14 @@ import { Grid, NewModal, useMediaQuery, variables } from '@trezor/components'; import { SelectedAccountLoaded } from '@suite-common/wallet-types'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { StakeEthFormContext, useStakeEthForm } from 'src/hooks/wallet/useStakeEthForm'; + import { StakeEthForm } from './StakeEthForm/StakeEthForm'; import { StakeButton } from './StakeEthForm/StakeButton'; import { StakingInfoCards } from './StakingInfoCards/StakingInfoCards'; -import { spacings } from '@trezor/theme'; interface StakeModalModalProps { onCancel?: () => void; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/EstimatedGains.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/EstimatedGains.tsx index d0bc239ea1f..51cd482af25 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/EstimatedGains.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/EstimatedGains.tsx @@ -1,15 +1,19 @@ import React from 'react'; +import { useSelector } from 'react-redux'; + +import styled, { useTheme } from 'styled-components'; + import { selectPoolStatsApyData, StakeRootState } from '@suite-common/wallet-core'; import { Column, Grid, H2, Image, Paragraph, Text } from '@trezor/components'; -import { useSelector } from 'react-redux'; +import { spacings, spacingsPx } from '@trezor/theme'; +import { HELP_CENTER_ETH_STAKING } from '@trezor/urls'; + import { Translation } from 'src/components/suite/Translation'; import { useStakeEthFormContext } from 'src/hooks/wallet/useStakeEthForm'; import { CRYPTO_INPUT } from 'src/types/wallet/stakeForms'; import { FiatValue, FormattedCryptoAmount, TrezorLink } from 'src/components/suite'; -import styled, { useTheme } from 'styled-components'; -import { spacings, spacingsPx } from '@trezor/theme'; import { calculateGains } from 'src/utils/suite/stake'; -import { HELP_CENTER_ETH_STAKING } from '@trezor/urls'; + const Heading = styled.div` margin-bottom: ${spacingsPx.xl}; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/StakingInfoCards.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/StakingInfoCards.tsx index c8a80487ebd..8c4e81ff297 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/StakingInfoCards.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/StakingInfoCards.tsx @@ -1,9 +1,12 @@ -import { Translation } from 'src/components/suite/Translation'; import { Card, CollapsibleBox, Column, H3, List } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { EstimatedGains } from './EstimatedGains'; + +import { Translation } from 'src/components/suite/Translation'; import { StakingInfo } from 'src/components/suite/StakingProcess/StakingInfo'; +import { EstimatedGains } from './EstimatedGains'; + + export const StakingInfoCards = () => { const cards = [ { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AdvancedTxDetails.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AdvancedTxDetails.tsx index 1af6970b025..4495c7705a4 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AdvancedTxDetails.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AdvancedTxDetails.tsx @@ -1,14 +1,18 @@ import { useState } from 'react'; + import styled from 'styled-components'; -import { Translation } from 'src/components/suite'; + import { useElevation, variables } from '@trezor/components'; import { isTestnet } from '@suite-common/wallet-utils'; import { WalletAccountTransaction, ChainedTransactions } from '@suite-common/wallet-types'; import { AccountType, Network } from '@suite-common/wallet-config'; +import { Elevation, mapElevationToBorder, spacingsPx } from '@trezor/theme'; + +import { Translation } from 'src/components/suite'; + import { AmountDetails } from './AmountDetails'; import { IODetails } from './IODetails/IODetails'; import { ChainedTxs } from '../ChainedTxs'; -import { Elevation, mapElevationToBorder, spacingsPx } from '@trezor/theme'; import { Data } from './Data'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AmountDetails.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AmountDetails.tsx index a4ff0fb8a82..6acfeaf6af0 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AmountDetails.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AmountDetails.tsx @@ -1,8 +1,6 @@ import styled from 'styled-components'; + import { variables } from '@trezor/components'; -import { Translation, FormattedCryptoAmount, FiatValue, FormattedDate } from 'src/components/suite'; -import { AmountRow } from './AmountRow'; -import { WalletAccountTransaction } from 'src/types/wallet'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { formatAmount, @@ -17,15 +15,20 @@ import { isStakeTypeTx, } from '@suite-common/wallet-utils'; import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { FormattedNftAmount } from 'src/components/suite/FormattedNftAmount'; -import { useSelector } from 'src/hooks/suite'; -import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { selectHistoricFiatRates, selectHistoricFiatRatesByTimestamp, } from '@suite-common/wallet-core'; import { Timestamp, TokenAddress } from '@suite-common/wallet-types'; +import { FormattedNftAmount } from 'src/components/suite/FormattedNftAmount'; +import { useSelector } from 'src/hooks/suite'; +import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; +import { WalletAccountTransaction } from 'src/types/wallet'; +import { Translation, FormattedCryptoAmount, FiatValue, FormattedDate } from 'src/components/suite'; + +import { AmountRow } from './AmountRow'; + const MainContainer = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AmountRow.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AmountRow.tsx index 7d825a8f74c..7e40cd37400 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AmountRow.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/AmountRow.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; const rightAlignedStyles = css` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx index d7e96fe4968..a99c63970f5 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx @@ -1,10 +1,13 @@ +import styled from 'styled-components'; + import { WalletAccountTransaction } from '@suite-common/wallet-types'; import { Paragraph, Row } from '@trezor/components'; import { palette, spacingsPx } from '@trezor/theme'; -import styled from 'styled-components'; -import { Translation } from 'src/components/suite'; import { TranslationKey } from '@suite-common/intl-types'; +import { Translation } from 'src/components/suite'; + + const Container = styled.div` display: grid; grid-template-columns: 130px 3fr; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/AnalyzeInExplorerBanner.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/AnalyzeInExplorerBanner.tsx index 40480539305..a741793f422 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/AnalyzeInExplorerBanner.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/AnalyzeInExplorerBanner.tsx @@ -1,12 +1,13 @@ import styled from 'styled-components'; import { variables } from '@trezor/components'; -import { NotificationCard, Translation } from 'src/components/suite'; -import { useSelector } from 'src/hooks/suite'; import { typography } from '@trezor/theme'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { selectBlockchainExplorerBySymbol } from '@suite-common/wallet-core'; +import { useSelector } from 'src/hooks/suite'; +import { NotificationCard, Translation } from 'src/components/suite'; + const TextWrapper = styled.div` display: flex; text-align: start; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx index 4eae47db2dc..8415fb0b7a5 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx @@ -1,18 +1,22 @@ import { ReactElement, ReactNode } from 'react'; + import styled, { css, useTheme } from 'styled-components'; import { spacingsPx, spacings, typography } from '@trezor/theme'; import { WalletAccountTransaction } from '@suite-common/wallet-types'; import { formatAmount, formatNetworkAmount, isNftTokenTransfer } from '@suite-common/wallet-utils'; -import { FormattedCryptoAmount, Translation } from 'src/components/suite'; -import { useSelector } from 'src/hooks/suite/useSelector'; import { AnonymitySet, TokenTransfer } from '@trezor/blockchain-link'; import { Icon, CollapsibleBox, Divider } from '@trezor/components'; +import { NetworkSymbol } from '@suite-common/wallet-config'; + +import { FormattedCryptoAmount, Translation } from 'src/components/suite'; +import { useSelector } from 'src/hooks/suite/useSelector'; import { UtxoAnonymity } from 'src/components/wallet'; -import { AnalyzeInExplorerBanner } from './AnalyzeInExplorerBanner'; import { FormattedNftAmount } from 'src/components/suite/FormattedNftAmount'; + +import { AnalyzeInExplorerBanner } from './AnalyzeInExplorerBanner'; import { IOAddress } from '../../IOAddress'; -import { NetworkSymbol } from '@suite-common/wallet-config'; + export const blurFix = css` margin-left: -10px; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx index e1f03c5fb0c..44d1055be0f 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx @@ -1,12 +1,9 @@ import styled, { useTheme } from 'styled-components'; +import { fromWei } from 'web3-utils'; + import { Icon, variables, H3, useElevation } from '@trezor/components'; -import { Translation, FormattedDateWithBullet } from 'src/components/suite'; -import { WalletAccountTransaction } from 'src/types/wallet'; import { Network } from '@suite-common/wallet-config'; import { getTxIcon, isPending, getFeeUnits, getFeeRate } from '@suite-common/wallet-utils'; -import { TransactionHeader } from 'src/components/wallet/TransactionItem/TransactionHeader'; -import { fromWei } from 'web3-utils'; -import { IOAddress } from './IOAddress'; import { Elevation, borders, @@ -18,6 +15,13 @@ import { } from '@trezor/theme'; import { CoinLogo } from '@trezor/product-components'; +import { Translation, FormattedDateWithBullet } from 'src/components/suite'; +import { WalletAccountTransaction } from 'src/types/wallet'; +import { TransactionHeader } from 'src/components/wallet/TransactionItem/TransactionHeader'; + +import { IOAddress } from './IOAddress'; + + const Wrapper = styled.div<{ $elevation: Elevation }>` background: ${mapElevationToBackground}; padding: ${spacingsPx.lg}; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChainedTxs.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChainedTxs.tsx index 9dcaa4c5877..ce866c50484 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChainedTxs.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChainedTxs.tsx @@ -2,10 +2,11 @@ import styled from 'styled-components'; import { variables } from '@trezor/components'; import { ChainedTransactions } from '@suite-common/wallet-types'; +import { AccountType, Network } from '@suite-common/wallet-config'; import { TrezorLink, Translation } from 'src/components/suite'; import { TransactionItem } from 'src/components/wallet/TransactionItem/TransactionItem'; -import { AccountType, Network } from '@suite-common/wallet-config'; + import { AffectedTransactionItem } from './ChangeFee/AffectedTransactionItem'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactionItem.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactionItem.tsx index c997985ccec..2f84d55b040 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactionItem.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactionItem.tsx @@ -1,9 +1,11 @@ import styled, { useTheme } from 'styled-components'; + import { Icon, variables } from '@trezor/components'; import { WalletAccountTransaction } from '@suite-common/wallet-types'; +import { truncateMiddle } from '@trezor/utils'; + import { FormattedDate } from 'src/components/suite'; import { useLayoutSize } from 'src/hooks/suite/useLayoutSize'; -import { truncateMiddle } from '@trezor/utils'; const TxRow = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactions.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactions.tsx index ed3952b1239..7925d4a7167 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactions.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/AffectedTransactions.tsx @@ -1,7 +1,10 @@ import styled from 'styled-components'; + import { Button } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useRbfContext } from 'src/hooks/wallet/useRbfForm'; + import { GreyCard } from './GreyCard'; import { WarnHeader } from './WarnHeader'; import { AffectedTransactionItem } from './AffectedTransactionItem'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx index acf08d76e88..b0a4a5d6bf7 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx @@ -1,16 +1,21 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; +import { formatNetworkAmount, getFeeUnits } from '@suite-common/wallet-utils'; +import { WalletAccountTransaction } from '@suite-common/wallet-types'; +import { borders } from '@trezor/theme'; + import { Translation, FiatValue, FormattedCryptoAmount } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { useRbf, RbfContext, UseRbfProps } from 'src/hooks/wallet/useRbfForm'; -import { formatNetworkAmount, getFeeUnits } from '@suite-common/wallet-utils'; -import { WalletAccountTransaction } from '@suite-common/wallet-types'; + import { RbfFees } from './RbfFees'; import { AffectedTransactions } from './AffectedTransactions'; import { DecreasedOutputs } from './DecreasedOutputs'; import { ReplaceTxButton } from './ReplaceTxButton'; -import { borders } from '@trezor/theme'; + const Wrapper = styled.div` margin: 12px 0; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/DecreasedOutputs.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/DecreasedOutputs.tsx index 6013bcf9559..fed8d17ec93 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/DecreasedOutputs.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/DecreasedOutputs.tsx @@ -1,14 +1,19 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; import { AnimatePresence, motion } from 'framer-motion'; + import { Icon, variables, Radio, motionAnimation } from '@trezor/components'; +import { formatNetworkAmount } from '@suite-common/wallet-utils'; +import { spacings } from '@trezor/theme'; + import { FormattedCryptoAmount, HiddenPlaceholder } from 'src/components/suite'; import { Translation, TranslationKey } from 'src/components/suite/Translation'; -import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { useRbfContext } from 'src/hooks/wallet/useRbfForm'; + import { GreyCard } from './GreyCard'; import { WarnHeader } from './WarnHeader'; -import { spacings } from '@trezor/theme'; + const OutputsWrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/GreyCard.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/GreyCard.tsx index 99747bc2ca9..6f9870587ef 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/GreyCard.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/GreyCard.tsx @@ -1,5 +1,7 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { Card, Column } from '@trezor/components'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ReplaceTxButton.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ReplaceTxButton.tsx index c3616d46955..66e70faf50b 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ReplaceTxButton.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ReplaceTxButton.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { Button } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useDevice } from 'src/hooks/suite'; import { useRbfContext } from 'src/hooks/wallet/useRbfForm'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/WarnHeader.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/WarnHeader.tsx index ae798138e56..4effaf18ad0 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/WarnHeader.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/WarnHeader.tsx @@ -1,5 +1,7 @@ import { ReactNode, HTMLAttributes } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { Icon, variables } from '@trezor/components'; const Header = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx index b47b2b51bea..1e03a6430b4 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx @@ -1,9 +1,13 @@ -import { HiddenPlaceholder } from 'src/components/suite/HiddenPlaceholder'; -import { Icon, Link, Paragraph } from '@trezor/components'; import { useState } from 'react'; -import { copyToClipboard } from '@trezor/dom-utils'; + import styled, { css, useTheme } from 'styled-components'; +import { Icon, Link, Paragraph } from '@trezor/components'; +import { copyToClipboard } from '@trezor/dom-utils'; + + +import { HiddenPlaceholder } from 'src/components/suite/HiddenPlaceholder'; + const IconWrapper = styled.div` display: none; padding: 1px; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/TxDetailModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/TxDetailModal.tsx index dbbc246ac82..101ba9628d0 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/TxDetailModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/TxDetailModal.tsx @@ -1,22 +1,27 @@ import { useState, useMemo } from 'react'; + import styled from 'styled-components'; + import { Button, NewModal } from '@trezor/components'; import { HELP_CENTER_ZERO_VALUE_ATTACKS } from '@trezor/urls'; import { isPending, findChainedTransactions, getAccountKey } from '@suite-common/wallet-utils'; import { getNetwork } from '@suite-common/wallet-config'; -import { useSelector } from 'src/hooks/suite'; import { selectAccountByKey, selectTransactionConfirmations, selectAllPendingTransactions, selectIsPhishingTransaction, } from '@suite-common/wallet-core'; +import { borders, spacingsPx, typography } from '@trezor/theme'; + +import { useSelector } from 'src/hooks/suite'; import { Translation, TrezorLink } from 'src/components/suite'; import { Account, WalletAccountTransaction } from 'src/types/wallet'; + import { BasicTxDetails } from './BasicTxDetails'; import { AdvancedTxDetails, TabID } from './AdvancedTxDetails/AdvancedTxDetails'; import { ChangeFee } from './ChangeFee/ChangeFee'; -import { borders, spacingsPx, typography } from '@trezor/theme'; + const PhishingBanner = styled.div` margin-bottom: ${spacingsPx.xs}; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnecoCoinjoinModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnecoCoinjoinModal.tsx index f7a3db439e5..88a66fefaef 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnecoCoinjoinModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnecoCoinjoinModal.tsx @@ -3,11 +3,12 @@ import { transparentize } from 'polished'; import { selectIsAccountWithRatesByKey } from '@suite-common/wallet-core'; import { Button, variables } from '@trezor/components'; +import { formatAmount, getAccountDecimals } from '@suite-common/wallet-utils'; + import { FiatValue, FormattedCryptoAmount, Modal, Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite/useDispatch'; import { onCancel } from 'src/actions/suite/modalActions'; import { goto } from 'src/actions/suite/routerActions'; -import { formatAmount, getAccountDecimals } from '@suite-common/wallet-utils'; import { UNECONOMICAL_COINJOIN_THRESHOLD } from 'src/services/coinjoin'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { useSelector } from 'src/hooks/suite/useSelector'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/EverstakeModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/EverstakeModal.tsx index 3d3624eb9ea..5a8db6bacc0 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/EverstakeModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/EverstakeModal.tsx @@ -1,9 +1,11 @@ +import { useState } from 'react'; + import { Checkbox, NewModal, Column, Banner, Card } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; -import { spacings } from '@trezor/theme'; -import { useState } from 'react'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; interface EverstakeModalProps { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Fees.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Fees.tsx index cd73e323f54..309587eb3ff 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Fees.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Fees.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Fees } from 'src/components/wallet/Fees/Fees'; import { useUnstakeEthFormContext } from 'src/hooks/wallet/useUnstakeEthForm'; import { Translation } from 'src/components/suite'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx index 23b4e14d148..65be5014a50 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx @@ -1,15 +1,18 @@ import styled from 'styled-components'; + import { Icon } from '@trezor/components'; +import { formInputsMaxLength } from '@suite-common/validators'; +import { variables } from '@trezor/components/src/config'; +import { useFormatters } from '@suite-common/formatters'; +import { getInputState, getNonComposeErrorMessage } from '@suite-common/wallet-utils'; + import { NumberInput } from 'src/components/suite'; import { CRYPTO_INPUT, FIAT_INPUT } from 'src/types/wallet/stakeForms'; -import { formInputsMaxLength } from '@suite-common/validators'; import { useSelector, useTranslation } from 'src/hooks/suite'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { variables } from '@trezor/components/src/config'; import { validateDecimals, validateLimitsBigNum, validateMin } from 'src/utils/suite/validation'; import { useUnstakeEthFormContext } from 'src/hooks/wallet/useUnstakeEthForm'; -import { useFormatters } from '@suite-common/formatters'; -import { getInputState, getNonComposeErrorMessage } from '@suite-common/wallet-utils'; + const HStack = styled.div` display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Options.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Options.tsx index a414bad5cb9..a924b9181f4 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Options.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Options.tsx @@ -1,14 +1,17 @@ import styled from 'styled-components'; -import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; + import { Paragraph, Radio } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; -import { Inputs } from './Inputs'; import { NetworkSymbol } from '@suite-common/wallet-config'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { getAccountEverstakeStakingPool } from '@suite-common/wallet-utils'; + import { useSelector } from 'src/hooks/suite'; import { useUnstakeEthFormContext } from 'src/hooks/wallet/useUnstakeEthForm'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { getAccountEverstakeStakingPool } from '@suite-common/wallet-utils'; +import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; + +import { Inputs } from './Inputs'; // eslint-disable-next-line local-rules/no-override-ds-component const GreyP = styled(Paragraph)` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeButton.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeButton.tsx index ea7fa1d89ce..cc1ef2a9596 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeButton.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeButton.tsx @@ -1,4 +1,5 @@ import { Tooltip, Button } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useDevice } from 'src/hooks/suite'; import { CRYPTO_INPUT, FIAT_INPUT } from 'src/types/wallet/stakeForms'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx index 0752a1c9652..0bce3a08a91 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx @@ -1,18 +1,23 @@ import styled from 'styled-components'; + import { Divider, Icon, Paragraph, Tooltip, Banner, Row, Column } from '@trezor/components'; import { spacings, spacingsPx } from '@trezor/theme'; +import { selectValidatorsQueueData } from '@suite-common/wallet-core'; +import { getAccountEverstakeStakingPool } from '@suite-common/wallet-utils'; +import { BigNumber } from '@trezor/utils'; + import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { useUnstakeEthFormContext } from 'src/hooks/wallet/useUnstakeEthForm'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { CRYPTO_INPUT, FIAT_INPUT } from 'src/types/wallet/stakeForms'; -import { Options } from './Options'; import { getUnstakingPeriodInDays } from 'src/utils/suite/stake'; -import UnstakeFees from './Fees'; -import { selectValidatorsQueueData } from '@suite-common/wallet-core'; -import { getAccountEverstakeStakingPool } from '@suite-common/wallet-utils'; import { ApproximateInstantEthAmount } from 'src/views/wallet/staking/components/EthStakingDashboard/components/ApproximateInstantEthAmount'; -import { BigNumber } from '@trezor/utils'; + +import { Options } from './Options'; +import UnstakeFees from './Fees'; + + const DividerWrapper = styled.div` & > div { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx index 3a7ae643e91..43cd16618b3 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx @@ -1,5 +1,3 @@ -import { useSelector } from 'src/hooks/suite'; -import { Translation } from 'src/components/suite'; import { Card, CollapsibleBox, @@ -12,11 +10,16 @@ import { variables, } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { SelectedAccountLoaded } from '@suite-common/wallet-types'; + +import { useSelector } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; import { UnstakingInfo } from 'src/components/suite/StakingProcess/UnstakingInfo'; -import { UnstakeButton } from './UnstakeEthForm/UnstakeButton'; import { UnstakeEthFormContext, useUnstakeEthForm } from 'src/hooks/wallet/useUnstakeEthForm'; + +import { UnstakeButton } from './UnstakeEthForm/UnstakeButton'; import { UnstakeEthForm } from './UnstakeEthForm/UnstakeEthForm'; -import { SelectedAccountLoaded } from '@suite-common/wallet-types'; + interface UnstakeModalModalProps { onCancel?: () => void; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UserContextModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UserContextModal.tsx index 4d757eb60bc..7295accb954 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UserContextModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UserContextModal.tsx @@ -1,3 +1,5 @@ +import { CryptoId } from 'invity-api'; + import { onCancel as onCancelAction } from 'src/actions/suite/modalActions'; import { MODAL } from 'src/actions/suite/constants'; import { useDispatch } from 'src/hooks/suite'; @@ -42,8 +44,8 @@ import { ConfirmUnverifiedProceedModal, } from 'src/components/suite/modals'; import type { AcquiredDevice } from 'src/types/suite'; + import type { ReduxModalProps } from '../ReduxModal'; -import { CryptoId } from 'invity-api'; import { EverstakeModal } from './UnstakeModal/EverstakeModal'; import { PassphraseMismatchModal } from './PassphraseMismatchModal'; import { FirmwareRevisionOptOutModal } from './FirmwareRevisionOptOutModal'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/WipeDeviceModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/WipeDeviceModal.tsx index f43fe1bc452..02671cd3864 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/WipeDeviceModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/WipeDeviceModal.tsx @@ -1,9 +1,11 @@ import { useState } from 'react'; + import { NewModal, Card, Column, H3, Paragraph } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation, CheckItem } from 'src/components/suite'; import { wipeDevice } from 'src/actions/settings/deviceSettingsActions'; import { useDevice, useDispatch } from 'src/hooks/suite'; -import { spacings } from '@trezor/theme'; type WipeDeviceModalProps = { onCancel: () => void; diff --git a/packages/suite/src/components/suite/notifications/NotificationRenderer/CoinProtocolRenderer.tsx b/packages/suite/src/components/suite/notifications/NotificationRenderer/CoinProtocolRenderer.tsx index 64f885eb395..2576197f7c9 100644 --- a/packages/suite/src/components/suite/notifications/NotificationRenderer/CoinProtocolRenderer.tsx +++ b/packages/suite/src/components/suite/notifications/NotificationRenderer/CoinProtocolRenderer.tsx @@ -1,16 +1,18 @@ import { useRouteMatch } from 'react-router-dom'; + import styled from 'styled-components'; import { CoinLogo } from '@trezor/product-components'; import { capitalizeFirstLetter } from '@trezor/utils'; +import { getNetworkSymbolForProtocol } from '@suite-common/suite-utils'; +import { NetworkSymbol } from '@suite-common/wallet-config'; import { fillSendForm, resetProtocol } from 'src/actions/suite/protocolActions'; import { Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { getNetworkSymbolForProtocol } from '@suite-common/suite-utils'; - import type { NotificationRendererProps } from 'src/components/suite'; -import { NetworkSymbol } from '@suite-common/wallet-config'; + + import { ConditionalActionRenderer } from './ConditionalActionRenderer'; const Row = styled.span` diff --git a/packages/suite/src/components/suite/notifications/NotificationRenderer/ConditionalActionRenderer.tsx b/packages/suite/src/components/suite/notifications/NotificationRenderer/ConditionalActionRenderer.tsx index 183fd6a24ec..ed48fb92f5f 100644 --- a/packages/suite/src/components/suite/notifications/NotificationRenderer/ConditionalActionRenderer.tsx +++ b/packages/suite/src/components/suite/notifications/NotificationRenderer/ConditionalActionRenderer.tsx @@ -1,7 +1,9 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; import { variables } from '@trezor/components'; + import type { ExtendedMessageDescriptor } from 'src/types/suite'; import type { NotificationRendererProps } from 'src/components/suite'; diff --git a/packages/suite/src/components/suite/notifications/NotificationRenderer/NotificationRenderer.tsx b/packages/suite/src/components/suite/notifications/NotificationRenderer/NotificationRenderer.tsx index b99cf8fcc6d..365d1b59540 100644 --- a/packages/suite/src/components/suite/notifications/NotificationRenderer/NotificationRenderer.tsx +++ b/packages/suite/src/components/suite/notifications/NotificationRenderer/NotificationRenderer.tsx @@ -7,6 +7,7 @@ import { DEVICE } from '@trezor/connect'; import { NotificationViewProps } from 'src/components/suite'; import type { ExtendedMessageDescriptor } from 'src/types/suite'; + import { ActionRenderer } from './ActionRenderer'; import { TransactionRenderer } from './TransactionRenderer'; import { CoinProtocolRenderer } from './CoinProtocolRenderer'; diff --git a/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationGroup.tsx b/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationGroup.tsx index 0c796aa6257..df7f2edde53 100644 --- a/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationGroup.tsx +++ b/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationGroup.tsx @@ -1,9 +1,11 @@ import styled from 'styled-components'; import { variables, Paragraph } from '@trezor/components'; + import { AppState } from 'src/types/suite'; import { Translation } from 'src/components/suite'; import { getSeenAndUnseenNotifications } from 'src/utils/suite/notification'; + import { NotificationList } from './NotificationList/NotificationList'; const SectionHeadline = styled.div` diff --git a/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationList/NotificationList.tsx b/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationList/NotificationList.tsx index 4c04af52d84..018e23df37a 100644 --- a/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationList/NotificationList.tsx +++ b/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationList/NotificationList.tsx @@ -1,9 +1,10 @@ import styled from 'styled-components'; import { NotificationRenderer } from 'src/components/suite'; -import { NotificationView } from './NotificationView'; import type { AppState } from 'src/types/suite'; +import { NotificationView } from './NotificationView'; + const Wrapper = styled.div` display: flex; flex: 1; diff --git a/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationList/NotificationView.tsx b/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationList/NotificationView.tsx index 703da68c10c..8a2b65397c4 100644 --- a/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationList/NotificationView.tsx +++ b/packages/suite/src/components/suite/notifications/Notifications/NotificationGroup/NotificationList/NotificationView.tsx @@ -2,6 +2,7 @@ import styled from 'styled-components'; import type { NotificationEntry } from '@suite-common/toast-notifications'; import { Button, Icon, ButtonProps, Paragraph, IconName } from '@trezor/components'; + import { Translation, FormattedDateWithBullet } from 'src/components/suite'; import { getNotificationIcon } from 'src/utils/suite/notification'; import { useLayoutSize } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/suite/notifications/Notifications/Notifications.tsx b/packages/suite/src/components/suite/notifications/Notifications/Notifications.tsx index 36724213ffc..158bf2a30e9 100644 --- a/packages/suite/src/components/suite/notifications/Notifications/Notifications.tsx +++ b/packages/suite/src/components/suite/notifications/Notifications/Notifications.tsx @@ -1,9 +1,13 @@ -import { useSelector } from 'src/hooks/suite'; -import { Icon, variables } from '@trezor/components'; import { useState } from 'react'; + import styled, { useTheme } from 'styled-components'; + +import { Icon, variables } from '@trezor/components'; + +import { useSelector } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; import { SETTINGS } from 'src/config/suite'; + import { NotificationGroup } from './NotificationGroup/NotificationGroup'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/suite/notifications/ToastContainer.tsx b/packages/suite/src/components/suite/notifications/ToastContainer.tsx index d5c2b815ede..d3a001ab955 100644 --- a/packages/suite/src/components/suite/notifications/ToastContainer.tsx +++ b/packages/suite/src/components/suite/notifications/ToastContainer.tsx @@ -1,6 +1,7 @@ -import styled from 'styled-components'; import { ToastContainer as BaseToastContainer, Slide } from 'react-toastify'; +import styled from 'styled-components'; + import { borders, zIndices } from '@trezor/theme'; // A set of required styles copied from 'react-toastify/dist/ReactToastify.css' diff --git a/packages/suite/src/components/suite/notifications/ToastNotification.tsx b/packages/suite/src/components/suite/notifications/ToastNotification.tsx index 57c80c4fed0..e4384a154c9 100644 --- a/packages/suite/src/components/suite/notifications/ToastNotification.tsx +++ b/packages/suite/src/components/suite/notifications/ToastNotification.tsx @@ -1,12 +1,17 @@ import { useLayoutEffect, useRef, useState } from 'react'; + import styled, { css, useTheme } from 'styled-components'; + import { Button, Icon, variables } from '@trezor/components'; -import { NotificationRenderer, NotificationViewProps, Translation } from 'src/components/suite'; import { notificationsActions, NotificationEntry } from '@suite-common/toast-notifications'; +import { spacings } from '@trezor/theme'; + +import { NotificationRenderer, NotificationViewProps, Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { getNotificationIcon, getVariantColor } from 'src/utils/suite/notification'; + import { ToastNotificationVariant } from '../../../types/suite'; -import { spacings } from '@trezor/theme'; + const Wrapper = styled.div<{ $variant: ToastNotificationVariant; $isTall: boolean }>` display: flex; diff --git a/packages/suite/src/components/suite/section/SectionItem.tsx b/packages/suite/src/components/suite/section/SectionItem.tsx index 746baf99f23..30bc92a1a02 100644 --- a/packages/suite/src/components/suite/section/SectionItem.tsx +++ b/packages/suite/src/components/suite/section/SectionItem.tsx @@ -1,8 +1,10 @@ import { forwardRef, HTMLAttributes } from 'react'; + import styled from 'styled-components'; import { borders, spacingsPx } from '@trezor/theme'; import { variables } from '@trezor/components'; + import { anchorOutlineStyles } from 'src/utils/suite/anchor'; import { SUBPAGE_NAV_HEIGHT } from 'src/constants/suite/layout'; diff --git a/packages/suite/src/components/suite/section/TextColumn.tsx b/packages/suite/src/components/suite/section/TextColumn.tsx index 5041deb73a3..55af93f4eaf 100644 --- a/packages/suite/src/components/suite/section/TextColumn.tsx +++ b/packages/suite/src/components/suite/section/TextColumn.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; import { variables } from '@trezor/components'; diff --git a/packages/suite/src/components/suite/section/sectionStyles.tsx b/packages/suite/src/components/suite/section/sectionStyles.tsx index eef1a184d07..59036d45380 100644 --- a/packages/suite/src/components/suite/section/sectionStyles.tsx +++ b/packages/suite/src/components/suite/section/sectionStyles.tsx @@ -1,4 +1,5 @@ import styled, { css } from 'styled-components'; + import { Select, variables, Button, SelectProps, ButtonProps } from '@trezor/components'; const { SCREEN_SIZE } = variables; diff --git a/packages/suite/src/components/suite/troubleshooting/TroubleshootingTips.tsx b/packages/suite/src/components/suite/troubleshooting/TroubleshootingTips.tsx index 7bdc208a1c7..4ba64920a12 100644 --- a/packages/suite/src/components/suite/troubleshooting/TroubleshootingTips.tsx +++ b/packages/suite/src/components/suite/troubleshooting/TroubleshootingTips.tsx @@ -1,6 +1,7 @@ import { useMemo, ReactNode } from 'react'; + import styled from 'styled-components'; -import { Translation, TrezorLink } from 'src/components/suite'; + import { variables, Button, CollapsibleBox, useElevation } from '@trezor/components'; import { TREZOR_SUPPORT_DEVICE_URL } from '@trezor/urls'; import TrezorConnect from '@trezor/connect'; @@ -8,6 +9,8 @@ import type TrezorConnectWeb from '@trezor/connect-web'; import { isAndroid } from '@trezor/env-utils'; import { Elevation, mapElevationToBorder } from '@trezor/theme'; +import { Translation, TrezorLink } from 'src/components/suite'; + const ItemLabel = styled.span` color: ${({ theme }) => theme.legacy.TYPE_DARK_GREY}; font-size: ${variables.FONT_SIZE.SMALL}; diff --git a/packages/suite/src/components/suite/troubleshooting/tips/UdevDescription.tsx b/packages/suite/src/components/suite/troubleshooting/tips/UdevDescription.tsx index 6bbcbe8151a..7009d1f3084 100644 --- a/packages/suite/src/components/suite/troubleshooting/tips/UdevDescription.tsx +++ b/packages/suite/src/components/suite/troubleshooting/tips/UdevDescription.tsx @@ -1,9 +1,11 @@ +import styled from 'styled-components'; + +import { typography } from '@trezor/theme'; + import { TrezorLink } from 'src/components/suite'; import { Translation } from 'src/components/suite/Translation'; import { useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; -import { typography } from '@trezor/theme'; -import styled from 'styled-components'; const Wrapper = styled.div` a { diff --git a/packages/suite/src/components/wallet/AccountExceptionLayout.tsx b/packages/suite/src/components/wallet/AccountExceptionLayout.tsx index 240604bbb2d..654f958b42c 100644 --- a/packages/suite/src/components/wallet/AccountExceptionLayout.tsx +++ b/packages/suite/src/components/wallet/AccountExceptionLayout.tsx @@ -1,4 +1,5 @@ import React, { ReactNode } from 'react'; + import { H2, Button, diff --git a/packages/suite/src/components/wallet/AnimationWrapper.tsx b/packages/suite/src/components/wallet/AnimationWrapper.tsx index b12f610fc18..e0ffcae3751 100644 --- a/packages/suite/src/components/wallet/AnimationWrapper.tsx +++ b/packages/suite/src/components/wallet/AnimationWrapper.tsx @@ -1,4 +1,5 @@ import { ReactNode, ReactText } from 'react'; + import { AnimatePresence, motion } from 'framer-motion'; interface AnimationWrapperProps { diff --git a/packages/suite/src/components/wallet/CoinjoinAccountDiscoveryProgress/CoinjoinAccountDiscoveryProgress.tsx b/packages/suite/src/components/wallet/CoinjoinAccountDiscoveryProgress/CoinjoinAccountDiscoveryProgress.tsx index 26e2e692b84..f295a9a905a 100644 --- a/packages/suite/src/components/wallet/CoinjoinAccountDiscoveryProgress/CoinjoinAccountDiscoveryProgress.tsx +++ b/packages/suite/src/components/wallet/CoinjoinAccountDiscoveryProgress/CoinjoinAccountDiscoveryProgress.tsx @@ -1,4 +1,5 @@ import { useMemo } from 'react'; + import styled, { useTheme } from 'styled-components'; import { @@ -11,12 +12,14 @@ import { variables, } from '@trezor/components'; import { localizeNumber } from '@suite-common/wallet-utils'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useCoinjoinAccountLoadingProgress } from 'src/hooks/coinjoin'; -import { RotatingFacts } from './RotatingFacts'; import { useSelector } from 'src/hooks/suite'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; -import { spacings } from '@trezor/theme'; + +import { RotatingFacts } from './RotatingFacts'; const Subheader = styled.div` display: flex; diff --git a/packages/suite/src/components/wallet/CoinjoinAccountDiscoveryProgress/RotatingFacts.tsx b/packages/suite/src/components/wallet/CoinjoinAccountDiscoveryProgress/RotatingFacts.tsx index dd6db8d9e50..3258cd2992b 100644 --- a/packages/suite/src/components/wallet/CoinjoinAccountDiscoveryProgress/RotatingFacts.tsx +++ b/packages/suite/src/components/wallet/CoinjoinAccountDiscoveryProgress/RotatingFacts.tsx @@ -1,7 +1,10 @@ import { useEffect, useState } from 'react'; + import styled from 'styled-components'; import { AnimatePresence, motion } from 'framer-motion'; + import { motionEasing, variables } from '@trezor/components'; + import { Translation, TranslationKey } from 'src/components/suite/Translation'; const Fact = styled(motion.p)` diff --git a/packages/suite/src/components/wallet/DiscoveryProgress.tsx b/packages/suite/src/components/wallet/DiscoveryProgress.tsx index f089f5b7cfb..0123aca49a2 100644 --- a/packages/suite/src/components/wallet/DiscoveryProgress.tsx +++ b/packages/suite/src/components/wallet/DiscoveryProgress.tsx @@ -1,9 +1,10 @@ import styled from 'styled-components'; -import { useDiscovery } from 'src/hooks/suite'; import { ProgressBar } from '@trezor/components'; import { zIndices } from '@trezor/theme'; +import { useDiscovery } from 'src/hooks/suite'; + // eslint-disable-next-line local-rules/no-override-ds-component const StyledProgressBar = styled(ProgressBar)` height: 0; diff --git a/packages/suite/src/components/wallet/EvmExplanationBox.tsx b/packages/suite/src/components/wallet/EvmExplanationBox.tsx index 5ef8a992c2c..eb51155a74b 100644 --- a/packages/suite/src/components/wallet/EvmExplanationBox.tsx +++ b/packages/suite/src/components/wallet/EvmExplanationBox.tsx @@ -1,8 +1,10 @@ +import { HTMLAttributes, ReactNode, forwardRef } from 'react'; + +import styled, { css } from 'styled-components'; + import { NetworkSymbol } from '@suite-common/wallet-config'; import { Card, CardProps, useElevation, variables } from '@trezor/components'; import { Elevation, mapElevationToBackground } from '@trezor/theme'; -import { HTMLAttributes, ReactNode, forwardRef } from 'react'; -import styled, { css } from 'styled-components'; import { CoinLogo } from '@trezor/product-components'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/components/wallet/Fees/CustomFee.tsx b/packages/suite/src/components/wallet/Fees/CustomFee.tsx index 93c675ef391..da145124a18 100644 --- a/packages/suite/src/components/wallet/Fees/CustomFee.tsx +++ b/packages/suite/src/components/wallet/Fees/CustomFee.tsx @@ -1,5 +1,3 @@ -import { BigNumber } from '@trezor/utils/src/bigNumber'; -import styled, { useTheme } from 'styled-components'; import { Control, FieldErrors, @@ -9,6 +7,11 @@ import { UseFormReturn, UseFormSetValue, } from 'react-hook-form'; + +import styled, { useTheme } from 'styled-components'; +import { motion } from 'framer-motion'; + +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { Note, Banner, @@ -17,20 +20,23 @@ import { Icon, getInputStateTextColor, } from '@trezor/components'; -import { Translation } from 'src/components/suite'; -import { NumberInput } from 'src/components/suite/NumberInput'; import { getInputState, getFeeUnits, isInteger } from '@suite-common/wallet-utils'; import { FeeInfo, FormState } from '@suite-common/wallet-types'; import { NetworkType } from '@suite-common/wallet-config'; -import { useTranslation } from 'src/hooks/suite'; -import { InputError } from '../InputError'; -import { validateDecimals } from 'src/utils/suite/validation'; -import { motion } from 'framer-motion'; import { BottomText } from '@trezor/components/src/components/form/BottomText'; import { spacings, spacingsPx } from '@trezor/theme'; import { HELP_CENTER_TRANSACTION_FEES_URL } from '@trezor/urls'; + +import { Translation } from 'src/components/suite'; +import { NumberInput } from 'src/components/suite/NumberInput'; +import { useTranslation } from 'src/hooks/suite'; +import { validateDecimals } from 'src/utils/suite/validation'; import { LearnMoreButton } from 'src/components/suite/LearnMoreButton'; +import { InputError } from '../InputError'; + + + const Wrapper = styled.div` display: flex; width: 100%; diff --git a/packages/suite/src/components/wallet/Fees/FeeDetails.tsx b/packages/suite/src/components/wallet/Fees/FeeDetails.tsx index 0fe3e2e9cde..9c837e2ffcb 100644 --- a/packages/suite/src/components/wallet/Fees/FeeDetails.tsx +++ b/packages/suite/src/components/wallet/Fees/FeeDetails.tsx @@ -1,18 +1,20 @@ +import { useState, useEffect } from 'react'; + import styled from 'styled-components'; + import { spacingsPx, typography } from '@trezor/theme'; import { FeeLevel } from '@trezor/connect'; -import { Translation } from 'src/components/suite'; import { getFeeUnits } from '@suite-common/wallet-utils'; import { formatDuration } from '@suite-common/suite-utils'; import { NetworkType } from '@suite-common/wallet-config'; - -import { useState, useEffect } from 'react'; import { PrecomposedTransaction, PrecomposedTransactionCardano, FeeInfo, } from '@suite-common/wallet-types'; +import { Translation } from 'src/components/suite'; + const Wrapper = styled.div` display: inline-flex; align-items: baseline; diff --git a/packages/suite/src/components/wallet/Fees/Fees.tsx b/packages/suite/src/components/wallet/Fees/Fees.tsx index 8ff975849d9..2a470c32233 100644 --- a/packages/suite/src/components/wallet/Fees/Fees.tsx +++ b/packages/suite/src/components/wallet/Fees/Fees.tsx @@ -1,5 +1,3 @@ -import styled from 'styled-components'; -import { FeeLevel } from '@trezor/connect'; import { Control, FieldErrors, @@ -8,6 +6,11 @@ import { UseFormReturn, UseFormSetValue, } from 'react-hook-form'; + +import styled from 'styled-components'; +import { AnimatePresence, motion } from 'framer-motion'; + +import { FeeLevel } from '@trezor/connect'; import { Icon, Paragraph, SelectBar, Tooltip, motionEasing, variables } from '@trezor/components'; import { FormState, @@ -17,14 +20,17 @@ import { PrecomposedTransactionFinal, } from '@suite-common/wallet-types'; import { spacingsPx, typography } from '@trezor/theme'; -import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; +import { TranslationKey } from '@suite-common/intl-types'; + +import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; import { Account } from 'src/types/wallet'; import { ExtendedMessageDescriptor } from 'src/types/suite'; + import { CustomFee } from './CustomFee'; import { FeeDetails } from './FeeDetails'; -import { AnimatePresence, motion } from 'framer-motion'; -import { TranslationKey } from '@suite-common/intl-types'; + + const Container = styled.div` overflow: hidden; /* prevent scrollbar when custom fee is opened */ diff --git a/packages/suite/src/components/wallet/FiatHeader.tsx b/packages/suite/src/components/wallet/FiatHeader.tsx index 467d9b66f92..40bd6c75a1b 100644 --- a/packages/suite/src/components/wallet/FiatHeader.tsx +++ b/packages/suite/src/components/wallet/FiatHeader.tsx @@ -1,11 +1,14 @@ +import { PropsWithChildren } from 'react'; + +import styled from 'styled-components'; + import { useFormatters } from '@suite-common/formatters'; import { typography } from '@trezor/theme'; import { useShouldRedactNumbers } from '@suite-common/wallet-utils'; + import { HiddenPlaceholder, RedactNumericalValue } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; -import { PropsWithChildren } from 'react'; -import styled from 'styled-components'; const ValueWrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/wallet/InputError.tsx b/packages/suite/src/components/wallet/InputError.tsx index 424f3b5dbb9..3d30013ba73 100644 --- a/packages/suite/src/components/wallet/InputError.tsx +++ b/packages/suite/src/components/wallet/InputError.tsx @@ -1,11 +1,13 @@ import { MouseEventHandler } from 'react'; + import styled from 'styled-components'; import { Button } from '@trezor/components'; -import { LearnMoreButton } from '../suite/LearnMoreButton'; import { Url } from '@trezor/urls'; import { spacingsPx } from '@trezor/theme'; +import { LearnMoreButton } from '../suite/LearnMoreButton'; + const Wrapper = styled.div` display: flex; align-items: center; diff --git a/packages/suite/src/components/wallet/Pagination.tsx b/packages/suite/src/components/wallet/Pagination.tsx index 06973f9ac73..8251f75be71 100644 --- a/packages/suite/src/components/wallet/Pagination.tsx +++ b/packages/suite/src/components/wallet/Pagination.tsx @@ -1,8 +1,11 @@ import { useMemo } from 'react'; -import { Translation } from 'src/components/suite'; + import styled, { css } from 'styled-components'; + import { borders, spacingsPx, typography } from '@trezor/theme'; +import { Translation } from 'src/components/suite'; + const Wrapper = styled.div` display: flex; justify-content: center; diff --git a/packages/suite/src/components/wallet/SearchAction.tsx b/packages/suite/src/components/wallet/SearchAction.tsx index 354dadfc313..d5c55fd5472 100644 --- a/packages/suite/src/components/wallet/SearchAction.tsx +++ b/packages/suite/src/components/wallet/SearchAction.tsx @@ -1,11 +1,13 @@ import { useCallback, useRef, Dispatch, SetStateAction, KeyboardEvent } from 'react'; + import styled, { css } from 'styled-components'; + import { Input, Icon, KEYBOARD_CODE, motionEasing, Row } from '@trezor/components'; import { borders, spacingsPx } from '@trezor/theme'; +import { TranslationKey } from '@suite-common/intl-types'; import { useTranslation } from 'src/hooks/suite/useTranslation'; import { TooltipSymbol, Translation } from 'src/components/suite'; -import { TranslationKey } from '@suite-common/intl-types'; const TRANSITION_DURATION = 0.26; const easingValues = motionEasing.transition.join(', '); // TODO: add to motionEasing diff --git a/packages/suite/src/components/wallet/TokenIconSetWrapper.tsx b/packages/suite/src/components/wallet/TokenIconSetWrapper.tsx index 3c728d8723b..70fae7b43d0 100644 --- a/packages/suite/src/components/wallet/TokenIconSetWrapper.tsx +++ b/packages/suite/src/components/wallet/TokenIconSetWrapper.tsx @@ -1,17 +1,18 @@ import { selectCoinDefinitions } from '@suite-common/token-definitions'; +import { TokenIconSet } from '@trezor/product-components'; +import { selectCurrentFiatRates } from '@suite-common/wallet-core'; +import { Account } from '@suite-common/wallet-types'; +import { NetworkSymbol } from '@suite-common/wallet-config'; +import { BigNumber } from '@trezor/utils'; + +import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; +import { useSelector } from 'src/hooks/suite'; import { enhanceTokensWithRates, getTokens, sortTokensWithRates, TokensWithRates, } from 'src/utils/wallet/tokenUtils'; -import { TokenIconSet } from '@trezor/product-components'; -import { useSelector } from 'src/hooks/suite'; -import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { selectCurrentFiatRates } from '@suite-common/wallet-core'; -import { Account } from '@suite-common/wallet-types'; -import { NetworkSymbol } from '@suite-common/wallet-config'; -import { BigNumber } from '@trezor/utils'; type TokenIconSetWrapperProps = { accounts: Account[]; diff --git a/packages/suite/src/components/wallet/TransactionItem/CoinjoinBatchItem.tsx b/packages/suite/src/components/wallet/TransactionItem/CoinjoinBatchItem.tsx index e05683d36c1..d0482809f4e 100644 --- a/packages/suite/src/components/wallet/TransactionItem/CoinjoinBatchItem.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/CoinjoinBatchItem.tsx @@ -1,6 +1,6 @@ import styled from 'styled-components'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { formatNetworkAmount, getFiatRateKey, @@ -11,6 +11,10 @@ import { } from '@suite-common/wallet-utils'; import { useFormatters } from '@suite-common/formatters'; import { CollapsibleBox } from '@trezor/components'; +import { borders } from '@trezor/theme'; +import { FiatCurrencyCode } from '@suite-common/suite-config'; +import { selectHistoricFiatRates } from '@suite-common/wallet-core'; +import { Timestamp } from '@suite-common/wallet-types'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; @@ -29,10 +33,6 @@ import { TimestampWrapper, TxTypeIconWrapper, } from './CommonComponents'; -import { borders } from '@trezor/theme'; -import { FiatCurrencyCode } from '@suite-common/suite-config'; -import { selectHistoricFiatRates } from '@suite-common/wallet-core'; -import { Timestamp } from '@suite-common/wallet-types'; const CryptoAmount = styled(StyledFormattedCryptoAmount)` width: unset; diff --git a/packages/suite/src/components/wallet/TransactionItem/CommonComponents.tsx b/packages/suite/src/components/wallet/TransactionItem/CommonComponents.tsx index ca57b3b6421..f48d9f748c8 100644 --- a/packages/suite/src/components/wallet/TransactionItem/CommonComponents.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/CommonComponents.tsx @@ -1,6 +1,9 @@ import styled, { css } from 'styled-components'; + import { variables } from '@trezor/components'; + import { FormattedCryptoAmount, FormattedNftAmount, HiddenPlaceholder } from 'src/components/suite'; + import { MIN_ROW_HEIGHT } from './TransactionTargetLayout'; export const TxTypeIconWrapper = styled.div` diff --git a/packages/suite/src/components/wallet/TransactionItem/InstantStakeBadge.tsx b/packages/suite/src/components/wallet/TransactionItem/InstantStakeBadge.tsx index f009af1c3c3..9a2bcc34dd4 100644 --- a/packages/suite/src/components/wallet/TransactionItem/InstantStakeBadge.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/InstantStakeBadge.tsx @@ -1,16 +1,20 @@ -import { Translation, FormattedCryptoAmount } from 'src/components/suite'; -import { WalletAccountTransaction } from 'src/types/wallet'; -import { StakeType } from '@suite-common/wallet-types'; +import { useSelector } from 'react-redux'; +import { memo } from 'react'; -import { Badge, Icon } from '@trezor/components'; import styled from 'styled-components'; + +import { StakeType } from '@suite-common/wallet-types'; +import { Badge, Icon } from '@trezor/components'; import { isNetworkSymbol, NetworkSymbol } from '@suite-common/wallet-config'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; -import { useSelector } from 'react-redux'; +import { spacings, spacingsPx } from '@trezor/theme'; + +import { Translation, FormattedCryptoAmount } from 'src/components/suite'; +import { WalletAccountTransaction } from 'src/types/wallet'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { getInstantStakeType } from 'src/utils/suite/stake'; -import { memo } from 'react'; -import { spacings, spacingsPx } from '@trezor/theme'; + + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionHeader.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionHeader.tsx index acf0331d06d..2d328ff98d8 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionHeader.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionHeader.tsx @@ -1,7 +1,8 @@ -import { Translation } from 'src/components/suite'; import { getTxHeaderSymbol, isSupportedEthStakingNetworkSymbol } from '@suite-common/wallet-utils'; -import { WalletAccountTransaction } from 'src/types/wallet'; import { AccountTransaction } from '@trezor/connect'; + +import { Translation } from 'src/components/suite'; +import { WalletAccountTransaction } from 'src/types/wallet'; import { UnstakingTxAmount } from 'src/components/suite/UnstakingTxAmount'; interface TransactionHeaderProps { diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionHeading.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionHeading.tsx index f18efa887a9..73019478a7d 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionHeading.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionHeading.tsx @@ -1,13 +1,9 @@ import { useState } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { variables, Icon } from '@trezor/components'; import { HELP_CENTER_ZERO_VALUE_ATTACKS } from '@trezor/urls'; -import { - FormattedCryptoAmount, - TooltipSymbol, - Translation, - TrezorLink, -} from 'src/components/suite'; import { formatNetworkAmount, getTargetAmount, @@ -15,11 +11,19 @@ import { getTxOperation, isSupportedEthStakingNetworkSymbol, } from '@suite-common/wallet-utils'; -import { TransactionHeader } from './TransactionHeader'; -import { WalletAccountTransaction } from 'src/types/wallet'; import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { BlurWrapper } from './TransactionItemBlurWrapper'; import { spacingsPx } from '@trezor/theme'; + +import { + FormattedCryptoAmount, + TooltipSymbol, + Translation, + TrezorLink, +} from 'src/components/suite'; +import { WalletAccountTransaction } from 'src/types/wallet'; + +import { TransactionHeader } from './TransactionHeader'; +import { BlurWrapper } from './TransactionItemBlurWrapper'; import { InstantStakeBadge } from './InstantStakeBadge'; const Wrapper = styled.span` diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionItem.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionItem.tsx index bc03c8e1739..67c6c84d30f 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionItem.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionItem.tsx @@ -1,20 +1,32 @@ import { memo, useMemo, useState } from 'react'; + import styled, { css } from 'styled-components'; import { AnimatePresence } from 'framer-motion'; + import { selectIsPhishingTransaction } from '@suite-common/wallet-core'; import { variables, Button, Card, Link, Tooltip } from '@trezor/components'; -import { Translation } from 'src/components/suite'; -import { useDispatch, useSelector } from 'src/hooks/suite'; -import { openModal } from 'src/actions/suite/modalActions'; import { formatNetworkAmount, isTestnet, isTxFeePaid, isStakeTypeTx, } from '@suite-common/wallet-utils'; +import { AccountType, Network } from '@suite-common/wallet-config'; +import { HELP_CENTER_REPLACE_BY_FEE } from '@trezor/urls'; + +import { Translation } from 'src/components/suite'; +import { useDispatch, useSelector } from 'src/hooks/suite'; +import { openModal } from 'src/actions/suite/modalActions'; import { AccountLabels } from 'src/types/suite/metadata'; import { WalletAccountTransaction } from 'src/types/wallet'; -import { AccountType, Network } from '@suite-common/wallet-config'; +import { useAnchor } from 'src/hooks/suite/useAnchor'; +import { AccountTransactionBaseAnchor } from 'src/constants/suite/anchors'; +import { anchorOutlineStyles } from 'src/utils/suite/anchor'; +import { TransactionTimestamp } from 'src/components/wallet/TransactionTimestamp'; +import { SUBPAGE_NAV_HEIGHT } from 'src/constants/suite/layout'; +import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; +import { getInstantStakeType } from 'src/utils/suite/stake'; + import { TransactionTypeIcon } from './TransactionTypeIcon'; import { TransactionHeading } from './TransactionHeading'; import { @@ -31,15 +43,9 @@ import { TimestampWrapper, TxTypeIconWrapper, } from './CommonComponents'; -import { useAnchor } from 'src/hooks/suite/useAnchor'; -import { AccountTransactionBaseAnchor } from 'src/constants/suite/anchors'; -import { anchorOutlineStyles } from 'src/utils/suite/anchor'; -import { TransactionTimestamp } from 'src/components/wallet/TransactionTimestamp'; -import { SUBPAGE_NAV_HEIGHT } from 'src/constants/suite/layout'; import { BlurWrapper } from './TransactionItemBlurWrapper'; -import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { getInstantStakeType } from 'src/utils/suite/stake'; -import { HELP_CENTER_REPLACE_BY_FEE } from '@trezor/urls'; + + // eslint-disable-next-line local-rules/no-override-ds-component const Wrapper = styled(Card)<{ diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionRow.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionRow.tsx index e518b77fca0..d6471e53243 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionRow.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionRow.tsx @@ -1,20 +1,24 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { FiatValue, Translation } from 'src/components/suite'; import { formatCardanoWithdrawal, formatCardanoDeposit, formatNetworkAmount, getFiatRateKey, } from '@suite-common/wallet-utils'; +import { SignOperator } from '@suite-common/suite-types'; +import { Timestamp } from '@suite-common/wallet-types'; +import { selectHistoricFiatRatesByTimestamp } from '@suite-common/wallet-core'; + +import { FiatValue, Translation } from 'src/components/suite'; import { WalletAccountTransaction } from 'src/types/wallet'; -import { TransactionTargetLayout } from './TransactionTargetLayout'; import { ExtendedMessageDescriptor } from 'src/types/suite'; -import { SignOperator } from '@suite-common/suite-types'; -import { StyledFormattedCryptoAmount } from './CommonComponents'; import { useSelector } from 'src/hooks/suite'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { Timestamp } from '@suite-common/wallet-types'; -import { selectHistoricFiatRatesByTimestamp } from '@suite-common/wallet-core'; + +import { TransactionTargetLayout } from './TransactionTargetLayout'; +import { StyledFormattedCryptoAmount } from './CommonComponents'; + + export const CustomRow = ({ transaction, diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TargetAddressLabel.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TargetAddressLabel.tsx index 92ecee957e1..2173e134ec9 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TargetAddressLabel.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TargetAddressLabel.tsx @@ -1,9 +1,12 @@ import styled from 'styled-components'; -import { WalletAccountTransaction } from 'src/types/wallet'; + import { ArrayElement } from '@trezor/type-utils'; +import { NetworkSymbol } from '@suite-common/wallet-config'; + +import { WalletAccountTransaction } from 'src/types/wallet'; import { Translation, AddressLabeling } from 'src/components/suite'; import { AccountLabels } from 'src/types/suite/metadata'; -import { NetworkSymbol } from '@suite-common/wallet-config'; + const TruncatedSpan = styled.span<{ $isBlurred?: boolean }>` overflow: hidden; diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TokenTransferAddressLabel.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TokenTransferAddressLabel.tsx index a3d1aaf6a7a..283c30e66d8 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TokenTransferAddressLabel.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TokenTransferAddressLabel.tsx @@ -1,8 +1,10 @@ import { ArrayElement } from '@trezor/type-utils'; +import { NetworkSymbol } from '@suite-common/wallet-config'; + import { Translation, AddressLabeling } from 'src/components/suite'; import { WalletAccountTransaction } from 'src/types/wallet'; + import { BlurWrapper } from '../TransactionItemBlurWrapper'; -import { NetworkSymbol } from '@suite-common/wallet-config'; interface TokenTransferAddressLabelProps { networkSymbol: NetworkSymbol; diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TransactionTarget.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TransactionTarget.tsx index bc59078ec99..0840e5172d1 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TransactionTarget.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TransactionTarget.tsx @@ -10,17 +10,20 @@ import { } from '@suite-common/wallet-utils'; import { copyToClipboard } from '@trezor/dom-utils'; import { ArrayElement } from '@trezor/type-utils'; +import { selectHistoricFiatRatesByTimestamp } from '@suite-common/wallet-core'; +import { Timestamp, TokenAddress } from '@suite-common/wallet-types'; + import { FiatValue, Translation, MetadataLabeling, AddressLabeling } from 'src/components/suite'; import { WalletAccountTransaction } from 'src/types/wallet'; import { useDispatch, useSelector } from 'src/hooks/suite'; +import { AccountLabels } from 'src/types/suite/metadata'; +import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; + import { TokenTransferAddressLabel } from './TokenTransferAddressLabel'; import { TargetAddressLabel } from './TargetAddressLabel'; -import { AccountLabels } from 'src/types/suite/metadata'; import { TransactionTargetLayout } from '../TransactionTargetLayout'; import { StyledFormattedCryptoAmount, StyledFormattedNftAmount } from '../CommonComponents'; -import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { selectHistoricFiatRatesByTimestamp } from '@suite-common/wallet-core'; -import { Timestamp, TokenAddress } from '@suite-common/wallet-types'; + interface BaseTransfer { singleRowLayout?: boolean; diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionTargetLayout.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionTargetLayout.tsx index ed4067887e0..c8985ea2a65 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionTargetLayout.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionTargetLayout.tsx @@ -1,10 +1,13 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; import { motion } from 'framer-motion'; -import { HiddenPlaceholder } from 'src/components/suite'; + import { motionAnimation } from '@trezor/components'; import { borders, spacingsPx, typography } from '@trezor/theme'; +import { HiddenPlaceholder } from 'src/components/suite'; + export const MIN_ROW_HEIGHT = '23px'; const FiatAmount = styled.span` diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionTypeIcon.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionTypeIcon.tsx index c7e634b2118..74d66ea5fef 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionTypeIcon.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionTypeIcon.tsx @@ -1,8 +1,10 @@ import styled, { useTheme } from 'styled-components'; -import { WalletAccountTransaction } from 'src/types/wallet'; + import { Icon, IconProps } from '@trezor/components'; import { getTxIcon } from '@suite-common/wallet-utils'; +import { WalletAccountTransaction } from 'src/types/wallet'; + const IconsWrapper = styled.div<{ $isJoint: boolean }>` position: relative; width: 24px; diff --git a/packages/suite/src/components/wallet/TransactionTimestamp.tsx b/packages/suite/src/components/wallet/TransactionTimestamp.tsx index 1c402b02b0b..76471397c3e 100644 --- a/packages/suite/src/components/wallet/TransactionTimestamp.tsx +++ b/packages/suite/src/components/wallet/TransactionTimestamp.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; + +import { spacingsPx, typography } from '@trezor/theme'; + import { FormattedDate } from 'src/components/suite'; import { WalletAccountTransaction } from 'src/types/wallet'; -import { spacingsPx, typography } from '@trezor/theme'; const TimestampLink = styled.div` display: block; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/AccountBanners.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/AccountBanners.tsx index 78609c0ce74..872250203dc 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/AccountBanners.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/AccountBanners.tsx @@ -1,6 +1,12 @@ import styled from 'styled-components'; +import { spacingsPx } from '@trezor/theme'; +import { Context } from '@suite-common/message-system'; +import { isSupportedEthStakingNetworkSymbol } from '@suite-common/wallet-utils'; + import { Account } from 'src/types/wallet'; +import { useSelector } from 'src/hooks/suite'; + import { AuthConfirmFailed } from './AuthConfirmFailed'; import { BackendDisconnected } from './BackendDisconnected'; import { DeviceUnavailable } from './DeviceUnavailable'; @@ -10,12 +16,11 @@ import { AccountOutOfSync } from './AccountOutOfSync'; import { TorDisconnected } from './TorDisconnected'; import { ContextMessage } from './ContextMessage'; import { StakeEthBanner } from './StakeEthBanner'; -import { spacingsPx } from '@trezor/theme'; import { EvmExplanationBanner } from './EvmExplanationBanner'; import { TaprootBanner } from './TaprootBanner'; -import { Context } from '@suite-common/message-system'; -import { useSelector } from 'src/hooks/suite'; -import { isSupportedEthStakingNetworkSymbol } from '@suite-common/wallet-utils'; + + + const BannersWrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/BackendDisconnected.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/BackendDisconnected.tsx index e02ba198950..5c77737124d 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/BackendDisconnected.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/BackendDisconnected.tsx @@ -1,7 +1,8 @@ -import { NotificationCard, Translation } from 'src/components/suite'; -import { useSelector } from 'src/hooks/suite'; import { tryGetAccountIdentity, isTrezorConnectBackendType } from '@suite-common/wallet-utils'; import type { NetworkSymbol } from '@suite-common/wallet-config'; + +import { NotificationCard, Translation } from 'src/components/suite'; +import { useSelector } from 'src/hooks/suite'; import { useBackendReconnection } from 'src/hooks/settings/backends'; const DisconnectedNotification = ({ diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/BannerPoints.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/BannerPoints.tsx index ecc4cfb937c..145dcc413d7 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/BannerPoints.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/BannerPoints.tsx @@ -1,5 +1,7 @@ import React, { ReactNode } from 'react'; + import styled from 'styled-components'; + import { typography } from '@trezor/theme'; interface BannerPointsProps { diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/CloseableBanner.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/CloseableBanner.tsx index c1c725a65ab..1b4900e600b 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/CloseableBanner.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/CloseableBanner.tsx @@ -1,8 +1,10 @@ -import { Text, Banner, BannerProps, Column } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { ReactNode } from 'react'; + +import { Text, Banner, BannerProps, Column } from '@trezor/components'; import { spacings } from '@trezor/theme/src'; +import { Translation } from 'src/components/suite'; + interface Props { onClose: () => void; variant: BannerProps['variant']; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/ContextMessage.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/ContextMessage.tsx index a2af012d55a..79d0f251eed 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/ContextMessage.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/ContextMessage.tsx @@ -1,9 +1,12 @@ -import { NotificationCard } from 'src/components/suite'; +import styled from 'styled-components'; + import { Link } from '@trezor/components'; -import { useSelector } from 'src/hooks/suite'; import { selectContextMessageContent, Context } from '@suite-common/message-system'; + +import { NotificationCard } from 'src/components/suite'; +import { useSelector } from 'src/hooks/suite'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; -import styled from 'styled-components'; + type ContextMessageProps = { context: (typeof Context)[keyof typeof Context]; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/EvmExplanationBanner.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/EvmExplanationBanner.tsx index 998539cde9f..7f211191a70 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/EvmExplanationBanner.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/EvmExplanationBanner.tsx @@ -1,10 +1,12 @@ -import { Translation } from 'src/components/suite'; -import { CloseableBanner } from './CloseableBanner'; -import { Account } from 'src/types/wallet'; import { networks } from '@suite-common/wallet-config'; + +import { Account } from 'src/types/wallet'; +import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite/useSelector'; import { useDispatch } from 'src/hooks/suite/useDispatch'; import { SUITE } from 'src/actions/suite/constants'; + +import { CloseableBanner } from './CloseableBanner'; import { BannerPoints } from './BannerPoints'; interface EvmExplanationBannerProps { diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/StakeEthBanner.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/StakeEthBanner.tsx index 08ec8c5d407..520df0f05d7 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/StakeEthBanner.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/StakeEthBanner.tsx @@ -1,15 +1,18 @@ +import { useTheme } from 'styled-components'; + import { Button, Text, IconButton, Row, Banner, Column } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { Account } from '@suite-common/wallet-types'; +import { selectPoolStatsApyData } from '@suite-common/wallet-core'; +import { MIN_ETH_AMOUNT_FOR_STAKING } from '@suite-common/wallet-constants'; +import { isSupportedEthStakingNetworkSymbol } from '@suite-common/wallet-utils'; + import { Translation } from 'src/components/suite'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { setFlag } from 'src/actions/suite/suiteActions'; + import { selectSuiteFlags } from '../../../../reducers/suite/suiteReducer'; -import { Account } from '@suite-common/wallet-types'; -import { selectPoolStatsApyData } from '@suite-common/wallet-core'; -import { MIN_ETH_AMOUNT_FOR_STAKING } from '@suite-common/wallet-constants'; -import { isSupportedEthStakingNetworkSymbol } from '@suite-common/wallet-utils'; -import { useTheme } from 'styled-components'; interface StakeEthBannerProps { account: Account; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/TaprootBanner.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/TaprootBanner.tsx index 77815e61799..e4084ba554a 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/TaprootBanner.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/TaprootBanner.tsx @@ -1,12 +1,15 @@ +import styled from 'styled-components'; + +import { getBip43Type } from '@suite-common/wallet-utils'; + import { Translation } from 'src/components/suite'; -import { CloseableBanner } from './CloseableBanner'; import { useSelector } from 'src/hooks/suite/useSelector'; import { useDispatch } from 'src/hooks/suite/useDispatch'; import { setFlag } from 'src/actions/suite/suiteActions'; -import { getBip43Type } from '@suite-common/wallet-utils'; import { Account } from 'src/types/wallet'; + +import { CloseableBanner } from './CloseableBanner'; import { BannerPoints } from './BannerPoints'; -import styled from 'styled-components'; import { selectSuiteFlags } from '../../../../reducers/suite/suiteReducer'; interface TaprootBannerProps { diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/XRPReserve.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/XRPReserve.tsx index 63a90395b23..d47a8e996d3 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/XRPReserve.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/XRPReserve.tsx @@ -1,9 +1,11 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { NotificationCard, Translation } from 'src/components/suite'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; -import type { Account } from 'src/types/wallet/index'; import { HELP_CENTER_XRP_URL } from '@trezor/urls'; +import { NotificationCard, Translation } from 'src/components/suite'; +import type { Account } from 'src/types/wallet/index'; + + interface XRPReserveProps { account: Account | undefined; } diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountException/AccountNotEnabled.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountException/AccountNotEnabled.tsx index 5059184036a..6caf9898d53 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountException/AccountNotEnabled.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountException/AccountNotEnabled.tsx @@ -1,6 +1,7 @@ +import { Network } from '@suite-common/wallet-config'; + import { changeCoinVisibility } from 'src/actions/settings/walletSettingsActions'; import { useDevice, useDispatch } from 'src/hooks/suite'; -import { Network } from '@suite-common/wallet-config'; import { Translation } from 'src/components/suite'; import { AccountExceptionLayout } from 'src/components/wallet'; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountTopPanel/AccountNavigation.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountTopPanel/AccountNavigation.tsx index b469dc1f644..9a61238f7b9 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountTopPanel/AccountNavigation.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountTopPanel/AccountNavigation.tsx @@ -1,11 +1,12 @@ +import { hasNetworkFeatures } from '@suite-common/wallet-utils'; +import { getNetworkOptional } from '@suite-common/wallet-config'; +import { EventType, analytics } from '@trezor/suite-analytics'; + import { WalletParams } from 'src/types/wallet'; import { Translation } from 'src/components/suite/Translation'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { hasNetworkFeatures } from '@suite-common/wallet-utils'; -import { getNetworkOptional } from '@suite-common/wallet-config'; import { goto } from 'src/actions/suite/routerActions'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { EventType, analytics } from '@trezor/suite-analytics'; import { NavigationItem, SubpageNavigation } from 'src/components/suite/layouts/SuiteLayout'; export const ACCOUNT_TABS = [ diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountTopPanel/AccountTopPanel.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountTopPanel/AccountTopPanel.tsx index 3ba89671d61..2816ae1afe2 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountTopPanel/AccountTopPanel.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountTopPanel/AccountTopPanel.tsx @@ -1,16 +1,17 @@ -import styled from 'styled-components'; import { forwardRef } from 'react'; +import styled from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { SkeletonCircle, SkeletonRectangle } from '@trezor/components'; +import { CoinLogo } from '@trezor/product-components'; import { FormattedCryptoAmount, AmountUnitSwitchWrapper } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { FiatHeader } from 'src/components/wallet/FiatHeader'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { useFiatFromCryptoValue } from 'src/hooks/suite/useFiatFromCryptoValue'; -import { CoinLogo } from '@trezor/product-components'; export const ACCOUNT_INFO_HEIGHT = 80; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountGroup.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountGroup.tsx index d4e289c070f..ede3185a339 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountGroup.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountGroup.tsx @@ -1,10 +1,15 @@ import { useState, ReactNode } from 'react'; + import styled from 'styled-components'; -import { Translation } from 'src/components/suite'; + import { Icon, Column } from '@trezor/components'; +import { spacingsPx, spacings, typography } from '@trezor/theme'; + +import { Translation } from 'src/components/suite'; import { Account } from 'src/types/wallet'; + import { AnimationWrapper } from '../../AnimationWrapper'; -import { spacingsPx, spacings, typography } from '@trezor/theme'; + const ICON_SIZE = 18; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItem.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItem.tsx index 4ece3846b06..9366e2dae47 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItem.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItem.tsx @@ -1,4 +1,5 @@ import { forwardRef, Ref } from 'react'; + import styled from 'styled-components'; import { isTestnet } from '@suite-common/wallet-utils'; @@ -11,6 +12,8 @@ import { TOOLTIP_DELAY_LONG, TruncateWithTooltip, } from '@trezor/components'; +import { useFormatters } from '@suite-common/formatters'; +import { CoinLogo } from '@trezor/product-components'; import { AccountLabel, @@ -23,9 +26,7 @@ import { useDispatch, useLoadingSkeleton, useSelector } from 'src/hooks/suite'; import { Account, AccountItemType } from 'src/types/wallet'; import { goto } from 'src/actions/suite/routerActions'; import { NavigationItemBase } from 'src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem'; -import { useFormatters } from '@suite-common/formatters'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { CoinLogo } from '@trezor/product-components'; import { TokenIconSetWrapper } from 'src/components/wallet/TokenIconSetWrapper'; const ICON_SIZE = 24; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemSkeleton.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemSkeleton.tsx index 90939ad6f97..b2f3e9e4890 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemSkeleton.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemSkeleton.tsx @@ -1,7 +1,8 @@ -import { useLoadingSkeleton } from 'src/hooks/suite'; import { SkeletonCircle, SkeletonRectangle, Row, Column } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { useLoadingSkeleton } from 'src/hooks/suite'; + export const AccountItemSkeleton = () => { const { shouldAnimate } = useLoadingSkeleton(); diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx index d75ba96c68a..a47fb9028bf 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx @@ -1,16 +1,20 @@ import styled from 'styled-components'; -import { AccountItem } from './AccountItem'; -import { Account } from 'src/types/wallet'; + import { borders, spacingsPx, spacings } from '@trezor/theme'; -import { useSelector } from 'src/hooks/suite'; import { selectCurrentFiatRates } from '@suite-common/wallet-core'; import { getAccountTotalStakingBalance, getAccountTokensFiatBalance, } from '@suite-common/wallet-utils'; +import { Column } from '@trezor/components'; + +import { Account } from 'src/types/wallet'; +import { useSelector } from 'src/hooks/suite'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { selectRouteName } from 'src/reducers/suite/routerReducer'; -import { Column } from '@trezor/components'; + + +import { AccountItem } from './AccountItem'; const Section = styled.div<{ $selected?: boolean }>` display: flex; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountSection.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountSection.tsx index e87fe0aa4fd..b9313b0e8c2 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountSection.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountSection.tsx @@ -1,12 +1,14 @@ import { Account } from '@suite-common/wallet-types'; -import { AccountItemsGroup } from './AccountItemsGroup'; -import { AccountItem } from './AccountItem'; -import { useSelector } from 'src/hooks/suite'; import { selectCoinDefinitions } from '@suite-common/token-definitions'; import { selectAccountHasStaked } from '@suite-common/wallet-core'; import { isSupportedEthStakingNetworkSymbol } from '@suite-common/wallet-utils'; + +import { useSelector } from 'src/hooks/suite'; import { getTokens } from 'src/utils/wallet/tokenUtils'; +import { AccountItem } from './AccountItem'; +import { AccountItemsGroup } from './AccountItemsGroup'; + interface AccountSectionProps { account: Account; selected: boolean; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsList.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsList.tsx index 243418e64a9..3e8e04e2e54 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsList.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsList.tsx @@ -1,19 +1,21 @@ import { sortByCoin, getFailedAccounts, accountSearchFn } from '@suite-common/wallet-utils'; import { Account } from '@suite-common/wallet-types'; +import { selectAccounts, selectDevice } from '@suite-common/wallet-core'; +import { spacings } from '@trezor/theme'; +import { Column } from '@trezor/components'; + import { useAccountSearch, useDiscovery, useSelector, useDefaultAccountLabel, } from 'src/hooks/suite'; -import { selectAccounts, selectDevice } from '@suite-common/wallet-core'; import { selectAccountLabels } from 'src/reducers/suite/metadataReducer'; import { Translation } from 'src/components/suite'; + import { AccountItemSkeleton } from './AccountItemSkeleton'; import { AccountGroup } from './AccountGroup'; import { AccountsMenuNotice } from './AccountsMenuNotice'; -import { spacings } from '@trezor/theme'; -import { Column } from '@trezor/components'; import { AccountSection } from './AccountSection'; interface AccountListProps { diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx index 6401865d225..3923e2705d3 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx @@ -1,19 +1,22 @@ import React from 'react'; + import styled from 'styled-components'; import { spacings, spacingsPx, zIndices } from '@trezor/theme'; import { selectDevice } from '@suite-common/wallet-core'; +import { getFailedAccounts, sortByCoin } from '@suite-common/wallet-utils'; +import { useScrollShadow, Row } from '@trezor/components'; import { useDiscovery, useSelector } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; + import { AccountSearchBox } from './AccountSearchBox'; import { AddAccountButton } from './AddAccountButton'; import { CoinsFilter } from './CoinsFilter'; import { AccountsList } from './AccountsList'; -import { Translation } from 'src/components/suite'; import { AccountsMenuNotice } from './AccountsMenuNotice'; -import { getFailedAccounts, sortByCoin } from '@suite-common/wallet-utils'; import { RefreshAfterDiscoveryNeeded } from './RefreshAfterDiscoveryNeeded'; -import { useScrollShadow, Row } from '@trezor/components'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenuNotice.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenuNotice.tsx index 6ced7d8627c..7ad65a76623 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenuNotice.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenuNotice.tsx @@ -1,6 +1,7 @@ -import { spacingsPx, typography } from '@trezor/theme'; import styled from 'styled-components'; +import { spacingsPx, typography } from '@trezor/theme'; + export const AccountsMenuNotice = styled.div` display: flex; justify-content: center; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx index 67b7d4ae24b..b33cf7488b9 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx @@ -1,10 +1,11 @@ +import { Tooltip, ButtonProps, IconButton, Button } from '@trezor/components'; +import { DiscoveryStatus } from '@suite-common/wallet-constants'; + import { Translation } from 'src/components/suite'; import { TrezorDevice } from 'src/types/suite'; import { useDiscovery, useDispatch } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; -import { Tooltip, ButtonProps, IconButton, Button } from '@trezor/components'; -import { DiscoveryStatus } from '@suite-common/wallet-constants'; const getExplanationMessage = (device: TrezorDevice | undefined, discoveryIsRunning: boolean) => { let message; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/MobileAccountsMenu.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/MobileAccountsMenu.tsx index e458725deee..36bb4423953 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/MobileAccountsMenu.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/MobileAccountsMenu.tsx @@ -1,10 +1,14 @@ import { useState } from 'react'; + import styled, { css, useTheme } from 'styled-components'; + import { H2, variables, Icon } from '@trezor/components'; import { zIndices, spacingsPx } from '@trezor/theme'; import { selectDevice } from '@suite-common/wallet-core'; + import { Translation } from 'src/components/suite'; import { useDiscovery, useSelector } from 'src/hooks/suite'; + import { AccountSearchBox } from './AccountSearchBox'; import { AddAccountButton } from './AddAccountButton'; import { CoinsFilter } from './CoinsFilter'; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/RefreshAfterDiscoveryNeeded.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/RefreshAfterDiscoveryNeeded.tsx index 0db9cfaa59e..ad60503dd40 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/RefreshAfterDiscoveryNeeded.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/RefreshAfterDiscoveryNeeded.tsx @@ -1,4 +1,5 @@ import React from 'react'; + import styled from 'styled-components'; import { AnimatePresence, MotionProps, motion } from 'framer-motion'; @@ -7,8 +8,8 @@ import { spacingsPx, typography } from '@trezor/theme'; import { selectDevice, startDiscoveryThunk } from '@suite-common/wallet-core'; import { useRediscoveryNeeded, useDispatch, useSelector } from 'src/hooks/suite'; - import { Translation } from 'src/components/suite'; + import { AccountsMenuNotice } from './AccountsMenuNotice'; const DiscoveryButtonContainer = styled(motion.div)` diff --git a/packages/suite/src/components/wallet/WalletLayout/CoinjoinAccountDiscovery/CoinjoinAccountDiscovery.tsx b/packages/suite/src/components/wallet/WalletLayout/CoinjoinAccountDiscovery/CoinjoinAccountDiscovery.tsx index 696154a93bc..f8c3f0cb6ce 100644 --- a/packages/suite/src/components/wallet/WalletLayout/CoinjoinAccountDiscovery/CoinjoinAccountDiscovery.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/CoinjoinAccountDiscovery/CoinjoinAccountDiscovery.tsx @@ -6,6 +6,7 @@ import { isDeviceRemembered } from '@suite-common/suite-utils'; import { useDispatch, useDevice } from 'src/hooks/suite'; import { TrezorDevice } from 'src/types/suite'; import { CoinjoinAccountDiscoveryProgress } from 'src/components/wallet'; + import { RememberWallet } from './RememberWallet'; export const CoinjoinAccountDiscovery = () => { diff --git a/packages/suite/src/components/wallet/WalletLayout/CoinjoinAccountDiscovery/RememberWallet.tsx b/packages/suite/src/components/wallet/WalletLayout/CoinjoinAccountDiscovery/RememberWallet.tsx index ace43bde614..ec0fc90e211 100644 --- a/packages/suite/src/components/wallet/WalletLayout/CoinjoinAccountDiscovery/RememberWallet.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/CoinjoinAccountDiscovery/RememberWallet.tsx @@ -1,8 +1,8 @@ import styled from 'styled-components'; import { spacings, spacingsPx } from '@trezor/theme'; - import { Card, Image, Note, Paragraph, Row, Switch } from '@trezor/components'; + import { Translation } from 'src/components/suite'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/components/wallet/WalletLayout/WalletLayout.tsx b/packages/suite/src/components/wallet/WalletLayout/WalletLayout.tsx index f6be2f0db27..22892c02cda 100644 --- a/packages/suite/src/components/wallet/WalletLayout/WalletLayout.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/WalletLayout.tsx @@ -1,7 +1,9 @@ import { ReactNode, useCallback } from 'react'; + import styled from 'styled-components'; import { SkeletonRectangle } from '@trezor/components'; + import { AppState, ExtendedMessageDescriptor } from 'src/types/suite'; import { useTranslation, useLayout } from 'src/hooks/suite'; import { PageHeader } from 'src/components/suite/layouts/SuiteLayout'; diff --git a/packages/suite/src/components/wallet/WalletLayout/WalletSubpageHeading.tsx b/packages/suite/src/components/wallet/WalletLayout/WalletSubpageHeading.tsx index 40146396d5a..c7bf383426e 100644 --- a/packages/suite/src/components/wallet/WalletLayout/WalletSubpageHeading.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/WalletSubpageHeading.tsx @@ -1,9 +1,12 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { H2 } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; + import type { ExtendedMessageDescriptor } from 'src/types/suite'; import { Translation } from 'src/components/suite'; -import { spacingsPx } from '@trezor/theme'; const HeaderWrapper = styled.div` display: flex; diff --git a/packages/suite/src/config/onboarding/steps.ts b/packages/suite/src/config/onboarding/steps.ts index 948cba577b1..aef8a9bb053 100644 --- a/packages/suite/src/config/onboarding/steps.ts +++ b/packages/suite/src/config/onboarding/steps.ts @@ -1,6 +1,7 @@ +import { DeviceModelInternal } from '@trezor/connect'; + import type { Step } from 'src/types/onboarding'; import * as STEP from 'src/constants/onboarding/steps'; -import { DeviceModelInternal } from '@trezor/connect'; const commonPrerequisites: Step['prerequisites'] = [ 'transport-bridge', diff --git a/packages/suite/src/constants/suite/experimental.ts b/packages/suite/src/constants/suite/experimental.ts index 03c8c49da0d..174d16dcdbb 100644 --- a/packages/suite/src/constants/suite/experimental.ts +++ b/packages/suite/src/constants/suite/experimental.ts @@ -1,6 +1,5 @@ import { TranslationKey } from '@suite-common/intl-types'; import { desktopApi } from '@trezor/suite-desktop-api'; - import { EXPERIMENTAL_PASSWORD_MANAGER_KB_URL, TOR_SNOWFLAKE_PROJECT_URL, Url } from '@trezor/urls'; import { Dispatch } from '../../types/suite'; diff --git a/packages/suite/src/constants/suite/routes.ts b/packages/suite/src/constants/suite/routes.ts index 93e30ecd33a..eae5e34551c 100644 --- a/packages/suite/src/constants/suite/routes.ts +++ b/packages/suite/src/constants/suite/routes.ts @@ -1,8 +1,8 @@ import { ArrayElement } from '@trezor/type-utils'; import { Route } from '@suite-common/suite-types'; import { routes } from '@suite-common/suite-config'; - import { AccountType, NetworkSymbol } from '@suite-common/wallet-config'; + import { RouteParams } from 'src/utils/suite/router'; export type SettingsBackRoute = { diff --git a/packages/suite/src/hooks/coinjoin/useCoinjoinAccountLoadingProgress.ts b/packages/suite/src/hooks/coinjoin/useCoinjoinAccountLoadingProgress.ts index ce93b09aa31..224fd616801 100644 --- a/packages/suite/src/hooks/coinjoin/useCoinjoinAccountLoadingProgress.ts +++ b/packages/suite/src/hooks/coinjoin/useCoinjoinAccountLoadingProgress.ts @@ -1,4 +1,5 @@ import { useEffect, useReducer } from 'react'; + import { ScanProgressInfo } from '@trezor/coinjoin'; import { CoinjoinService } from 'src/services/coinjoin'; diff --git a/packages/suite/src/hooks/coinjoin/useCoinjoinSessionBlockers.ts b/packages/suite/src/hooks/coinjoin/useCoinjoinSessionBlockers.ts index df2d447e5c9..3adac5b8a7b 100644 --- a/packages/suite/src/hooks/coinjoin/useCoinjoinSessionBlockers.ts +++ b/packages/suite/src/hooks/coinjoin/useCoinjoinSessionBlockers.ts @@ -1,7 +1,7 @@ -import { useSelector, useTranslation } from 'src/hooks/suite'; import { Feature, selectFeatureMessageContent } from '@suite-common/message-system'; -import { selectLanguage } from 'src/reducers/suite/suiteReducer'; +import { useSelector, useTranslation } from 'src/hooks/suite'; +import { selectLanguage } from 'src/reducers/suite/suiteReducer'; import { selectCoinjoinSessionBlockerByAccountKey } from 'src/reducers/wallet/coinjoinReducer'; export const useCoinjoinSessionBlockers = ( diff --git a/packages/suite/src/hooks/coinjoin/useCoinjoinSessionPhase.ts b/packages/suite/src/hooks/coinjoin/useCoinjoinSessionPhase.ts index 248001c28c0..859abe9e2d3 100644 --- a/packages/suite/src/hooks/coinjoin/useCoinjoinSessionPhase.ts +++ b/packages/suite/src/hooks/coinjoin/useCoinjoinSessionPhase.ts @@ -1,4 +1,5 @@ import { useEffect, useState, useCallback } from 'react'; + import { SESSION_PHASE_TRANSITION_DELAY } from 'src/constants/suite/coinjoin'; import { useSelector } from 'src/hooks/suite/useSelector'; import { selectSessionByAccountKey } from 'src/reducers/wallet/coinjoinReducer'; diff --git a/packages/suite/src/hooks/guide/useGuide.ts b/packages/suite/src/hooks/guide/useGuide.ts index 4d5cf64bf81..840b2d2cfca 100644 --- a/packages/suite/src/hooks/guide/useGuide.ts +++ b/packages/suite/src/hooks/guide/useGuide.ts @@ -1,6 +1,8 @@ import { useMemo } from 'react'; + import { useDispatch, useSelector, useLayoutSize } from 'src/hooks/suite'; import { close, open } from 'src/actions/suite/guideActions'; + import { usePreferredModal } from '../suite/usePreferredModal'; export const GUIDE_ANIMATION_DURATION_MS = 300; diff --git a/packages/suite/src/hooks/guide/useGuideKeyboard.ts b/packages/suite/src/hooks/guide/useGuideKeyboard.ts index 3aafa38c586..0669651f789 100644 --- a/packages/suite/src/hooks/guide/useGuideKeyboard.ts +++ b/packages/suite/src/hooks/guide/useGuideKeyboard.ts @@ -1,6 +1,7 @@ import { useCallback, useEffect } from 'react'; import { KEYBOARD_CODE } from '@trezor/components'; + import { useGuide } from 'src/hooks/guide'; export const useGuideKeyboard = () => { diff --git a/packages/suite/src/hooks/guide/useGuideLoadArticle.ts b/packages/suite/src/hooks/guide/useGuideLoadArticle.ts index 4583211e45a..29bd237765b 100644 --- a/packages/suite/src/hooks/guide/useGuideLoadArticle.ts +++ b/packages/suite/src/hooks/guide/useGuideLoadArticle.ts @@ -1,5 +1,7 @@ import { useState, useEffect } from 'react'; + import type { GuideNode } from '@suite-common/suite-types'; + import type { Locale } from 'src/config/suite/languages'; export const loadPageMarkdownFile = async (id: string, language = 'en'): Promise => { diff --git a/packages/suite/src/hooks/guide/useGuideSearch.ts b/packages/suite/src/hooks/guide/useGuideSearch.ts index 3e6b7817328..913215ee606 100644 --- a/packages/suite/src/hooks/guide/useGuideSearch.ts +++ b/packages/suite/src/hooks/guide/useGuideSearch.ts @@ -1,5 +1,7 @@ import { useState, useEffect, useMemo } from 'react'; + import { GuideCategory, GuideArticle } from '@suite-common/suite-types'; + import { loadPageMarkdownFile } from 'src/hooks/guide/useGuideLoadArticle'; const SEARCH_DELAY = 300; diff --git a/packages/suite/src/hooks/settings/backends/useBackendReconnection.ts b/packages/suite/src/hooks/settings/backends/useBackendReconnection.ts index f1291c74012..2b42aff8c9b 100644 --- a/packages/suite/src/hooks/settings/backends/useBackendReconnection.ts +++ b/packages/suite/src/hooks/settings/backends/useBackendReconnection.ts @@ -1,9 +1,9 @@ import { useState, useEffect } from 'react'; import { reconnectBlockchainThunk } from '@suite-common/wallet-core'; +import { NetworkSymbol } from '@suite-common/wallet-config'; import { useDispatch } from 'src/hooks/suite'; -import { NetworkSymbol } from '@suite-common/wallet-config'; export const useBackendReconnection = ( coin: NetworkSymbol, diff --git a/packages/suite/src/hooks/settings/backends/useBackendsForm.ts b/packages/suite/src/hooks/settings/backends/useBackendsForm.ts index e0bc29befa6..97fee4a3d5d 100644 --- a/packages/suite/src/hooks/settings/backends/useBackendsForm.ts +++ b/packages/suite/src/hooks/settings/backends/useBackendsForm.ts @@ -1,15 +1,16 @@ import { useState } from 'react'; import { useForm } from 'react-hook-form'; -import { analytics, EventType } from '@trezor/suite-analytics'; -import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; +import { analytics, EventType } from '@trezor/suite-analytics'; import { isUrl } from '@trezor/utils'; -import { isOnionUrl } from 'src/utils/suite/tor'; import { blockchainActions } from '@suite-common/wallet-core'; import { isElectrumUrl } from '@suite-common/wallet-utils'; import { NetworkSymbol, BackendType } from '@suite-common/wallet-config'; import { BackendSettings } from '@suite-common/wallet-types'; +import { isOnionUrl } from 'src/utils/suite/tor'; +import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; + export type BackendOption = BackendType | 'default'; type BackendsFormData = { diff --git a/packages/suite/src/hooks/settings/backends/useCustomBackends.ts b/packages/suite/src/hooks/settings/backends/useCustomBackends.ts index 9497f22a23b..ff3a458d3c8 100644 --- a/packages/suite/src/hooks/settings/backends/useCustomBackends.ts +++ b/packages/suite/src/hooks/settings/backends/useCustomBackends.ts @@ -1,6 +1,7 @@ -import { useSelector } from 'src/hooks/suite'; import { getCustomBackends } from '@suite-common/wallet-utils'; +import { useSelector } from 'src/hooks/suite'; + export const useCustomBackends = () => { const blockchains = useSelector(state => state.wallet.blockchain); diff --git a/packages/suite/src/hooks/settings/backends/useDefaultUrls.ts b/packages/suite/src/hooks/settings/backends/useDefaultUrls.ts index fece359e1c3..6d0856c6ab7 100644 --- a/packages/suite/src/hooks/settings/backends/useDefaultUrls.ts +++ b/packages/suite/src/hooks/settings/backends/useDefaultUrls.ts @@ -1,4 +1,5 @@ import { useState, useEffect } from 'react'; + import TrezorConnect, { BlockchainLink } from '@trezor/connect'; import { NetworkSymbol } from '@suite-common/wallet-config'; diff --git a/packages/suite/src/hooks/settings/useNetworkSupport.ts b/packages/suite/src/hooks/settings/useNetworkSupport.ts index 0406aa05140..c5373d6a13e 100644 --- a/packages/suite/src/hooks/settings/useNetworkSupport.ts +++ b/packages/suite/src/hooks/settings/useNetworkSupport.ts @@ -1,8 +1,8 @@ import { Network, getMainnets, getTestnets } from '@suite-common/wallet-config'; import { selectDeviceSupportedNetworks } from '@suite-common/wallet-core'; import { arrayPartition } from '@trezor/utils'; -import { useSelector } from 'src/hooks/suite'; +import { useSelector } from 'src/hooks/suite'; import { selectIsDebugModeActive } from 'src/reducers/suite/suiteReducer'; export const useNetworkSupport = () => { diff --git a/packages/suite/src/hooks/suite/__fixtures__/useFilteredModal.ts b/packages/suite/src/hooks/suite/__fixtures__/useFilteredModal.ts index 5b81f1f6af5..8791c619296 100644 --- a/packages/suite/src/hooks/suite/__fixtures__/useFilteredModal.ts +++ b/packages/suite/src/hooks/suite/__fixtures__/useFilteredModal.ts @@ -1,4 +1,5 @@ import { MODAL } from 'src/actions/suite/constants'; + import { useFilteredModal } from '../useFilteredModal'; export const filters: Parameters[] = [ diff --git a/packages/suite/src/hooks/suite/__tests__/useCountdownTimer.test.tsx b/packages/suite/src/hooks/suite/__tests__/useCountdownTimer.test.tsx index fad4f83cfb8..aaeb4d5910a 100644 --- a/packages/suite/src/hooks/suite/__tests__/useCountdownTimer.test.tsx +++ b/packages/suite/src/hooks/suite/__tests__/useCountdownTimer.test.tsx @@ -1,4 +1,5 @@ import { act, render } from '@testing-library/react'; + import { fixtures } from 'src/hooks/suite/__fixtures__/useCountdownTimer'; import { useCountdownTimer } from 'src/hooks/suite/useCountdownTimer'; diff --git a/packages/suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx b/packages/suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx index 1c8495927bb..fc29e3d69be 100644 --- a/packages/suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx +++ b/packages/suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx @@ -1,9 +1,13 @@ import { Provider } from 'react-redux'; -import { configureStore } from 'src/support/tests/configureStore'; + import { render } from '@testing-library/react'; + +import { configureStore } from 'src/support/tests/configureStore'; +import type { State as ModalState } from 'src/reducers/suite/modalReducer'; + import { useFilteredModal } from '../useFilteredModal'; import { filters, fixtures } from '../__fixtures__/useFilteredModal'; -import type { State as ModalState } from 'src/reducers/suite/modalReducer'; + const mockStore = configureStore<{ modal: ModalState }, any>(); diff --git a/packages/suite/src/hooks/suite/__tests__/usePinModal.test.ts b/packages/suite/src/hooks/suite/__tests__/usePinModal.test.ts index 28277c38115..cf8e657c440 100644 --- a/packages/suite/src/hooks/suite/__tests__/usePinModal.test.ts +++ b/packages/suite/src/hooks/suite/__tests__/usePinModal.test.ts @@ -1,4 +1,5 @@ import { ButtonRequest } from '@suite-common/suite-types'; + import { usePinWithoutSelector } from '../usePinModal'; describe('usePinWithoutSelector', () => { diff --git a/packages/suite/src/hooks/suite/useActions.ts b/packages/suite/src/hooks/suite/useActions.ts index 83f37accfd4..ad345304fe2 100644 --- a/packages/suite/src/hooks/suite/useActions.ts +++ b/packages/suite/src/hooks/suite/useActions.ts @@ -1,6 +1,8 @@ import { useMemo, useRef } from 'react'; -import { ActionCreatorsMapObject, bindActionCreators } from 'redux'; import { useDispatch } from 'react-redux'; + +import { ActionCreatorsMapObject, bindActionCreators } from 'redux'; + import type { Action, ThunkAction } from 'src/types/suite'; /** diff --git a/packages/suite/src/hooks/suite/useAnonymityStatus.ts b/packages/suite/src/hooks/suite/useAnonymityStatus.ts index 78db85de42a..f72f92a9ac0 100644 --- a/packages/suite/src/hooks/suite/useAnonymityStatus.ts +++ b/packages/suite/src/hooks/suite/useAnonymityStatus.ts @@ -1,7 +1,8 @@ -import { useSelector } from './useSelector'; import { AnonymityStatus } from 'src/constants/suite/coinjoin'; import { selectCurrentTargetAnonymity } from 'src/reducers/wallet/coinjoinReducer'; +import { useSelector } from './useSelector'; + const getAnonymityStatus = (targetAnonymity: number) => { if (targetAnonymity < AnonymityStatus.Bad) { return AnonymityStatus.Bad; diff --git a/packages/suite/src/hooks/suite/useClearAnchorHighlightOnClick.ts b/packages/suite/src/hooks/suite/useClearAnchorHighlightOnClick.ts index 26272d6148d..be42489a6af 100644 --- a/packages/suite/src/hooks/suite/useClearAnchorHighlightOnClick.ts +++ b/packages/suite/src/hooks/suite/useClearAnchorHighlightOnClick.ts @@ -1,7 +1,9 @@ import { RefObject, useEffect } from 'react'; + +import { onAnchorChange } from 'src/actions/suite/routerActions'; + import { useDispatch } from './useDispatch'; import { useSelector } from './useSelector'; -import { onAnchorChange } from 'src/actions/suite/routerActions'; export const useClearAnchorHighlightOnClick = (elementRef: RefObject) => { const anchor = useSelector(state => state.router.anchor); diff --git a/packages/suite/src/hooks/suite/useCountdownTimer.ts b/packages/suite/src/hooks/suite/useCountdownTimer.ts index 9a992028feb..92791519e5c 100644 --- a/packages/suite/src/hooks/suite/useCountdownTimer.ts +++ b/packages/suite/src/hooks/suite/useCountdownTimer.ts @@ -1,4 +1,5 @@ import { useEffect, useState, useCallback } from 'react'; + import intervalToDuration from 'date-fns/intervalToDuration'; export const useCountdownTimer = (deadline: number) => { diff --git a/packages/suite/src/hooks/suite/useDebugLanguageShortcut.ts b/packages/suite/src/hooks/suite/useDebugLanguageShortcut.ts index ccf7489e691..063a7f602cd 100644 --- a/packages/suite/src/hooks/suite/useDebugLanguageShortcut.ts +++ b/packages/suite/src/hooks/suite/useDebugLanguageShortcut.ts @@ -1,13 +1,15 @@ import { useCallback, useEffect } from 'react'; import { KEYBOARD_CODE } from '@trezor/components'; -import { useSelector } from './useSelector'; -import { useDispatch } from './useDispatch'; + import { setLanguage } from 'src/actions/settings/languageActions'; import LANGUAGES, { Locale } from 'src/config/suite/languages'; import { setAutodetect } from 'src/actions/suite/suiteActions'; import { selectIsDebugModeActive, selectLanguage } from 'src/reducers/suite/suiteReducer'; +import { useDispatch } from './useDispatch'; +import { useSelector } from './useSelector'; + const languages: { value: Locale; label: string }[] = Object.entries(LANGUAGES) .filter(lang => ['official', 'community'].includes(lang[1].type || '')) .map(([value, { name }]) => ({ value: value as Locale, label: name })); diff --git a/packages/suite/src/hooks/suite/useDefaultAccountLabel.ts b/packages/suite/src/hooks/suite/useDefaultAccountLabel.ts index b5ee1a1fb73..b420a9f34c4 100644 --- a/packages/suite/src/hooks/suite/useDefaultAccountLabel.ts +++ b/packages/suite/src/hooks/suite/useDefaultAccountLabel.ts @@ -1,8 +1,11 @@ -import { getTitleForNetwork, getTitleForCoinjoinAccount } from '@suite-common/wallet-utils'; import { useCallback } from 'react'; -import { useTranslation } from './useTranslation'; + +import { getTitleForNetwork, getTitleForCoinjoinAccount } from '@suite-common/wallet-utils'; import { AccountType, NetworkSymbol } from '@suite-common/wallet-config'; +import { useTranslation } from './useTranslation'; + + export interface GetDefaultAccountLabelParams { accountType: AccountType; symbol: NetworkSymbol; diff --git a/packages/suite/src/hooks/suite/useDevice.ts b/packages/suite/src/hooks/suite/useDevice.ts index 13deda0b3b8..aa1587555ed 100644 --- a/packages/suite/src/hooks/suite/useDevice.ts +++ b/packages/suite/src/hooks/suite/useDevice.ts @@ -1,11 +1,11 @@ import { useCallback } from 'react'; import { selectDevice } from '@suite-common/wallet-core'; +import { TrezorDevice } from '@suite-common/suite-types'; import { SUITE } from 'src/actions/suite/constants'; import { useSelector } from './useSelector'; -import { TrezorDevice } from '@suite-common/suite-types'; type Result = { device?: TrezorDevice; diff --git a/packages/suite/src/hooks/suite/useDispatch.ts b/packages/suite/src/hooks/suite/useDispatch.ts index 412ad303306..ec7a510cfae 100644 --- a/packages/suite/src/hooks/suite/useDispatch.ts +++ b/packages/suite/src/hooks/suite/useDispatch.ts @@ -1,5 +1,7 @@ import { useDispatch as useReduxDispatch } from 'react-redux'; + import { ThunkDispatch } from 'redux-thunk'; + import { Action, AppState } from 'src/types/suite'; export const useDispatch: () => ThunkDispatch = useReduxDispatch; diff --git a/packages/suite/src/hooks/suite/useDisplayMode.ts b/packages/suite/src/hooks/suite/useDisplayMode.ts index 52f662c66f5..eb591836333 100644 --- a/packages/suite/src/hooks/suite/useDisplayMode.ts +++ b/packages/suite/src/hooks/suite/useDisplayMode.ts @@ -3,9 +3,10 @@ import { AddressDisplayOptions, StakeType, ReviewOutput } from '@suite-common/wa import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { useSelector } from './useSelector'; import { DisplayMode } from 'src/types/suite'; +import { useSelector } from './useSelector'; + type UseDisplayModeProps = { type: ReviewOutput['type']; ethereumStakeType?: StakeType; diff --git a/packages/suite/src/hooks/suite/useExternalLink.ts b/packages/suite/src/hooks/suite/useExternalLink.ts index 50ac59dd115..e19c8b26912 100644 --- a/packages/suite/src/hooks/suite/useExternalLink.ts +++ b/packages/suite/src/hooks/suite/useExternalLink.ts @@ -1,4 +1,5 @@ import { useMemo } from 'react'; + import { useSelector } from 'src/hooks/suite'; import { getTorUrlIfAvailable } from 'src/utils/suite/tor'; import { selectTorState } from 'src/reducers/suite/suiteReducer'; diff --git a/packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts b/packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts index 20d2a0feb06..df118815da9 100644 --- a/packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts +++ b/packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts @@ -1,12 +1,13 @@ -import { useSelector } from 'src/hooks/suite'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { getFiatRateKey, toFiatCurrency } from '@suite-common/wallet-utils'; -import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { selectFiatRatesByFiatRateKey } from '@suite-common/wallet-core'; import { TokenAddress } from '@suite-common/wallet-types'; import { TokenTransfer } from '@trezor/blockchain-link-types'; +import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; +import { useSelector } from 'src/hooks/suite'; + interface CommonOwnProps { amount: string; symbol: NetworkSymbol | TokenTransfer['symbol']; diff --git a/packages/suite/src/hooks/suite/useFormattersConfig.ts b/packages/suite/src/hooks/suite/useFormattersConfig.ts index b1a79606e8a..9ed1a2a81eb 100644 --- a/packages/suite/src/hooks/suite/useFormattersConfig.ts +++ b/packages/suite/src/hooks/suite/useFormattersConfig.ts @@ -1,6 +1,7 @@ +import { FormatterProviderConfig } from '@suite-common/formatters'; + import { useSelector } from 'src/hooks/suite/useSelector'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { FormatterProviderConfig } from '@suite-common/formatters'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; export const useFormattersConfig = (): FormatterProviderConfig => { diff --git a/packages/suite/src/hooks/suite/useMessageSystemStaking.ts b/packages/suite/src/hooks/suite/useMessageSystemStaking.ts index f90da71c216..e7ab840b4e8 100644 --- a/packages/suite/src/hooks/suite/useMessageSystemStaking.ts +++ b/packages/suite/src/hooks/suite/useMessageSystemStaking.ts @@ -3,7 +3,9 @@ import { Feature, selectFeatureMessageContent, } from '@suite-common/message-system'; + import { selectLanguage } from 'src/reducers/suite/suiteReducer'; + import { useSelector } from './useSelector'; export const useMessageSystemStaking = () => { diff --git a/packages/suite/src/hooks/suite/useOnboarding.ts b/packages/suite/src/hooks/suite/useOnboarding.ts index b4b39942d65..ccb699ea8eb 100644 --- a/packages/suite/src/hooks/suite/useOnboarding.ts +++ b/packages/suite/src/hooks/suite/useOnboarding.ts @@ -1,4 +1,5 @@ import { UI } from '@trezor/connect'; + import * as onboardingActions from 'src/actions/onboarding/onboardingActions'; import * as routerActions from 'src/actions/suite/routerActions'; import * as recoveryActions from 'src/actions/recovery/recoveryActions'; diff --git a/packages/suite/src/hooks/suite/useOpenSuiteDesktop.ts b/packages/suite/src/hooks/suite/useOpenSuiteDesktop.ts index e58efe4fa00..8075c23e508 100644 --- a/packages/suite/src/hooks/suite/useOpenSuiteDesktop.ts +++ b/packages/suite/src/hooks/suite/useOpenSuiteDesktop.ts @@ -2,6 +2,7 @@ import TrezorConnect from '@trezor/connect'; import type TrezorConnectWeb from '@trezor/connect-web'; import { useWindowFocus } from '@trezor/react-utils'; import { SUITE_BRIDGE_DEEPLINK, SUITE_URL } from '@trezor/urls'; + import { isWebUsb } from 'src/utils/suite/transport'; import { useSelector } from 'src/hooks/suite'; diff --git a/packages/suite/src/hooks/suite/usePasswords.ts b/packages/suite/src/hooks/suite/usePasswords.ts index 2593eaed7f0..ddcd353aa0e 100644 --- a/packages/suite/src/hooks/suite/usePasswords.ts +++ b/packages/suite/src/hooks/suite/usePasswords.ts @@ -5,7 +5,6 @@ import { selectDevice } from '@suite-common/wallet-core'; import { useSelector, useDispatch } from 'src/hooks/suite'; import * as metadataProviderActions from 'src/actions/suite/metadataProviderActions'; import * as metadataPasswordsActions from 'src/actions/suite/metadataPasswordsActions'; - import type { PasswordEntry } from 'src/types/suite/metadata'; import { selectPasswordManagerState, diff --git a/packages/suite/src/hooks/suite/usePinModal.ts b/packages/suite/src/hooks/suite/usePinModal.ts index 6d671de7e56..e7c38dd4faa 100644 --- a/packages/suite/src/hooks/suite/usePinModal.ts +++ b/packages/suite/src/hooks/suite/usePinModal.ts @@ -1,5 +1,6 @@ import { ButtonRequest } from '@suite-common/suite-types'; import { selectDeviceButtonRequests } from '@suite-common/wallet-core'; + import { useSelector } from 'src/hooks/suite'; const NEW_PIN_REQUEST_TYPES = ['PinMatrixRequestType_NewFirst', 'PinMatrixRequestType_NewSecond']; diff --git a/packages/suite/src/hooks/suite/useRediscoveryNeeded.ts b/packages/suite/src/hooks/suite/useRediscoveryNeeded.ts index 9e406fa2535..564b6131f11 100644 --- a/packages/suite/src/hooks/suite/useRediscoveryNeeded.ts +++ b/packages/suite/src/hooks/suite/useRediscoveryNeeded.ts @@ -1,7 +1,9 @@ import { useEffect, useState } from 'react'; -import { useDiscovery, useSelector } from 'src/hooks/suite'; + import { selectDeviceDiscovery } from '@suite-common/wallet-core'; +import { useDiscovery, useSelector } from 'src/hooks/suite'; + export const useRediscoveryNeeded = () => { const [isRediscoveryNeeded, setIsRediscoveryNeeded] = useState(false); diff --git a/packages/suite/src/hooks/suite/useResetScrollOnUrl.ts b/packages/suite/src/hooks/suite/useResetScrollOnUrl.ts index 7b5c3f22395..5de3e74c371 100644 --- a/packages/suite/src/hooks/suite/useResetScrollOnUrl.ts +++ b/packages/suite/src/hooks/suite/useResetScrollOnUrl.ts @@ -1,4 +1,5 @@ import { useLayoutEffect, useRef } from 'react'; + import { useSelector } from './useSelector'; export const useResetScrollOnUrl = () => { diff --git a/packages/suite/src/hooks/suite/useSelector.ts b/packages/suite/src/hooks/suite/useSelector.ts index 892581c7d76..0449578a3d8 100644 --- a/packages/suite/src/hooks/suite/useSelector.ts +++ b/packages/suite/src/hooks/suite/useSelector.ts @@ -1,6 +1,7 @@ -import { AppState } from 'src/types/suite'; import { useSelector as useReduxSelector, shallowEqual, TypedUseSelectorHook } from 'react-redux'; +import { AppState } from 'src/types/suite'; + /** * Properly typed useSelector hook, use this one instead of directly importing it from react-redux. * https://react-redux.js.org/using-react-redux/static-typing#typing-the-useselector-hook diff --git a/packages/suite/src/hooks/suite/useTranslation.ts b/packages/suite/src/hooks/suite/useTranslation.ts index d85183a09d1..9e008ba85e9 100644 --- a/packages/suite/src/hooks/suite/useTranslation.ts +++ b/packages/suite/src/hooks/suite/useTranslation.ts @@ -1,8 +1,10 @@ import { useCallback } from 'react'; import { useIntl } from 'react-intl'; + +import { PrimitiveType } from '@trezor/type-utils'; + import messages from 'src/support/messages'; import { ExtendedMessageDescriptor } from 'src/types/suite'; -import { PrimitiveType } from '@trezor/type-utils'; export type TranslationFunction = ( id: ExtendedMessageDescriptor['id'], diff --git a/packages/suite/src/hooks/wallet/__fixtures__/useSendForm.ts b/packages/suite/src/hooks/wallet/__fixtures__/useSendForm.ts index b9c9098ad84..4004cecde7f 100644 --- a/packages/suite/src/hooks/wallet/__fixtures__/useSendForm.ts +++ b/packages/suite/src/hooks/wallet/__fixtures__/useSendForm.ts @@ -5,6 +5,7 @@ import { DEFAULT_PAYMENT, DEFAULT_VALUES } from '@suite-common/wallet-constants' import { accountsActions, prepareSendFormReducer } from '@suite-common/wallet-core'; import { PROTO } from '@trezor/connect'; import { testMocks } from '@suite-common/test-utils'; + import { extraDependencies } from 'src/support/extraDependencies'; const sendFormReducer = prepareSendFormReducer(extraDependencies); diff --git a/packages/suite/src/hooks/wallet/__tests__/useExcludedUtxos.test.tsx b/packages/suite/src/hooks/wallet/__tests__/useExcludedUtxos.test.tsx index b76ce8efc09..f8d81230ae0 100644 --- a/packages/suite/src/hooks/wallet/__tests__/useExcludedUtxos.test.tsx +++ b/packages/suite/src/hooks/wallet/__tests__/useExcludedUtxos.test.tsx @@ -1,9 +1,12 @@ import { useRef, useState, useEffect } from 'react'; + import { render, screen } from '@testing-library/react'; + import { testMocks } from '@suite-common/test-utils'; -import { useExcludedUtxos } from '../form/useExcludedUtxos'; import * as walletUtils from '@suite-common/wallet-utils'; +import { useExcludedUtxos } from '../form/useExcludedUtxos'; + type Props = Parameters[0]; const ACCOUNT = testMocks.getWalletAccount({ diff --git a/packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx b/packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx index b58804f238f..907d61b7841 100644 --- a/packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx +++ b/packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx @@ -1,7 +1,8 @@ -import TrezorConnect from '@trezor/connect'; import { screen } from '@testing-library/react'; + +import TrezorConnect from '@trezor/connect'; import { configureMockStore, initPreloadedState } from '@suite-common/test-utils'; -import * as fixtures from '../__fixtures__/useRbfForm'; + import { renderWithProviders, waitForLoader, @@ -9,6 +10,8 @@ import { findByTestId, } from 'src/support/tests/hooksHelper'; import { ChangeFee } from 'src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee'; + +import * as fixtures from '../__fixtures__/useRbfForm'; import { useRbfContext } from '../useRbfForm'; // do not mock diff --git a/packages/suite/src/hooks/wallet/__tests__/useSendForm.test.tsx b/packages/suite/src/hooks/wallet/__tests__/useSendForm.test.tsx index e01fd2b3b59..c6f4893962f 100644 --- a/packages/suite/src/hooks/wallet/__tests__/useSendForm.test.tsx +++ b/packages/suite/src/hooks/wallet/__tests__/useSendForm.test.tsx @@ -1,8 +1,11 @@ import { useState, useEffect } from 'react'; import { DeepPartial } from 'react-hook-form'; +import { act, waitFor } from '@testing-library/react'; + import { configureMockStore, initPreloadedState, testMocks } from '@suite-common/test-utils'; import { PROTO } from '@trezor/connect'; +import { FormState } from '@suite-common/wallet-types'; import { filterThunkActionTypes } from 'src/support/tests/configureStore'; import { @@ -12,13 +15,11 @@ import { UserAction, actionSequence, } from 'src/support/tests/hooksHelper'; -import { FormState } from '@suite-common/wallet-types'; import SendIndex from 'src/views/wallet/send'; +import { SendContextValues } from 'src/types/wallet/sendForm'; import * as fixtures from '../__fixtures__/useSendForm'; import { useSendFormContext } from '../useSendForm'; -import { act, waitFor } from '@testing-library/react'; -import { SendContextValues } from 'src/types/wallet/sendForm'; const TEST_TIMEOUT = 30000; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketAccount.ts b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketAccount.ts index 7fdba3344ad..928faa546a4 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketAccount.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketAccount.ts @@ -1,7 +1,9 @@ +import { useState } from 'react'; + import { selectAccounts, selectDevice } from '@suite-common/wallet-core'; import { Account, SelectedAccountLoaded } from '@suite-common/wallet-types'; import { isTestnet } from '@suite-common/wallet-utils'; -import { useState } from 'react'; + import { useSelector } from 'src/hooks/suite'; import { coinmarketGetSortedAccounts, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketBuildAccountGroups.ts b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketBuildAccountGroups.ts index 7e1712fb12a..3600a712e29 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketBuildAccountGroups.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketBuildAccountGroups.ts @@ -1,5 +1,7 @@ -import { selectAccounts, selectDevice } from '@suite-common/wallet-core'; import { useMemo } from 'react'; + +import { selectAccounts, selectDevice } from '@suite-common/wallet-core'; + import { useDefaultAccountLabel, useSelector } from 'src/hooks/suite'; import { selectAccountLabels } from 'src/reducers/suite/metadataReducer'; import { diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketComposeTransaction.ts b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketComposeTransaction.ts index 5aef7e23772..99f97a2ce9d 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketComposeTransaction.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketComposeTransaction.ts @@ -1,9 +1,11 @@ +import { useEffect, useMemo, useState } from 'react'; +import { UseFormReturn } from 'react-hook-form'; + import { COMPOSE_ERROR_TYPES } from '@suite-common/wallet-constants'; import { selectAccounts, selectDevice } from '@suite-common/wallet-core'; import { AddressDisplayOptions } from '@suite-common/wallet-types'; import { getFeeLevels } from '@suite-common/wallet-utils'; -import { useEffect, useMemo, useState } from 'react'; -import { UseFormReturn } from 'react-hook-form'; + import { saveComposedTransactionInfo } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; import { FORM_OUTPUT_ADDRESS, FORM_OUTPUT_AMOUNT } from 'src/constants/wallet/coinmarket/form'; import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketCurrencySwitcher.ts b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketCurrencySwitcher.ts index 81d6784d549..8ac2203b02c 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketCurrencySwitcher.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketCurrencySwitcher.ts @@ -1,8 +1,10 @@ +import { UseFormReturn, useWatch } from 'react-hook-form'; + import { Network } from '@suite-common/wallet-config'; import { Account } from '@suite-common/wallet-types'; import { amountToSmallestUnit, formatAmount } from '@suite-common/wallet-utils'; import { useDidUpdate } from '@trezor/react-utils'; -import { UseFormReturn, useWatch } from 'react-hook-form'; + import { FORM_CRYPTO_INPUT, FORM_FIAT_INPUT, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketFiatValues.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketFiatValues.tsx index 65d2cd27ae3..398e57fe724 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketFiatValues.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketFiatValues.tsx @@ -1,9 +1,12 @@ +import { useCallback, useEffect } from 'react'; + +import { FiatCurrencyCode } from 'invity-api'; + import { networks, NetworkSymbol } from '@suite-common/wallet-config'; import { selectFiatRatesByFiatRateKey, updateFiatRatesThunk } from '@suite-common/wallet-core'; import { FiatRatesResult, Rate, Timestamp, TokenAddress } from '@suite-common/wallet-types'; import { amountToSmallestUnit, getFiatRateKey, toFiatCurrency } from '@suite-common/wallet-utils'; -import { FiatCurrencyCode } from 'invity-api'; -import { useCallback, useEffect } from 'react'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketFormActions.ts b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketFormActions.ts index 331c7d1a8ab..5838ab3271b 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketFormActions.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketFormActions.ts @@ -1,3 +1,9 @@ +import { useCallback, useEffect, useRef, useState } from 'react'; +import { UseFormReturn, useWatch } from 'react-hook-form'; +import { useDebounce } from 'react-use'; + +import { FiatCurrencyCode } from 'invity-api'; + import { isChanged } from '@suite-common/suite-utils'; import { selectAccounts, selectDevice } from '@suite-common/wallet-core'; import { @@ -7,10 +13,7 @@ import { isZero, } from '@suite-common/wallet-utils'; import { BigNumber } from '@trezor/utils'; -import { FiatCurrencyCode } from 'invity-api'; -import { useCallback, useEffect, useRef, useState } from 'react'; -import { UseFormReturn, useWatch } from 'react-hook-form'; -import { useDebounce } from 'react-use'; + import { FORM_CRYPTO_TOKEN, FORM_OUTPUT_ADDRESS, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketInitializer.ts b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketInitializer.ts index 3f0260ba69e..bd7d86fac3c 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketInitializer.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketInitializer.ts @@ -1,5 +1,7 @@ -import { useTimer } from '@trezor/react-utils'; import { useState } from 'react'; + +import { useTimer } from '@trezor/react-utils'; + import { INVITY_API_RELOAD_QUOTES_AFTER_SECONDS } from 'src/constants/wallet/coinmarket/metadata'; import { useDevice } from 'src/hooks/suite'; import { useServerEnvironment } from 'src/hooks/wallet/coinmarket/useServerEnviroment'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto.ts b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto.ts index 96e4c0f7df1..7065f874382 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto.ts @@ -1,5 +1,7 @@ -import { CryptoId } from 'invity-api'; import { useEffect } from 'react'; + +import { CryptoId } from 'invity-api'; + import { SET_MODAL_CRYPTO_CURRENCY } from 'src/actions/wallet/constants/coinmarketCommonConstants'; import { useDispatch } from 'src/hooks/suite'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx index 16f64e66c99..5670533d584 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx @@ -1,9 +1,16 @@ import { useCallback, useState, useEffect, useRef } from 'react'; import { useForm, useWatch } from 'react-hook-form'; + import useDebounce from 'react-use/lib/useDebounce'; import type { BuyTrade, BuyTradeQuoteRequest, CryptoId } from 'invity-api'; + import { isChanged } from '@suite-common/suite-utils'; import { formatAmount } from '@suite-common/wallet-utils'; +import { notificationsActions } from '@suite-common/toast-notifications'; +import { isDesktop } from '@trezor/env-utils'; +import { networks } from '@suite-common/wallet-config'; +import { analytics, EventType } from '@trezor/suite-analytics'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import invityAPI from 'src/services/suite/invityAPI'; import { @@ -29,8 +36,6 @@ import * as coinmarketInfoActions from 'src/actions/wallet/coinmarketInfoActions import * as coinmarketCommonActions from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; import * as coinmarketBuyActions from 'src/actions/wallet/coinmarketBuyActions'; import * as routerActions from 'src/actions/suite/routerActions'; -import { notificationsActions } from '@suite-common/toast-notifications'; -import { isDesktop } from '@trezor/env-utils'; import useCoinmarketPaymentMethod from 'src/hooks/wallet/coinmarket/form/useCoinmarketPaymentMethod'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { useCoinmarketNavigation } from 'src/hooks/wallet/useCoinmarketNavigation'; @@ -44,9 +49,8 @@ import { useCoinmarketLoadData } from 'src/hooks/wallet/coinmarket/useCoinmarket import { useCoinmarketCurrencySwitcher } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketCurrencySwitcher'; import { useCoinmarketModalCrypto } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; -import { networks } from '@suite-common/wallet-config'; -import { analytics, EventType } from '@trezor/suite-analytics'; import { useCoinmarketBuyFormDefaultValues } from 'src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues'; + import { useCoinmarketInitializer } from './common/useCoinmarketInitializer'; export const useCoinmarketBuyForm = ({ diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx index 7fc190bf0d4..c634833da7b 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx @@ -1,5 +1,10 @@ -import { BuyInfo } from 'src/actions/wallet/coinmarketBuyActions'; import { useMemo } from 'react'; + +import { FiatCurrencyCode, CryptoId } from 'invity-api'; + +import { networks } from '@suite-common/wallet-config'; + +import { BuyInfo } from 'src/actions/wallet/coinmarketBuyActions'; import { Account } from 'src/types/wallet'; import { buildFiatOption, getDefaultCountry } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { CoinmarketBuyFormDefaultValuesProps } from 'src/types/coinmarket/coinmarketForm'; @@ -8,9 +13,8 @@ import { FORM_DEFAULT_FIAT_CURRENCY, FORM_DEFAULT_PAYMENT_METHOD, } from 'src/constants/wallet/coinmarket/form'; -import { FiatCurrencyCode, CryptoId } from 'invity-api'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; -import { networks } from '@suite-common/wallet-config'; + export const useCoinmarketBuyFormDefaultValues = ( accountSymbol: Account['symbol'], diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm.tsx index dd31f7ad968..be5e6f78624 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm.tsx @@ -1,4 +1,5 @@ import { createContext, useContext } from 'react'; + import { CoinmarketTradeType } from 'src/types/coinmarket/coinmarket'; import { CoinmarketFormContextValues } from 'src/types/coinmarket/coinmarketForm'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts index e2843cd177e..41202612810 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts @@ -1,5 +1,6 @@ import { useCallback, useState, useEffect, useRef, useMemo } from 'react'; import { useForm, useWatch } from 'react-hook-form'; + import type { CryptoId, ExchangeTrade, @@ -7,8 +8,14 @@ import type { FiatCurrencyCode, } from 'invity-api'; import useDebounce from 'react-use/lib/useDebounce'; + import { amountToSmallestUnit, formatAmount, toFiatCurrency } from '@suite-common/wallet-utils'; import { isChanged } from '@suite-common/suite-utils'; +import { Account } from '@suite-common/wallet-types'; +import { notificationsActions } from '@suite-common/toast-notifications'; +import { networks } from '@suite-common/wallet-config'; +import { analytics, EventType } from '@trezor/suite-analytics'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import invityAPI from 'src/services/suite/invityAPI'; import { saveQuoteRequest, saveQuotes } from 'src/actions/wallet/coinmarketExchangeActions'; @@ -28,7 +35,6 @@ import { useFormDraft } from 'src/hooks/wallet/useFormDraft'; import { useCoinmarketNavigation } from 'src/hooks/wallet/useCoinmarketNavigation'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { CryptoAmountLimits } from 'src/types/wallet/coinmarketCommonTypes'; -import { Account } from '@suite-common/wallet-types'; import { CoinmarketTradeExchangeType, UseCoinmarketFormProps, @@ -48,18 +54,16 @@ import { import { useCoinmarketExchangeFormDefaultValues } from 'src/hooks/wallet/coinmarket/form/useCoinmarketExchangeFormDefaultValues'; import * as coinmarketExchangeActions from 'src/actions/wallet/coinmarketExchangeActions'; import * as coinmarketCommonActions from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; -import { notificationsActions } from '@suite-common/toast-notifications'; import { useCoinmarketRecomposeAndSign } from 'src/hooks/wallet/useCoinmarketRecomposeAndSign'; import { useCoinmarketLoadData } from 'src/hooks/wallet/coinmarket/useCoinmarketLoadData'; import { useCoinmarketComposeTransaction } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketComposeTransaction'; import { useCoinmarketFormActions } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketFormActions'; import { useCoinmarketCurrencySwitcher } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketCurrencySwitcher'; import { useCoinmarketModalCrypto } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketModalCrypto'; -import { networks } from '@suite-common/wallet-config'; import { useCoinmarketAccount } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketAccount'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; -import { analytics, EventType } from '@trezor/suite-analytics'; import { useCoinmarketFiatValues } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketFiatValues'; + import { useCoinmarketInitializer } from './common/useCoinmarketInitializer'; export const useCoinmarketExchangeForm = ({ diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeFormDefaultValues.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeFormDefaultValues.ts index d576e12513e..9398dcef900 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeFormDefaultValues.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeFormDefaultValues.ts @@ -1,5 +1,8 @@ import { useMemo } from 'react'; + import { DEFAULT_PAYMENT, DEFAULT_VALUES } from '@suite-common/wallet-constants'; +import { FormState, Output } from '@suite-common/wallet-types'; + import { buildFiatOption, cryptoIdToNetworkSymbol, @@ -14,7 +17,6 @@ import { RateType, RateTypeFilter, } from 'src/types/coinmarket/coinmarketForm'; -import { FormState, Output } from '@suite-common/wallet-types'; import { EXCHANGE_COMPARATOR_KYC_FILTER, EXCHANGE_COMPARATOR_KYC_FILTER_ALL, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeWatchSendApproval.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeWatchSendApproval.ts index 3ba3a4faae6..e10bf181a8d 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeWatchSendApproval.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeWatchSendApproval.ts @@ -1,6 +1,8 @@ -import { ExchangeTrade } from 'invity-api'; import { useEffect, useState } from 'react'; import { useTimeoutFn, useUnmount } from 'react-use'; + +import { ExchangeTrade } from 'invity-api'; + import { useDispatch } from 'src/hooks/suite'; import invityAPI from 'src/services/suite/invityAPI'; import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketPaymentMethod.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketPaymentMethod.tsx index 4c24b871836..a0d68313300 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketPaymentMethod.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketPaymentMethod.tsx @@ -1,4 +1,5 @@ import { useCallback } from 'react'; + import { useSelector } from 'src/hooks/suite'; import { CoinmarketPaymentMethodListProps, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts index ad584514838..f3b11122b4d 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts @@ -1,9 +1,15 @@ import { useCallback, useState, useEffect, useRef } from 'react'; import { useForm, useWatch } from 'react-hook-form'; + import type { BankAccount, CryptoId, SellFiatTrade, SellFiatTradeQuoteRequest } from 'invity-api'; import useDebounce from 'react-use/lib/useDebounce'; + import { amountToSmallestUnit, formatAmount } from '@suite-common/wallet-utils'; import { isChanged } from '@suite-common/suite-utils'; +import { notificationsActions } from '@suite-common/toast-notifications'; +import { networks } from '@suite-common/wallet-config'; +import { analytics, EventType } from '@trezor/suite-analytics'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import invityAPI from 'src/services/suite/invityAPI'; import { @@ -38,7 +44,6 @@ import { FORM_PAYMENT_METHOD_SELECT, } from 'src/constants/wallet/coinmarket/form'; import { useCoinmarketRecomposeAndSign } from 'src/hooks/wallet/useCoinmarketRecomposeAndSign'; -import { notificationsActions } from '@suite-common/toast-notifications'; import * as coinmarketSellActions from 'src/actions/wallet/coinmarketSellActions'; import * as routerActions from 'src/actions/suite/routerActions'; import * as coinmarketCommonActions from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; @@ -47,10 +52,10 @@ import { useCoinmarketFormActions } from 'src/hooks/wallet/coinmarket/form/commo import { useCoinmarketLoadData } from 'src/hooks/wallet/coinmarket/useCoinmarketLoadData'; import { useCoinmarketComposeTransaction } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketComposeTransaction'; import { useCoinmarketCurrencySwitcher } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketCurrencySwitcher'; -import { networks } from '@suite-common/wallet-config'; import { useCoinmarketAccount } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketAccount'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; -import { analytics, EventType } from '@trezor/suite-analytics'; + + import { useCoinmarketInitializer } from './common/useCoinmarketInitializer'; export const useCoinmarketSellForm = ({ diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellFormDefaultValues.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellFormDefaultValues.ts index 2ef6e5e48b3..afe3543873a 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellFormDefaultValues.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellFormDefaultValues.ts @@ -1,6 +1,9 @@ import { useMemo } from 'react'; -import { SellInfo } from 'src/actions/wallet/coinmarketSellActions'; + import { DEFAULT_PAYMENT, DEFAULT_VALUES } from '@suite-common/wallet-constants'; +import { FormState, Output } from '@suite-common/wallet-types'; + +import { SellInfo } from 'src/actions/wallet/coinmarketSellActions'; import { buildFiatOption, cryptoIdToNetworkSymbol, @@ -9,7 +12,6 @@ import { import { Account } from 'src/types/wallet'; import { CoinmarketPaymentMethodListProps } from 'src/types/coinmarket/coinmarket'; import { CoinmarketSellFormDefaultValuesProps } from 'src/types/coinmarket/coinmarketForm'; -import { FormState, Output } from '@suite-common/wallet-types'; import { FORM_DEFAULT_FIAT_CURRENCY, FORM_DEFAULT_PAYMENT_METHOD, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx index 8434cccad71..bfe9724702f 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx @@ -1,11 +1,15 @@ -import { Network, networksCollection } from '@suite-common/wallet-config'; -import { selectDevice } from '@suite-common/wallet-core'; import { useEffect, useMemo, useState } from 'react'; import { useForm } from 'react-hook-form'; + +import { Network, networksCollection } from '@suite-common/wallet-config'; +import { selectDevice } from '@suite-common/wallet-core'; +import { Account } from '@suite-common/wallet-types'; +import { TrezorDevice } from '@suite-common/suite-types'; +import { filterReceiveAccounts } from '@suite-common/wallet-utils'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { selectIsDebugModeActive } from 'src/reducers/suite/suiteReducer'; import { openModal } from 'src/actions/suite/modalActions'; -import { Account } from '@suite-common/wallet-types'; import { cryptoIdToNetworkSymbol, getUnusedAddressFromAccount, @@ -21,8 +25,7 @@ import { CoinmarketVerifyFormProps, } from 'src/types/coinmarket/coinmarketVerify'; import { useAccountAddressDictionary } from 'src/hooks/wallet/useAccounts'; -import { TrezorDevice } from '@suite-common/suite-types'; -import { filterReceiveAccounts } from '@suite-common/wallet-utils'; + const getSelectAccountOptions = ( suiteReceiveAccounts: Account[] | undefined, diff --git a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketDetail.ts b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketDetail.ts index b33422735a6..4a94878978c 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketDetail.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketDetail.ts @@ -1,5 +1,6 @@ -import { useSelector } from 'src/hooks/suite'; import { createContext, useContext } from 'react'; + +import { useSelector } from 'src/hooks/suite'; import { CoinmarketDetailContextValues, CoinmarketGetDetailDataOutputProps, diff --git a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketInfo.ts b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketInfo.ts index b64b44078ca..ba3c5cb92cb 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketInfo.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketInfo.ts @@ -1,8 +1,11 @@ -import { getNetworkByCoingeckoNativeId, networks } from '@suite-common/wallet-config'; -import { CoinInfo, CryptoId } from 'invity-api'; import { useCallback } from 'react'; -import { useSelector } from 'src/hooks/suite/useSelector'; + +import { CoinInfo, CryptoId } from 'invity-api'; + +import { getNetworkByCoingeckoNativeId, networks } from '@suite-common/wallet-config'; import addressValidator from '@trezor/address-validator'; + +import { useSelector } from 'src/hooks/suite/useSelector'; import { CoinmarketCryptoSelectItemProps, CoinmarketCryptoSelectOptionProps, diff --git a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketLoadData.ts b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketLoadData.ts index e0b031d75ef..9894e9df2a5 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketLoadData.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketLoadData.ts @@ -1,4 +1,5 @@ import { useEffect } from 'react'; + import { loadInvityData } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; import { useDispatch } from 'src/hooks/suite'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketWatchTrade.ts b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketWatchTrade.ts index 7a6c6f0cd1f..0f0b0ace089 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketWatchTrade.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketWatchTrade.ts @@ -1,11 +1,7 @@ import { useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; import { useTimeoutFn, useUnmount } from 'react-use'; -import { Trade, TradeType } from 'src/types/wallet/coinmarketCommonTypes'; -import invityAPI from 'src/services/suite/invityAPI'; -import { saveTrade as saveBuyTrade } from 'src/actions/wallet/coinmarketBuyActions'; -import { saveTrade as saveExchangeTrade } from 'src/actions/wallet/coinmarketExchangeActions'; -import { saveTrade as saveSellTrade } from 'src/actions/wallet/coinmarketSellActions'; + import { BuyTradeFinalStatus, ExchangeTradeFinalStatus, @@ -14,6 +10,12 @@ import { WatchExchangeTradeResponse, WatchSellTradeResponse, } from 'invity-api'; + +import { Trade, TradeType } from 'src/types/wallet/coinmarketCommonTypes'; +import invityAPI from 'src/services/suite/invityAPI'; +import { saveTrade as saveBuyTrade } from 'src/actions/wallet/coinmarketBuyActions'; +import { saveTrade as saveExchangeTrade } from 'src/actions/wallet/coinmarketExchangeActions'; +import { saveTrade as saveSellTrade } from 'src/actions/wallet/coinmarketSellActions'; import { CoinmarketTradeStatusType, CoinmarketTradeType, diff --git a/packages/suite/src/hooks/wallet/form/useCoinjoinRegisteredUtxos.ts b/packages/suite/src/hooks/wallet/form/useCoinjoinRegisteredUtxos.ts index 9b6239715ba..b2e2e550bbf 100644 --- a/packages/suite/src/hooks/wallet/form/useCoinjoinRegisteredUtxos.ts +++ b/packages/suite/src/hooks/wallet/form/useCoinjoinRegisteredUtxos.ts @@ -1,4 +1,5 @@ import { useMemo } from 'react'; + import { AccountUtxo } from '@trezor/connect'; import { getUtxoOutpoint } from '@suite-common/wallet-utils'; import { Account } from '@suite-common/wallet-types'; diff --git a/packages/suite/src/hooks/wallet/form/useCoinjoinUnavailableUtxos.ts b/packages/suite/src/hooks/wallet/form/useCoinjoinUnavailableUtxos.ts index 1ca9edc0fff..2277d512d6d 100644 --- a/packages/suite/src/hooks/wallet/form/useCoinjoinUnavailableUtxos.ts +++ b/packages/suite/src/hooks/wallet/form/useCoinjoinUnavailableUtxos.ts @@ -1,9 +1,10 @@ import { useMemo } from 'react'; + import { BigNumber } from '@trezor/utils/src/bigNumber'; import { AccountUtxo } from '@trezor/connect'; - import { getUtxoOutpoint } from '@suite-common/wallet-utils'; import { Account } from '@suite-common/wallet-types'; + import { useSelector, useTranslation } from 'src/hooks/suite'; import { WabiSabiProtocolErrorCode } from 'src/types/wallet/coinjoin'; import { diff --git a/packages/suite/src/hooks/wallet/form/useCompose.ts b/packages/suite/src/hooks/wallet/form/useCompose.ts index c8ee67bbf6b..bd3b4fa89c8 100644 --- a/packages/suite/src/hooks/wallet/form/useCompose.ts +++ b/packages/suite/src/hooks/wallet/form/useCompose.ts @@ -1,11 +1,10 @@ import { useEffect, useRef, useCallback, useState } from 'react'; import { FieldPath, UseFormReturn } from 'react-hook-form'; + import { isFulfilled } from '@reduxjs/toolkit'; import { FeeLevel } from '@trezor/connect'; import { useDebounce } from '@trezor/react-utils'; -import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; -import { signAndPushSendFormTransactionThunk } from 'src/actions/wallet/send/sendFormThunks'; import { ComposeActionContext, composeSendFormTransactionFeeLevelsThunk, @@ -19,7 +18,11 @@ import { PrecomposedLevelsCardano, } from '@suite-common/wallet-types'; import { COMPOSE_ERROR_TYPES } from '@suite-common/wallet-constants'; + +import { signAndPushSendFormTransactionThunk } from 'src/actions/wallet/send/sendFormThunks'; +import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; + import { SendContextValues, UseSendFormState } from '../../../types/wallet/sendForm'; const DEFAULT_FIELD = 'outputs.0.amount'; diff --git a/packages/suite/src/hooks/wallet/form/useFees.ts b/packages/suite/src/hooks/wallet/form/useFees.ts index 6d383b454d2..7d942fcb4eb 100644 --- a/packages/suite/src/hooks/wallet/form/useFees.ts +++ b/packages/suite/src/hooks/wallet/form/useFees.ts @@ -1,14 +1,17 @@ import { useEffect, useRef } from 'react'; import { FieldPath, UseFormReturn } from 'react-hook-form'; + import { FeeLevel } from '@trezor/connect'; -import { setLastUsedFeeLevel } from 'src/actions/settings/walletSettingsActions'; -import { useDispatch } from 'src/hooks/suite'; import { FeeInfo, FormState, PrecomposedLevels, PrecomposedLevelsCardano, } from '@suite-common/wallet-types'; + +import { setLastUsedFeeLevel } from 'src/actions/settings/walletSettingsActions'; +import { useDispatch } from 'src/hooks/suite'; + import { SendContextValues } from '../../../types/wallet/sendForm'; interface Props extends UseFormReturn { diff --git a/packages/suite/src/hooks/wallet/form/useStakeCompose.ts b/packages/suite/src/hooks/wallet/form/useStakeCompose.ts index 7c909d5bdfa..2b6469edee8 100644 --- a/packages/suite/src/hooks/wallet/form/useStakeCompose.ts +++ b/packages/suite/src/hooks/wallet/form/useStakeCompose.ts @@ -2,8 +2,6 @@ import { useEffect, useRef, useCallback, useState } from 'react'; import { FieldPath, UseFormReturn } from 'react-hook-form'; import { useDebounce } from '@trezor/react-utils'; -import { useDispatch, useTranslation } from 'src/hooks/suite'; -import { composeTransaction } from 'src/actions/wallet/stakeActions'; import { findComposeErrors } from '@suite-common/wallet-utils'; import { StakeFormState, @@ -14,6 +12,9 @@ import { COMPOSE_ERROR_TYPES } from '@suite-common/wallet-constants'; import { FeeLevel } from '@trezor/connect'; import { ComposeActionContext, StakeContextValues } from '@suite-common/wallet-core'; +import { composeTransaction } from 'src/actions/wallet/stakeActions'; +import { useDispatch, useTranslation } from 'src/hooks/suite'; + const DEFAULT_FIELD = 'outputs.0.amount'; interface Props extends UseFormReturn { diff --git a/packages/suite/src/hooks/wallet/form/useUtxoSelection.ts b/packages/suite/src/hooks/wallet/form/useUtxoSelection.ts index c8e39b62485..acc2940e200 100644 --- a/packages/suite/src/hooks/wallet/form/useUtxoSelection.ts +++ b/packages/suite/src/hooks/wallet/form/useUtxoSelection.ts @@ -4,6 +4,7 @@ import { UseFormReturn } from 'react-hook-form'; import { ExcludedUtxos, FormState } from '@suite-common/wallet-types'; import type { AccountUtxo, PROTO } from '@trezor/connect'; import { getUtxoOutpoint, isSameUtxo } from '@suite-common/wallet-utils'; + import { useCoinjoinRegisteredUtxos } from './useCoinjoinRegisteredUtxos'; import { SendContextValues, diff --git a/packages/suite/src/hooks/wallet/sign-verify/useCopySignedMessage.ts b/packages/suite/src/hooks/wallet/sign-verify/useCopySignedMessage.ts index 5b1c387536d..64b108211cd 100644 --- a/packages/suite/src/hooks/wallet/sign-verify/useCopySignedMessage.ts +++ b/packages/suite/src/hooks/wallet/sign-verify/useCopySignedMessage.ts @@ -1,7 +1,8 @@ import { copyToClipboard } from '@trezor/dom-utils'; -import { useDispatch } from 'src/hooks/suite'; import { notificationsActions } from '@suite-common/toast-notifications'; +import { useDispatch } from 'src/hooks/suite'; + type SignedMessageData = { message?: string; address?: string; diff --git a/packages/suite/src/hooks/wallet/sign-verify/useSignAddressOptions.ts b/packages/suite/src/hooks/wallet/sign-verify/useSignAddressOptions.ts index e5b1d718ee8..b92587485c9 100644 --- a/packages/suite/src/hooks/wallet/sign-verify/useSignAddressOptions.ts +++ b/packages/suite/src/hooks/wallet/sign-verify/useSignAddressOptions.ts @@ -1,4 +1,5 @@ import { useMemo } from 'react'; + import { useTranslation } from 'src/hooks/suite'; import type { Account } from 'src/types/wallet'; import type { ExtendedMessageDescriptor } from 'src/types/suite'; diff --git a/packages/suite/src/hooks/wallet/sign-verify/useSignVerifyForm.ts b/packages/suite/src/hooks/wallet/sign-verify/useSignVerifyForm.ts index e3f9f8f91f5..e2273f8f2db 100644 --- a/packages/suite/src/hooks/wallet/sign-verify/useSignVerifyForm.ts +++ b/packages/suite/src/hooks/wallet/sign-verify/useSignVerifyForm.ts @@ -1,11 +1,13 @@ import { useEffect } from 'react'; import { useForm, useController } from 'react-hook-form'; + +import { yupResolver } from '@hookform/resolvers/yup'; + import { yup } from '@suite-common/validators'; import { isAddressValid } from '@suite-common/wallet-utils'; -import { yupResolver } from '@hookform/resolvers/yup'; +import { NetworkSymbol } from '@suite-common/wallet-config'; import type { Account } from 'src/types/wallet'; -import { NetworkSymbol } from '@suite-common/wallet-config'; export const MAX_LENGTH_MESSAGE = 1024; export const MAX_LENGTH_SIGNATURE = 255; diff --git a/packages/suite/src/hooks/wallet/useBitcoinAmountUnit.ts b/packages/suite/src/hooks/wallet/useBitcoinAmountUnit.ts index edd0cdaaf7b..94d895b54a8 100644 --- a/packages/suite/src/hooks/wallet/useBitcoinAmountUnit.ts +++ b/packages/suite/src/hooks/wallet/useBitcoinAmountUnit.ts @@ -1,10 +1,10 @@ import { PROTO } from '@trezor/connect'; import { selectDeviceUnavailableCapabilities } from '@suite-common/wallet-core'; +import { getNetworkOptional, NetworkSymbol } from '@suite-common/wallet-config'; import { useSelector } from 'src/hooks/suite/useSelector'; import { useActions } from 'src/hooks/suite/useActions'; import * as walletSettingsActions from 'src/actions/settings/walletSettingsActions'; -import { getNetworkOptional, NetworkSymbol } from '@suite-common/wallet-config'; export const useBitcoinAmountUnit = (symbol?: NetworkSymbol) => { const bitcoinAmountUnit = useSelector(state => state.wallet.settings.bitcoinAmountUnit); diff --git a/packages/suite/src/hooks/wallet/useClaimEthForm.ts b/packages/suite/src/hooks/wallet/useClaimEthForm.ts index 9b466a513af..646afd34292 100644 --- a/packages/suite/src/hooks/wallet/useClaimEthForm.ts +++ b/packages/suite/src/hooks/wallet/useClaimEthForm.ts @@ -1,21 +1,21 @@ import { createContext, useCallback, useContext, useEffect, useMemo } from 'react'; import { useForm } from 'react-hook-form'; +import { selectNetwork } from '@everstake/wallet-sdk/ethereum'; + import { getFeeLevels } from '@suite-common/wallet-utils'; +import { PrecomposedTransactionFinal } from '@suite-common/wallet-types'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { CRYPTO_INPUT, OUTPUT_AMOUNT, UseStakeFormsProps } from 'src/types/wallet/stakeForms'; - -import { useStakeCompose } from './form/useStakeCompose'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; - import { signTransaction } from 'src/actions/wallet/stakeActions'; -import { PrecomposedTransactionFinal } from '@suite-common/wallet-types'; import { getEthNetworkForWalletSdk, getStakeFormsDefaultValues } from 'src/utils/suite/stake'; -import { selectNetwork } from '@everstake/wallet-sdk/ethereum'; -import { useFees } from './form/useFees'; import { ClaimContextValues, ClaimFormState } from 'src/types/wallet/claimForm'; +import { useFees } from './form/useFees'; +import { useStakeCompose } from './form/useStakeCompose'; + export const ClaimEthFormContext = createContext(null); ClaimEthFormContext.displayName = 'ClaimEthFormContext'; diff --git a/packages/suite/src/hooks/wallet/useCoinmarketNavigation.ts b/packages/suite/src/hooks/wallet/useCoinmarketNavigation.ts index ab0bfe4b2a6..072e0513d9b 100644 --- a/packages/suite/src/hooks/wallet/useCoinmarketNavigation.ts +++ b/packages/suite/src/hooks/wallet/useCoinmarketNavigation.ts @@ -1,4 +1,5 @@ import { useCallback } from 'react'; + import { Account } from 'src/types/wallet'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch } from 'src/hooks/suite'; diff --git a/packages/suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts b/packages/suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts index b09cf9866fd..ba8a834f8be 100644 --- a/packages/suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts +++ b/packages/suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts @@ -1,6 +1,5 @@ import { useCallback } from 'react'; -import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; -import { signAndPushSendFormTransactionThunk } from 'src/actions/wallet/send/sendFormThunks'; + import { notificationsActions } from '@suite-common/toast-notifications'; import { DEFAULT_VALUES, DEFAULT_PAYMENT } from '@suite-common/wallet-constants'; @@ -10,6 +9,9 @@ import { networks } from '@suite-common/wallet-config'; import type { Account, FormOptions } from '@suite-common/wallet-types'; import { composeSendFormTransactionFeeLevelsThunk } from '@suite-common/wallet-core'; +import { signAndPushSendFormTransactionThunk } from 'src/actions/wallet/send/sendFormThunks'; +import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; + interface CoinmarketRecomposeAndSignProps { account: Account; address: string; diff --git a/packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts b/packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts index 15985d575b4..60457f5276e 100644 --- a/packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts +++ b/packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts @@ -1,11 +1,14 @@ -import { Account } from 'src/types/wallet'; import { BuyTradeQuoteRequest, CryptoId, SellFiatTradeQuoteRequest } from 'invity-api'; + +import { FeeLevel } from '@trezor/connect'; + +import { Account } from 'src/types/wallet'; import { useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; import * as coinmarketBuyActions from 'src/actions/wallet/coinmarketBuyActions'; import * as coinmarketSellActions from 'src/actions/wallet/coinmarketSellActions'; import { saveComposedTransactionInfo } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; -import { FeeLevel } from '@trezor/connect'; + interface OfferRedirectParams { symbol: Account['symbol']; diff --git a/packages/suite/src/hooks/wallet/useFormDraft.ts b/packages/suite/src/hooks/wallet/useFormDraft.ts index b84c40a6f2d..b6f7da3f385 100644 --- a/packages/suite/src/hooks/wallet/useFormDraft.ts +++ b/packages/suite/src/hooks/wallet/useFormDraft.ts @@ -1,7 +1,8 @@ import { FieldValues } from 'react-hook-form'; -import { useActions } from 'src/hooks/suite'; import { FormDraftKeyPrefix } from '@suite-common/wallet-types'; + +import { useActions } from 'src/hooks/suite'; import * as formDraftActions from 'src/actions/wallet/formDraftActions'; export const useFormDraft = (keyPrefix: FormDraftKeyPrefix) => diff --git a/packages/suite/src/hooks/wallet/useRbfForm.ts b/packages/suite/src/hooks/wallet/useRbfForm.ts index 46adb3e2324..752a827c0aa 100644 --- a/packages/suite/src/hooks/wallet/useRbfForm.ts +++ b/packages/suite/src/hooks/wallet/useRbfForm.ts @@ -1,8 +1,9 @@ -import { BigNumber } from '@trezor/utils/src/bigNumber'; import { createContext, useContext, useState, useEffect, useMemo } from 'react'; import { useForm } from 'react-hook-form'; + import { fromWei } from 'web3-utils'; -import { useSelector } from 'src/hooks/suite'; + +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { DEFAULT_PAYMENT, DEFAULT_OPRETURN, DEFAULT_VALUES } from '@suite-common/wallet-constants'; import { getFeeLevels } from '@suite-common/wallet-utils'; import { @@ -13,10 +14,13 @@ import { FormState, FeeInfo, } from '@suite-common/wallet-types'; -import { useFees } from './form/useFees'; -import { useCompose } from './form/useCompose'; + +import { useSelector } from 'src/hooks/suite'; import { selectCurrentTargetAnonymity } from 'src/reducers/wallet/coinjoinReducer'; import { useCoinjoinRegisteredUtxos } from 'src/hooks/wallet/form/useCoinjoinRegisteredUtxos'; + +import { useCompose } from './form/useCompose'; +import { useFees } from './form/useFees'; import { useBitcoinAmountUnit } from './useBitcoinAmountUnit'; export type UseRbfProps = { diff --git a/packages/suite/src/hooks/wallet/useSendForm.ts b/packages/suite/src/hooks/wallet/useSendForm.ts index 6d2f69798be..1beb91cf8e1 100644 --- a/packages/suite/src/hooks/wallet/useSendForm.ts +++ b/packages/suite/src/hooks/wallet/useSendForm.ts @@ -1,7 +1,19 @@ import { createContext, useContext, useCallback, useState, useEffect, useRef } from 'react'; import { useForm, useFieldArray } from 'react-hook-form'; -import { useSelector, useDispatch } from 'src/hooks/suite'; + import { useDidUpdate } from '@trezor/react-utils'; +import { FormState } from '@suite-common/wallet-types'; +import { + getFeeLevels, + getDefaultValues, + amountToSmallestUnit, + formatAmount, +} from '@suite-common/wallet-utils'; +import { getNetworkSymbolForProtocol } from '@suite-common/suite-utils'; +import { selectCurrentFiatRates } from '@suite-common/wallet-core'; +import { FiatCurrencyCode } from '@suite-common/suite-config'; + +import { useSelector, useDispatch } from 'src/hooks/suite'; import { getSendFormDraftThunk, removeSendFormDraftThunk, @@ -15,26 +27,17 @@ import { import { goto } from 'src/actions/suite/routerActions'; import { fillSendForm } from 'src/actions/suite/protocolActions'; import { AppState } from 'src/types/suite'; -import { FormState } from '@suite-common/wallet-types'; -import { - getFeeLevels, - getDefaultValues, - amountToSmallestUnit, - formatAmount, -} from '@suite-common/wallet-utils'; +import { SendContextValues, UseSendFormState } from 'src/types/wallet/sendForm'; + import { useSendFormOutputs } from './useSendFormOutputs'; import { useSendFormFields } from './useSendFormFields'; import { useSendFormCompose } from './useSendFormCompose'; import { useSendFormImport } from './useSendFormImport'; import { useFees } from './form/useFees'; -import { getNetworkSymbolForProtocol } from '@suite-common/suite-utils'; - import { useBitcoinAmountUnit } from './useBitcoinAmountUnit'; import { useUtxoSelection } from './form/useUtxoSelection'; import { useExcludedUtxos } from './form/useExcludedUtxos'; -import { selectCurrentFiatRates } from '@suite-common/wallet-core'; -import { FiatCurrencyCode } from '@suite-common/suite-config'; -import { SendContextValues, UseSendFormState } from 'src/types/wallet/sendForm'; + export const SendContext = createContext(null); SendContext.displayName = 'SendContext'; diff --git a/packages/suite/src/hooks/wallet/useSendFormCompose.ts b/packages/suite/src/hooks/wallet/useSendFormCompose.ts index 9c644f6b6d6..50aebd96db5 100644 --- a/packages/suite/src/hooks/wallet/useSendFormCompose.ts +++ b/packages/suite/src/hooks/wallet/useSendFormCompose.ts @@ -1,5 +1,8 @@ import { useState, useRef, useEffect, useCallback, Dispatch, SetStateAction } from 'react'; import { FieldPath, UseFormReturn } from 'react-hook-form'; +import { useDispatch } from 'react-redux'; + +import { isFulfilled } from '@reduxjs/toolkit'; import { FormState, @@ -14,13 +17,12 @@ import { isChanged } from '@suite-common/suite-utils'; import { findComposeErrors } from '@suite-common/wallet-utils'; import { FeeLevel } from '@trezor/connect'; import { COMPOSE_ERROR_TYPES } from '@suite-common/wallet-constants'; +import { composeSendFormTransactionFeeLevelsThunk } from '@suite-common/wallet-core'; import { TranslationKey } from 'src/components/suite/Translation'; -import { useDispatch } from 'react-redux'; -import { composeSendFormTransactionFeeLevelsThunk } from '@suite-common/wallet-core'; -import { useTranslation } from '../suite'; import { SendContextValues, UseSendFormState } from 'src/types/wallet/sendForm'; -import { isFulfilled } from '@reduxjs/toolkit'; + +import { useTranslation } from '../suite'; type Props = UseFormReturn & { state: UseSendFormState; diff --git a/packages/suite/src/hooks/wallet/useSendFormFields.ts b/packages/suite/src/hooks/wallet/useSendFormFields.ts index 3e1523f9178..07d033dedf1 100644 --- a/packages/suite/src/hooks/wallet/useSendFormFields.ts +++ b/packages/suite/src/hooks/wallet/useSendFormFields.ts @@ -1,11 +1,14 @@ import { useCallback } from 'react'; import { FieldPath, UseFormReturn } from 'react-hook-form'; + import { formatNetworkAmount, getFiatRateKey, toFiatCurrency } from '@suite-common/wallet-utils'; import { FormState, FormOptions, TokenAddress, Rate } from '@suite-common/wallet-types'; -import { useBitcoinAmountUnit } from './useBitcoinAmountUnit'; -import { SendContextValues, UseSendFormState } from 'src/types/wallet/sendForm'; import { FiatCurrencyCode } from '@suite-common/suite-config'; import { selectCurrentFiatRates } from '@suite-common/wallet-core'; + +import { SendContextValues, UseSendFormState } from 'src/types/wallet/sendForm'; + +import { useBitcoinAmountUnit } from './useBitcoinAmountUnit'; import { useSelector } from '../suite'; type Props = UseFormReturn & { diff --git a/packages/suite/src/hooks/wallet/useSendFormImport.ts b/packages/suite/src/hooks/wallet/useSendFormImport.ts index 2a4e07523da..2953a032b9d 100644 --- a/packages/suite/src/hooks/wallet/useSendFormImport.ts +++ b/packages/suite/src/hooks/wallet/useSendFormImport.ts @@ -1,8 +1,5 @@ import { useState, useEffect } from 'react'; -import { importSendFormRequestThunk } from 'src/actions/wallet/send/sendFormThunks'; -import { useDispatch } from 'src/hooks/suite'; -import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { DEFAULT_PAYMENT } from '@suite-common/wallet-constants'; import { FiatCurrencyCode, fiatCurrencies } from '@suite-common/suite-config'; import { @@ -15,6 +12,10 @@ import { import { Output, Timestamp, FiatRatesResult, Rate, FiatRates } from '@suite-common/wallet-types'; import { updateFiatRatesThunk } from '@suite-common/wallet-core'; import { NetworkSymbol } from '@suite-common/wallet-config'; + +import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; +import { useDispatch } from 'src/hooks/suite'; +import { importSendFormRequestThunk } from 'src/actions/wallet/send/sendFormThunks'; import { UseSendFormState } from 'src/types/wallet/sendForm'; type useSendFormImportProps = { diff --git a/packages/suite/src/hooks/wallet/useSendFormOutputs.ts b/packages/suite/src/hooks/wallet/useSendFormOutputs.ts index 9dd712a942a..9225c0762de 100644 --- a/packages/suite/src/hooks/wallet/useSendFormOutputs.ts +++ b/packages/suite/src/hooks/wallet/useSendFormOutputs.ts @@ -1,7 +1,9 @@ import { useCallback, useEffect } from 'react'; import { useFieldArray, UseFormReturn } from 'react-hook-form'; + import { FormState } from '@suite-common/wallet-types'; import { DEFAULT_PAYMENT, DEFAULT_OPRETURN } from '@suite-common/wallet-constants'; + import { SendContextValues, UseSendFormState } from 'src/types/wallet/sendForm'; type Props = UseFormReturn & { diff --git a/packages/suite/src/hooks/wallet/useStakeEthForm.ts b/packages/suite/src/hooks/wallet/useStakeEthForm.ts index 00d6ad328b7..67eeadf6682 100644 --- a/packages/suite/src/hooks/wallet/useStakeEthForm.ts +++ b/packages/suite/src/hooks/wallet/useStakeEthForm.ts @@ -1,9 +1,11 @@ import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'; import { useForm, useWatch } from 'react-hook-form'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; import useDebounce from 'react-use/lib/useDebounce'; +import { fromWei } from 'web3-utils'; +import { selectNetwork } from '@everstake/wallet-sdk/ethereum'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { fromFiatCurrency, getFeeLevels, @@ -11,6 +13,17 @@ import { toFiatCurrency, } from '@suite-common/wallet-utils'; import { isChanged } from '@suite-common/suite-utils'; +import { PrecomposedTransactionFinal, StakeFormState } from '@suite-common/wallet-types'; +import { + AmountLimitsString, + StakeContextValues, + selectFiatRatesByFiatRateKey, +} from '@suite-common/wallet-core'; +import { + MIN_ETH_AMOUNT_FOR_STAKING, + MIN_ETH_BALANCE_FOR_STAKING, + MIN_ETH_FOR_WITHDRAWALS, +} from '@suite-common/wallet-constants'; import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; import { saveComposedTransactionInfo } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; @@ -20,26 +33,12 @@ import { CRYPTO_INPUT, OUTPUT_AMOUNT, } from 'src/types/wallet/stakeForms'; -import { useFormDraft } from './useFormDraft'; - -import { fromWei } from 'web3-utils'; -import { useStakeCompose } from './form/useStakeCompose'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; - import { signTransaction } from 'src/actions/wallet/stakeActions'; -import { PrecomposedTransactionFinal, StakeFormState } from '@suite-common/wallet-types'; import { getEthNetworkForWalletSdk, getStakeFormsDefaultValues } from 'src/utils/suite/stake'; -import { - AmountLimitsString, - StakeContextValues, - selectFiatRatesByFiatRateKey, -} from '@suite-common/wallet-core'; -import { - MIN_ETH_AMOUNT_FOR_STAKING, - MIN_ETH_BALANCE_FOR_STAKING, - MIN_ETH_FOR_WITHDRAWALS, -} from '@suite-common/wallet-constants'; -import { selectNetwork } from '@everstake/wallet-sdk/ethereum'; + +import { useStakeCompose } from './form/useStakeCompose'; +import { useFormDraft } from './useFormDraft'; import { useFees } from './form/useFees'; export const StakeEthFormContext = createContext(null); diff --git a/packages/suite/src/hooks/wallet/useUnstakeEthForm.ts b/packages/suite/src/hooks/wallet/useUnstakeEthForm.ts index 358daad2945..6f28c52e048 100644 --- a/packages/suite/src/hooks/wallet/useUnstakeEthForm.ts +++ b/packages/suite/src/hooks/wallet/useUnstakeEthForm.ts @@ -1,6 +1,9 @@ import { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'; import { useForm, useWatch } from 'react-hook-form'; +import useDebounce from 'react-use/lib/useDebounce'; +import { selectNetwork } from '@everstake/wallet-sdk/ethereum'; + import { fromFiatCurrency, getAccountAutocompoundBalance, @@ -8,6 +11,14 @@ import { getFiatRateKey, toFiatCurrency, } from '@suite-common/wallet-utils'; +import { PrecomposedTransactionFinal } from '@suite-common/wallet-types'; +import { isChanged } from '@suite-common/suite-utils'; +import { + AmountLimitsString, + selectFiatRatesByFiatRateKey, + UnstakeContextValues as UnstakeContextValuesBase, + UnstakeFormState, +} from '@suite-common/wallet-core'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { @@ -16,27 +27,16 @@ import { OUTPUT_AMOUNT, UseStakeFormsProps, } from 'src/types/wallet/stakeForms'; - -import { useStakeCompose } from './form/useStakeCompose'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; - import { signTransaction } from 'src/actions/wallet/stakeActions'; -import { PrecomposedTransactionFinal } from '@suite-common/wallet-types'; import { getEthNetworkForWalletSdk, getStakeFormsDefaultValues, simulateUnstake, } from 'src/utils/suite/stake'; + +import { useStakeCompose } from './form/useStakeCompose'; import { useFormDraft } from './useFormDraft'; -import useDebounce from 'react-use/lib/useDebounce'; -import { isChanged } from '@suite-common/suite-utils'; -import { - AmountLimitsString, - selectFiatRatesByFiatRateKey, - UnstakeContextValues as UnstakeContextValuesBase, - UnstakeFormState, -} from '@suite-common/wallet-core'; -import { selectNetwork } from '@everstake/wallet-sdk/ethereum'; import { useFees } from './form/useFees'; type UnstakeOptions = 'all' | 'rewards' | 'other'; diff --git a/packages/suite/src/middlewares/backup/backupMiddleware.ts b/packages/suite/src/middlewares/backup/backupMiddleware.ts index d74084fb51b..2176d66ce38 100644 --- a/packages/suite/src/middlewares/backup/backupMiddleware.ts +++ b/packages/suite/src/middlewares/backup/backupMiddleware.ts @@ -1,4 +1,5 @@ import { MiddlewareAPI } from 'redux'; + import { SUITE } from 'src/actions/suite/constants'; import * as backupActions from 'src/actions/backup/backupActions'; import { AppState, Action, Dispatch } from 'src/types/suite'; diff --git a/packages/suite/src/middlewares/onboarding/__tests__/onboardingMiddleware.test.ts b/packages/suite/src/middlewares/onboarding/__tests__/onboardingMiddleware.test.ts index 4599ab4e989..1fcb39809e8 100644 --- a/packages/suite/src/middlewares/onboarding/__tests__/onboardingMiddleware.test.ts +++ b/packages/suite/src/middlewares/onboarding/__tests__/onboardingMiddleware.test.ts @@ -1,7 +1,5 @@ import { configureStore } from 'src/support/tests/configureStore'; - import { SUITE } from 'src/actions/suite/constants'; - import routerReducer from 'src/reducers/suite/routerReducer'; import suiteReducer from 'src/reducers/suite/suiteReducer'; import modalReducer from 'src/reducers/suite/modalReducer'; diff --git a/packages/suite/src/middlewares/recovery/recoveryMiddleware.ts b/packages/suite/src/middlewares/recovery/recoveryMiddleware.ts index 6435f23b621..841bee40327 100644 --- a/packages/suite/src/middlewares/recovery/recoveryMiddleware.ts +++ b/packages/suite/src/middlewares/recovery/recoveryMiddleware.ts @@ -7,6 +7,7 @@ import { SUITE } from 'src/actions/suite/constants'; import * as recoveryActions from 'src/actions/recovery/recoveryActions'; import * as onboardingActions from 'src/actions/onboarding/onboardingActions'; import { AppState, Action, Dispatch } from 'src/types/suite'; + import { isRecoveryInProgress } from '../../utils/device/isRecoveryInProgress'; const recovery = diff --git a/packages/suite/src/middlewares/suite/__tests__/protocolMiddleware.test.ts b/packages/suite/src/middlewares/suite/__tests__/protocolMiddleware.test.ts index 19011ec9fe7..281f464d6d1 100644 --- a/packages/suite/src/middlewares/suite/__tests__/protocolMiddleware.test.ts +++ b/packages/suite/src/middlewares/suite/__tests__/protocolMiddleware.test.ts @@ -1,14 +1,15 @@ -import { configureStore } from 'src/support/tests/configureStore'; - -import { PROTOCOL } from 'src/actions/suite/constants'; -import protocolMiddleware from '../protocolMiddleware'; -import protocolReducer from 'src/reducers/suite/protocolReducer'; import { NotificationEntry, notificationsActions, notificationsReducer, } from '@suite-common/toast-notifications'; +import { configureStore } from 'src/support/tests/configureStore'; +import { PROTOCOL } from 'src/actions/suite/constants'; +import protocolReducer from 'src/reducers/suite/protocolReducer'; + +import protocolMiddleware from '../protocolMiddleware'; + const middlewares = [protocolMiddleware]; type ProtocolState = ReturnType; diff --git a/packages/suite/src/middlewares/suite/analyticsMiddleware.ts b/packages/suite/src/middlewares/suite/analyticsMiddleware.ts index bd9f40be4b3..dced6b06ee9 100644 --- a/packages/suite/src/middlewares/suite/analyticsMiddleware.ts +++ b/packages/suite/src/middlewares/suite/analyticsMiddleware.ts @@ -1,6 +1,6 @@ import { MiddlewareAPI } from 'redux'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { getPhysicalDeviceCount } from '@suite-common/suite-utils'; import { discoveryActions, @@ -18,6 +18,7 @@ import { hasBitcoinOnlyFirmware, isDeviceInBootloaderMode, } from '@trezor/device-utils'; +import { Account } from '@suite-common/wallet-types'; import { SUITE, ROUTER } from 'src/actions/suite/constants'; import { COINJOIN } from 'src/actions/wallet/constants'; @@ -32,7 +33,6 @@ import { selectCoinjoinAccountByKey, } from 'src/reducers/wallet/coinjoinReducer'; import { updateLastAnonymityReportTimestamp } from 'src/actions/wallet/coinjoinAccountActions'; -import { Account } from '@suite-common/wallet-types'; /* In analytics middleware we may intercept actions we would like to log. For example: diff --git a/packages/suite/src/middlewares/suite/buttonRequestMiddleware.ts b/packages/suite/src/middlewares/suite/buttonRequestMiddleware.ts index ee151e43107..6af41a6a32a 100644 --- a/packages/suite/src/middlewares/suite/buttonRequestMiddleware.ts +++ b/packages/suite/src/middlewares/suite/buttonRequestMiddleware.ts @@ -2,11 +2,11 @@ import { MiddlewareAPI } from 'redux'; import { selectDevice, deviceActions } from '@suite-common/wallet-core'; import TrezorConnect, { UI } from '@trezor/connect'; +import { checkDeviceAuthenticityThunk } from '@suite-common/device-authenticity'; import { SUITE } from 'src/actions/suite/constants'; import { AppState, Action, Dispatch } from 'src/types/suite'; import { ONBOARDING } from 'src/actions/onboarding/constants'; -import { checkDeviceAuthenticityThunk } from '@suite-common/device-authenticity'; const buttonRequest = (api: MiddlewareAPI) => diff --git a/packages/suite/src/middlewares/suite/logsMiddleware.ts b/packages/suite/src/middlewares/suite/logsMiddleware.ts index 6704b12d392..80db722cae4 100644 --- a/packages/suite/src/middlewares/suite/logsMiddleware.ts +++ b/packages/suite/src/middlewares/suite/logsMiddleware.ts @@ -1,4 +1,5 @@ import { MiddlewareAPI } from 'redux'; + import { authorizeDeviceThunk, deviceActions, discoveryActions } from '@suite-common/wallet-core'; import { addLog } from '@suite-common/logger'; import { TRANSPORT, DEVICE } from '@trezor/connect'; diff --git a/packages/suite/src/middlewares/suite/protocolMiddleware.ts b/packages/suite/src/middlewares/suite/protocolMiddleware.ts index 753c89c27c3..e9818ca2c6c 100644 --- a/packages/suite/src/middlewares/suite/protocolMiddleware.ts +++ b/packages/suite/src/middlewares/suite/protocolMiddleware.ts @@ -1,8 +1,8 @@ import { MiddlewareAPI } from 'redux'; import { notificationsActions, ToastPayload } from '@suite-common/toast-notifications'; -import { PROTOCOL } from 'src/actions/suite/constants'; +import { PROTOCOL } from 'src/actions/suite/constants'; import type { AppState, Action, Dispatch } from 'src/types/suite'; // close custom protocol notification of given type diff --git a/packages/suite/src/middlewares/suite/routerMiddleware.ts b/packages/suite/src/middlewares/suite/routerMiddleware.ts index 05f2940cba2..6e25c1d2bb0 100644 --- a/packages/suite/src/middlewares/suite/routerMiddleware.ts +++ b/packages/suite/src/middlewares/suite/routerMiddleware.ts @@ -1,6 +1,6 @@ import { MiddlewareAPI } from 'redux'; -import { ROUTER } from 'src/actions/suite/constants'; +import { ROUTER } from 'src/actions/suite/constants'; import { AppState, Action, Dispatch } from 'src/types/suite'; const router = (api: MiddlewareAPI) => (next: Dispatch) => (action: Action) => { diff --git a/packages/suite/src/middlewares/suite/toastMiddleware.ts b/packages/suite/src/middlewares/suite/toastMiddleware.ts index cb8515dca5c..a7244623eb1 100644 --- a/packages/suite/src/middlewares/suite/toastMiddleware.ts +++ b/packages/suite/src/middlewares/suite/toastMiddleware.ts @@ -1,7 +1,9 @@ -import { MiddlewareAPI } from 'redux'; import { toast } from 'react-toastify'; +import { MiddlewareAPI } from 'redux'; + import { notificationsActions } from '@suite-common/toast-notifications'; + import { renderToast } from 'src/components/suite'; import { Action, AppState, Dispatch } from 'src/types/suite'; diff --git a/packages/suite/src/middlewares/wallet/__fixtures__/coinjoinMiddleware.ts b/packages/suite/src/middlewares/wallet/__fixtures__/coinjoinMiddleware.ts index 822feaf5dcf..8e6b238a5f0 100644 --- a/packages/suite/src/middlewares/wallet/__fixtures__/coinjoinMiddleware.ts +++ b/packages/suite/src/middlewares/wallet/__fixtures__/coinjoinMiddleware.ts @@ -2,6 +2,7 @@ import { accountsActions } from '@suite-common/wallet-core'; import { SelectedAccountLoaded } from '@suite-common/wallet-types'; import { AnonymitySet } from '@trezor/blockchain-link'; import { DEVICE, StaticSessionId } from '@trezor/connect'; +import { NetworkSymbol } from '@suite-common/wallet-config'; import { SuiteState } from 'src/reducers/suite/suiteReducer'; import { ROUTER, SUITE } from 'src/actions/suite/constants'; @@ -9,7 +10,6 @@ import { COINJOIN } from 'src/actions/wallet/constants'; import { CoinjoinState } from 'src/reducers/wallet/coinjoinReducer'; import { CoinjoinAccount, CoinjoinSession } from 'src/types/wallet/coinjoin'; import { Account } from 'src/types/wallet'; -import { NetworkSymbol } from '@suite-common/wallet-config'; import { RouterState } from 'src/reducers/suite/routerReducer'; const DEVICE_A = { diff --git a/packages/suite/src/middlewares/wallet/__fixtures__/walletMiddleware.ts b/packages/suite/src/middlewares/wallet/__fixtures__/walletMiddleware.ts index 45e12e5ad42..da041fd9474 100644 --- a/packages/suite/src/middlewares/wallet/__fixtures__/walletMiddleware.ts +++ b/packages/suite/src/middlewares/wallet/__fixtures__/walletMiddleware.ts @@ -1,14 +1,15 @@ import { PROTO } from '@trezor/connect'; import { Account, FormState as SendFormState, Output } from '@suite-common/wallet-types'; -import { WALLET_SETTINGS } from 'src/actions/settings/constants'; -import { RouterState } from 'src/reducers/suite/routerReducer'; -import { State as SelectedAccountState } from 'src/reducers/wallet/selectedAccountReducer'; import { accountsActions, sendFormActions, convertSendFormDraftsBtcAmountUnitsThunk, } from '@suite-common/wallet-core'; +import { WALLET_SETTINGS } from 'src/actions/settings/constants'; +import { RouterState } from 'src/reducers/suite/routerReducer'; +import { State as SelectedAccountState } from 'src/reducers/wallet/selectedAccountReducer'; + export const blockchainSubscription = [ { description: 'create account, only one subscribed', diff --git a/packages/suite/src/middlewares/wallet/__tests__/coinmarketMiddleware.test.ts b/packages/suite/src/middlewares/wallet/__tests__/coinmarketMiddleware.test.ts index df35fd4b438..e4d82fa9f47 100644 --- a/packages/suite/src/middlewares/wallet/__tests__/coinmarketMiddleware.test.ts +++ b/packages/suite/src/middlewares/wallet/__tests__/coinmarketMiddleware.test.ts @@ -1,5 +1,6 @@ -import { configureStore } from 'src/support/tests/configureStore'; +import { UI } from '@trezor/connect'; +import { configureStore } from 'src/support/tests/configureStore'; import { coinmarketReducer, initialState } from 'src/reducers/wallet/coinmarketReducer'; import selectedAccountReducer from 'src/reducers/wallet/selectedAccountReducer'; import { coinmarketMiddleware } from 'src/middlewares/wallet/coinmarketMiddleware'; @@ -11,7 +12,6 @@ import { accounts } from 'src/reducers/wallet/__fixtures__/transactionConstants' import routerReducer, { RouterState } from 'src/reducers/suite/routerReducer'; import modalReducer, { State as ModalState } from 'src/reducers/suite/modalReducer'; import { MODAL, ROUTER } from 'src/actions/suite/constants'; -import { UI } from '@trezor/connect'; jest.mock('src/services/suite/invityAPI'); invityAPI.setInvityServersEnvironment = () => {}; diff --git a/packages/suite/src/middlewares/wallet/coinmarketMiddleware.ts b/packages/suite/src/middlewares/wallet/coinmarketMiddleware.ts index 567b46e65dc..c67b8d13e9b 100644 --- a/packages/suite/src/middlewares/wallet/coinmarketMiddleware.ts +++ b/packages/suite/src/middlewares/wallet/coinmarketMiddleware.ts @@ -1,4 +1,7 @@ import { MiddlewareAPI } from 'redux'; + +import { UI } from '@trezor/connect'; + import { AppState, Action, Dispatch } from 'src/types/suite'; import { COINMARKET_COMMON } from 'src/actions/wallet/constants'; import { INVITY_API_RELOAD_DATA_AFTER_MS } from 'src/constants/wallet/coinmarket/metadata'; @@ -8,7 +11,6 @@ import * as coinmarketInfoAction from 'src/actions/wallet/coinmarketInfoActions' import * as coinmarketBuyActions from 'src/actions/wallet/coinmarketBuyActions'; import * as coinmarketExchangeActions from 'src/actions/wallet/coinmarketExchangeActions'; import * as coinmarketSellActions from 'src/actions/wallet/coinmarketSellActions'; -import { UI } from '@trezor/connect'; import { ROUTER, MODAL } from 'src/actions/suite/constants'; export const coinmarketMiddleware = diff --git a/packages/suite/src/middlewares/wallet/index.ts b/packages/suite/src/middlewares/wallet/index.ts index 3f4c631339f..a15514e9b98 100644 --- a/packages/suite/src/middlewares/wallet/index.ts +++ b/packages/suite/src/middlewares/wallet/index.ts @@ -3,6 +3,9 @@ import { prepareBlockchainMiddleware, prepareStakeMiddleware, } from '@suite-common/wallet-core'; +import { prepareTokenDefinitionsMiddleware } from '@suite-common/token-definitions'; + +import { extraDependencies } from 'src/support/extraDependencies'; import { prepareDiscoveryMiddleware } from './discoveryMiddleware'; import storageMiddleware from './storageMiddleware'; @@ -10,8 +13,6 @@ import walletMiddleware from './walletMiddleware'; import graphMiddleware from './graphMiddleware'; import { coinmarketMiddleware } from './coinmarketMiddleware'; import { coinjoinMiddleware } from './coinjoinMiddleware'; -import { extraDependencies } from 'src/support/extraDependencies'; -import { prepareTokenDefinitionsMiddleware } from '@suite-common/token-definitions'; export default [ prepareBlockchainMiddleware(extraDependencies), diff --git a/packages/suite/src/middlewares/wallet/storageMiddleware.ts b/packages/suite/src/middlewares/wallet/storageMiddleware.ts index 376ee04793c..feeffa9b4d6 100644 --- a/packages/suite/src/middlewares/wallet/storageMiddleware.ts +++ b/packages/suite/src/middlewares/wallet/storageMiddleware.ts @@ -21,6 +21,8 @@ import { isDeviceRemembered } from '@suite-common/suite-utils'; import { messageSystemActions } from '@suite-common/message-system'; import { findAccountDevice } from '@suite-common/wallet-utils'; import { analyticsActions } from '@suite-common/analytics'; +import { tokenDefinitionsActions } from '@suite-common/token-definitions/src/tokenDefinitionsActions'; +import { TokenManagementAction } from '@suite-common/token-definitions'; import { db } from 'src/storage'; import { WALLET_SETTINGS } from 'src/actions/settings/constants'; @@ -33,8 +35,6 @@ import * as metadataActions from 'src/actions/suite/metadataActions'; import { serializeDiscovery } from 'src/utils/suite/storage'; import type { AppState, Action as SuiteAction, Dispatch } from 'src/types/suite'; import type { WalletAction } from 'src/types/wallet'; -import { tokenDefinitionsActions } from '@suite-common/token-definitions/src/tokenDefinitionsActions'; -import { TokenManagementAction } from '@suite-common/token-definitions'; const storageMiddleware = (api: MiddlewareAPI) => { db.onBlocking = () => api.dispatch({ type: STORAGE.ERROR, payload: 'blocking' }); diff --git a/packages/suite/src/reducers/backup/backupReducer.ts b/packages/suite/src/reducers/backup/backupReducer.ts index e10e37f74bc..81df9c9d7ac 100644 --- a/packages/suite/src/reducers/backup/backupReducer.ts +++ b/packages/suite/src/reducers/backup/backupReducer.ts @@ -1,4 +1,5 @@ import produce from 'immer'; + import { BACKUP } from 'src/actions/backup/constants'; import { ConfirmKey, BackupStatus } from 'src/actions/backup/backupActions'; import { Action } from 'src/types/suite'; diff --git a/packages/suite/src/reducers/desktop/__tests__/desktopReducer.test.ts b/packages/suite/src/reducers/desktop/__tests__/desktopReducer.test.ts index 009949f7bc3..c01cf5fd10c 100644 --- a/packages/suite/src/reducers/desktop/__tests__/desktopReducer.test.ts +++ b/packages/suite/src/reducers/desktop/__tests__/desktopReducer.test.ts @@ -1,7 +1,9 @@ -import { desktopReducer } from '../index'; -import * as SUITE from 'src/actions/suite/constants/suiteConstants'; import type { HandshakeElectron } from '@trezor/suite-desktop-api'; +import * as SUITE from 'src/actions/suite/constants/suiteConstants'; + +import { desktopReducer } from '../index'; + const handshakePayload: HandshakeElectron = { paths: { binDir: 'a', diff --git a/packages/suite/src/reducers/onboarding/onboardingReducer.ts b/packages/suite/src/reducers/onboarding/onboardingReducer.ts index 09bd6bb83f0..1afdebcbc59 100644 --- a/packages/suite/src/reducers/onboarding/onboardingReducer.ts +++ b/packages/suite/src/reducers/onboarding/onboardingReducer.ts @@ -1,11 +1,11 @@ import produce from 'immer'; + import { DEVICE } from '@trezor/connect'; import { OnboardingAnalytics } from '@trezor/suite-analytics'; import { ONBOARDING } from 'src/actions/onboarding/constants'; import * as STEP from 'src/constants/onboarding/steps'; import { Action, TrezorDevice } from 'src/types/suite'; - import type { AnyStepId, AnyPath } from 'src/types/onboarding'; export interface OnboardingRootState { diff --git a/packages/suite/src/reducers/recovery/recoveryReducer.ts b/packages/suite/src/reducers/recovery/recoveryReducer.ts index 50b0ac17f91..79329b57acd 100644 --- a/packages/suite/src/reducers/recovery/recoveryReducer.ts +++ b/packages/suite/src/reducers/recovery/recoveryReducer.ts @@ -1,4 +1,5 @@ import produce from 'immer'; + import { RECOVERY } from 'src/actions/recovery/constants'; import { Action } from 'src/types/suite'; import { WordCount } from 'src/types/recovery'; diff --git a/packages/suite/src/reducers/store.ts b/packages/suite/src/reducers/store.ts index 414d10a1199..564b801303a 100644 --- a/packages/suite/src/reducers/store.ts +++ b/packages/suite/src/reducers/store.ts @@ -8,6 +8,7 @@ import { prepareFirmwareReducer } from '@suite-common/wallet-core'; import { addLog } from '@suite-common/logger'; import { isCodesignBuild } from '@trezor/env-utils'; import { mergeDeepObject } from '@trezor/utils'; +import { prepareTokenDefinitionsReducer } from '@suite-common/token-definitions'; import suiteMiddlewares from 'src/middlewares/suite'; import walletMiddlewares from 'src/middlewares/wallet'; @@ -27,7 +28,6 @@ import type { PreloadStoreAction } from 'src/support/suite/preloadStore'; import { desktopReducer } from './desktop'; import { extraDependencies } from '../support/extraDependencies'; -import { prepareTokenDefinitionsReducer } from '@suite-common/token-definitions'; const firmwareReducer = prepareFirmwareReducer(extraDependencies); const tokenDefinitionsReducer = prepareTokenDefinitionsReducer(extraDependencies); diff --git a/packages/suite/src/reducers/suite/__tests__/desktopUpdateReducer.test.ts b/packages/suite/src/reducers/suite/__tests__/desktopUpdateReducer.test.ts index 09eb7f4c47a..53c5ab19325 100644 --- a/packages/suite/src/reducers/suite/__tests__/desktopUpdateReducer.test.ts +++ b/packages/suite/src/reducers/suite/__tests__/desktopUpdateReducer.test.ts @@ -1,7 +1,8 @@ -import desktopUpdateReducer, { DesktopUpdateState, UpdateState } from '../desktopUpdateReducer'; import { DESKTOP_UPDATE, SUITE } from 'src/actions/suite/constants'; import type { Action } from 'src/types/suite'; +import desktopUpdateReducer, { DesktopUpdateState, UpdateState } from '../desktopUpdateReducer'; + const createUpdateInfo = (salt: string) => ({ releaseDate: `releaseDate-${salt}`, version: `version-${salt}`, diff --git a/packages/suite/src/reducers/suite/__tests__/modalReducer.test.ts b/packages/suite/src/reducers/suite/__tests__/modalReducer.test.ts index 646bcecebc8..2dddeed9bbd 100644 --- a/packages/suite/src/reducers/suite/__tests__/modalReducer.test.ts +++ b/packages/suite/src/reducers/suite/__tests__/modalReducer.test.ts @@ -1,5 +1,6 @@ -import modalReducer, { State } from '../modalReducer'; import { Action } from 'src/types/suite'; + +import modalReducer, { State } from '../modalReducer'; import fixtures from '../__fixtures__/modalReducer'; describe('modalReducer', () => { diff --git a/packages/suite/src/reducers/suite/__tests__/protocolReducer.test.ts b/packages/suite/src/reducers/suite/__tests__/protocolReducer.test.ts index 71a5bf85d17..14b6ba6c29a 100644 --- a/packages/suite/src/reducers/suite/__tests__/protocolReducer.test.ts +++ b/packages/suite/src/reducers/suite/__tests__/protocolReducer.test.ts @@ -1,7 +1,8 @@ +import type { Action } from 'src/types/suite'; + import protocolReducer, { State } from '../protocolReducer'; import fixtures from '../__fixtures__/protocolReducer'; -import type { Action } from 'src/types/suite'; describe('Protocol reducer', () => { fixtures.forEach(f => { diff --git a/packages/suite/src/reducers/suite/desktopUpdateReducer.ts b/packages/suite/src/reducers/suite/desktopUpdateReducer.ts index 9e7f63a05e1..ccd6cea4712 100644 --- a/packages/suite/src/reducers/suite/desktopUpdateReducer.ts +++ b/packages/suite/src/reducers/suite/desktopUpdateReducer.ts @@ -1,8 +1,10 @@ import produce from 'immer'; + import { UpdateInfo, UpdateProgress } from '@trezor/suite-desktop-api'; +import { DesktopAppUpdateState as UpdateState } from '@suite-common/suite-constants'; + import { DESKTOP_UPDATE, SUITE } from 'src/actions/suite/constants'; import { Action } from 'src/types/suite'; -import { DesktopAppUpdateState as UpdateState } from '@suite-common/suite-constants'; export { DesktopAppUpdateState as UpdateState } from '@suite-common/suite-constants'; diff --git a/packages/suite/src/reducers/suite/guideReducer.ts b/packages/suite/src/reducers/suite/guideReducer.ts index 73761a602fb..d612d08544b 100644 --- a/packages/suite/src/reducers/suite/guideReducer.ts +++ b/packages/suite/src/reducers/suite/guideReducer.ts @@ -1,9 +1,11 @@ import produce from 'immer'; -import { Action } from 'src/types/suite'; -import { GUIDE } from 'src/actions/suite/constants'; + import type { ActiveView, GuideCategory, GuideNode } from '@suite-common/suite-types'; import * as indexNodeJSON from '@trezor/suite-data/files/guide/index.json'; +import { Action } from 'src/types/suite'; +import { GUIDE } from 'src/actions/suite/constants'; + export interface State { open: boolean; view: ActiveView; diff --git a/packages/suite/src/reducers/suite/metadataReducer.ts b/packages/suite/src/reducers/suite/metadataReducer.ts index 478bc7ead58..14870a0026a 100644 --- a/packages/suite/src/reducers/suite/metadataReducer.ts +++ b/packages/suite/src/reducers/suite/metadataReducer.ts @@ -10,6 +10,8 @@ import { deviceActions, selectDeviceByStaticSessionId, } from '@suite-common/wallet-core'; +import { AccountKey } from '@suite-common/wallet-types'; +import { DeviceState, StaticSessionId } from '@trezor/connect'; import { STORAGE, @@ -31,8 +33,6 @@ import { } from 'src/actions/suite/constants/metadataLabelingConstants'; import { SuiteRootState } from './suiteReducer'; -import { AccountKey } from '@suite-common/wallet-types'; -import { DeviceState, StaticSessionId } from '@trezor/connect'; export const initialState: MetadataState = { // is Suite trying to load metadata (get master key -> sync cloud)? diff --git a/packages/suite/src/reducers/suite/protocolReducer.ts b/packages/suite/src/reducers/suite/protocolReducer.ts index 2b85183463f..820bde59348 100644 --- a/packages/suite/src/reducers/suite/protocolReducer.ts +++ b/packages/suite/src/reducers/suite/protocolReducer.ts @@ -1,7 +1,9 @@ import produce from 'immer'; + +import type { Protocol } from '@suite-common/suite-constants'; + import { PROTOCOL } from 'src/actions/suite/constants'; import type { Action } from 'src/types/suite'; -import type { Protocol } from '@suite-common/suite-constants'; export interface SendFormState { scheme: Protocol; diff --git a/packages/suite/src/reducers/suite/resizeReducer.ts b/packages/suite/src/reducers/suite/resizeReducer.ts index 8c375e563af..2a0e65a189c 100644 --- a/packages/suite/src/reducers/suite/resizeReducer.ts +++ b/packages/suite/src/reducers/suite/resizeReducer.ts @@ -1,7 +1,9 @@ import produce from 'immer'; + import * as variables from '@trezor/components/src/config/variables'; // can't import from index cause it would import all UI components -import { RESIZE } from 'src/actions/suite/constants'; import { getNumberFromPixelString } from '@trezor/utils'; + +import { RESIZE } from 'src/actions/suite/constants'; import { Action } from 'src/types/suite'; const sizes = { diff --git a/packages/suite/src/reducers/suite/suiteReducer.ts b/packages/suite/src/reducers/suite/suiteReducer.ts index 9d0999c3e8c..822bd89b648 100644 --- a/packages/suite/src/reducers/suite/suiteReducer.ts +++ b/packages/suite/src/reducers/suite/suiteReducer.ts @@ -7,6 +7,9 @@ import { discoveryActions, DeviceRootState, selectDevice } from '@suite-common/w import { isArrayMember, versionUtils } from '@trezor/utils'; import { isWeb } from '@trezor/env-utils'; import { TRANSPORT, TransportInfo, ConnectSettings } from '@trezor/connect'; +import { NetworkSymbol } from '@suite-common/wallet-config'; +import { SuiteThemeVariant } from '@trezor/suite-desktop-api'; +import { AddressDisplayOptions, WalletType } from '@suite-common/wallet-types'; import { getIsTorEnabled, getIsTorLoading } from 'src/utils/suite/tor'; import type { OAuthServerEnvironment } from 'src/types/suite/metadata'; @@ -16,13 +19,11 @@ import { SUITE, STORAGE } from 'src/actions/suite/constants'; import { ExperimentalFeature } from 'src/constants/suite/experimental'; import { Action, AppState, Lock, TorBootstrap, TorStatus } from 'src/types/suite'; import { getExcludedPrerequisites, getPrerequisiteName } from 'src/utils/suite/prerequisites'; -import { RouterRootState, selectRouter } from './routerReducer'; -import { NetworkSymbol } from '@suite-common/wallet-config'; -import { SuiteThemeVariant } from '@trezor/suite-desktop-api'; -import { AddressDisplayOptions, WalletType } from '@suite-common/wallet-types'; import { SIDEBAR_WIDTH_NUMERIC } from 'src/constants/suite/layout'; import { skippedHashCheckErrors, skippedRevisionCheckErrors } from 'src/constants/suite/firmware'; +import { RouterRootState, selectRouter } from './routerReducer'; + export interface SuiteRootState { suite: SuiteState; } diff --git a/packages/suite/src/reducers/wallet/__fixtures__/coinjoinReducer.ts b/packages/suite/src/reducers/wallet/__fixtures__/coinjoinReducer.ts index c76a82dbe64..6f069b8a59b 100644 --- a/packages/suite/src/reducers/wallet/__fixtures__/coinjoinReducer.ts +++ b/packages/suite/src/reducers/wallet/__fixtures__/coinjoinReducer.ts @@ -1,4 +1,5 @@ import { SessionPhase } from '@trezor/coinjoin'; + import { COINJOIN } from 'src/actions/wallet/constants'; import { initialState } from 'src/reducers/wallet/coinjoinReducer'; diff --git a/packages/suite/src/reducers/wallet/__tests__/coinjoinReducer.test.ts b/packages/suite/src/reducers/wallet/__tests__/coinjoinReducer.test.ts index eb2923dd4b9..614bac25e52 100644 --- a/packages/suite/src/reducers/wallet/__tests__/coinjoinReducer.test.ts +++ b/packages/suite/src/reducers/wallet/__tests__/coinjoinReducer.test.ts @@ -1,3 +1,5 @@ +import type { Action } from 'src/types/suite'; + import { coinjoinReducer, CoinjoinState, @@ -6,7 +8,6 @@ import { } from '../coinjoinReducer'; import { actionFixtures, selectorFixtures } from '../__fixtures__/coinjoinReducer'; -import type { Action } from 'src/types/suite'; describe('Coinjoin reducer actions', () => { actionFixtures.forEach(f => { diff --git a/packages/suite/src/reducers/wallet/__tests__/coinmarketReducer.test.ts b/packages/suite/src/reducers/wallet/__tests__/coinmarketReducer.test.ts index e57f0606ed9..7327bbe6de8 100644 --- a/packages/suite/src/reducers/wallet/__tests__/coinmarketReducer.test.ts +++ b/packages/suite/src/reducers/wallet/__tests__/coinmarketReducer.test.ts @@ -1,3 +1,11 @@ +import { + BuyTradeQuoteRequest, + CryptoId, + ExchangeTradeQuoteRequest, + InfoResponse, + SellFiatTradeQuoteRequest, +} from 'invity-api'; + import { coinmarketReducer, initialState } from 'src/reducers/wallet/coinmarketReducer'; import { TradeBuy, TradeExchange } from 'src/types/wallet/coinmarketCommonTypes'; import { STORAGE } from 'src/actions/suite/constants'; @@ -8,13 +16,6 @@ import { COINMARKET_INFO, COINMARKET_SELL, } from 'src/actions/wallet/constants'; -import { - BuyTradeQuoteRequest, - CryptoId, - ExchangeTradeQuoteRequest, - InfoResponse, - SellFiatTradeQuoteRequest, -} from 'invity-api'; import { BuyInfo } from 'src/actions/wallet/coinmarketBuyActions'; import { ExchangeInfo } from 'src/actions/wallet/coinmarketExchangeActions'; import { diff --git a/packages/suite/src/reducers/wallet/__tests__/sendFormReducer.test.ts b/packages/suite/src/reducers/wallet/__tests__/sendFormReducer.test.ts index 627ec65b3f3..9eb2adeac3e 100644 --- a/packages/suite/src/reducers/wallet/__tests__/sendFormReducer.test.ts +++ b/packages/suite/src/reducers/wallet/__tests__/sendFormReducer.test.ts @@ -1,5 +1,3 @@ -import { STORAGE } from 'src/actions/suite/constants'; -import { Action } from 'src/types/suite'; import { FormState, PrecomposedTransactionFinal, Account } from '@suite-common/wallet-types'; import { SerializedTx, @@ -9,6 +7,8 @@ import { sendFormActions, } from '@suite-common/wallet-core'; +import { STORAGE } from 'src/actions/suite/constants'; +import { Action } from 'src/types/suite'; import { PreloadStoreAction } from 'src/support/suite/preloadStore'; import { extraDependencies } from 'src/support/extraDependencies'; diff --git a/packages/suite/src/reducers/wallet/__tests__/transactionReducer.test.ts b/packages/suite/src/reducers/wallet/__tests__/transactionReducer.test.ts index bc9b4d221a3..bebbba28963 100644 --- a/packages/suite/src/reducers/wallet/__tests__/transactionReducer.test.ts +++ b/packages/suite/src/reducers/wallet/__tests__/transactionReducer.test.ts @@ -1,10 +1,12 @@ -import { extraDependencies } from 'src/support/extraDependencies'; import { transactionsInitialState, transactionsActions, prepareTransactionsReducer, fetchTransactionsPageThunk, } from '@suite-common/wallet-core'; + +import { extraDependencies } from 'src/support/extraDependencies'; + import { transactions, accounts } from '../__fixtures__/transactionConstants'; const reducer = prepareTransactionsReducer(extraDependencies); diff --git a/packages/suite/src/reducers/wallet/cardanoStakingReducer.ts b/packages/suite/src/reducers/wallet/cardanoStakingReducer.ts index d3fabca3e08..921aede68e8 100644 --- a/packages/suite/src/reducers/wallet/cardanoStakingReducer.ts +++ b/packages/suite/src/reducers/wallet/cardanoStakingReducer.ts @@ -1,8 +1,10 @@ import produce from 'immer'; + +import { BigNumber } from '@trezor/utils/src/bigNumber'; + import { CARDANO_STAKING } from 'src/actions/wallet/constants'; import { WalletAction } from 'src/types/wallet'; import { CardanoNetwork, PendingStakeTx, PoolsResponse } from 'src/types/wallet/cardanoStaking'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; export interface State { pendingTx: PendingStakeTx[]; diff --git a/packages/suite/src/reducers/wallet/coinjoinReducer.ts b/packages/suite/src/reducers/wallet/coinjoinReducer.ts index f11c3ecb848..619211a0390 100644 --- a/packages/suite/src/reducers/wallet/coinjoinReducer.ts +++ b/packages/suite/src/reducers/wallet/coinjoinReducer.ts @@ -1,7 +1,7 @@ import produce from 'immer'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; import { memoizeWithArgs } from 'proxy-memoize'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { getInputSize, getOutputSize, RoundPhase } from '@trezor/coinjoin'; import { PartialRecord } from '@trezor/type-utils'; import { Account, AccountKey } from '@suite-common/wallet-types'; @@ -58,6 +58,7 @@ import { ZKSNACKS_LEGAL_DOCUMENTS_VERSION, TREZOR_LEGAL_DOCUMENTS_VERSION, } from 'src/services/coinjoin'; + import { SelectedAccountRootState, selectSelectedAccount } from './selectedAccountReducer'; export interface CoinjoinState { diff --git a/packages/suite/src/reducers/wallet/coinmarketReducer.ts b/packages/suite/src/reducers/wallet/coinmarketReducer.ts index 3c96b1fbe0d..8c94f357ace 100644 --- a/packages/suite/src/reducers/wallet/coinmarketReducer.ts +++ b/packages/suite/src/reducers/wallet/coinmarketReducer.ts @@ -1,7 +1,4 @@ import produce from 'immer'; -import type { WalletAction, Account } from 'src/types/wallet'; -import type { PrecomposedTransactionFinal } from '@suite-common/wallet-types'; - import type { BuyTrade, BuyTradeQuoteRequest, @@ -13,6 +10,11 @@ import type { CryptoId, Platforms, } from 'invity-api'; + +import type { PrecomposedTransactionFinal } from '@suite-common/wallet-types'; +import type { FeeLevel } from '@trezor/connect'; + +import type { WalletAction, Account } from 'src/types/wallet'; import type { BuyInfo } from 'src/actions/wallet/coinmarketBuyActions'; import type { ExchangeInfo } from 'src/actions/wallet/coinmarketExchangeActions'; import { @@ -25,7 +27,6 @@ import { import { STORAGE } from 'src/actions/suite/constants'; import type { Action as SuiteAction } from 'src/types/suite'; import type { SellInfo } from 'src/actions/wallet/coinmarketSellActions'; -import type { FeeLevel } from '@trezor/connect'; import type { Trade } from 'src/types/wallet/coinmarketCommonTypes'; import { CoinmarketPaymentMethodListProps, diff --git a/packages/suite/src/reducers/wallet/formDraftReducer.ts b/packages/suite/src/reducers/wallet/formDraftReducer.ts index a83af453edb..51d636405a4 100644 --- a/packages/suite/src/reducers/wallet/formDraftReducer.ts +++ b/packages/suite/src/reducers/wallet/formDraftReducer.ts @@ -1,6 +1,7 @@ -import produce from 'immer'; import { FieldValues } from 'react-hook-form'; +import produce from 'immer'; + import { FORM_DRAFT } from 'src/actions/wallet/constants'; import { Action } from 'src/types/suite'; import { STORAGE } from 'src/actions/suite/constants'; diff --git a/packages/suite/src/reducers/wallet/graphReducer.ts b/packages/suite/src/reducers/wallet/graphReducer.ts index 10a01bd67b8..bdc2a263e1a 100644 --- a/packages/suite/src/reducers/wallet/graphReducer.ts +++ b/packages/suite/src/reducers/wallet/graphReducer.ts @@ -1,11 +1,12 @@ import produce from 'immer'; + +import { accountsActions } from '@suite-common/wallet-core'; + import { GRAPH } from 'src/actions/wallet/constants'; import { STORAGE } from 'src/actions/suite/constants'; import { WalletAction, Account } from 'src/types/wallet'; import { Action as SuiteAction } from 'src/types/suite'; import { SETTINGS } from 'src/config/suite'; - -import { accountsActions } from '@suite-common/wallet-core'; import { GraphData, AccountIdentifier, GraphRange, GraphScale } from 'src/types/wallet/graph'; export interface State { diff --git a/packages/suite/src/reducers/wallet/receiveReducer.ts b/packages/suite/src/reducers/wallet/receiveReducer.ts index 57eefa8a270..aa67a486273 100644 --- a/packages/suite/src/reducers/wallet/receiveReducer.ts +++ b/packages/suite/src/reducers/wallet/receiveReducer.ts @@ -1,8 +1,10 @@ import produce from 'immer'; + +import { ReceiveInfo } from '@suite-common/wallet-types'; + import { RECEIVE } from 'src/actions/wallet/constants'; import { Action as SuiteAction } from 'src/types/suite'; -import { ReceiveInfo } from '@suite-common/wallet-types'; export type State = ReceiveInfo[]; diff --git a/packages/suite/src/reducers/wallet/selectedAccountReducer.ts b/packages/suite/src/reducers/wallet/selectedAccountReducer.ts index 06489822413..dddf53ff897 100644 --- a/packages/suite/src/reducers/wallet/selectedAccountReducer.ts +++ b/packages/suite/src/reducers/wallet/selectedAccountReducer.ts @@ -1,7 +1,8 @@ import { accountsActions } from '@suite-common/wallet-core'; import { MIN_ETH_BALANCE_FOR_STAKING } from '@suite-common/wallet-constants'; -import type { Action } from 'src/types/suite'; import type { SelectedAccountStatus } from '@suite-common/wallet-types'; + +import type { Action } from 'src/types/suite'; import { State as CoinmarketState } from 'src/reducers/wallet/coinmarketReducer'; export type State = SelectedAccountStatus; diff --git a/packages/suite/src/reducers/wallet/settingsReducer.ts b/packages/suite/src/reducers/wallet/settingsReducer.ts index 4f27b62b963..a2a9c57fa80 100644 --- a/packages/suite/src/reducers/wallet/settingsReducer.ts +++ b/packages/suite/src/reducers/wallet/settingsReducer.ts @@ -1,11 +1,13 @@ import produce from 'immer'; + +import { WalletSettings } from '@suite-common/wallet-types'; +import { PROTO } from '@trezor/connect'; + import { STORAGE } from 'src/actions/suite/constants'; import { WALLET_SETTINGS } from 'src/actions/settings/constants'; import * as walletSettingsActions from 'src/actions/settings/walletSettingsActions'; import { Action, AppState } from 'src/types/suite'; -import { WalletSettings } from '@suite-common/wallet-types'; -import { PROTO } from '@trezor/connect'; export type State = WalletSettings; diff --git a/packages/suite/src/services/coinjoin/coinjoinService.ts b/packages/suite/src/services/coinjoin/coinjoinService.ts index 734f5a1aaff..3a814bd32f2 100644 --- a/packages/suite/src/services/coinjoin/coinjoinService.ts +++ b/packages/suite/src/services/coinjoin/coinjoinService.ts @@ -3,6 +3,7 @@ import { createIpcProxy } from '@trezor/ipc-proxy'; import { PartialRecord } from '@trezor/type-utils'; import { isDesktop } from '@trezor/env-utils'; import { NetworkSymbol } from '@suite-common/wallet-config'; + import { CoinjoinNetworksConfig, getCoinjoinConfig } from './config'; const loadInstance = (settings: ReturnType) => { diff --git a/packages/suite/src/services/coinjoin/config.ts b/packages/suite/src/services/coinjoin/config.ts index 4a47aba2137..15e2aa7efae 100644 --- a/packages/suite/src/services/coinjoin/config.ts +++ b/packages/suite/src/services/coinjoin/config.ts @@ -6,9 +6,10 @@ import { } from '@trezor/coinjoin/src/constants'; import type { CoinjoinBackendSettings, CoinjoinClientSettings } from '@trezor/coinjoin'; import type { PartialRecord } from '@trezor/type-utils'; -import type { CoinjoinServerEnvironment } from 'src/types/wallet/coinjoin'; import type { NetworkSymbol } from '@suite-common/wallet-config'; +import type { CoinjoinServerEnvironment } from 'src/types/wallet/coinjoin'; + export type CoinjoinNetworksConfig = CoinjoinBackendSettings & CoinjoinClientSettings & { blockbookUrls: string[] }; diff --git a/packages/suite/src/services/github.ts b/packages/suite/src/services/github.ts index 5cee99d8de6..620c7f153f1 100644 --- a/packages/suite/src/services/github.ts +++ b/packages/suite/src/services/github.ts @@ -1,5 +1,4 @@ import { getFirmwareVersion } from '@trezor/device-utils'; - import { getCommitHash, getScreenHeight, @@ -8,10 +7,11 @@ import { getUserAgent, isDesktop, } from '@trezor/env-utils'; -import type { TrezorDevice } from 'src/types/suite'; import type { TransportInfo } from '@trezor/connect'; import { GITHUB_REPO_URL } from '@trezor/urls'; +import type { TrezorDevice } from 'src/types/suite'; + type DebugInfo = { device?: TrezorDevice; transport?: Partial; diff --git a/packages/suite/src/services/google.ts b/packages/suite/src/services/google.ts index 93975f9dd7b..14080733065 100644 --- a/packages/suite/src/services/google.ts +++ b/packages/suite/src/services/google.ts @@ -6,8 +6,9 @@ * in case our authorization server (which holds a client secret necessary for the authorization code flow) is not available. */ -import { METADATA_PROVIDER } from 'src/actions/suite/constants'; import { isDesktop } from '@trezor/env-utils'; + +import { METADATA_PROVIDER } from 'src/actions/suite/constants'; import { OAuthServerEnvironment, Tokens } from 'src/types/suite/metadata'; import { extractCredentialsFromAuthorizationFlow, diff --git a/packages/suite/src/services/suite/invityAPI.ts b/packages/suite/src/services/suite/invityAPI.ts index 7598a0c1634..806a0f99e25 100644 --- a/packages/suite/src/services/suite/invityAPI.ts +++ b/packages/suite/src/services/suite/invityAPI.ts @@ -23,8 +23,10 @@ import { SellFiatTradeResponse, InfoResponse, } from 'invity-api'; + import { getSuiteVersion, isDesktop } from '@trezor/env-utils'; import type { InvityServerEnvironment, InvityServers } from '@suite-common/invity'; + import { CoinmarketPaymentMethodType, CoinmarketTradeDetailType, diff --git a/packages/suite/src/services/suite/metadata/DropboxProvider.ts b/packages/suite/src/services/suite/metadata/DropboxProvider.ts index faa9979bec8..60f2eaa124a 100644 --- a/packages/suite/src/services/suite/metadata/DropboxProvider.ts +++ b/packages/suite/src/services/suite/metadata/DropboxProvider.ts @@ -1,12 +1,14 @@ import { Dropbox, DropboxAuth } from 'dropbox'; import type { users } from 'dropbox'; + +import { getWeakRandomId } from '@trezor/utils'; + import { AbstractMetadataProvider } from 'src/types/suite/metadata'; import { extractCredentialsFromAuthorizationFlow, getOauthReceiverUrl, } from 'src/utils/suite/oauth'; -import { getWeakRandomId } from '@trezor/utils'; // Dropbox messed up types, that's why @ts-expect-error occurs in this file diff --git a/packages/suite/src/services/suite/metadata/FileSystemProvider.ts b/packages/suite/src/services/suite/metadata/FileSystemProvider.ts index f0bb16cbb71..9943113c7c7 100644 --- a/packages/suite/src/services/suite/metadata/FileSystemProvider.ts +++ b/packages/suite/src/services/suite/metadata/FileSystemProvider.ts @@ -1,4 +1,5 @@ import { desktopApi } from '@trezor/suite-desktop-api'; + import { AbstractMetadataProvider } from 'src/types/suite/metadata'; class FileSystemProvider extends AbstractMetadataProvider { diff --git a/packages/suite/src/storage/definitions.ts b/packages/suite/src/storage/definitions.ts index c483f6a0b19..f4a1c6a63d4 100644 --- a/packages/suite/src/storage/definitions.ts +++ b/packages/suite/src/storage/definitions.ts @@ -1,25 +1,28 @@ -import type { DBSchema } from 'idb'; import { FieldValues } from 'react-hook-form'; -import type { SuiteState } from 'src/reducers/suite/suiteReducer'; +import type { DBSchema } from 'idb'; + import type { FormState, RatesByTimestamps, BackendSettings, WalletSettings, } from '@suite-common/wallet-types'; -import type { MetadataState } from 'src/types/suite/metadata'; -import type { Trade } from 'src/types/wallet/coinmarketCommonTypes'; import type { MessageState } from '@suite-common/message-system'; import type { DeviceWithEmptyPath, MessageSystem } from '@suite-common/suite-types'; -import type { Account, Discovery, WalletAccountTransaction } from 'src/types/wallet'; import { NetworkSymbol } from '@suite-common/wallet-config'; -import type { CoinjoinAccount, CoinjoinDebugSettings } from 'src/types/wallet/coinjoin'; import type { StorageUpdateMessage } from '@trezor/suite-storage'; import { AnalyticsState } from '@suite-common/analytics'; -import { GraphData } from '../types/wallet/graph'; import { SimpleTokenStructure } from '@suite-common/token-definitions'; +import type { CoinjoinAccount, CoinjoinDebugSettings } from 'src/types/wallet/coinjoin'; +import type { Account, Discovery, WalletAccountTransaction } from 'src/types/wallet'; +import type { Trade } from 'src/types/wallet/coinmarketCommonTypes'; +import type { MetadataState } from 'src/types/suite/metadata'; +import type { SuiteState } from 'src/reducers/suite/suiteReducer'; + +import { GraphData } from '../types/wallet/graph'; + export interface DBWalletAccountTransaction { tx: WalletAccountTransaction; order: number; diff --git a/packages/suite/src/storage/index.ts b/packages/suite/src/storage/index.ts index 657547fad2e..43e9c632f45 100644 --- a/packages/suite/src/storage/index.ts +++ b/packages/suite/src/storage/index.ts @@ -1,7 +1,8 @@ import SuiteDB, { OnUpgradeFunc } from '@trezor/suite-storage'; + import { reloadApp } from 'src/utils/suite/reload'; -import { migrate } from './migrations'; +import { migrate } from './migrations'; import type { SuiteDBSchema } from './definitions'; const VERSION = 48; // don't forget to add migration and CHANGELOG when changing versions! diff --git a/packages/suite/src/storage/migrations/index.ts b/packages/suite/src/storage/migrations/index.ts index 1b9ce53d671..3b0691abba8 100644 --- a/packages/suite/src/storage/migrations/index.ts +++ b/packages/suite/src/storage/migrations/index.ts @@ -1,22 +1,24 @@ -import { BigNumber } from '@trezor/utils/src/bigNumber'; import { toWei } from 'web3-utils'; + +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { isDesktop } from '@trezor/env-utils'; -import type { State } from 'src/reducers/wallet/settingsReducer'; -import type { CustomBackend, BlockbookUrl } from 'src/types/wallet/backend'; import { NetworkSymbol } from '@suite-common/wallet-config'; - import type { BackendSettings } from '@suite-common/wallet-types'; import type { OnUpgradeFunc } from '@trezor/suite-storage'; -import type { DBWalletAccountTransaction, SuiteDBSchema } from '../definitions'; import { formatNetworkAmount, networkAmountToSmallestUnit, amountToSmallestUnit, } from '@suite-common/wallet-utils'; -import { updateAll } from './utils'; import { DeviceModelInternal, FirmwareType } from '@trezor/connect'; import { parseAsset } from '@trezor/blockchain-link-utils/src/blockfrost'; +import type { CustomBackend, BlockbookUrl } from 'src/types/wallet/backend'; +import type { State } from 'src/reducers/wallet/settingsReducer'; + +import { updateAll } from './utils'; +import type { DBWalletAccountTransaction, SuiteDBSchema } from '../definitions'; + type WalletWithBackends = { backends?: Partial<{ [coin in NetworkSymbol]: Omit; diff --git a/packages/suite/src/storage/migrations/utils.ts b/packages/suite/src/storage/migrations/utils.ts index e2d1bbb7eb0..1a9b9805d50 100644 --- a/packages/suite/src/storage/migrations/utils.ts +++ b/packages/suite/src/storage/migrations/utils.ts @@ -1,4 +1,5 @@ import type { StoreNames, StoreValue, IDBPTransaction } from 'idb'; + import type { SuiteDBSchema } from '../definitions'; /** diff --git a/packages/suite/src/support/extraDependencies.ts b/packages/suite/src/support/extraDependencies.ts index bd53f6fc915..b9ad8fb7d65 100644 --- a/packages/suite/src/support/extraDependencies.ts +++ b/packages/suite/src/support/extraDependencies.ts @@ -15,11 +15,17 @@ import { } from '@suite-common/wallet-core'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { ExtraDependencies } from '@suite-common/redux-utils'; +import { PROTO, StaticSessionId } from '@trezor/connect'; +import { + TokenDefinitionsState, + buildTokenDefinitionsFromStorage, +} from '@suite-common/token-definitions'; +import { isDesktop } from '@trezor/env-utils'; + import { findLabelsToBeMovedOrDeleted, moveLabelsForRbfAction, } from 'src/actions/wallet/moveLabelsForRbfActions'; - import { StorageLoadAction } from 'src/actions/suite/storageActions'; import * as metadataLabelingActions from 'src/actions/suite/metadataLabelingActions'; import * as metadataActions from 'src/actions/suite/metadataActions'; @@ -27,18 +33,14 @@ import * as cardanoStakingActions from 'src/actions/wallet/cardanoStakingActions import * as walletSettingsActions from 'src/actions/settings/walletSettingsActions'; import { fixLoadedCoinjoinAccount } from 'src/utils/wallet/coinjoinUtils'; import * as modalActions from 'src/actions/suite/modalActions'; +import { addWalletThunk, openSwitchDeviceDialog } from 'src/actions/wallet/addWalletThunk'; import * as suiteActions from '../actions/suite/suiteActions'; import { AppState, ButtonRequest, TrezorDevice } from '../types/suite'; import { METADATA, STORAGE } from '../actions/suite/constants'; -import { PROTO, StaticSessionId } from '@trezor/connect'; -import { - TokenDefinitionsState, - buildTokenDefinitionsFromStorage, -} from '@suite-common/token-definitions'; import { selectSuiteSettings } from '../reducers/suite/suiteReducer'; -import { addWalletThunk, openSwitchDeviceDialog } from 'src/actions/wallet/addWalletThunk'; -import { isDesktop } from '@trezor/env-utils'; + + const connectSrc = resolveStaticPath('connect/'); // 'https://localhost:8088/'; diff --git a/packages/suite/src/support/suite/Autodetect.tsx b/packages/suite/src/support/suite/Autodetect.tsx index 685975fbe80..f1f2b4c77cc 100644 --- a/packages/suite/src/support/suite/Autodetect.tsx +++ b/packages/suite/src/support/suite/Autodetect.tsx @@ -1,4 +1,5 @@ import { useEffect } from 'react'; + import { getOsTheme, watchOsTheme } from 'src/utils/suite/env'; import { getOsLocale, watchOsLocale } from 'src/utils/suite/l10n'; import { useActions, useSelector } from 'src/hooks/suite'; diff --git a/packages/suite/src/support/suite/ConnectedIntlProvider.tsx b/packages/suite/src/support/suite/ConnectedIntlProvider.tsx index 64a78adc13f..192d5450c66 100644 --- a/packages/suite/src/support/suite/ConnectedIntlProvider.tsx +++ b/packages/suite/src/support/suite/ConnectedIntlProvider.tsx @@ -1,8 +1,10 @@ import { useState, useEffect, ReactNode } from 'react'; import { IntlProvider } from 'react-intl'; + import enMessages from '@trezor/suite-data/files/translations/en.json'; -import { useSelector } from 'src/hooks/suite/useSelector'; import { isDevEnv } from '@suite-common/suite-utils'; + +import { useSelector } from 'src/hooks/suite/useSelector'; import type { Locale } from 'src/config/suite/languages'; const useFetchMessages = (locale: Locale) => { diff --git a/packages/suite/src/support/suite/ConnectedThemeProvider.tsx b/packages/suite/src/support/suite/ConnectedThemeProvider.tsx index a8ee93434a1..898e7fbf770 100644 --- a/packages/suite/src/support/suite/ConnectedThemeProvider.tsx +++ b/packages/suite/src/support/suite/ConnectedThemeProvider.tsx @@ -1,5 +1,7 @@ import { ReactNode } from 'react'; + import { useSelector } from 'src/hooks/suite'; + import { ThemeProvider } from './ThemeProvider'; interface ConnectedThemeProviderProps { diff --git a/packages/suite/src/support/suite/ErrorBoundary.tsx b/packages/suite/src/support/suite/ErrorBoundary.tsx index d67ba55eab2..64ca69565f3 100644 --- a/packages/suite/src/support/suite/ErrorBoundary.tsx +++ b/packages/suite/src/support/suite/ErrorBoundary.tsx @@ -1,6 +1,8 @@ import { Component, ErrorInfo } from 'react'; import { connect, ConnectedComponent } from 'react-redux'; + import { bindActionCreators, Dispatch } from 'redux'; + import { Error } from 'src/components/suite/Error'; import { reportToSentry } from 'src/utils/suite/sentry'; diff --git a/packages/suite/src/support/suite/OnlineStatus.tsx b/packages/suite/src/support/suite/OnlineStatus.tsx index d436b728860..c45ea7b9efc 100644 --- a/packages/suite/src/support/suite/OnlineStatus.tsx +++ b/packages/suite/src/support/suite/OnlineStatus.tsx @@ -1,4 +1,5 @@ import { useEffect } from 'react'; + import { useDispatch } from 'src/hooks/suite'; import { updateOnlineStatus } from 'src/actions/suite/suiteActions'; diff --git a/packages/suite/src/support/suite/Protocol.tsx b/packages/suite/src/support/suite/Protocol.tsx index c879f910944..7522ac8ef38 100644 --- a/packages/suite/src/support/suite/Protocol.tsx +++ b/packages/suite/src/support/suite/Protocol.tsx @@ -1,8 +1,9 @@ import { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; -import { desktopApi } from '@trezor/suite-desktop-api'; +import { desktopApi } from '@trezor/suite-desktop-api'; import { isWeb, isDesktop } from '@trezor/env-utils'; + import { useActions } from 'src/hooks/suite'; import * as protocolActions from 'src/actions/suite/protocolActions'; diff --git a/packages/suite/src/support/suite/Resize.tsx b/packages/suite/src/support/suite/Resize.tsx index bae17e84ea6..c7ba88ff0e2 100644 --- a/packages/suite/src/support/suite/Resize.tsx +++ b/packages/suite/src/support/suite/Resize.tsx @@ -1,5 +1,7 @@ import { useEffect, useState } from 'react'; + import useDebounce from 'react-use/lib/useDebounce'; + import { useDispatch } from 'src/hooks/suite'; import { updateWindowSize } from 'src/actions/suite/resizeActions'; diff --git a/packages/suite/src/support/suite/Router.tsx b/packages/suite/src/support/suite/Router.tsx index 1ea44aa0fc0..d102ee952d2 100644 --- a/packages/suite/src/support/suite/Router.tsx +++ b/packages/suite/src/support/suite/Router.tsx @@ -2,6 +2,7 @@ import { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; import { useDidUpdate } from '@trezor/react-utils'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { onBeforePopState, onLocationChange } from 'src/actions/suite/routerActions'; import history from 'src/support/history'; diff --git a/packages/suite/src/support/suite/ThemeProvider.tsx b/packages/suite/src/support/suite/ThemeProvider.tsx index 2b423f89697..7d52d1147bd 100644 --- a/packages/suite/src/support/suite/ThemeProvider.tsx +++ b/packages/suite/src/support/suite/ThemeProvider.tsx @@ -1,7 +1,10 @@ import { ReactNode } from 'react'; + import { ThemeProvider as SCThemeProvider } from 'styled-components'; + import { getThemeColors } from 'src/utils/suite/theme'; import { getOsTheme } from 'src/utils/suite/env'; + import GlobalStyle from './styles/GlobalStyle'; type ThemeProviderProps = { diff --git a/packages/suite/src/support/suite/screens/ErrorScreen.tsx b/packages/suite/src/support/suite/screens/ErrorScreen.tsx index 5c3344a0bb1..41c5e1a5da4 100644 --- a/packages/suite/src/support/suite/screens/ErrorScreen.tsx +++ b/packages/suite/src/support/suite/screens/ErrorScreen.tsx @@ -1,4 +1,5 @@ import { Error } from 'src/components/suite/Error'; + import { ThemeProvider } from '../ThemeProvider'; type ErrorScreenProps = { diff --git a/packages/suite/src/support/suite/screens/LoadingScreen.tsx b/packages/suite/src/support/suite/screens/LoadingScreen.tsx index 8a997effc02..59ab1a4cc32 100644 --- a/packages/suite/src/support/suite/screens/LoadingScreen.tsx +++ b/packages/suite/src/support/suite/screens/LoadingScreen.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; import { Paragraph } from '@trezor/components'; + import { Loading } from 'src/components/suite'; + import { ThemeProvider } from '../ThemeProvider'; const Wrapper = styled.div` diff --git a/packages/suite/src/support/suite/styles/GlobalStyle.tsx b/packages/suite/src/support/suite/styles/GlobalStyle.tsx index 3d8c9bba5f7..a26242740f6 100644 --- a/packages/suite/src/support/suite/styles/GlobalStyle.tsx +++ b/packages/suite/src/support/suite/styles/GlobalStyle.tsx @@ -1,6 +1,8 @@ +import { createGlobalStyle, DefaultTheme } from 'styled-components'; + import { typography } from '@trezor/theme'; + import animations from './animations'; -import { createGlobalStyle, DefaultTheme } from 'styled-components'; const GlobalStyle = createGlobalStyle<{ theme: DefaultTheme }>` #app { diff --git a/packages/suite/src/support/suite/useTor.tsx b/packages/suite/src/support/suite/useTor.tsx index 2a494106149..371f20ac0e8 100644 --- a/packages/suite/src/support/suite/useTor.tsx +++ b/packages/suite/src/support/suite/useTor.tsx @@ -1,6 +1,9 @@ import { useEffect } from 'react'; import { desktopApi, BootstrapTorEvent, TorStatusEvent } from '@trezor/suite-desktop-api'; +import { isWeb, isDesktop, getLocationHostname } from '@trezor/env-utils'; +import { notificationsActions } from '@suite-common/toast-notifications'; + import { TorStatus } from 'src/types/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { getIsTorDomain } from 'src/utils/suite/tor'; @@ -9,9 +12,8 @@ import { setTorBootstrapSlow, updateTorStatus, } from 'src/actions/suite/suiteActions'; -import { isWeb, isDesktop, getLocationHostname } from '@trezor/env-utils'; import { selectTorState } from 'src/reducers/suite/suiteReducer'; -import { notificationsActions } from '@suite-common/toast-notifications'; + export const useTor = () => { const { torBootstrap, isTorEnabling } = useSelector(selectTorState); diff --git a/packages/suite/src/support/tests/IntlHelper.tsx b/packages/suite/src/support/tests/IntlHelper.tsx index 4007d6ee2c5..c8c63f8cefd 100644 --- a/packages/suite/src/support/tests/IntlHelper.tsx +++ b/packages/suite/src/support/tests/IntlHelper.tsx @@ -2,6 +2,7 @@ import { ReactChild } from 'react'; import renderer from 'react-test-renderer'; import { IntlProvider } from 'react-intl'; import { Provider } from 'react-redux'; + import { configureStore } from 'src/support/tests/configureStore'; interface Props { diff --git a/packages/suite/src/support/tests/hooksHelper.tsx b/packages/suite/src/support/tests/hooksHelper.tsx index c4ce4cc3dc3..2be6e0a554f 100644 --- a/packages/suite/src/support/tests/hooksHelper.tsx +++ b/packages/suite/src/support/tests/hooksHelper.tsx @@ -1,11 +1,14 @@ import { ReactNode } from 'react'; import { Provider } from 'react-redux'; import { IntlProvider } from 'react-intl'; + import { act, render, screen, waitForElementToBeRemoved } from '@testing-library/react'; -import { ConnectedThemeProvider } from 'src/support/suite/ConnectedThemeProvider'; import userEvent from '@testing-library/user-event'; + import { MockedFormatterProvider } from '@suite-common/formatters'; +import { ConnectedThemeProvider } from 'src/support/suite/ConnectedThemeProvider'; + // used in hooks tests export const renderWithProviders = (store: any, children: ReactNode) => { const renderMethods = render( diff --git a/packages/suite/src/types/coinmarket/coinmarket.ts b/packages/suite/src/types/coinmarket/coinmarket.ts index 15037a006a7..669f0432c49 100644 --- a/packages/suite/src/types/coinmarket/coinmarket.ts +++ b/packages/suite/src/types/coinmarket/coinmarket.ts @@ -1,14 +1,3 @@ -import type { BuyInfo } from 'src/actions/wallet/coinmarketBuyActions'; -import type { ExchangeInfo } from 'src/actions/wallet/coinmarketExchangeActions'; -import type { SellInfo } from 'src/actions/wallet/coinmarketSellActions'; -import type { - Option, - Trade, - TradeBuy, - TradeExchange, - TradeSell, - TradeType, -} from 'src/types/wallet/coinmarketCommonTypes'; import { BuyCryptoPaymentMethod, BuyProviderInfo, @@ -27,11 +16,10 @@ import { WatchExchangeTradeResponse, WatchSellTradeResponse, } from 'invity-api'; -import { Account, SelectedAccountLoaded } from '@suite-common/wallet-types'; import { AnyAction, Dispatch } from 'redux'; -import { State } from 'src/reducers/wallet/coinmarketReducer'; + +import { Account, SelectedAccountLoaded } from '@suite-common/wallet-types'; import { AccountType } from '@suite-common/wallet-config'; -import { ExtendedMessageDescriptor, TrezorDevice } from 'src/types/suite'; import { Timer } from '@trezor/react-utils'; import { AccountsState } from '@suite-common/wallet-core'; import { TokenDefinitionsState } from '@suite-common/token-definitions'; @@ -41,9 +29,23 @@ import { SelectAssetOptionGroupProps, SelectAssetOptionProps, } from '@trezor/product-components/src/components/SelectAssetModal/SelectAssetModal'; -import { GetDefaultAccountLabelParams } from 'src/hooks/suite/useDefaultAccountLabel'; import { StaticSessionId } from '@trezor/connect'; +import { GetDefaultAccountLabelParams } from 'src/hooks/suite/useDefaultAccountLabel'; +import { State } from 'src/reducers/wallet/coinmarketReducer'; +import { ExtendedMessageDescriptor, TrezorDevice } from 'src/types/suite'; +import type { + Option, + Trade, + TradeBuy, + TradeExchange, + TradeSell, + TradeType, +} from 'src/types/wallet/coinmarketCommonTypes'; +import type { SellInfo } from 'src/actions/wallet/coinmarketSellActions'; +import type { ExchangeInfo } from 'src/actions/wallet/coinmarketExchangeActions'; +import type { BuyInfo } from 'src/actions/wallet/coinmarketBuyActions'; + export type UseCoinmarketProps = { selectedAccount: SelectedAccountLoaded }; export type UseCoinmarketCommonProps = UseCoinmarketProps & { type: CoinmarketTradeType; diff --git a/packages/suite/src/types/coinmarket/coinmarketDetail.ts b/packages/suite/src/types/coinmarket/coinmarketDetail.ts index 5c735399250..99e6c065f8c 100644 --- a/packages/suite/src/types/coinmarket/coinmarketDetail.ts +++ b/packages/suite/src/types/coinmarket/coinmarketDetail.ts @@ -1,7 +1,8 @@ +import type { SelectedAccountLoaded } from '@suite-common/wallet-types'; + import type { CoinmarketTradeCommonProps } from 'src/reducers/wallet/coinmarketReducer'; import type { Account } from 'src/types/wallet'; import type { TradeType } from 'src/types/wallet/coinmarketCommonTypes'; -import type { SelectedAccountLoaded } from '@suite-common/wallet-types'; import { CoinmarketTradeInfoMapProps, CoinmarketTradeMapProps, diff --git a/packages/suite/src/types/coinmarket/coinmarketForm.ts b/packages/suite/src/types/coinmarket/coinmarketForm.ts index 0a04459c8ea..eb7f3f0e367 100644 --- a/packages/suite/src/types/coinmarket/coinmarketForm.ts +++ b/packages/suite/src/types/coinmarket/coinmarketForm.ts @@ -1,3 +1,27 @@ +import type { FieldValues, UseFormReturn, FieldPath } from 'react-hook-form'; +import { PropsWithChildren } from 'react'; + +import type { + BankAccount, + BuyTrade, + CryptoId, + ExchangeTrade, + ExchangeTradeQuoteRequest, + FiatCurrencyCode, + SellFiatTrade, +} from 'invity-api'; + +import { Network } from '@suite-common/wallet-config'; +import { Timer } from '@trezor/react-utils'; +import { + FeeInfo, + FormState, + PrecomposedLevels, + PrecomposedLevelsCardano, +} from '@suite-common/wallet-types'; +import { FeeLevel } from '@trezor/connect'; +import { AccountsState } from '@suite-common/wallet-core'; + import { CoinmarketAccountOptionsGroupOptionProps, CoinmarketCryptoSelectItemProps, @@ -15,39 +39,17 @@ import { CoinmarketTradeType, } from 'src/types/coinmarket/coinmarket'; import type { Account } from 'src/types/wallet'; -import { Network } from '@suite-common/wallet-config'; import type { BuyInfo } from 'src/actions/wallet/coinmarketBuyActions'; -import type { FieldValues, UseFormReturn, FieldPath } from 'react-hook-form'; -import type { - BankAccount, - BuyTrade, - CryptoId, - ExchangeTrade, - ExchangeTradeQuoteRequest, - FiatCurrencyCode, - SellFiatTrade, -} from 'invity-api'; -import { Timer } from '@trezor/react-utils'; import { AppState } from 'src/reducers/store'; import { Dispatch, ExtendedMessageDescriptor, GetState } from 'src/types/suite'; -import { PropsWithChildren } from 'react'; import { AmountLimits, CryptoAmountLimits, Option, TradeSell, } from 'src/types/wallet/coinmarketCommonTypes'; -import { - FeeInfo, - FormState, - PrecomposedLevels, - PrecomposedLevelsCardano, -} from '@suite-common/wallet-types'; -import { FeeLevel } from '@trezor/connect'; import { SendContextValues } from 'src/types/wallet/sendForm'; import { SellInfo } from 'src/actions/wallet/coinmarketSellActions'; - -import { AccountsState } from '@suite-common/wallet-core'; import { ExchangeInfo } from 'src/actions/wallet/coinmarketExchangeActions'; import { EXCHANGE_COMPARATOR_KYC_FILTER, diff --git a/packages/suite/src/types/coinmarket/coinmarketVerify.ts b/packages/suite/src/types/coinmarket/coinmarketVerify.ts index 21ee6d0e1ee..83692ae36b7 100644 --- a/packages/suite/src/types/coinmarket/coinmarketVerify.ts +++ b/packages/suite/src/types/coinmarket/coinmarketVerify.ts @@ -1,8 +1,11 @@ -import type { Account } from 'src/types/wallet'; -import { NetworkSymbol } from '@suite-common/wallet-config'; -import { CryptoId } from 'invity-api'; import { UseFormReturn } from 'react-hook-form'; + +import { CryptoId } from 'invity-api'; + +import { NetworkSymbol } from '@suite-common/wallet-config'; import { AccountAddress } from '@trezor/connect'; + +import type { Account } from 'src/types/wallet'; import { ExtendedMessageDescriptor, TrezorDevice } from 'src/types/suite'; export interface CoinmarketVerifyFormProps { diff --git a/packages/suite/src/types/onboarding/index.ts b/packages/suite/src/types/onboarding/index.ts index f3d05e38133..af66cc612c4 100644 --- a/packages/suite/src/types/onboarding/index.ts +++ b/packages/suite/src/types/onboarding/index.ts @@ -1,4 +1,5 @@ import { DeviceModelInternal } from '@trezor/connect'; + import * as STEP from 'src/constants/onboarding/steps'; import { PrerequisiteType } from 'src/utils/suite/prerequisites'; diff --git a/packages/suite/src/types/wallet/coinjoin.ts b/packages/suite/src/types/wallet/coinjoin.ts index eff6e58f9a1..96e8dda7652 100644 --- a/packages/suite/src/types/wallet/coinjoin.ts +++ b/packages/suite/src/types/wallet/coinjoin.ts @@ -15,6 +15,7 @@ import { EndRoundState, WabiSabiProtocolErrorCode, } from '@trezor/coinjoin/src/enums'; + import type { CoinjoinNetworksConfig } from 'src/services/coinjoin'; export { EndRoundState, WabiSabiProtocolErrorCode }; diff --git a/packages/suite/src/types/wallet/coinmarketCommonTypes.ts b/packages/suite/src/types/wallet/coinmarketCommonTypes.ts index f54fe0b9a8d..2d86c94650e 100644 --- a/packages/suite/src/types/wallet/coinmarketCommonTypes.ts +++ b/packages/suite/src/types/wallet/coinmarketCommonTypes.ts @@ -1,7 +1,9 @@ -import type { Account } from 'src/types/wallet'; import type { BuyTrade, SellFiatTrade, ExchangeTrade, FiatCurrencyCode } from 'invity-api'; + import type { FlagProps } from '@trezor/components'; +import type { Account } from 'src/types/wallet'; + type CommonTrade = { date: string; key?: string; diff --git a/packages/suite/src/types/wallet/index.ts b/packages/suite/src/types/wallet/index.ts index c06c1b6a2fa..61b6b6cf0c3 100644 --- a/packages/suite/src/types/wallet/index.ts +++ b/packages/suite/src/types/wallet/index.ts @@ -5,6 +5,8 @@ import { stakeActions, sendFormActions, } from '@suite-common/wallet-core'; +import { tokenDefinitionsActions } from '@suite-common/token-definitions/src/tokenDefinitionsActions'; + import { ReceiveAction } from 'src/actions/wallet/receiveActions'; import { SignVerifyAction } from 'src/actions/wallet/signVerifyActions'; import { CoinmarketBuyAction } from 'src/actions/wallet/coinmarketBuyActions'; @@ -18,7 +20,6 @@ import { CardanoStakingAction } from 'src/actions/wallet/cardanoStakingActions'; import { CoinjoinAccountAction } from 'src/actions/wallet/coinjoinAccountActions'; import { CoinjoinClientAction } from 'src/actions/wallet/coinjoinClientActions'; import { CoinmarketInfoAction } from 'src/actions/wallet/coinmarketInfoActions'; -import { tokenDefinitionsActions } from '@suite-common/token-definitions/src/tokenDefinitionsActions'; // reexport export type { Icon } from './iconTypes'; diff --git a/packages/suite/src/types/wallet/sendForm.ts b/packages/suite/src/types/wallet/sendForm.ts index 20d8e48e526..d4324296b10 100644 --- a/packages/suite/src/types/wallet/sendForm.ts +++ b/packages/suite/src/types/wallet/sendForm.ts @@ -3,7 +3,6 @@ import { FieldPath, UseFormReturn } from 'react-hook-form'; import { Network } from '@suite-common/wallet-config'; import { AccountUtxo, FeeLevel, PROTO } from '@trezor/connect'; - import { Account, AccountKey, diff --git a/packages/suite/src/utils/firmware/__tests__/firmware.test.ts b/packages/suite/src/utils/firmware/__tests__/firmware.test.ts index 9a3ad6f6cef..a08c75339b3 100644 --- a/packages/suite/src/utils/firmware/__tests__/firmware.test.ts +++ b/packages/suite/src/utils/firmware/__tests__/firmware.test.ts @@ -1,6 +1,8 @@ +import { DeviceModelInternal } from '@trezor/connect'; + import { TrezorDevice } from 'src/types/suite'; + import { getFormattedFingerprint, validateFirmware } from '../index'; -import { DeviceModelInternal } from '@trezor/connect'; describe('getFormattedFingerprint', () => { it('should return a formatted fingerprint', () => { diff --git a/packages/suite/src/utils/firmware/index.ts b/packages/suite/src/utils/firmware/index.ts index 89b1f70b440..ec425ed1730 100644 --- a/packages/suite/src/utils/firmware/index.ts +++ b/packages/suite/src/utils/firmware/index.ts @@ -1,8 +1,9 @@ import { valid, satisfies } from 'semver'; + import { getFirmwareVersion } from '@trezor/device-utils'; +import { DeviceModelInternal, FirmwareType } from '@trezor/connect'; import { type TrezorDevice, type ExtendedMessageDescriptor } from 'src/types/suite'; -import { DeviceModelInternal, FirmwareType } from '@trezor/connect'; export const getFormattedFingerprint = (fingerprint: string) => [ diff --git a/packages/suite/src/utils/onboarding/__tests__/steps.test.ts b/packages/suite/src/utils/onboarding/__tests__/steps.test.ts index 662765c2699..d4e3151f5c9 100644 --- a/packages/suite/src/utils/onboarding/__tests__/steps.test.ts +++ b/packages/suite/src/utils/onboarding/__tests__/steps.test.ts @@ -2,6 +2,7 @@ import { DeviceModelInternal } from '@trezor/connect'; import * as STEP from 'src/constants/onboarding/steps'; import { Step } from 'src/types/onboarding'; + import { findNextStep, findPrevStep, isStepUsed } from '../steps'; const firmwareStep: Step = { diff --git a/packages/suite/src/utils/suite/__fixtures__/device.ts b/packages/suite/src/utils/suite/__fixtures__/device.ts index f2ddeec22b9..7341600595e 100644 --- a/packages/suite/src/utils/suite/__fixtures__/device.ts +++ b/packages/suite/src/utils/suite/__fixtures__/device.ts @@ -1,8 +1,9 @@ import { testMocks } from '@suite-common/test-utils'; -import type { TrezorDevice } from 'src/types/suite'; import { DeviceModelInternal } from '@trezor/connect'; import * as URLS from '@trezor/urls'; +import type { TrezorDevice } from 'src/types/suite'; + const { getSuiteDevice } = testMocks; const SUITE_DEVICE = getSuiteDevice(); diff --git a/packages/suite/src/utils/suite/__fixtures__/homescreen.ts b/packages/suite/src/utils/suite/__fixtures__/homescreen.ts index 1b64eec500f..00550a613f8 100644 --- a/packages/suite/src/utils/suite/__fixtures__/homescreen.ts +++ b/packages/suite/src/utils/suite/__fixtures__/homescreen.ts @@ -1,6 +1,7 @@ -import { deviceModelInformation } from 'src/utils/suite/homescreen'; import { DeviceModelInternal } from '@trezor/connect'; +import { deviceModelInformation } from 'src/utils/suite/homescreen'; + export const isValidImageFormat = [ { description: 'valid image format for T2T1', diff --git a/packages/suite/src/utils/suite/__tests__/homescreen.test.ts b/packages/suite/src/utils/suite/__tests__/homescreen.test.ts index 47527fb00ce..7c256fe2561 100644 --- a/packages/suite/src/utils/suite/__tests__/homescreen.test.ts +++ b/packages/suite/src/utils/suite/__tests__/homescreen.test.ts @@ -1,3 +1,5 @@ +import { DeviceModelInternal } from '@trezor/connect'; + import { dataUrlToImage, fileToArrayBuffer, @@ -8,8 +10,8 @@ import { isValidImageSize, isValidImageWidth, } from 'src/utils/suite/homescreen'; + import * as fixtures from '../__fixtures__/homescreen'; -import { DeviceModelInternal } from '@trezor/connect'; describe('homescreen', () => { describe('fileToDataUrl', () => { diff --git a/packages/suite/src/utils/suite/__tests__/logsUtils.test.ts b/packages/suite/src/utils/suite/__tests__/logsUtils.test.ts index edb372869e8..c47c5ed650f 100644 --- a/packages/suite/src/utils/suite/__tests__/logsUtils.test.ts +++ b/packages/suite/src/utils/suite/__tests__/logsUtils.test.ts @@ -1,6 +1,7 @@ import { testMocks } from '@suite-common/test-utils'; import { discoveryActions } from '@suite-common/wallet-core'; import { DiscoveryStatus } from '@suite-common/wallet-constants'; +import { StaticSessionId } from '@trezor/connect'; import { redactAccount, @@ -9,7 +10,6 @@ import { redactDiscovery, REDACTED_REPLACEMENT, } from 'src/utils/suite/logsUtils'; -import { StaticSessionId } from '@trezor/connect'; describe('logsUtils', () => { const account = testMocks.getWalletAccount({ diff --git a/packages/suite/src/utils/suite/__tests__/metadata.test.ts b/packages/suite/src/utils/suite/__tests__/metadata.test.ts index 6aee1c61867..50d9d639bab 100644 --- a/packages/suite/src/utils/suite/__tests__/metadata.test.ts +++ b/packages/suite/src/utils/suite/__tests__/metadata.test.ts @@ -1,4 +1,5 @@ import fs from 'fs'; + import { encrypt, decrypt, diff --git a/packages/suite/src/utils/suite/__tests__/parseUri.test.ts b/packages/suite/src/utils/suite/__tests__/parseUri.test.ts index 012c854b602..215dc886b37 100644 --- a/packages/suite/src/utils/suite/__tests__/parseUri.test.ts +++ b/packages/suite/src/utils/suite/__tests__/parseUri.test.ts @@ -1,4 +1,5 @@ import { parseUri, parseQuery } from 'src/utils/suite/parseUri'; + import * as fixtures from '../__fixtures__/parseUri'; describe('parseUri', () => { diff --git a/packages/suite/src/utils/suite/__tests__/protocol.test.ts b/packages/suite/src/utils/suite/__tests__/protocol.test.ts index d468740c766..7b7abe603ce 100644 --- a/packages/suite/src/utils/suite/__tests__/protocol.test.ts +++ b/packages/suite/src/utils/suite/__tests__/protocol.test.ts @@ -1,6 +1,7 @@ import { testMocks } from '@suite-common/test-utils'; import { getProtocolInfo } from 'src/utils/suite/protocol'; + import * as fixtures from '../__fixtures__/protocol'; jest.doMock('@trezor/suite-analytics', () => testMocks.getAnalytics()); diff --git a/packages/suite/src/utils/suite/__tests__/reload.test.ts b/packages/suite/src/utils/suite/__tests__/reload.test.ts index bd79aee15ad..0775536dc99 100644 --- a/packages/suite/src/utils/suite/__tests__/reload.test.ts +++ b/packages/suite/src/utils/suite/__tests__/reload.test.ts @@ -1,4 +1,5 @@ import { desktopApi } from '@trezor/suite-desktop-api'; + import { reloadApp } from '../reload'; describe('reloadApp', () => { diff --git a/packages/suite/src/utils/suite/__tests__/stake.test.ts b/packages/suite/src/utils/suite/__tests__/stake.test.ts index dc60baee034..fae40c39637 100644 --- a/packages/suite/src/utils/suite/__tests__/stake.test.ts +++ b/packages/suite/src/utils/suite/__tests__/stake.test.ts @@ -6,25 +6,13 @@ import TrezorConnect, { Unsuccessful, } from '@trezor/connect'; import { - transformTxFixtures, - stakeFixture, - stakeFailedFixture, - unstakeFixture, - unstakeFailedFixture, - claimFixture, - claimFailedFixture, - getStakeFormsDefaultValuesFixture, - getStakeTxGasLimitFixture, - getUnstakingPeriodInDaysFixture, - getDaysToAddToPoolFixture, - getDaysToUnstakeFixture, - getDaysToAddToPoolInitialFixture, - getAdjustedGasLimitConsumptionFixture, - getEthNetworkForWalletSdkFixture, - getInstantStakeTypeFixture, - getChangedInternalTxFixture, - simulateUnstakeFixture, -} from '../__fixtures__/stake'; + BlockchainEstimatedFee, + BlockchainEstimatedFeeLevel, +} from '@trezor/connect/src/types/api/blockchainEstimateFee'; +import { WalletAccountTransaction } from '@suite-common/wallet-types'; +import { ValidatorsQueue } from '@suite-common/wallet-core'; +import { NetworkSymbol } from '@suite-common/wallet-config'; + import { transformTx, stake, @@ -46,12 +34,25 @@ import { simulateUnstake, } from '../stake'; import { - BlockchainEstimatedFee, - BlockchainEstimatedFeeLevel, -} from '@trezor/connect/src/types/api/blockchainEstimateFee'; -import { WalletAccountTransaction } from '@suite-common/wallet-types'; -import { ValidatorsQueue } from '@suite-common/wallet-core'; -import { NetworkSymbol } from '@suite-common/wallet-config'; + transformTxFixtures, + stakeFixture, + stakeFailedFixture, + unstakeFixture, + unstakeFailedFixture, + claimFixture, + claimFailedFixture, + getStakeFormsDefaultValuesFixture, + getStakeTxGasLimitFixture, + getUnstakingPeriodInDaysFixture, + getDaysToAddToPoolFixture, + getDaysToUnstakeFixture, + getDaysToAddToPoolInitialFixture, + getAdjustedGasLimitConsumptionFixture, + getEthNetworkForWalletSdkFixture, + getInstantStakeTypeFixture, + getChangedInternalTxFixture, + simulateUnstakeFixture, +} from '../__fixtures__/stake'; describe('transformTx', () => { transformTxFixtures.forEach(test => { diff --git a/packages/suite/src/utils/suite/__tests__/theme.test.ts b/packages/suite/src/utils/suite/__tests__/theme.test.ts index 6ed9459a583..f70692f1138 100644 --- a/packages/suite/src/utils/suite/__tests__/theme.test.ts +++ b/packages/suite/src/utils/suite/__tests__/theme.test.ts @@ -1,4 +1,5 @@ import { intermediaryTheme } from '@trezor/components'; + import { getThemeColors } from '../theme'; describe('theme', () => { diff --git a/packages/suite/src/utils/suite/__tests__/tor.test.ts b/packages/suite/src/utils/suite/__tests__/tor.test.ts index f47985658ff..339bb5906a4 100644 --- a/packages/suite/src/utils/suite/__tests__/tor.test.ts +++ b/packages/suite/src/utils/suite/__tests__/tor.test.ts @@ -1,4 +1,5 @@ import { TOR_URLS } from '@trezor/urls'; + import { getTorUrlIfAvailable, getIsTorDomain, isOnionUrl } from 'src/utils/suite/tor'; describe('tor', () => { diff --git a/packages/suite/src/utils/suite/anchor.ts b/packages/suite/src/utils/suite/anchor.ts index 6ee47bd2074..49375b6e286 100644 --- a/packages/suite/src/utils/suite/anchor.ts +++ b/packages/suite/src/utils/suite/anchor.ts @@ -1,9 +1,9 @@ import { css } from 'styled-components'; -import { AccountTransactionBaseAnchor, AnchorType } from 'src/constants/suite/anchors'; +import { borders } from '@trezor/theme'; +import { AccountTransactionBaseAnchor, AnchorType } from 'src/constants/suite/anchors'; import type { WalletAccountTransaction } from 'src/types/wallet'; -import { borders } from '@trezor/theme'; export const getTxIdFromAnchor = (anchor?: string): string => anchor?.split('/').pop() || ''; diff --git a/packages/suite/src/utils/suite/l10n.ts b/packages/suite/src/utils/suite/l10n.ts index 26c027b37d1..ec798cff427 100644 --- a/packages/suite/src/utils/suite/l10n.ts +++ b/packages/suite/src/utils/suite/l10n.ts @@ -1,6 +1,7 @@ -import LANGUAGES, { Locale, TRANSLATION_PSEUDOLANGUAGE } from 'src/config/suite/languages'; import { getPlatformLanguages } from '@trezor/env-utils'; +import LANGUAGES, { Locale, TRANSLATION_PSEUDOLANGUAGE } from 'src/config/suite/languages'; + const TRANSLATION_MODE_FLAG = 'translation_mode'; const DEFAULT_LOCALE = 'en'; diff --git a/packages/suite/src/utils/suite/metadata.ts b/packages/suite/src/utils/suite/metadata.ts index d07d5eac6f3..1b07dde17ea 100644 --- a/packages/suite/src/utils/suite/metadata.ts +++ b/packages/suite/src/utils/suite/metadata.ts @@ -1,9 +1,11 @@ import * as crypto from 'crypto'; import base58check from 'bs58check'; -import { FetchIntervalTrackingId } from 'src/actions/suite/metadataProviderActions'; + import { DataType, MetadataProvider } from '@suite-common/metadata-types'; import { StaticSessionId } from '@trezor/connect'; +import { FetchIntervalTrackingId } from 'src/actions/suite/metadataProviderActions'; + // note we only need base58 conversion fn from base58check, other functions from there might // be supplemented from crypto module diff --git a/packages/suite/src/utils/suite/notification.ts b/packages/suite/src/utils/suite/notification.ts index 03a19d27cee..c80db2caac5 100644 --- a/packages/suite/src/utils/suite/notification.ts +++ b/packages/suite/src/utils/suite/notification.ts @@ -1,7 +1,8 @@ import { NotificationEntry } from '@suite-common/toast-notifications'; +import { intermediaryTheme } from '@trezor/components'; + import { ToastNotificationVariant, AppState } from 'src/types/suite'; import type { NotificationViewProps } from 'src/components/suite'; -import { intermediaryTheme } from '@trezor/components'; export const getNotificationIcon = (variant: ToastNotificationVariant) => { switch (variant) { diff --git a/packages/suite/src/utils/suite/oauth.ts b/packages/suite/src/utils/suite/oauth.ts index 7c98f62f29c..dbe7dbc8a31 100644 --- a/packages/suite/src/utils/suite/oauth.ts +++ b/packages/suite/src/utils/suite/oauth.ts @@ -1,7 +1,8 @@ import { desktopApi } from '@trezor/suite-desktop-api'; +import { Deferred, createDeferred } from '@trezor/utils'; + import { getPrefixedURL } from 'src/utils/suite/router'; import { METADATA_PROVIDER } from 'src/actions/suite/constants'; -import { Deferred, createDeferred } from '@trezor/utils'; import { urlHashParams, urlSearchParams } from 'src/utils/suite/metadata'; /** diff --git a/packages/suite/src/utils/suite/prerequisites.ts b/packages/suite/src/utils/suite/prerequisites.ts index ff5ce7f5559..5c3521dae4a 100644 --- a/packages/suite/src/utils/suite/prerequisites.ts +++ b/packages/suite/src/utils/suite/prerequisites.ts @@ -1,7 +1,9 @@ import type { TransportInfo } from '@trezor/connect'; import { DefinedUnionMember } from '@trezor/type-utils'; + import { RouterState } from 'src/reducers/suite/routerReducer'; import type { TrezorDevice, AppState } from 'src/types/suite'; + import { isAdditionalShamirBackupInProgress, isRecoveryInProgress, diff --git a/packages/suite/src/utils/suite/protocol.ts b/packages/suite/src/utils/suite/protocol.ts index c58918adbb7..9547bbda122 100644 --- a/packages/suite/src/utils/suite/protocol.ts +++ b/packages/suite/src/utils/suite/protocol.ts @@ -1,8 +1,9 @@ import { Protocol } from '@suite-common/suite-constants'; import { getNetworkSymbolForProtocol } from '@suite-common/suite-utils'; -import { parseQuery, parseUri } from './parseUri'; import { analytics, EventType } from '@trezor/suite-analytics'; +import { parseQuery, parseUri } from './parseUri'; + export type CoinProtocolInfo = { scheme: Protocol; address: string; diff --git a/packages/suite/src/utils/suite/stake.ts b/packages/suite/src/utils/suite/stake.ts index 96d70b7cd50..fcfddfd99f7 100644 --- a/packages/suite/src/utils/suite/stake.ts +++ b/packages/suite/src/utils/suite/stake.ts @@ -1,3 +1,6 @@ +import { selectNetwork } from '@everstake/wallet-sdk/ethereum'; +import { fromWei, numberToHex, toWei } from 'web3-utils'; + import { PrecomposedLevels, StakeFormState, @@ -11,13 +14,12 @@ import { MAX_ETH_AMOUNT_FOR_STAKING, } from '@suite-common/wallet-constants'; import { NetworkSymbol } from '@suite-common/wallet-config'; -import { selectNetwork } from '@everstake/wallet-sdk/ethereum'; -import { fromWei, numberToHex, toWei } from 'web3-utils'; import { getEthereumEstimateFeeParams, isPending, sanitizeHex } from '@suite-common/wallet-utils'; import TrezorConnect, { EthereumTransaction, Success, InternalTransfer } from '@trezor/connect'; import { BigNumber } from '@trezor/utils/src/bigNumber'; import { ValidatorsQueue } from '@suite-common/wallet-core'; import { BlockchainEstimatedFee } from '@trezor/connect/src/types/api/blockchainEstimateFee'; + import { TranslationFunction } from 'src/hooks/suite/useTranslation'; // source is a required parameter for some functions in the Everstake Wallet SDK. diff --git a/packages/suite/src/utils/suite/storage.ts b/packages/suite/src/utils/suite/storage.ts index d1c158a03ed..3b27a8d655f 100644 --- a/packages/suite/src/utils/suite/storage.ts +++ b/packages/suite/src/utils/suite/storage.ts @@ -1,9 +1,9 @@ import { Discovery } from '@suite-common/wallet-types'; import { connectInitThunk } from '@suite-common/connect-init'; +import { DeviceWithEmptyPath } from '@suite-common/suite-types'; import { AcquiredDevice } from 'src/types/suite'; import { CoinjoinAccount } from 'src/types/wallet/coinjoin'; -import { DeviceWithEmptyPath } from '@suite-common/suite-types'; /** * Strip unserializable fields from Discovery (eg. promises) diff --git a/packages/suite/src/utils/suite/theme.ts b/packages/suite/src/utils/suite/theme.ts index 400dbad7e91..677ab210636 100644 --- a/packages/suite/src/utils/suite/theme.ts +++ b/packages/suite/src/utils/suite/theme.ts @@ -1,4 +1,5 @@ import { intermediaryTheme } from '@trezor/components/src/config/colors'; + import type { AppState } from 'src/types/suite'; export const getThemeColors = (theme: AppState['suite']['settings']['theme']) => { diff --git a/packages/suite/src/utils/suite/tor.ts b/packages/suite/src/utils/suite/tor.ts index 2ccb0c2e90b..f5d7f210f55 100644 --- a/packages/suite/src/utils/suite/tor.ts +++ b/packages/suite/src/utils/suite/tor.ts @@ -1,5 +1,6 @@ import { parseHostname, urlToOnion } from '@trezor/utils'; import { TOR_URLS } from '@trezor/urls'; + import { TorStatus } from 'src/types/suite'; /** diff --git a/packages/suite/src/utils/suite/validation.ts b/packages/suite/src/utils/suite/validation.ts index f44859140d1..8701e8a50f7 100644 --- a/packages/suite/src/utils/suite/validation.ts +++ b/packages/suite/src/utils/suite/validation.ts @@ -10,6 +10,7 @@ import { networkAmountToSmallestUnit, } from '@suite-common/wallet-utils'; import { BigNumber } from '@trezor/utils/src/bigNumber'; + import { TranslationFunction } from 'src/hooks/suite/useTranslation'; import { AmountLimits } from 'src/types/wallet/coinmarketCommonTypes'; diff --git a/packages/suite/src/utils/wallet/__fixtures__/coinjoinUtils.ts b/packages/suite/src/utils/wallet/__fixtures__/coinjoinUtils.ts index cf2acb0c5e0..62a0af28506 100644 --- a/packages/suite/src/utils/wallet/__fixtures__/coinjoinUtils.ts +++ b/packages/suite/src/utils/wallet/__fixtures__/coinjoinUtils.ts @@ -1,5 +1,7 @@ import { RoundPhase, SessionPhase } from '@trezor/coinjoin'; + import { ANONYMITY_GAINS_HINDSIGHT_COUNT } from 'src/services/coinjoin'; + import * as coinjoinUtils from '../coinjoinUtils'; const baseUtxo = { diff --git a/packages/suite/src/utils/wallet/accountUtils.ts b/packages/suite/src/utils/wallet/accountUtils.ts index 344f3e18be4..18557c67c5c 100644 --- a/packages/suite/src/utils/wallet/accountUtils.ts +++ b/packages/suite/src/utils/wallet/accountUtils.ts @@ -1,5 +1,6 @@ import { Account } from '@suite-common/wallet-types'; import { StaticSessionId } from '@trezor/connect'; + import { WalletParams } from 'src/types/wallet'; export const getSelectedAccount = ( diff --git a/packages/suite/src/utils/wallet/coinjoinUtils.ts b/packages/suite/src/utils/wallet/coinjoinUtils.ts index 1979e2319f6..5ee6b932844 100644 --- a/packages/suite/src/utils/wallet/coinjoinUtils.ts +++ b/packages/suite/src/utils/wallet/coinjoinUtils.ts @@ -1,21 +1,9 @@ -import { BigNumber } from '@trezor/utils/src/bigNumber'; import { createHash } from 'crypto'; import hoursToMilliseconds from 'date-fns/hoursToMilliseconds'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { getUtxoOutpoint, getBip43Type } from '@suite-common/wallet-utils'; import { Account, SelectedAccountStatus } from '@suite-common/wallet-types'; -import { - ANONYMITY_GAINS_HINDSIGHT_COUNT, - ANONYMITY_GAINS_HINDSIGHT_DAYS, - MAX_ROUNDS_ALLOWED, - ESTIMATED_MIN_ROUNDS_NEEDED, - SKIP_ROUNDS_VALUE_WHEN_ENABLED, -} from 'src/services/coinjoin/config'; -import { - AnonymityGainPerRound, - CoinjoinAccount, - CoinjoinSessionParameters, -} from 'src/types/wallet/coinjoin'; import { AnonymitySet } from '@trezor/blockchain-link'; import { CoinjoinStatusEvent, @@ -25,6 +13,19 @@ import { RoundPhase, } from '@trezor/coinjoin'; +import { + AnonymityGainPerRound, + CoinjoinAccount, + CoinjoinSessionParameters, +} from 'src/types/wallet/coinjoin'; +import { + ANONYMITY_GAINS_HINDSIGHT_COUNT, + ANONYMITY_GAINS_HINDSIGHT_DAYS, + MAX_ROUNDS_ALLOWED, + ESTIMATED_MIN_ROUNDS_NEEDED, + SKIP_ROUNDS_VALUE_WHEN_ENABLED, +} from 'src/services/coinjoin/config'; + export type CoinjoinBalanceBreakdown = { notAnonymized: string; anonymized: string; diff --git a/packages/suite/src/utils/wallet/coinmarket/__fixtures__/exchangeUtils.ts b/packages/suite/src/utils/wallet/coinmarket/__fixtures__/exchangeUtils.ts index b2aec6c3b5b..22acce6e521 100644 --- a/packages/suite/src/utils/wallet/coinmarket/__fixtures__/exchangeUtils.ts +++ b/packages/suite/src/utils/wallet/coinmarket/__fixtures__/exchangeUtils.ts @@ -1,6 +1,7 @@ -import { ExchangeInfo } from 'src/actions/wallet/coinmarketExchangeActions'; import { CryptoId, ExchangeTrade } from 'invity-api'; +import { ExchangeInfo } from 'src/actions/wallet/coinmarketExchangeActions'; + const litecoin = 'litecoin' as CryptoId; const bitcoin = 'bitcoin' as CryptoId; const ethereum = 'ethereum' as CryptoId; diff --git a/packages/suite/src/utils/wallet/coinmarket/__tests__/coinmarketUtils.test.ts b/packages/suite/src/utils/wallet/coinmarket/__tests__/coinmarketUtils.test.ts index ec8cab06f83..f1903751d76 100644 --- a/packages/suite/src/utils/wallet/coinmarket/__tests__/coinmarketUtils.test.ts +++ b/packages/suite/src/utils/wallet/coinmarket/__tests__/coinmarketUtils.test.ts @@ -1,3 +1,5 @@ +import { CryptoId } from 'invity-api'; + import { Account } from 'src/types/wallet'; import { buildFiatOption, @@ -24,7 +26,6 @@ import { import * as BUY_FIXTURE from 'src/utils/wallet/coinmarket/__fixtures__/buyUtils'; import * as SELL_FIXTURE from 'src/utils/wallet/coinmarket/__fixtures__/sellUtils'; import * as EXCHANGE_FIXTURE from 'src/utils/wallet/coinmarket/__fixtures__/exchangeUtils'; -import { CryptoId } from 'invity-api'; import { useDefaultAccountLabel } from 'src/hooks/suite/useDefaultAccountLabel'; jest.mock('src/hooks/suite/useDefaultAccountLabel', () => ({ diff --git a/packages/suite/src/utils/wallet/coinmarket/__tests__/exchangeUtils.test.ts b/packages/suite/src/utils/wallet/coinmarket/__tests__/exchangeUtils.test.ts index 61a303de716..28cbc86198d 100644 --- a/packages/suite/src/utils/wallet/coinmarket/__tests__/exchangeUtils.test.ts +++ b/packages/suite/src/utils/wallet/coinmarket/__tests__/exchangeUtils.test.ts @@ -1,4 +1,5 @@ import { CryptoId } from 'invity-api'; + import * as fixtures from 'src/utils/wallet/coinmarket/__fixtures__/exchangeUtils'; import { coinmarketGetExchangeReceiveCryptoId, diff --git a/packages/suite/src/utils/wallet/coinmarket/buyUtils.ts b/packages/suite/src/utils/wallet/coinmarket/buyUtils.ts index 081f3ab1a57..e1e1c098931 100644 --- a/packages/suite/src/utils/wallet/coinmarket/buyUtils.ts +++ b/packages/suite/src/utils/wallet/coinmarket/buyUtils.ts @@ -1,8 +1,10 @@ +import { BuyTrade, BuyTradeQuoteRequest, BuyTradeStatus } from 'invity-api'; + import { desktopApi } from '@trezor/suite-desktop-api'; +import { isDesktop, getLocationOrigin } from '@trezor/env-utils'; + import { Account } from 'src/types/wallet'; import { AmountLimits } from 'src/types/wallet/coinmarketCommonTypes'; -import { BuyTrade, BuyTradeQuoteRequest, BuyTradeStatus } from 'invity-api'; -import { isDesktop, getLocationOrigin } from '@trezor/env-utils'; // loop through quotes and if all quotes are either with error below minimum or over maximum, return the limits export function getAmountLimits( diff --git a/packages/suite/src/utils/wallet/coinmarket/coinmarketTypingUtils.ts b/packages/suite/src/utils/wallet/coinmarket/coinmarketTypingUtils.ts index b351264d44e..99748192eae 100644 --- a/packages/suite/src/utils/wallet/coinmarket/coinmarketTypingUtils.ts +++ b/packages/suite/src/utils/wallet/coinmarket/coinmarketTypingUtils.ts @@ -1,5 +1,7 @@ -import { CurrencyOption } from '@suite-common/wallet-types'; import { BuyTrade, ExchangeTrade, SellFiatTrade } from 'invity-api'; + +import { CurrencyOption } from '@suite-common/wallet-types'; + import { FORM_FIAT_CURRENCY_SELECT, FORM_OUTPUT_CURRENCY, diff --git a/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts b/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts index b4be989a50b..bff8cc2f18a 100644 --- a/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts +++ b/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts @@ -1,4 +1,6 @@ -import { Account } from 'src/types/wallet'; +import { BuyTrade, SellFiatTrade, CryptoId } from 'invity-api'; +import { v4 as uuidv4 } from 'uuid'; + import { Network, NetworkSymbol, @@ -9,15 +11,17 @@ import { networks, } from '@suite-common/wallet-config'; import TrezorConnect from '@trezor/connect'; -import regional from 'src/constants/wallet/coinmarket/regional'; -import { ExtendedMessageDescriptor, TrezorDevice } from 'src/types/suite'; -import { BuyTrade, SellFiatTrade, CryptoId } from 'invity-api'; import { DefinitionType, isTokenDefinitionKnown } from '@suite-common/token-definitions'; import { getContractAddressForNetwork, substituteBip43Path, sortByCoin, } from '@suite-common/wallet-utils'; +import { BigNumber } from '@trezor/utils'; + +import { Account } from 'src/types/wallet'; +import regional from 'src/constants/wallet/coinmarket/regional'; +import { ExtendedMessageDescriptor, TrezorDevice } from 'src/types/suite'; import { CoinmarketAccountOptionsGroupOptionProps, CoinmarketAccountsOptionsGroupProps, @@ -31,8 +35,8 @@ import { CoinmarketTradeDetailType, CoinmarketTradeType, } from 'src/types/coinmarket/coinmarket'; -import { v4 as uuidv4 } from 'uuid'; -import { BigNumber } from '@trezor/utils'; + + export const cryptoPlatformSeparator = '--'; diff --git a/packages/suite/src/utils/wallet/coinmarket/exchangeUtils.ts b/packages/suite/src/utils/wallet/coinmarket/exchangeUtils.ts index 4cadb0b9a37..c2b8f1d4ae3 100644 --- a/packages/suite/src/utils/wallet/coinmarket/exchangeUtils.ts +++ b/packages/suite/src/utils/wallet/coinmarket/exchangeUtils.ts @@ -1,6 +1,7 @@ +import { CryptoId, ExchangeTrade, ExchangeTradeStatus } from 'invity-api'; + import { ExchangeInfo } from 'src/actions/wallet/coinmarketExchangeActions'; import { CryptoAmountLimits } from 'src/types/wallet/coinmarketCommonTypes'; -import { CryptoId, ExchangeTrade, ExchangeTradeStatus } from 'invity-api'; import { RateType } from 'src/types/coinmarket/coinmarketForm'; import { FORM_DEFAULT_CRYPTO_CURRENCY, diff --git a/packages/suite/src/utils/wallet/coinmarket/sellUtils.ts b/packages/suite/src/utils/wallet/coinmarket/sellUtils.ts index a160e5f03a8..82313b0f73f 100644 --- a/packages/suite/src/utils/wallet/coinmarket/sellUtils.ts +++ b/packages/suite/src/utils/wallet/coinmarket/sellUtils.ts @@ -1,8 +1,10 @@ +import { SellFiatTrade, SellFiatTradeQuoteRequest, SellTradeStatus } from 'invity-api'; + import { desktopApi } from '@trezor/suite-desktop-api'; +import { isDesktop, getLocationOrigin } from '@trezor/env-utils'; + import { Account } from 'src/types/wallet'; import { AmountLimits } from 'src/types/wallet/coinmarketCommonTypes'; -import { SellFiatTrade, SellFiatTradeQuoteRequest, SellTradeStatus } from 'invity-api'; -import { isDesktop, getLocationOrigin } from '@trezor/env-utils'; import { ComposedTransactionInfo } from 'src/reducers/wallet/coinmarketReducer'; // loop through quotes and if all quotes are either with error below minimum or over maximum, return the limits diff --git a/packages/suite/src/utils/wallet/exportTransactionsUtils.ts b/packages/suite/src/utils/wallet/exportTransactionsUtils.ts index cfcb4a4e281..8dfb1b731e2 100644 --- a/packages/suite/src/utils/wallet/exportTransactionsUtils.ts +++ b/packages/suite/src/utils/wallet/exportTransactionsUtils.ts @@ -15,7 +15,6 @@ import { } from '@suite-common/wallet-types'; import { TransactionTarget } from '@trezor/connect'; import { BigNumber } from '@trezor/utils/src/bigNumber'; - import { formatAmount, formatNetworkAmount, diff --git a/packages/suite/src/utils/wallet/graph/utils.ts b/packages/suite/src/utils/wallet/graph/utils.ts index 3c937ba3bd7..d0a8971f435 100644 --- a/packages/suite/src/utils/wallet/graph/utils.ts +++ b/packages/suite/src/utils/wallet/graph/utils.ts @@ -1,15 +1,17 @@ +import { differenceInMonths } from 'date-fns'; + import { getFiatRatesForTimestamps } from '@suite-common/fiat-services'; import { resetTime } from '@suite-common/suite-utils'; import { networks, type NetworkSymbol } from '@suite-common/wallet-config'; import { Account } from '@suite-common/wallet-types'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { differenceInMonths } from 'date-fns'; +import type { BlockchainAccountBalanceHistory, StaticSessionId } from '@trezor/connect'; +import { FiatCurrencyCode } from '@suite-common/suite-config'; import { CommonAggregatedHistory, GraphData, GraphRange, GraphScale } from 'src/types/wallet/graph'; -import type { BlockchainAccountBalanceHistory, StaticSessionId } from '@trezor/connect'; -import { FiatCurrencyCode } from '@suite-common/suite-config'; + import { ObjectType, TypeName, sumFiatValueMapInPlace } from './utilsShared'; export const deviceGraphDataFilterFn = (d: GraphData, deviceState: StaticSessionId | undefined) => { diff --git a/packages/suite/src/utils/wallet/graph/utilsShared.ts b/packages/suite/src/utils/wallet/graph/utilsShared.ts index 73b6cbeeea2..cb3391b795f 100644 --- a/packages/suite/src/utils/wallet/graph/utilsShared.ts +++ b/packages/suite/src/utils/wallet/graph/utilsShared.ts @@ -1,4 +1,5 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; + import { AggregatedAccountHistory, AggregatedDashboardHistory } from 'src/types/wallet/graph'; export type ObjectType = T extends 'account' diff --git a/packages/suite/src/utils/wallet/graph/utilsWorker.ts b/packages/suite/src/utils/wallet/graph/utilsWorker.ts index 09232846a3b..de731ad8238 100644 --- a/packages/suite/src/utils/wallet/graph/utilsWorker.ts +++ b/packages/suite/src/utils/wallet/graph/utilsWorker.ts @@ -1,14 +1,16 @@ -import { BigNumber } from '@trezor/utils/src/bigNumber'; import { fromUnixTime, getUnixTime, startOfMonth } from 'date-fns'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; +import type { FiatRatesBySymbol } from '@trezor/connect'; +import { toFiatCurrency } from '@suite-common/wallet-utils'; + import { AggregatedAccountHistory, AggregatedDashboardHistory, GraphData, } from 'src/types/wallet/graph'; + import { ObjectType, TypeName, sumFiatValueMapInPlace } from './utilsShared'; -import type { FiatRatesBySymbol } from '@trezor/connect'; -import { toFiatCurrency } from '@suite-common/wallet-utils'; const calcFiatValueMap = ( amount: string, diff --git a/packages/suite/src/utils/wallet/tokenUtils.ts b/packages/suite/src/utils/wallet/tokenUtils.ts index e6d0d304fdf..dd33b401c64 100644 --- a/packages/suite/src/utils/wallet/tokenUtils.ts +++ b/packages/suite/src/utils/wallet/tokenUtils.ts @@ -1,5 +1,4 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; - import { Account, Rate, TokenAddress, RatesByKey } from '@suite-common/wallet-types'; import { TokenInfo } from '@trezor/connect'; import { getFiatRateKey, isTokenMatchesSearch } from '@suite-common/wallet-utils'; diff --git a/packages/suite/src/views/dashboard/AssetsView/ArrowIcon.tsx b/packages/suite/src/views/dashboard/AssetsView/ArrowIcon.tsx index 41c863276c6..f11ecd7729b 100644 --- a/packages/suite/src/views/dashboard/AssetsView/ArrowIcon.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/ArrowIcon.tsx @@ -1,6 +1,7 @@ +import styled, { css } from 'styled-components'; + import { Icon } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; -import styled, { css } from 'styled-components'; // eslint-disable-next-line local-rules/no-override-ds-component export const ArrowIcon = styled(Icon)` diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCard.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCard.tsx index 477a86e5360..349420228c9 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCard.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCard.tsx @@ -1,16 +1,10 @@ import React from 'react'; +import { useDispatch } from 'react-redux'; + import styled, { useTheme } from 'styled-components'; -import { Network } from '@suite-common/wallet-config'; -import { - AmountUnitSwitchWrapper, - CoinBalance, - PriceTicker, - Translation, - TrendTicker, -} from 'src/components/suite'; +import { Network } from '@suite-common/wallet-config'; import { spacings, spacingsPx, typography } from '@trezor/theme'; - import { Card, Column, @@ -21,22 +15,38 @@ import { variables, Text, } from '@trezor/components'; -import { useDispatch } from 'react-redux'; -import { useAccountSearch, useLoadingSkeleton, useSelector } from 'src/hooks/suite'; -import { goto } from 'src/actions/suite/routerActions'; import { AssetFiatBalance } from '@suite-common/assets'; -import { FiatHeader } from 'src/components/wallet/FiatHeader'; -import { ArrowIcon, styledHoverOnParentOfArrowIcon } from '../ArrowIcon'; -import { CoinmarketBuyButton } from '../CoinmarketBuyButton'; -import { AssetCardInfo, AssetCardInfoSkeleton } from './AssetCardInfo'; -import { useFiatFromCryptoValue } from 'src/hooks/suite/useFiatFromCryptoValue'; import { TokenInfo } from '@trezor/connect'; import { Account, RatesByKey } from '@suite-common/wallet-types'; -import { AssetCardTokensAndStakingInfo } from './AssetCardTokensAndStakingInfo'; import { isTestnet } from '@suite-common/wallet-utils'; import { selectAssetAccountsThatStaked } from '@suite-common/wallet-core'; import { selectCoinDefinitions } from '@suite-common/token-definitions'; + import { FiatCurrencyCode } from '@suite-common/suite-config'; +import { + AmountUnitSwitchWrapper, + CoinBalance, + PriceTicker, + Translation, + TrendTicker, +} from 'src/components/suite'; + + +import { useAccountSearch, useLoadingSkeleton, useSelector } from 'src/hooks/suite'; +import { goto } from 'src/actions/suite/routerActions'; + + +import { FiatHeader } from 'src/components/wallet/FiatHeader'; +import { useFiatFromCryptoValue } from 'src/hooks/suite/useFiatFromCryptoValue'; + +import { ArrowIcon, styledHoverOnParentOfArrowIcon } from '../ArrowIcon'; +import { CoinmarketBuyButton } from '../CoinmarketBuyButton'; +import { AssetCardInfo, AssetCardInfoSkeleton } from './AssetCardInfo'; + + +import { AssetCardTokensAndStakingInfo } from './AssetCardTokensAndStakingInfo'; + + import { handleTokensAndStakingData } from '../assetsViewUtils'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCardInfo.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCardInfo.tsx index 7256baef3ac..6f1070c936a 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCardInfo.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCardInfo.tsx @@ -1,11 +1,13 @@ -import { Network } from '@suite-common/wallet-config'; import React from 'react'; + +import { Network } from '@suite-common/wallet-config'; import { AssetFiatBalance } from '@suite-common/assets'; -import { AssetCoinLogo, AssetCoinLogoSkeleton } from '../AssetCoinLogo'; -import { AssetCoinName, AssetCoinNameSkeleton } from '../AssetCoinName'; import { Row } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { AssetCoinLogo, AssetCoinLogoSkeleton } from '../AssetCoinLogo'; +import { AssetCoinName, AssetCoinNameSkeleton } from '../AssetCoinName'; + type AssetInfoProps = { network: Network; assetsFiatBalances?: AssetFiatBalance[]; diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCardTokensAndStakingInfo.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCardTokensAndStakingInfo.tsx index 96807370029..b6964372a1f 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCardTokensAndStakingInfo.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCardTokensAndStakingInfo.tsx @@ -1,9 +1,10 @@ import { Row, Column, Icon, Divider, Text } from '@trezor/components'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { spacings } from '@trezor/theme'; +import { Account } from '@suite-common/wallet-types'; + import { CoinBalance, FiatValue, HiddenPlaceholder, Translation } from 'src/components/suite'; import { TokenIconSetWrapper } from 'src/components/wallet/TokenIconSetWrapper'; -import { Account } from '@suite-common/wallet-types'; type AssetCardTokensAndStakingInfoProps = { symbol: NetworkSymbol; diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetCoinLogo.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetCoinLogo.tsx index b9bd8a7dd42..855843257e8 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetCoinLogo.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetCoinLogo.tsx @@ -6,9 +6,10 @@ import { import { Row, SkeletonCircle, Tooltip } from '@trezor/components'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { localizePercentage } from '@suite-common/wallet-utils'; +import { AssetShareIndicator } from '@trezor/product-components'; + import { selectLanguage } from 'src/reducers/suite/suiteReducer'; import { useSelector } from 'src/hooks/suite'; -import { AssetShareIndicator } from '@trezor/product-components'; type AssetCoinLogoProps = { symbol: NetworkSymbol; diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetCoinName.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetCoinName.tsx index 6cd6b8e0bb0..dd7df972804 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetCoinName.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetCoinName.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { Network } from '@suite-common/wallet-config'; import { selectVisibleNonEmptyDeviceAccountsByNetworkSymbol } from '@suite-common/wallet-core'; import { Icon, SkeletonRectangle } from '@trezor/components'; import { spacingsPx, typography } from '@trezor/theme'; + import { useSelector } from 'src/hooks/suite'; const WalletContent = styled.div` diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx index c86299783a2..9d8783ba132 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRow.tsx @@ -1,7 +1,18 @@ import { memo } from 'react'; + import { useTheme } from 'styled-components'; + import { Network } from '@suite-common/wallet-config'; import { Icon, Table, Row, IconButton, Column, Text } from '@trezor/components'; +import { isTestnet } from '@suite-common/wallet-utils'; +import { spacings } from '@trezor/theme'; +import { TokenInfo } from '@trezor/blockchain-link-types'; +import { selectCoinDefinitions } from '@suite-common/token-definitions'; +import { selectAssetAccountsThatStaked } from '@suite-common/wallet-core'; +import { Account, RatesByKey } from '@suite-common/wallet-types'; +import { AssetFiatBalance } from '@suite-common/assets'; +import { FiatCurrencyCode } from '@suite-common/suite-config'; + import { AmountUnitSwitchWrapper, CoinBalance, @@ -10,23 +21,16 @@ import { Translation, TrendTicker, } from 'src/components/suite'; -import { isTestnet } from '@suite-common/wallet-utils'; import { goto } from 'src/actions/suite/routerActions'; import { useAccountSearch, useDispatch, useSelector } from 'src/hooks/suite'; -import { spacings } from '@trezor/theme'; +import { TokenIconSetWrapper } from 'src/components/wallet/TokenIconSetWrapper'; + import { AssetCoinLogo } from '../AssetCoinLogo'; import { AssetCoinName } from '../AssetCoinName'; import { CoinmarketBuyButton } from '../CoinmarketBuyButton'; -import { TokenInfo } from '@trezor/blockchain-link-types'; import { AssetTokenRow } from './AssetTokenRow'; -import { selectCoinDefinitions } from '@suite-common/token-definitions'; -import { selectAssetAccountsThatStaked } from '@suite-common/wallet-core'; -import { Account, RatesByKey } from '@suite-common/wallet-types'; import { AssetStakingRow } from './AssetStakingRow'; -import { AssetFiatBalance } from '@suite-common/assets'; -import { FiatCurrencyCode } from '@suite-common/suite-config'; import { AssetTableExtraRowsSection as Section } from './AssetTableExtraRowsSection'; -import { TokenIconSetWrapper } from 'src/components/wallet/TokenIconSetWrapper'; import { handleTokensAndStakingData } from '../assetsViewUtils'; export interface AssetTableRowProps { diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRowSkeleton.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRowSkeleton.tsx index 144931ace3d..4dc79e0d93b 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRowSkeleton.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetRowSkeleton.tsx @@ -1,7 +1,9 @@ import { Row, Table, SkeletonRectangle } from '@trezor/components'; -import { AssetCoinLogoSkeleton } from '../AssetCoinLogo'; + import { useLoadingSkeleton } from 'src/hooks/suite'; +import { AssetCoinLogoSkeleton } from '../AssetCoinLogo'; + type AssetRowSkeletonProps = { isAnimating?: boolean; }; diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetStakingRow.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetStakingRow.tsx index cbb3d5f1148..ef8cfffd3ab 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetStakingRow.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetStakingRow.tsx @@ -1,7 +1,9 @@ import { Column, Icon, Table, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { CoinBalance, HiddenPlaceholder, Translation, FiatValue } from 'src/components/suite'; import { NetworkSymbol } from '@suite-common/wallet-config'; + +import { CoinBalance, HiddenPlaceholder, Translation, FiatValue } from 'src/components/suite'; + import { AssetTableExtraRowsSection as Section } from './AssetTableExtraRowsSection'; interface AssetStakingRowProps { diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTable.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTable.tsx index 773eccec223..59bda778420 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTable.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTable.tsx @@ -1,13 +1,15 @@ -import { AssetRow } from './AssetRow'; -import { AssetRowSkeleton } from './AssetRowSkeleton'; -import { AssetData } from '../AssetsView'; import { Table } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { Translation } from 'src/components/suite'; import { AssetFiatBalance } from '@suite-common/assets'; import { RatesByKey } from '@suite-common/wallet-types'; import { FiatCurrencyCode } from '@suite-common/suite-config'; +import { Translation } from 'src/components/suite'; + +import { AssetData } from '../AssetsView'; +import { AssetRowSkeleton } from './AssetRowSkeleton'; +import { AssetRow } from './AssetRow'; + interface AssetTableProps { discoveryInProgress?: boolean; assetsData: AssetData[]; diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTableExtraRowsSection.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTableExtraRowsSection.tsx index 2fb4b0f2fb5..a4965756463 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTableExtraRowsSection.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTableExtraRowsSection.tsx @@ -1,4 +1,5 @@ import styled, { css } from 'styled-components'; + import { borders } from '@trezor/theme'; type DashedLinePosition = 'middleToBottom' | 'topToBottom' | 'topToMiddle'; diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTokenRow.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTokenRow.tsx index 089c53ec3e1..3b38bd7b533 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTokenRow.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTokenRow.tsx @@ -1,8 +1,10 @@ import { Table } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { Network } from '@suite-common/wallet-config'; + import { FiatValue, Translation } from 'src/components/suite'; + import { AssetTableExtraRowsSection as Section } from './AssetTableExtraRowsSection'; -import { Network } from '@suite-common/wallet-config'; interface AssetTokenProps { tokenIconSetWrapper: React.ReactNode; diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx index c7f1ee7a94d..c0babb42700 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx @@ -1,33 +1,35 @@ import styled, { useTheme } from 'styled-components'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { Icon, Button, LoadingContent, Card, Row } from '@trezor/components'; import { selectCurrentFiatRates } from '@suite-common/wallet-core'; - -import { DashboardSection } from 'src/components/dashboard'; -import { Account } from 'src/types/wallet'; -import { Translation } from 'src/components/suite'; -import { useDiscovery, useDispatch, useLayoutSize, useSelector } from 'src/hooks/suite'; -import { useAccounts } from 'src/hooks/wallet'; -import { setFlag } from 'src/actions/suite/suiteActions'; -import { goto } from 'src/actions/suite/routerActions'; import { TokenInfo } from '@trezor/blockchain-link-types'; import { AssetFiatBalance } from '@suite-common/assets'; - -import { AssetCard, AssetCardSkeleton } from './AssetCard/AssetCard'; import { spacings, spacingsPx, typography } from '@trezor/theme'; import { getFiatRateKey, toFiatCurrency, isSupportedEthStakingNetworkSymbol, } from '@suite-common/wallet-utils'; -import { selectEnabledNetworks, selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { AssetTable } from './AssetTable/AssetTable'; import { NetworkSymbol, getNetwork, Network } from '@suite-common/wallet-config'; import { RatesByKey } from '@suite-common/wallet-types'; import { FiatCurrencyCode } from '@suite-common/suite-config'; + +import { DashboardSection } from 'src/components/dashboard'; +import { Account } from 'src/types/wallet'; +import { Translation } from 'src/components/suite'; +import { useDiscovery, useDispatch, useLayoutSize, useSelector } from 'src/hooks/suite'; +import { useAccounts } from 'src/hooks/wallet'; +import { setFlag } from 'src/actions/suite/suiteActions'; +import { goto } from 'src/actions/suite/routerActions'; +import { selectEnabledNetworks, selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { useNetworkSupport } from 'src/hooks/settings/useNetworkSupport'; +import { AssetCard, AssetCardSkeleton } from './AssetCard/AssetCard'; +import { AssetTable } from './AssetTable/AssetTable'; + + + const InfoMessage = styled.div` padding: ${spacingsPx.md} ${spacingsPx.xl}; display: flex; diff --git a/packages/suite/src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx b/packages/suite/src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx index ac58a433dd6..a0f5c6ac90d 100644 --- a/packages/suite/src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx @@ -1,10 +1,14 @@ -import * as routerActions from 'src/actions/suite/routerActions'; +import { MouseEvent } from 'react'; + import { Button } from '@trezor/components'; import { NetworkSymbol } from '@suite-common/wallet-config'; +import { EventType, analytics } from '@trezor/suite-analytics'; + +import * as routerActions from 'src/actions/suite/routerActions'; import { Translation } from 'src/components/suite'; import { useDispatch, useAccountSearch } from 'src/hooks/suite'; -import { EventType, analytics } from '@trezor/suite-analytics'; -import { MouseEvent } from 'react'; + + type CoinmarketBuyButtonProps = { symbol: NetworkSymbol; diff --git a/packages/suite/src/views/dashboard/AssetsView/assetsViewUtils.ts b/packages/suite/src/views/dashboard/AssetsView/assetsViewUtils.ts index df8c391c29f..7ffc7ebe78e 100644 --- a/packages/suite/src/views/dashboard/AssetsView/assetsViewUtils.ts +++ b/packages/suite/src/views/dashboard/AssetsView/assetsViewUtils.ts @@ -1,8 +1,3 @@ -import { - enhanceTokensWithRates, - getTokens, - sortTokensWithRates, -} from 'src/utils/wallet/tokenUtils'; import { FiatCurrencyCode } from '@suite-common/suite-config'; import { TokenDefinition } from '@suite-common/token-definitions'; @@ -12,6 +7,12 @@ import { TokenInfo } from '@trezor/connect'; import { BigNumber } from '@trezor/utils'; import { getAccountTotalStakingBalance } from '@suite-common/wallet-utils'; +import { + enhanceTokensWithRates, + getTokens, + sortTokensWithRates, +} from 'src/utils/wallet/tokenUtils'; + export const handleTokensAndStakingData = ( assetTokens: TokenInfo[], accountsThatStaked: Account[], diff --git a/packages/suite/src/views/dashboard/DashboardPassphraseBanner.tsx b/packages/suite/src/views/dashboard/DashboardPassphraseBanner.tsx index 1502b4597fd..88b3026cc08 100644 --- a/packages/suite/src/views/dashboard/DashboardPassphraseBanner.tsx +++ b/packages/suite/src/views/dashboard/DashboardPassphraseBanner.tsx @@ -1,16 +1,21 @@ +import { useState } from 'react'; + +import { AnimatePresence, motion } from 'framer-motion'; +import styled from 'styled-components'; + import { selectDevice } from '@suite-common/wallet-core'; import { Banner, Text, Button, IconButton, Row, Column } from '@trezor/components'; -import { AnimatePresence, motion } from 'framer-motion'; -import { useState } from 'react'; +import { WalletType } from '@suite-common/wallet-types'; + import { goto } from 'src/actions/suite/routerActions'; import { setFlag } from 'src/actions/suite/suiteActions'; import { Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; import { useDiscovery, useDispatch, useSelector } from 'src/hooks/suite'; import { selectSuiteFlags } from 'src/reducers/suite/suiteReducer'; + import { bannerAnimationConfig } from './banner-animations'; -import { WalletType } from '@suite-common/wallet-types'; -import styled from 'styled-components'; + const Container = styled(motion.div)` width: 100%; diff --git a/packages/suite/src/views/dashboard/PortfolioCard/EmptyWallet.tsx b/packages/suite/src/views/dashboard/PortfolioCard/EmptyWallet.tsx index af64f598e95..335769a1618 100644 --- a/packages/suite/src/views/dashboard/PortfolioCard/EmptyWallet.tsx +++ b/packages/suite/src/views/dashboard/PortfolioCard/EmptyWallet.tsx @@ -1,10 +1,10 @@ import { H3, Row, Paragraph, Button, Column, IconCircle } from '@trezor/components'; import { CoinLogo } from '@trezor/product-components'; import { spacings } from '@trezor/theme'; +import { selectIsDeviceUsingPassphrase } from '@suite-common/wallet-core'; import { Translation } from 'src/components/suite'; import { useSelector, useDispatch } from 'src/hooks/suite'; -import { selectIsDeviceUsingPassphrase } from '@suite-common/wallet-core'; import { goto } from 'src/actions/suite/routerActions'; import { useNetworkSupport } from 'src/hooks/settings/useNetworkSupport'; import { selectEnabledNetworks } from 'src/reducers/wallet/settingsReducer'; diff --git a/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx b/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx index ed9210cfcb6..22cba834436 100644 --- a/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx +++ b/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCard.tsx @@ -1,23 +1,25 @@ import { memo, useMemo } from 'react'; + import styled from 'styled-components'; import { Dropdown, Card, Tooltip, Column } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { getTotalFiatBalance } from '@suite-common/wallet-utils'; +import { selectCurrentFiatRates } from '@suite-common/wallet-core'; +import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; + import { GraphScaleDropdownItem, GraphSkeleton, Translation } from 'src/components/suite'; import { DashboardSection } from 'src/components/dashboard'; import { useDevice, useDiscovery, useDispatch, useSelector } from 'src/hooks/suite'; import { useFastAccounts } from 'src/hooks/wallet'; import { goto } from 'src/actions/suite/routerActions'; import { setFlag } from 'src/actions/suite/suiteActions'; -import { getTotalFiatBalance } from '@suite-common/wallet-utils'; +import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { PortfolioCardHeader } from './PortfolioCardHeader'; import { PortfolioCardException } from './PortfolioCardException'; import { EmptyWallet } from './EmptyWallet'; import { DashboardGraph } from './DashboardGraph'; -import { selectCurrentFiatRates } from '@suite-common/wallet-core'; -import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; // eslint-disable-next-line local-rules/no-override-ds-component const StyledDropdown = styled(Dropdown)` diff --git a/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCardHeader.tsx b/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCardHeader.tsx index acaab0b77ee..95f5e65da5a 100644 --- a/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCardHeader.tsx +++ b/packages/suite/src/views/dashboard/PortfolioCard/PortfolioCardHeader.tsx @@ -1,14 +1,15 @@ import { useCallback } from 'react'; + import styled, { css } from 'styled-components'; import { Button, LoadingContent } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; import { GraphRangeSelector, Translation } from 'src/components/suite'; import { updateGraphData } from 'src/actions/wallet/graphActions'; import { useFastAccounts } from 'src/hooks/wallet'; import { GraphRange } from 'src/types/wallet/graph'; import { FiatHeader } from 'src/components/wallet/FiatHeader'; -import { spacingsPx } from '@trezor/theme'; const Wrapper = styled.div<{ $hideBorder: boolean }>` display: flex; diff --git a/packages/suite/src/views/dashboard/PromoBanner.tsx b/packages/suite/src/views/dashboard/PromoBanner.tsx index a0efd35c073..f6f1646cfad 100644 --- a/packages/suite/src/views/dashboard/PromoBanner.tsx +++ b/packages/suite/src/views/dashboard/PromoBanner.tsx @@ -1,14 +1,18 @@ import { useState } from 'react'; + import styled, { css } from 'styled-components'; + import { SUITE_MOBILE_APP_STORE, SUITE_MOBILE_PLAY_STORE, SUITE_URL } from '@trezor/urls'; import { EventType, analytics } from '@trezor/suite-analytics'; import { Button, Icon, Image, Tooltip, variables } from '@trezor/components'; -import { Translation, QrCode, TrezorLink } from 'src/components/suite'; import { isWeb } from '@trezor/env-utils'; +import { spacingsPx } from '@trezor/theme'; + +import { Translation, QrCode, TrezorLink } from 'src/components/suite'; import { useLayoutSize } from 'src/hooks/suite/useLayoutSize'; import { HORIZONTAL_LAYOUT_PADDINGS } from 'src/constants/suite/layout'; import { useSelector } from 'src/hooks/suite'; -import { spacingsPx } from '@trezor/theme'; + const Container = styled.div` position: absolute; diff --git a/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCard.tsx b/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCard.tsx index 52c9123a1d6..e1be8539240 100644 --- a/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCard.tsx +++ b/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCard.tsx @@ -1,4 +1,5 @@ import { useEffect, useMemo, useState } from 'react'; + import { variables, Divider, @@ -11,18 +12,20 @@ import { Paragraph, IconName, } from '@trezor/components'; -import { DashboardSection } from 'src/components/dashboard'; -import { Translation, StakingFeature } from 'src/components/suite'; -import { StakeEthCardFooter } from './StakeEthCardFooter/StakeEthCardFooter'; +import { spacings } from '@trezor/theme'; +import { selectPoolStatsApyData } from '@suite-common/wallet-core'; +import { MIN_ETH_BALANCE_FOR_STAKING } from '@suite-common/wallet-constants'; +import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; + import { useDevice, useDiscovery, useDispatch, useSelector } from 'src/hooks/suite'; import { useAccounts } from 'src/hooks/wallet'; -import { spacings } from '@trezor/theme'; import { selectEnabledNetworks } from 'src/reducers/wallet/settingsReducer'; import { selectSuiteFlags } from 'src/reducers/suite/suiteReducer'; import { setFlag } from 'src/actions/suite/suiteActions'; -import { selectPoolStatsApyData } from '@suite-common/wallet-core'; -import { MIN_ETH_BALANCE_FOR_STAKING } from '@suite-common/wallet-constants'; -import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; +import { Translation, StakingFeature } from 'src/components/suite'; +import { DashboardSection } from 'src/components/dashboard'; + +import { StakeEthCardFooter } from './StakeEthCardFooter/StakeEthCardFooter'; const bannerSymbol = 'eth'; diff --git a/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCardFooter/NetworkBadge.tsx b/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCardFooter/NetworkBadge.tsx index 6d201827c98..c977ac71aa0 100644 --- a/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCardFooter/NetworkBadge.tsx +++ b/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCardFooter/NetworkBadge.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import { Paragraph, Row } from '@trezor/components'; import { spacings } from '@trezor/theme'; import { CoinLogo } from '@trezor/product-components'; diff --git a/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCardFooter/StakeEthCardFooter.tsx b/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCardFooter/StakeEthCardFooter.tsx index 96d613d31e0..29f0392b4bf 100644 --- a/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCardFooter/StakeEthCardFooter.tsx +++ b/packages/suite/src/views/dashboard/StakeEthCard/StakeEthCardFooter/StakeEthCardFooter.tsx @@ -1,9 +1,11 @@ import { Button, Paragraph, Row } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; -import { NetworkBadge } from './NetworkBadge'; import { useAccountSearch, useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; -import { spacings } from '@trezor/theme'; + +import { NetworkBadge } from './NetworkBadge'; type StakeEthCardFooterProps = { accountIndex: number | undefined; diff --git a/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx b/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx index de72caf64bb..f87648ee53b 100644 --- a/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx +++ b/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx @@ -1,18 +1,22 @@ import React, { useState } from 'react'; + import styled from 'styled-components'; +import { AnimatePresence, motion } from 'framer-motion'; +import { rgba } from 'polished'; import { EventType, analytics } from '@trezor/suite-analytics'; import { TREZOR_SAFE_5_URL } from '@trezor/urls'; +import { Button, IconButton, Image, SVG_IMAGES, SVG_PATH, variables } from '@trezor/components'; +import { resolveStaticPath } from '@suite-common/suite-utils'; +import { colorVariants } from '@trezor/theme'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { selectIsDashboardT3T1PromoBannerShown } from 'src/reducers/suite/suiteReducer'; -import { Button, IconButton, Image, SVG_IMAGES, SVG_PATH, variables } from '@trezor/components'; import { setFlag } from 'src/actions/suite/suiteActions'; import { Translation, TrezorLink } from 'src/components/suite'; -import { AnimatePresence, motion } from 'framer-motion'; -import { resolveStaticPath } from '@suite-common/suite-utils'; -import { colorVariants } from '@trezor/theme'; -import { rgba } from 'polished'; + + + import { T3T1PromoLogo } from './T3T1PromoLogo'; import { bannerAnimationConfig } from '../banner-animations'; diff --git a/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoLogo.tsx b/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoLogo.tsx index e975aa43d4e..8a49f49d63a 100644 --- a/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoLogo.tsx +++ b/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoLogo.tsx @@ -1,5 +1,7 @@ import React from 'react'; + import styled from 'styled-components'; + import { borders, colorVariants, typography } from '@trezor/theme'; import { variables } from '@trezor/components'; diff --git a/packages/suite/src/views/dashboard/index.tsx b/packages/suite/src/views/dashboard/index.tsx index 717a9219acd..b92c4cb742c 100644 --- a/packages/suite/src/views/dashboard/index.tsx +++ b/packages/suite/src/views/dashboard/index.tsx @@ -1,14 +1,17 @@ import styled from 'styled-components'; + import { breakpointMediaQueries } from '@trezor/styles'; +import { spacingsPx } from '@trezor/theme'; + import { useLayout } from 'src/hooks/suite'; +import { PageHeader } from 'src/components/suite/layouts/SuiteLayout'; + import { AssetsView } from './AssetsView/AssetsView'; import { PortfolioCard } from './PortfolioCard/PortfolioCard'; import { PromoBanner } from './PromoBanner'; import { T3T1PromoBanner } from './T3T1PromoBanner/T3T1PromoBanner'; -import { PageHeader } from 'src/components/suite/layouts/SuiteLayout'; import { StakeEthCard } from './StakeEthCard/StakeEthCard'; import { DashboardPassphraseBanner } from './DashboardPassphraseBanner'; -import { spacingsPx } from '@trezor/theme'; const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/firmware/FirmwareCustom.tsx b/packages/suite/src/views/firmware/FirmwareCustom.tsx index 56dfd390193..7eb42c2ebfc 100644 --- a/packages/suite/src/views/firmware/FirmwareCustom.tsx +++ b/packages/suite/src/views/firmware/FirmwareCustom.tsx @@ -2,6 +2,7 @@ import { useState } from 'react'; import { useDevice, useFirmware } from 'src/hooks/suite'; import { SelectCustomFirmware } from 'src/components/firmware'; + import { FirmwareModal } from './FirmwareModal'; export const FirmwareCustom = () => { diff --git a/packages/suite/src/views/firmware/FirmwareModal.tsx b/packages/suite/src/views/firmware/FirmwareModal.tsx index 00ad05b72b8..74414bbb916 100644 --- a/packages/suite/src/views/firmware/FirmwareModal.tsx +++ b/packages/suite/src/views/firmware/FirmwareModal.tsx @@ -1,5 +1,6 @@ import { ReactElement } from 'react'; import { useIntl } from 'react-intl'; + import styled from 'styled-components'; import { TranslationKey } from '@suite-common/intl-types'; diff --git a/packages/suite/src/views/firmware/FirmwareUpdate.tsx b/packages/suite/src/views/firmware/FirmwareUpdate.tsx index 0288443d24c..35032387178 100644 --- a/packages/suite/src/views/firmware/FirmwareUpdate.tsx +++ b/packages/suite/src/views/firmware/FirmwareUpdate.tsx @@ -1,6 +1,7 @@ import { FirmwareInitial } from 'src/components/firmware'; import { closeModalApp } from 'src/actions/suite/routerActions'; import { useDispatch, useFirmware } from 'src/hooks/suite'; + import { FirmwareModal } from './FirmwareModal'; type FirmwareUpdateProps = { diff --git a/packages/suite/src/views/onboarding/UnexpectedState/components/IsSameDevice.tsx b/packages/suite/src/views/onboarding/UnexpectedState/components/IsSameDevice.tsx index dc7183d8b4c..e1a92996c6f 100644 --- a/packages/suite/src/views/onboarding/UnexpectedState/components/IsSameDevice.tsx +++ b/packages/suite/src/views/onboarding/UnexpectedState/components/IsSameDevice.tsx @@ -1,4 +1,5 @@ import { Button } from '@trezor/components'; + import { OnboardingStepBox } from 'src/components/onboarding'; import { Translation } from 'src/components/suite'; import { useOnboarding } from 'src/hooks/suite'; diff --git a/packages/suite/src/views/onboarding/UnexpectedState/index.tsx b/packages/suite/src/views/onboarding/UnexpectedState/index.tsx index 979ac784bcd..a3f07a1f498 100644 --- a/packages/suite/src/views/onboarding/UnexpectedState/index.tsx +++ b/packages/suite/src/views/onboarding/UnexpectedState/index.tsx @@ -1,4 +1,5 @@ import { useMemo } from 'react'; + import styled from 'styled-components'; import { selectDevice } from '@suite-common/wallet-core'; diff --git a/packages/suite/src/views/onboarding/index.tsx b/packages/suite/src/views/onboarding/index.tsx index fdcac1de53c..154218292fc 100644 --- a/packages/suite/src/views/onboarding/index.tsx +++ b/packages/suite/src/views/onboarding/index.tsx @@ -1,9 +1,9 @@ import { useMemo } from 'react'; + import { OnboardingLayout } from 'src/components/onboarding'; import { ReduxModal } from 'src/components/suite/modals/ReduxModal/ReduxModal'; import CreateOrRecover from 'src/views/onboarding/steps/CreateOrRecover'; import { FirmwareStep } from 'src/views/onboarding/steps/FirmwareStep'; -import { DeviceAuthenticity } from './steps/SecurityCheck/DeviceAuthenticity'; import { ResetDeviceStep } from 'src/views/onboarding/steps/ResetDevice'; import { RecoveryStep } from 'src/views/onboarding/steps/Recovery'; import { BackupStep } from 'src/views/onboarding/steps/Backup'; @@ -15,6 +15,8 @@ import UnexpectedState from 'src/views/onboarding/UnexpectedState'; import { useOnboarding, useFilteredModal } from 'src/hooks/suite'; import { MODAL } from 'src/actions/suite/constants'; import * as STEP from 'src/constants/onboarding/steps'; + +import { DeviceAuthenticity } from './steps/SecurityCheck/DeviceAuthenticity'; import { DeviceTutorial } from './steps/DeviceTutorial'; export const Onboarding = () => { diff --git a/packages/suite/src/views/onboarding/steps/BasicSettings/AdvancedSetup.tsx b/packages/suite/src/views/onboarding/steps/BasicSettings/AdvancedSetup.tsx index f9aea899c3d..0bff4856c9a 100644 --- a/packages/suite/src/views/onboarding/steps/BasicSettings/AdvancedSetup.tsx +++ b/packages/suite/src/views/onboarding/steps/BasicSettings/AdvancedSetup.tsx @@ -1,13 +1,17 @@ import { useState, ReactNode } from 'react'; + import styled, { useTheme } from 'styled-components'; -import { Translation } from 'src/components/suite'; + import { Icon } from '@trezor/components'; -import { useSelector } from 'src/hooks/suite'; import { isDesktop, isWeb } from '@trezor/env-utils'; -import { TorSection } from './TorSection'; + +import { useSelector } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; import { getIsTorEnabled } from 'src/utils/suite/tor'; import { CollapsibleOnboardingCard } from 'src/components/onboarding/CollapsibleOnboardingCard'; +import { TorSection } from './TorSection'; + const AdvancedSetupWrapper = styled.div` width: 100%; text-align: center; diff --git a/packages/suite/src/views/onboarding/steps/BasicSettings/BasicSettingsStepBox.tsx b/packages/suite/src/views/onboarding/steps/BasicSettings/BasicSettingsStepBox.tsx index 0476982aecc..86c1345ad56 100644 --- a/packages/suite/src/views/onboarding/steps/BasicSettings/BasicSettingsStepBox.tsx +++ b/packages/suite/src/views/onboarding/steps/BasicSettings/BasicSettingsStepBox.tsx @@ -1,13 +1,16 @@ import { useEffect } from 'react'; + import styled from 'styled-components'; -import { OnboardingStepBox, OnboardingStepBoxProps } from 'src/components/onboarding'; -import { CoinGroup, TooltipSymbol, Translation } from 'src/components/suite'; -import { useNetworkSupport } from 'src/hooks/settings/useNetworkSupport'; + import { CollapsibleBox } from '@trezor/components'; import { spacings } from '@trezor/theme'; import { selectDeviceModel } from '@suite-common/wallet-core'; -import { useDispatch, useSelector } from 'src/hooks/suite'; import { DeviceModelInternal } from '@trezor/connect'; + +import { OnboardingStepBox, OnboardingStepBoxProps } from 'src/components/onboarding'; +import { CoinGroup, TooltipSymbol, Translation } from 'src/components/suite'; +import { useNetworkSupport } from 'src/hooks/settings/useNetworkSupport'; +import { useDispatch, useSelector } from 'src/hooks/suite'; import { changeCoinVisibility } from 'src/actions/settings/walletSettingsActions'; import { selectEnabledNetworks } from 'src/reducers/wallet/settingsReducer'; diff --git a/packages/suite/src/views/onboarding/steps/BasicSettings/TorSection.tsx b/packages/suite/src/views/onboarding/steps/BasicSettings/TorSection.tsx index a326209103f..be5c3f4e5e3 100644 --- a/packages/suite/src/views/onboarding/steps/BasicSettings/TorSection.tsx +++ b/packages/suite/src/views/onboarding/steps/BasicSettings/TorSection.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { variables, Switch } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { toggleTor } from 'src/actions/suite/suiteActions'; diff --git a/packages/suite/src/views/onboarding/steps/DeviceTutorial.tsx b/packages/suite/src/views/onboarding/steps/DeviceTutorial.tsx index 0e8db6ed365..fd58ec0b3d9 100644 --- a/packages/suite/src/views/onboarding/steps/DeviceTutorial.tsx +++ b/packages/suite/src/views/onboarding/steps/DeviceTutorial.tsx @@ -1,10 +1,13 @@ import { useEffect } from 'react'; import { useIntl } from 'react-intl'; + import styled from 'styled-components'; import { selectDevice } from '@suite-common/wallet-core'; import TrezorConnect from '@trezor/connect'; import { Button } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; + import { beginOnboardingTutorial, goToNextStep, @@ -16,7 +19,6 @@ import { useDispatch, useSelector } from 'src/hooks/suite'; import { selectIsActionAbortable } from 'src/reducers/suite/suiteReducer'; import { selectOnboardingTutorialStatus } from 'src/reducers/onboarding/onboardingReducer'; import messages from 'src/support/messages'; -import { spacingsPx } from '@trezor/theme'; const StyledOnboardingStepBox = styled(OnboardingStepBox)` padding: 40px 20px 0; diff --git a/packages/suite/src/views/onboarding/steps/Final.tsx b/packages/suite/src/views/onboarding/steps/Final.tsx index f3e9aad50c9..d1279b79781 100644 --- a/packages/suite/src/views/onboarding/steps/Final.tsx +++ b/packages/suite/src/views/onboarding/steps/Final.tsx @@ -1,8 +1,9 @@ import { useRef, useState } from 'react'; + import styled, { css } from 'styled-components'; import useMeasure from 'react-use/lib/useMeasure'; -import { analytics, EventType } from '@trezor/suite-analytics'; +import { analytics, EventType } from '@trezor/suite-analytics'; import { Button, variables, @@ -11,13 +12,14 @@ import { Tooltip, DeviceAnimation, } from '@trezor/components'; +import { spacingsPx, typography } from '@trezor/theme'; + import { Translation, HomescreenGallery } from 'src/components/suite'; import { OnboardingStepBox } from 'src/components/onboarding'; import { useDevice, useOnboarding, useSelector } from 'src/hooks/suite'; import { isHomescreenSupportedOnDevice } from 'src/utils/suite/homescreen'; import { selectIsActionAbortable } from 'src/reducers/suite/suiteReducer'; import { ChangeDeviceLabel } from 'src/components/suite/ChangeDeviceLabel'; -import { spacingsPx, typography } from '@trezor/theme'; const Content = styled.div` flex-direction: column; diff --git a/packages/suite/src/views/onboarding/steps/Recovery/RecoveryStepBox.tsx b/packages/suite/src/views/onboarding/steps/Recovery/RecoveryStepBox.tsx index df1898e6226..ff19931af81 100644 --- a/packages/suite/src/views/onboarding/steps/Recovery/RecoveryStepBox.tsx +++ b/packages/suite/src/views/onboarding/steps/Recovery/RecoveryStepBox.tsx @@ -1,4 +1,5 @@ import { DeviceModelInternal } from '@trezor/connect'; + import { OnboardingButtonBack, OnboardingStepBox, diff --git a/packages/suite/src/views/onboarding/steps/ResetDevice.tsx b/packages/suite/src/views/onboarding/steps/ResetDevice.tsx index f8d261d5676..7d4ab01c366 100644 --- a/packages/suite/src/views/onboarding/steps/ResetDevice.tsx +++ b/packages/suite/src/views/onboarding/steps/ResetDevice.tsx @@ -1,19 +1,23 @@ import { useCallback, useEffect, useState } from 'react'; + import styled from 'styled-components'; + import { selectDevice } from '@suite-common/wallet-core'; +import { Button, Divider, Text } from '@trezor/components'; +import { DeviceModelInternal } from '@trezor/connect'; + import * as STEP from 'src/constants/onboarding/steps'; import { OnboardingButtonBack, OptionsWrapper, OnboardingStepBox } from 'src/components/onboarding'; import { Translation } from 'src/components/suite'; import { useDispatch, useSelector, useOnboarding, useDevice } from 'src/hooks/suite'; import { resetDevice } from 'src/actions/settings/deviceSettingsActions'; import { selectIsActionAbortable } from 'src/reducers/suite/suiteReducer'; -import { Button, Divider, Text } from '@trezor/components'; + import { SelectBackupType, getDefaultBackupType, isShamirBackupType, } from './SelectBackupType/SelectBackupType'; -import { DeviceModelInternal } from '@trezor/connect'; import { BackupType } from '../../../reducers/onboarding/onboardingReducer'; const SelectWrapper = styled.div` diff --git a/packages/suite/src/views/onboarding/steps/Security.tsx b/packages/suite/src/views/onboarding/steps/Security.tsx index e7841330bc5..223cafe6b3b 100644 --- a/packages/suite/src/views/onboarding/steps/Security.tsx +++ b/packages/suite/src/views/onboarding/steps/Security.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; + import { Translation } from 'src/components/suite'; import { OnboardingButtonCta, diff --git a/packages/suite/src/views/onboarding/steps/SecurityCheck/DeviceAuthenticity.tsx b/packages/suite/src/views/onboarding/steps/SecurityCheck/DeviceAuthenticity.tsx index f7421fb7ff0..3290451b959 100644 --- a/packages/suite/src/views/onboarding/steps/SecurityCheck/DeviceAuthenticity.tsx +++ b/packages/suite/src/views/onboarding/steps/SecurityCheck/DeviceAuthenticity.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { checkDeviceAuthenticityThunk } from '@suite-common/device-authenticity'; diff --git a/packages/suite/src/views/onboarding/steps/SecurityCheck/SecurityCheck.tsx b/packages/suite/src/views/onboarding/steps/SecurityCheck/SecurityCheck.tsx index 76b7cca8608..5767f9d2119 100644 --- a/packages/suite/src/views/onboarding/steps/SecurityCheck/SecurityCheck.tsx +++ b/packages/suite/src/views/onboarding/steps/SecurityCheck/SecurityCheck.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react'; + import styled, { useTheme } from 'styled-components'; import { getConnectedDeviceStatus } from '@suite-common/suite-utils'; @@ -23,6 +24,7 @@ import { SUPPORTS_DEVICE_AUTHENTICITY_CHECK } from 'src/constants/suite/device'; import { SecurityCheckFail } from 'src/components/suite/SecurityCheck/SecurityCheckFail'; import { selectIsOnboardingActive } from 'src/reducers/onboarding/onboardingReducer'; import { selectSuiteFlags } from 'src/reducers/suite/suiteReducer'; + import { SecurityChecklist } from './SecurityChecklist'; import { DeviceAuthenticity } from './DeviceAuthenticity'; diff --git a/packages/suite/src/views/onboarding/steps/SecurityCheck/SecurityChecklist.tsx b/packages/suite/src/views/onboarding/steps/SecurityCheck/SecurityChecklist.tsx index 8fab48ec46b..0b4234544b8 100644 --- a/packages/suite/src/views/onboarding/steps/SecurityCheck/SecurityChecklist.tsx +++ b/packages/suite/src/views/onboarding/steps/SecurityCheck/SecurityChecklist.tsx @@ -2,6 +2,7 @@ import { useTheme } from 'styled-components'; import { Column, Icon, Row, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { SecurityChecklistItem } from './types'; type SecurityChecklistProps = { diff --git a/packages/suite/src/views/onboarding/steps/SecurityCheck/types.ts b/packages/suite/src/views/onboarding/steps/SecurityCheck/types.ts index f2d2d6ccc16..68cf3a6b660 100644 --- a/packages/suite/src/views/onboarding/steps/SecurityCheck/types.ts +++ b/packages/suite/src/views/onboarding/steps/SecurityCheck/types.ts @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import { IconName } from '@trezor/components'; export type SecurityChecklistItem = { diff --git a/packages/suite/src/views/onboarding/steps/SelectBackupType/DefaultTag.tsx b/packages/suite/src/views/onboarding/steps/SelectBackupType/DefaultTag.tsx index 17889c42805..b16979cef1a 100644 --- a/packages/suite/src/views/onboarding/steps/SelectBackupType/DefaultTag.tsx +++ b/packages/suite/src/views/onboarding/steps/SelectBackupType/DefaultTag.tsx @@ -1,5 +1,6 @@ import { Badge, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useLayoutSize } from 'src/hooks/suite'; diff --git a/packages/suite/src/views/onboarding/steps/SelectBackupType/FloatingSelections.tsx b/packages/suite/src/views/onboarding/steps/SelectBackupType/FloatingSelections.tsx index f9eb0d264c5..9faaacea9a9 100644 --- a/packages/suite/src/views/onboarding/steps/SelectBackupType/FloatingSelections.tsx +++ b/packages/suite/src/views/onboarding/steps/SelectBackupType/FloatingSelections.tsx @@ -1,3 +1,7 @@ +import { CSSProperties, forwardRef, useRef } from 'react'; + +import styled from 'styled-components'; + import { useElevation, Divider, @@ -15,13 +19,13 @@ import { spacingsPx, zIndices, } from '@trezor/theme'; -import { CSSProperties, forwardRef, useRef } from 'react'; +import { HELP_CENTER_MULTI_SHARE_BACKUP_URL } from '@trezor/urls'; + import { Translation, TrezorLink } from 'src/components/suite'; + import { LegacyOptions } from './LegacyOptions'; import { isShamirBackupType } from './SelectBackupType'; import { BackupType } from '../../../../reducers/onboarding/onboardingReducer'; -import styled from 'styled-components'; -import { HELP_CENTER_MULTI_SHARE_BACKUP_URL } from '@trezor/urls'; import { ShamirOptions } from './ShamirOptions'; const OptionGroupHeading = styled.div` diff --git a/packages/suite/src/views/onboarding/steps/SelectBackupType/LegacyOptions.tsx b/packages/suite/src/views/onboarding/steps/SelectBackupType/LegacyOptions.tsx index 936517020a0..3ffb87d40f7 100644 --- a/packages/suite/src/views/onboarding/steps/SelectBackupType/LegacyOptions.tsx +++ b/packages/suite/src/views/onboarding/steps/SelectBackupType/LegacyOptions.tsx @@ -1,6 +1,8 @@ -import { BackupType } from '../../../../reducers/onboarding/onboardingReducer'; -import { Translation } from 'src/components/suite'; import { Tooltip } from '@trezor/components'; + +import { Translation } from 'src/components/suite'; + +import { BackupType } from '../../../../reducers/onboarding/onboardingReducer'; import { OptionWithContent } from './OptionWithContent'; import { DefaultTag } from './DefaultTag'; diff --git a/packages/suite/src/views/onboarding/steps/SelectBackupType/OptionWithContent.tsx b/packages/suite/src/views/onboarding/steps/SelectBackupType/OptionWithContent.tsx index a51c8a40d32..ff3f212e43a 100644 --- a/packages/suite/src/views/onboarding/steps/SelectBackupType/OptionWithContent.tsx +++ b/packages/suite/src/views/onboarding/steps/SelectBackupType/OptionWithContent.tsx @@ -1,9 +1,8 @@ -import { Radio, Row, variables, Text, Icon, useElevation, Tooltip } from '@trezor/components'; -import { BackupType } from '../../../../reducers/onboarding/onboardingReducer'; import { ReactNode, forwardRef } from 'react'; -import { Translation } from 'src/components/suite'; -import { useLayoutSize } from 'src/hooks/suite'; + import styled, { css } from 'styled-components'; + +import { Radio, Row, variables, Text, Icon, useElevation, Tooltip } from '@trezor/components'; import { spacingsPx, borders, @@ -11,6 +10,11 @@ import { mapElevationToBackground, mapElevationToBorder, } from '@trezor/theme'; + +import { useLayoutSize } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; + +import { BackupType } from '../../../../reducers/onboarding/onboardingReducer'; import { typesToLabelMap } from './typesToLabelMap'; export const OptionText = styled.div` diff --git a/packages/suite/src/views/onboarding/steps/SelectBackupType/SelectBackupType.tsx b/packages/suite/src/views/onboarding/steps/SelectBackupType/SelectBackupType.tsx index 5278fa3044e..3338ed99582 100644 --- a/packages/suite/src/views/onboarding/steps/SelectBackupType/SelectBackupType.tsx +++ b/packages/suite/src/views/onboarding/steps/SelectBackupType/SelectBackupType.tsx @@ -1,15 +1,6 @@ -import { ElevationUp, Text, Banner, useElevation } from '@trezor/components'; -import { - Elevation, - borders, - mapElevationToBackground, - mapElevationToBorder, - spacingsPx, -} from '@trezor/theme'; import { useState } from 'react'; + import styled from 'styled-components'; -import { useLayoutSize, useSelector } from '../../../../hooks/suite'; -import { selectDevice } from '@suite-common/wallet-core'; import { FloatingFocusManager, autoUpdate, @@ -22,13 +13,26 @@ import { size, offset, } from '@floating-ui/react'; + +import { ElevationUp, Text, Banner, useElevation } from '@trezor/components'; +import { + Elevation, + borders, + mapElevationToBackground, + mapElevationToBorder, + spacingsPx, +} from '@trezor/theme'; +import { selectDevice } from '@suite-common/wallet-core'; import { TranslationKey } from '@suite-common/intl-types'; +import { DeviceModelInternal } from '@trezor/connect'; + +import { useLayoutSize, useSelector } from '../../../../hooks/suite'; import { Translation } from '../../../../components/suite'; import { BackupType } from '../../../../reducers/onboarding/onboardingReducer'; import { OptionText, SelectedOption } from './OptionWithContent'; import { FloatingSelections } from './FloatingSelections'; import { typesToLabelMap } from './typesToLabelMap'; -import { DeviceModelInternal } from '@trezor/connect'; + const SELECT_ELEMENT_HEIGHT = 84; const SELECT_ELEMENT_HEIGHT_MOBILE = 62; diff --git a/packages/suite/src/views/onboarding/steps/SelectBackupType/ShamirOptions.tsx b/packages/suite/src/views/onboarding/steps/SelectBackupType/ShamirOptions.tsx index bf69bbd2f03..9d94fdd1576 100644 --- a/packages/suite/src/views/onboarding/steps/SelectBackupType/ShamirOptions.tsx +++ b/packages/suite/src/views/onboarding/steps/SelectBackupType/ShamirOptions.tsx @@ -1,13 +1,15 @@ +import { satisfies } from 'semver'; + import { Badge, Tooltip } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { selectDevice } from '@suite-common/wallet-core'; +import { getFirmwareVersion } from '@trezor/device-utils'; + import { Translation } from '../../../../components/suite'; import { useLayoutSize, useSelector } from '../../../../hooks/suite'; import { BackupType } from '../../../../reducers/onboarding/onboardingReducer'; import { DefaultTag } from './DefaultTag'; import { OptionWithContent } from './OptionWithContent'; -import { selectDevice } from '@suite-common/wallet-core'; -import { getFirmwareVersion } from '@trezor/device-utils'; -import { satisfies } from 'semver'; const UpgradableToMultiTag = () => { const { isMobileLayout } = useLayoutSize(); diff --git a/packages/suite/src/views/onboarding/steps/SelectBackupType/typesToLabelMap.ts b/packages/suite/src/views/onboarding/steps/SelectBackupType/typesToLabelMap.ts index 653860d4878..c8593d7247f 100644 --- a/packages/suite/src/views/onboarding/steps/SelectBackupType/typesToLabelMap.ts +++ b/packages/suite/src/views/onboarding/steps/SelectBackupType/typesToLabelMap.ts @@ -1,4 +1,5 @@ import { TranslationKey } from '@suite-common/intl-types'; + import { BackupType } from '../../../../reducers/onboarding/onboardingReducer'; export const typesToLabelMap: Record = { diff --git a/packages/suite/src/views/password-manager/PasswordManager/EntryForm.tsx b/packages/suite/src/views/password-manager/PasswordManager/EntryForm.tsx index 8175ddba046..426d179a391 100644 --- a/packages/suite/src/views/password-manager/PasswordManager/EntryForm.tsx +++ b/packages/suite/src/views/password-manager/PasswordManager/EntryForm.tsx @@ -1,19 +1,20 @@ import React, { useState } from 'react'; + import { randomBytes } from 'crypto'; import styled from 'styled-components'; import TrezorConnect from '@trezor/connect'; - import { Button, Checkbox, Input } from '@trezor/components'; import type { PasswordEntry, PasswordEntryDecoded } from '@suite-common/metadata-types'; +import { selectDevice } from '@suite-common/wallet-core'; +import { isUrl } from '@trezor/utils'; +import { spacingsPx } from '@trezor/theme'; import { usePasswords, useSelector } from 'src/hooks/suite'; -import { selectDevice } from '@suite-common/wallet-core'; import * as metadataUtils from 'src/utils/suite/metadata'; import { PATH } from 'src/actions/suite/constants/metadataPasswordsConstants'; import { getDisplayKey } from 'src/utils/suite/passwords'; -import { isUrl } from '@trezor/utils'; -import { spacingsPx } from '@trezor/theme'; + const FormWrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/password-manager/PasswordManager/PasswordEntry.tsx b/packages/suite/src/views/password-manager/PasswordManager/PasswordEntry.tsx index fb86749e158..692bf051338 100644 --- a/packages/suite/src/views/password-manager/PasswordManager/PasswordEntry.tsx +++ b/packages/suite/src/views/password-manager/PasswordManager/PasswordEntry.tsx @@ -1,8 +1,9 @@ import React, { useState } from 'react'; + import styled from 'styled-components'; + import TrezorConnect, { DeviceUniquePath } from '@trezor/connect'; import { Button } from '@trezor/components'; - import { spacingsPx } from '@trezor/theme'; import { DialogModal } from 'src/components/suite/modals/Modal/DialogRenderer'; diff --git a/packages/suite/src/views/password-manager/PasswordManager/PasswordManager.tsx b/packages/suite/src/views/password-manager/PasswordManager/PasswordManager.tsx index 18609626926..8ef40e76102 100644 --- a/packages/suite/src/views/password-manager/PasswordManager/PasswordManager.tsx +++ b/packages/suite/src/views/password-manager/PasswordManager/PasswordManager.tsx @@ -1,5 +1,7 @@ import React, { useState } from 'react'; + import styled from 'styled-components'; + import { Button } from '@trezor/components'; import { TextColumn, ActionColumn } from 'src/components/suite'; diff --git a/packages/suite/src/views/password-manager/PasswordManager/PasswordsList.tsx b/packages/suite/src/views/password-manager/PasswordManager/PasswordsList.tsx index a4c61dd0bab..941498a67a3 100644 --- a/packages/suite/src/views/password-manager/PasswordManager/PasswordsList.tsx +++ b/packages/suite/src/views/password-manager/PasswordManager/PasswordsList.tsx @@ -1,17 +1,20 @@ import styled from 'styled-components'; +import { selectDevice } from '@suite-common/wallet-core'; + +import type { PasswordEntry as PasswordEntryType } from 'src/types/suite/metadata'; +import { useSelector } from 'src/hooks/suite'; +import { TextColumn } from 'src/components/suite'; + import { AddEntryButton } from './AddEntryButton'; import { PasswordEntry as PasswordEntryComponent, PasswordEntryCol, PasswordEntryRow, } from './PasswordEntry'; -import type { PasswordEntry as PasswordEntryType } from 'src/types/suite/metadata'; import { EntryForm } from './EntryForm'; -import { useSelector } from 'src/hooks/suite'; -import { TextColumn } from 'src/components/suite'; -import { selectDevice } from '@suite-common/wallet-core'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/password-manager/PasswordManager/TagsList.tsx b/packages/suite/src/views/password-manager/PasswordManager/TagsList.tsx index e1400bcefb3..65f958d57fe 100644 --- a/packages/suite/src/views/password-manager/PasswordManager/TagsList.tsx +++ b/packages/suite/src/views/password-manager/PasswordManager/TagsList.tsx @@ -1,9 +1,10 @@ import styled from 'styled-components'; -import { Tag } from './Tag'; import { PasswordTag } from '@suite-common/metadata-types'; import { spacingsPx } from '@trezor/theme'; +import { Tag } from './Tag'; + const TagsListWrapper = styled.div` display: flex; flex-direction: row; diff --git a/packages/suite/src/views/password-manager/index.tsx b/packages/suite/src/views/password-manager/index.tsx index 4651ea58e64..b0b622f27db 100644 --- a/packages/suite/src/views/password-manager/index.tsx +++ b/packages/suite/src/views/password-manager/index.tsx @@ -1,8 +1,9 @@ import { useLayout } from 'src/hooks/suite'; -import { PasswordManager } from './PasswordManager/PasswordManager'; import { PageHeader } from 'src/components/suite/layouts/SuiteLayout'; import { BasicName } from 'src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/BasicName'; +import { PasswordManager } from './PasswordManager/PasswordManager'; + const PasswordManagerView = () => { useLayout('Password manager', () => ( diff --git a/packages/suite/src/views/settings/SettingsCoins/FirmwareTypeSuggestion.tsx b/packages/suite/src/views/settings/SettingsCoins/FirmwareTypeSuggestion.tsx index b00971b1e9d..574850e75ab 100644 --- a/packages/suite/src/views/settings/SettingsCoins/FirmwareTypeSuggestion.tsx +++ b/packages/suite/src/views/settings/SettingsCoins/FirmwareTypeSuggestion.tsx @@ -1,13 +1,14 @@ import styled from 'styled-components'; +import { Button, Banner } from '@trezor/components'; +import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; +import { typography } from '@trezor/theme'; + import { setFlag } from 'src/actions/suite/suiteActions'; import { goto } from 'src/actions/suite/routerActions'; import { Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; import { useDevice, useDispatch } from 'src/hooks/suite'; -import { Button, Banner } from '@trezor/components'; -import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; -import { typography } from '@trezor/theme'; const InlineButtonWrapper = styled.div` display: inline-block; diff --git a/packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx b/packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx index 14c8b0c0ec7..40ebca476db 100644 --- a/packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx @@ -1,11 +1,12 @@ import styled from 'styled-components'; +import type { InvityServerEnvironment } from '@suite-common/invity'; + import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, ActionSelect, TextColumn } from 'src/components/suite'; import { setDebugMode } from 'src/actions/suite/suiteActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; import invityAPI from 'src/services/suite/invityAPI'; -import type { InvityServerEnvironment } from '@suite-common/invity'; import { SettingsAnchor } from 'src/constants/suite/anchors'; import { reloadApp } from 'src/utils/suite/reload'; diff --git a/packages/suite/src/views/settings/SettingsDebug/SettingsDebug.tsx b/packages/suite/src/views/settings/SettingsDebug/SettingsDebug.tsx index 3bd08871fae..a49284d7641 100644 --- a/packages/suite/src/views/settings/SettingsDebug/SettingsDebug.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/SettingsDebug.tsx @@ -1,6 +1,8 @@ import { isDesktop, isWeb } from '@trezor/env-utils'; import { SettingsSection, SettingsLayout } from 'src/components/settings'; +import { selectSuiteFlags } from 'src/reducers/suite/suiteReducer'; +import { useSelector } from 'src/hooks/suite'; import { TranslationMode } from './TranslationMode'; import { GithubIssue } from './GithubIssue'; @@ -17,8 +19,6 @@ import { TransportBackends } from './TransportBackends'; import { ViewOnlySettings } from './ViewOnlySettings'; import { TriggerHighlight } from './TriggerHighlight'; import { Backends } from './Backends'; -import { selectSuiteFlags } from 'src/reducers/suite/suiteReducer'; -import { useSelector } from 'src/hooks/suite'; import { PreField } from './PreField'; import { Tor } from './Tor'; diff --git a/packages/suite/src/views/settings/SettingsDebug/Tor.tsx b/packages/suite/src/views/settings/SettingsDebug/Tor.tsx index 6c2ceeace93..01725610875 100644 --- a/packages/suite/src/views/settings/SettingsDebug/Tor.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/Tor.tsx @@ -1,5 +1,4 @@ import { useDispatch } from 'src/hooks/suite'; - import { ActionColumn, ActionButton, SectionItem, TextColumn } from 'src/components/suite'; import { toggleTor } from 'src/actions/suite/suiteActions'; diff --git a/packages/suite/src/views/settings/SettingsDebug/Transport.tsx b/packages/suite/src/views/settings/SettingsDebug/Transport.tsx index 1cb6b53bcd5..3720ec05465 100644 --- a/packages/suite/src/views/settings/SettingsDebug/Transport.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/Transport.tsx @@ -2,9 +2,9 @@ import { useMemo } from 'react'; import { Checkbox } from '@trezor/components'; import { isDesktop } from '@trezor/env-utils'; -import { useDispatch, useSelector } from 'src/hooks/suite'; import { ArrayElement } from '@trezor/type-utils'; +import { useDispatch, useSelector } from 'src/hooks/suite'; import { setDebugMode } from 'src/actions/suite/suiteActions'; import { DebugModeOptions } from 'src/reducers/suite/suiteReducer'; import { ActionColumn, SectionItem, TextColumn } from 'src/components/suite'; diff --git a/packages/suite/src/views/settings/SettingsDebug/TransportBackends.tsx b/packages/suite/src/views/settings/SettingsDebug/TransportBackends.tsx index 0446bdf0d58..cffd204e01d 100644 --- a/packages/suite/src/views/settings/SettingsDebug/TransportBackends.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/TransportBackends.tsx @@ -1,9 +1,10 @@ import { Checkbox } from '@trezor/components'; import { desktopApi } from '@trezor/suite-desktop-api'; +import { isDevEnv } from '@suite-common/suite-utils'; import { ActionColumn, SectionItem, TextColumn } from 'src/components/suite'; -import { isDevEnv } from '@suite-common/suite-utils'; import { useSelector } from 'src/hooks/suite'; + import { useBridgeDesktopApi } from '../../../hooks/suite/useBridgeDesktopApi'; // note that this variable is duplicated with suite-desktop-core diff --git a/packages/suite/src/views/settings/SettingsDebug/TriggerHighlight.tsx b/packages/suite/src/views/settings/SettingsDebug/TriggerHighlight.tsx index 22155f6aa06..f2428f71ff3 100644 --- a/packages/suite/src/views/settings/SettingsDebug/TriggerHighlight.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/TriggerHighlight.tsx @@ -1,4 +1,5 @@ import { ActionButton, ActionColumn, SectionItem, TextColumn } from 'src/components/suite'; + import { goto } from '../../../actions/suite/routerActions'; import { SettingsAnchor } from '../../../constants/suite/anchors'; import { useDispatch } from '../../../hooks/suite'; diff --git a/packages/suite/src/views/settings/SettingsDebug/ViewOnlySettings.tsx b/packages/suite/src/views/settings/SettingsDebug/ViewOnlySettings.tsx index fab86c2011e..c2ef2153943 100644 --- a/packages/suite/src/views/settings/SettingsDebug/ViewOnlySettings.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/ViewOnlySettings.tsx @@ -1,6 +1,6 @@ import { Checkbox } from '@trezor/components'; -import { useDispatch, useSelector } from 'src/hooks/suite'; +import { useDispatch, useSelector } from 'src/hooks/suite'; import { setFlag } from 'src/actions/suite/suiteActions'; import { ActionColumn, SectionItem, TextColumn } from 'src/components/suite'; import { selectSuiteFlags } from 'src/reducers/suite/suiteReducer'; diff --git a/packages/suite/src/views/settings/SettingsDebug/WipeData.tsx b/packages/suite/src/views/settings/SettingsDebug/WipeData.tsx index aa004cef809..3e6ad4c0a3f 100644 --- a/packages/suite/src/views/settings/SettingsDebug/WipeData.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/WipeData.tsx @@ -1,10 +1,11 @@ import styled from 'styled-components'; + import { desktopApi } from '@trezor/suite-desktop-api'; +import { notificationsActions } from '@suite-common/toast-notifications'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionButton, ActionColumn, TextColumn } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { notificationsActions } from '@suite-common/toast-notifications'; import { SettingsAnchor } from 'src/constants/suite/anchors'; const UserDataLink = styled.span` diff --git a/packages/suite/src/views/settings/SettingsDevice/AutoLock.tsx b/packages/suite/src/views/settings/SettingsDevice/AutoLock.tsx index 0dfc5611522..7f4267f3e08 100644 --- a/packages/suite/src/views/settings/SettingsDevice/AutoLock.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/AutoLock.tsx @@ -1,10 +1,10 @@ import { analytics, EventType } from '@trezor/suite-analytics'; +import { formatDurationStrict } from '@suite-common/suite-utils'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, ActionSelect, TextColumn, Translation } from 'src/components/suite'; import { useDevice, useDispatch, useLocales } from 'src/hooks/suite'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; -import { formatDurationStrict } from '@suite-common/suite-utils'; import { SettingsAnchor } from 'src/constants/suite/anchors'; // auto lock times in seconds; allowed lock times by device: <1 minute, 6 days> diff --git a/packages/suite/src/views/settings/SettingsDevice/Brightness.tsx b/packages/suite/src/views/settings/SettingsDevice/Brightness.tsx index ee705ae61ff..8753d672576 100644 --- a/packages/suite/src/views/settings/SettingsDevice/Brightness.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/Brightness.tsx @@ -1,5 +1,6 @@ import TrezorConnect from '@trezor/connect'; import { analytics, EventType } from '@trezor/suite-analytics'; + import { SectionItem, ActionButton, @@ -7,6 +8,7 @@ import { TextColumn, Translation, } from 'src/components/suite'; + import { useDevice } from '../../../hooks/suite'; interface DeviceLabelProps { diff --git a/packages/suite/src/views/settings/SettingsDevice/ChangeLanguage.tsx b/packages/suite/src/views/settings/SettingsDevice/ChangeLanguage.tsx index 6267a7c1884..0a5dd471550 100644 --- a/packages/suite/src/views/settings/SettingsDevice/ChangeLanguage.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/ChangeLanguage.tsx @@ -1,5 +1,6 @@ import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, ActionSelect, TextColumn, Translation } from 'src/components/suite'; + import { SettingsAnchor } from '../../../constants/suite/anchors'; import { useDevice, useDispatch } from '../../../hooks/suite'; import { changeLanguage } from '../../../actions/settings/deviceSettingsActions'; diff --git a/packages/suite/src/views/settings/SettingsDevice/DefaultWalletLoading.tsx b/packages/suite/src/views/settings/SettingsDevice/DefaultWalletLoading.tsx index e3bcbb160e6..607b64bf4a4 100644 --- a/packages/suite/src/views/settings/SettingsDevice/DefaultWalletLoading.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/DefaultWalletLoading.tsx @@ -1,6 +1,7 @@ import { WalletType as DefaultWalletLoadingOptions } from '@suite-common/wallet-types'; import { SelectBar } from '@trezor/components'; import { EventType, analytics } from '@trezor/suite-analytics'; +import { deviceActions, selectDevice } from '@suite-common/wallet-core'; import { Translation } from 'src/components/suite/Translation'; import { SettingsAnchor } from 'src/constants/suite/anchors'; @@ -8,7 +9,6 @@ import { useDispatch, useSelector } from 'src/hooks/suite'; import { setDefaultWalletLoading } from 'src/actions/suite/suiteActions'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, TextColumn } from 'src/components/suite'; -import { deviceActions, selectDevice } from '@suite-common/wallet-core'; const options = [ { diff --git a/packages/suite/src/views/settings/SettingsDevice/DisplayRotation.tsx b/packages/suite/src/views/settings/SettingsDevice/DisplayRotation.tsx index 6fc556602af..0b4987c749b 100644 --- a/packages/suite/src/views/settings/SettingsDevice/DisplayRotation.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/DisplayRotation.tsx @@ -1,9 +1,9 @@ import { DeviceModelInternal } from '@trezor/connect'; import { analytics, EventType } from '@trezor/suite-analytics'; +import { Icon, SelectBar, Tooltip } from '@trezor/components'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, TextColumn, Translation } from 'src/components/suite'; -import { Icon, SelectBar, Tooltip } from '@trezor/components'; import { useDevice, useDispatch } from 'src/hooks/suite'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; import { SettingsAnchor } from 'src/constants/suite/anchors'; diff --git a/packages/suite/src/views/settings/SettingsDevice/FirmwareRevisionCheck.tsx b/packages/suite/src/views/settings/SettingsDevice/FirmwareRevisionCheck.tsx index f1a702a9f75..162aadc0cbb 100644 --- a/packages/suite/src/views/settings/SettingsDevice/FirmwareRevisionCheck.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/FirmwareRevisionCheck.tsx @@ -1,3 +1,5 @@ +import { HELP_CENTER_FIRMWARE_REVISION_CHECK } from '@trezor/urls'; + import { ActionButton, ActionColumn, @@ -8,7 +10,6 @@ import { import { useDispatch, useSelector } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; import { toggleCheckFirmwareAuthenticity } from 'src/actions/suite/suiteActions'; -import { HELP_CENTER_FIRMWARE_REVISION_CHECK } from '@trezor/urls'; export const FirmwareRevisionCheck = () => { const dispatch = useDispatch(); diff --git a/packages/suite/src/views/settings/SettingsDevice/FirmwareTypeChange.tsx b/packages/suite/src/views/settings/SettingsDevice/FirmwareTypeChange.tsx index 62c81afc0a0..ec218a1cc4e 100644 --- a/packages/suite/src/views/settings/SettingsDevice/FirmwareTypeChange.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/FirmwareTypeChange.tsx @@ -1,5 +1,13 @@ import styled from 'styled-components'; +import { Button } from '@trezor/components'; +import { + getFirmwareVersion, + hasBitcoinOnlyFirmware, + isBitcoinOnlyDevice, +} from '@trezor/device-utils'; +import { HELP_FIRMWARE_TYPE } from '@trezor/urls'; + import { SettingsSectionItem } from 'src/components/settings'; import { ActionButton, @@ -10,14 +18,7 @@ import { } from 'src/components/suite'; import { useDevice, useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; -import { Button } from '@trezor/components'; import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { - getFirmwareVersion, - hasBitcoinOnlyFirmware, - isBitcoinOnlyDevice, -} from '@trezor/device-utils'; -import { HELP_FIRMWARE_TYPE } from '@trezor/urls'; import { getSuiteFirmwareTypeString } from 'src/utils/firmware'; const Version = styled.div` diff --git a/packages/suite/src/views/settings/SettingsDevice/HapticFeedback.tsx b/packages/suite/src/views/settings/SettingsDevice/HapticFeedback.tsx index fd68f37713d..872d6067ec3 100644 --- a/packages/suite/src/views/settings/SettingsDevice/HapticFeedback.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/HapticFeedback.tsx @@ -1,10 +1,12 @@ import { Switch } from '@trezor/components'; +import { analytics, EventType } from '@trezor/suite-analytics'; + import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { useDevice, useDispatch } from '../../../hooks/suite'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; -import { analytics, EventType } from '@trezor/suite-analytics'; + +import { useDevice, useDispatch } from '../../../hooks/suite'; interface DeviceLabelProps { isDeviceLocked: boolean; diff --git a/packages/suite/src/views/settings/SettingsDevice/Homescreen.tsx b/packages/suite/src/views/settings/SettingsDevice/Homescreen.tsx index f5ea09337fe..7a47dffc86e 100644 --- a/packages/suite/src/views/settings/SettingsDevice/Homescreen.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/Homescreen.tsx @@ -1,8 +1,10 @@ import { useRef, useState } from 'react'; + import styled from 'styled-components'; import { DeviceModelInternal } from '@trezor/connect'; import { HOMESCREEN_EDITOR_URL } from '@trezor/urls'; +import { Button, ButtonGroup, Tooltip, variables } from '@trezor/components'; import { SettingsSectionItem } from 'src/components/settings'; import { @@ -13,7 +15,6 @@ import { Translation, } from 'src/components/suite'; import { HAS_MONOCHROME_SCREEN } from 'src/constants/suite/device'; -import { Button, ButtonGroup, Tooltip, variables } from '@trezor/components'; import { useDevice, useDispatch } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; diff --git a/packages/suite/src/views/settings/SettingsDevice/MultiShareBackup.tsx b/packages/suite/src/views/settings/SettingsDevice/MultiShareBackup.tsx index 5724cafce8e..cc061355723 100644 --- a/packages/suite/src/views/settings/SettingsDevice/MultiShareBackup.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/MultiShareBackup.tsx @@ -1,4 +1,8 @@ import { HELP_CENTER_MULTI_SHARE_BACKUP_URL } from '@trezor/urls'; +import { selectDevice } from '@suite-common/wallet-core'; +import { TrezorDevice } from '@suite-common/suite-types'; +import { EventType, analytics } from '@trezor/suite-analytics'; + import { ActionButton, ActionColumn, @@ -7,10 +11,9 @@ import { Translation, } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { selectDevice } from '@suite-common/wallet-core'; -import { TrezorDevice } from '@suite-common/suite-types'; + import { goto } from '../../../actions/suite/routerActions'; -import { EventType, analytics } from '@trezor/suite-analytics'; + const doesSupportMultiShare = (device: TrezorDevice | undefined): boolean => { if (device?.features === undefined) { diff --git a/packages/suite/src/views/settings/SettingsDevice/Passphrase.tsx b/packages/suite/src/views/settings/SettingsDevice/Passphrase.tsx index 8762a7b8df5..020d177d28e 100644 --- a/packages/suite/src/views/settings/SettingsDevice/Passphrase.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/Passphrase.tsx @@ -1,9 +1,9 @@ import { HELP_CENTER_PASSPHRASE_URL } from '@trezor/urls'; import { analytics, EventType } from '@trezor/suite-analytics'; +import { Switch } from '@trezor/components'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, TextColumn, Translation } from 'src/components/suite'; -import { Switch } from '@trezor/components'; import { useDevice, useDispatch } from 'src/hooks/suite'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; import { SettingsAnchor } from 'src/constants/suite/anchors'; diff --git a/packages/suite/src/views/settings/SettingsDevice/PinProtection.tsx b/packages/suite/src/views/settings/SettingsDevice/PinProtection.tsx index 028896d05f3..8b2580aa625 100644 --- a/packages/suite/src/views/settings/SettingsDevice/PinProtection.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/PinProtection.tsx @@ -1,7 +1,7 @@ import { analytics, EventType } from '@trezor/suite-analytics'; +import { Switch } from '@trezor/components'; import { ActionColumn, TextColumn, Translation } from 'src/components/suite'; -import { Switch } from '@trezor/components'; import { useDevice, useDispatch } from 'src/hooks/suite'; import { changePin } from 'src/actions/settings/deviceSettingsActions'; import { SettingsAnchor } from 'src/constants/suite/anchors'; diff --git a/packages/suite/src/views/settings/SettingsDevice/WipeCode.tsx b/packages/suite/src/views/settings/SettingsDevice/WipeCode.tsx index a157e0281a7..85d5656773b 100644 --- a/packages/suite/src/views/settings/SettingsDevice/WipeCode.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/WipeCode.tsx @@ -1,13 +1,14 @@ -import { analytics, EventType } from '@trezor/suite-analytics'; import { useSelector } from 'react-redux'; +import { analytics, EventType } from '@trezor/suite-analytics'; import { HELP_CENTER_WIPE_CODE_URL } from '@trezor/urls'; +import { selectIsDeviceProtectedByWipeCode } from '@suite-common/wallet-core'; + import { changeWipeCode } from 'src/actions/settings/deviceSettingsActions'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionButton, ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; import { useDispatch } from 'src/hooks/suite'; -import { selectIsDeviceProtectedByWipeCode } from '@suite-common/wallet-core'; interface Props { isDeviceLocked: boolean; diff --git a/packages/suite/src/views/settings/SettingsGeneral/Analytics.tsx b/packages/suite/src/views/settings/SettingsGeneral/Analytics.tsx index 3473f093944..66dc68b2c72 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/Analytics.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/Analytics.tsx @@ -1,4 +1,5 @@ import { useSelector } from 'react-redux'; + import styled from 'styled-components'; import { selectHasUserAllowedTracking } from '@suite-common/analytics'; diff --git a/packages/suite/src/views/settings/SettingsGeneral/AutoStart.tsx b/packages/suite/src/views/settings/SettingsGeneral/AutoStart.tsx index 2c52bbc66d8..08ef3a24a15 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/AutoStart.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/AutoStart.tsx @@ -3,11 +3,11 @@ import { useEffect, useState } from 'react'; import styled from 'styled-components'; import { Switch } from '@trezor/components'; +import { desktopApi } from '@trezor/suite-desktop-api'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { desktopApi } from '@trezor/suite-desktop-api'; const PositionedSwitch = styled.div` align-self: center; diff --git a/packages/suite/src/views/settings/SettingsGeneral/AutomaticUpdate.tsx b/packages/suite/src/views/settings/SettingsGeneral/AutomaticUpdate.tsx index 21d17a880c2..ac5dcb5f676 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/AutomaticUpdate.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/AutomaticUpdate.tsx @@ -1,13 +1,15 @@ import styled from 'styled-components'; import { Switch } from '@trezor/components'; +import { isDesktop } from '@trezor/env-utils'; +import { desktopApi } from '@trezor/suite-desktop-api'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { isDesktop } from '@trezor/env-utils'; + import { useSelector } from '../../../hooks/suite'; -import { desktopApi } from '@trezor/suite-desktop-api'; + const PositionedSwitch = styled.div` align-self: center; diff --git a/packages/suite/src/views/settings/SettingsGeneral/BitcoinAmountUnit.tsx b/packages/suite/src/views/settings/SettingsGeneral/BitcoinAmountUnit.tsx index ddfcd71a274..1425646eb0f 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/BitcoinAmountUnit.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/BitcoinAmountUnit.tsx @@ -1,8 +1,8 @@ import { PROTO } from '@trezor/connect'; +import { UNIT_LABELS, UNIT_OPTIONS } from '@suite-common/suite-constants'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, ActionSelect, TextColumn, Translation } from 'src/components/suite'; -import { UNIT_LABELS, UNIT_OPTIONS } from '@suite-common/suite-constants'; import { SettingsAnchor } from 'src/constants/suite/anchors'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; diff --git a/packages/suite/src/views/settings/SettingsGeneral/DesktopSuiteBanner.tsx b/packages/suite/src/views/settings/SettingsGeneral/DesktopSuiteBanner.tsx index f1604c6ce71..6b5e557777d 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/DesktopSuiteBanner.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/DesktopSuiteBanner.tsx @@ -1,14 +1,16 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { AnimatePresence, HTMLMotionProps, motion } from 'framer-motion'; + import { Button, H2, Icon, Image, Paragraph, motionEasing } from '@trezor/components'; import { analytics, EventType } from '@trezor/suite-analytics'; import { SUITE_URL } from '@trezor/urls'; +import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; import { useDispatch } from 'src/hooks/suite/useDispatch'; import { setFlag } from 'src/actions/suite/suiteActions'; import { Translation, TrezorLink } from 'src/components/suite'; -import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; const Container = styled(motion.div)` position: relative; diff --git a/packages/suite/src/views/settings/SettingsGeneral/Experimental.tsx b/packages/suite/src/views/settings/SettingsGeneral/Experimental.tsx index 128330b8bb3..127c9a145d1 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/Experimental.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/Experimental.tsx @@ -1,5 +1,6 @@ import styled from 'styled-components'; import { AnimatePresence, motion } from 'framer-motion'; + import { Checkbox, Switch, Banner } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; import { EXPERIMENTAL_FEATURES_KB_URL } from '@trezor/urls'; diff --git a/packages/suite/src/views/settings/SettingsGeneral/Language.tsx b/packages/suite/src/views/settings/SettingsGeneral/Language.tsx index 91ea18fa772..dae86d90c0f 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/Language.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/Language.tsx @@ -1,5 +1,8 @@ import { useMemo } from 'react'; + import { analytics, EventType } from '@trezor/suite-analytics'; +import { getPlatformLanguages } from '@trezor/env-utils'; +import { CROWDIN_URL } from '@trezor/urls'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, ActionSelect, TextColumn, Translation } from 'src/components/suite'; @@ -9,8 +12,6 @@ import LANGUAGES, { Locale, LocaleInfo } from 'src/config/suite/languages'; import { setAutodetect } from 'src/actions/suite/suiteActions'; import { setLanguage } from 'src/actions/settings/languageActions'; import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { getPlatformLanguages } from '@trezor/env-utils'; -import { CROWDIN_URL } from '@trezor/urls'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; const onlyOfficial = (locale: [string, LocaleInfo]): locale is [Locale, LocaleInfo] => diff --git a/packages/suite/src/views/settings/SettingsGeneral/SettingsGeneral.tsx b/packages/suite/src/views/settings/SettingsGeneral/SettingsGeneral.tsx index 48a74edea74..7b78b1573fa 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/SettingsGeneral.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/SettingsGeneral.tsx @@ -1,4 +1,5 @@ import { isDesktop, isWeb } from '@trezor/env-utils'; +import { networks, NetworkFeature } from '@suite-common/wallet-config'; import { SettingsLayout, SettingsSection } from 'src/components/settings'; import { Translation } from 'src/components/suite'; @@ -29,7 +30,6 @@ import { DesktopSuiteBanner } from './DesktopSuiteBanner'; import { AddressDisplay } from './AddressDisplay'; import { EnableViewOnly } from './EnableViewOnly'; import { Experimental } from './Experimental'; -import { networks, NetworkFeature } from '@suite-common/wallet-config'; import { TorSnowflake } from './TorSnowflake'; import { AutomaticUpdate } from './AutomaticUpdate'; import { AutoStart } from './AutoStart'; diff --git a/packages/suite/src/views/settings/SettingsGeneral/ShowApplicationLog.tsx b/packages/suite/src/views/settings/SettingsGeneral/ShowApplicationLog.tsx index a260b0dbe9f..5643d0067ca 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/ShowApplicationLog.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/ShowApplicationLog.tsx @@ -1,6 +1,5 @@ import { openModal } from 'src/actions/suite/modalActions'; import { useDispatch } from 'src/hooks/suite'; - import { SettingsSectionItem } from 'src/components/settings'; import { ActionButton, ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; diff --git a/packages/suite/src/views/settings/SettingsGeneral/ShowOnTray.tsx b/packages/suite/src/views/settings/SettingsGeneral/ShowOnTray.tsx index b456ff62222..e1a7970fb37 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/ShowOnTray.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/ShowOnTray.tsx @@ -3,11 +3,11 @@ import { useEffect, useState } from 'react'; import styled from 'styled-components'; import { Switch } from '@trezor/components'; +import { desktopApi } from '@trezor/suite-desktop-api'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; -import { desktopApi } from '@trezor/suite-desktop-api'; const PositionedSwitch = styled.div` align-self: center; diff --git a/packages/suite/src/views/settings/SettingsGeneral/Theme.tsx b/packages/suite/src/views/settings/SettingsGeneral/Theme.tsx index 2f9d8dc8c4f..3dbf7460619 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/Theme.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/Theme.tsx @@ -1,13 +1,13 @@ import { analytics, EventType } from '@trezor/suite-analytics'; - import { desktopApi, SuiteThemeVariant } from '@trezor/suite-desktop-api'; +import { ThemeColorVariant } from '@trezor/theme'; + import { setAutodetect, setTheme } from 'src/actions/suite/suiteActions'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, ActionSelect, TextColumn, Translation } from 'src/components/suite'; import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; import { getOsTheme } from 'src/utils/suite/env'; -import { ThemeColorVariant } from '@trezor/theme'; type ThemeColorVariantWithSystem = ThemeColorVariant | 'system'; type Option = { value: ThemeColorVariantWithSystem; label: string }; diff --git a/packages/suite/src/views/settings/SettingsGeneral/Tor.tsx b/packages/suite/src/views/settings/SettingsGeneral/Tor.tsx index 5da8266ba04..5b49fae855e 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/Tor.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/Tor.tsx @@ -1,6 +1,8 @@ import { useEffect, useState } from 'react'; + import { LoadingContent, Switch } from '@trezor/components'; import { TOR_PROJECT_URL } from '@trezor/urls'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { toggleTor } from 'src/actions/suite/suiteActions'; import { SettingsSectionItem } from 'src/components/settings'; diff --git a/packages/suite/src/views/settings/SettingsGeneral/TorOnionLinks.tsx b/packages/suite/src/views/settings/SettingsGeneral/TorOnionLinks.tsx index 8264ee62e81..b8540de554b 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/TorOnionLinks.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/TorOnionLinks.tsx @@ -1,8 +1,8 @@ import { analytics, EventType } from '@trezor/suite-analytics'; +import { Switch } from '@trezor/components'; import { setOnionLinks } from 'src/actions/suite/suiteActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { Switch } from '@trezor/components'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { SettingsAnchor } from 'src/constants/suite/anchors'; diff --git a/packages/suite/src/views/settings/SettingsGeneral/TorSnowflake.tsx b/packages/suite/src/views/settings/SettingsGeneral/TorSnowflake.tsx index a04aebf1058..6849e111a5e 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/TorSnowflake.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/TorSnowflake.tsx @@ -1,7 +1,7 @@ import { ChangeEventHandler, useEffect, useState } from 'react'; + import styled from 'styled-components'; -import { useSelector, useTranslation } from 'src/hooks/suite'; -import { selectTorState } from 'src/reducers/suite/suiteReducer'; + import { TorSettings } from '@trezor/suite-desktop-api/src/messages'; import { TOR_SNOWFLAKE_KB_URL } from '@trezor/urls'; import { breakpointMediaQueries } from '@trezor/styles'; @@ -10,6 +10,8 @@ import { Button, Input } from '@trezor/components'; import { isFullPath } from '@trezor/utils'; import { spacingsPx } from '@trezor/theme'; +import { selectTorState } from 'src/reducers/suite/suiteReducer'; +import { useSelector, useTranslation } from 'src/hooks/suite'; import { ActionColumn, SectionItem, TextColumn, Translation } from 'src/components/suite'; const Container = styled.div` diff --git a/packages/suite/src/views/settings/SettingsLoader.tsx b/packages/suite/src/views/settings/SettingsLoader.tsx index 56368e85192..22f58e92b42 100644 --- a/packages/suite/src/views/settings/SettingsLoader.tsx +++ b/packages/suite/src/views/settings/SettingsLoader.tsx @@ -1,9 +1,13 @@ import React from 'react'; -import { H3, Spinner, motionEasing } from '@trezor/components'; + import styled from 'styled-components'; +import { motion, AnimatePresence } from 'framer-motion'; + +import { H3, Spinner, motionEasing } from '@trezor/components'; import { spacings, spacingsPx } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; -import { motion, AnimatePresence } from 'framer-motion'; + const Container = styled(motion.div)` background-color: ${({ theme }) => theme.backgroundTertiaryDefaultOnElevation0}; diff --git a/packages/suite/src/views/start/StartContent.tsx b/packages/suite/src/views/start/StartContent.tsx index 4b9d0af6303..a867f5bfd99 100644 --- a/packages/suite/src/views/start/StartContent.tsx +++ b/packages/suite/src/views/start/StartContent.tsx @@ -1,15 +1,19 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { DataAnalytics } from '@trezor/components'; import { analytics } from '@trezor/suite-analytics'; import { DOCS_ANALYTICS_URL, DATA_TOS_URL } from '@trezor/urls'; import { selectIsAnalyticsConfirmed } from '@suite-common/analytics'; +import { typography } from '@trezor/theme'; + import { rerun } from 'src/actions/recovery/recoveryActions'; import { PrerequisitesGuide, TrezorLink } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { selectPrerequisite } from 'src/reducers/suite/suiteReducer'; + import { SecurityCheck } from '../onboarding/steps/SecurityCheck/SecurityCheck'; -import { typography } from '@trezor/theme'; const StyledTrezorLink = styled(TrezorLink)` color: ${({ theme }) => theme.legacy.TYPE_LIGHT_GREY}; diff --git a/packages/suite/src/views/start/SuiteStart.tsx b/packages/suite/src/views/start/SuiteStart.tsx index dc465707016..b24022c8cac 100644 --- a/packages/suite/src/views/start/SuiteStart.tsx +++ b/packages/suite/src/views/start/SuiteStart.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { WelcomeLayout } from 'src/components/suite'; + import { StartContent } from './StartContent'; const Content = styled.div` diff --git a/packages/suite/src/views/suite/ErrorPage.tsx b/packages/suite/src/views/suite/ErrorPage.tsx index cff4f6b9009..c8c5e1ad200 100644 --- a/packages/suite/src/views/suite/ErrorPage.tsx +++ b/packages/suite/src/views/suite/ErrorPage.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; -import { Translation } from 'src/components/suite'; import { Paragraph, H2, Button, Link, Image } from '@trezor/components'; +import { Translation } from 'src/components/suite'; + + const Wrapper = styled.div` display: flex; flex: 1; diff --git a/packages/suite/src/views/suite/SwitchDevice/CardWithDevice.tsx b/packages/suite/src/views/suite/SwitchDevice/CardWithDevice.tsx index 54242bf98c1..38b24190313 100644 --- a/packages/suite/src/views/suite/SwitchDevice/CardWithDevice.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/CardWithDevice.tsx @@ -2,11 +2,12 @@ import { ReactNode } from 'react'; import { AnimatePresence, motion } from 'framer-motion'; import styled from 'styled-components'; + import { Card, IconName, motionAnimation, useElevation } from '@trezor/components'; import * as deviceUtils from '@suite-common/suite-utils'; +import { Elevation, mapElevationToBorder, spacingsPx } from '@trezor/theme'; import type { TrezorDevice, ForegroundAppProps } from 'src/types/suite'; -import { Elevation, mapElevationToBorder, spacingsPx } from '@trezor/theme'; import { DeviceHeader } from './DeviceItem/DeviceHeader'; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/AddWalletButton.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/AddWalletButton.tsx index b5715e6a3c6..c23f261f458 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/AddWalletButton.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/AddWalletButton.tsx @@ -1,11 +1,11 @@ import { Button, Column, HotkeyBadge, Row, Tooltip } from '@trezor/components'; +import { spacings } from '@trezor/theme'; +import { WalletType } from '@suite-common/wallet-types'; import { Translation } from 'src/components/suite'; import { TrezorDevice, AcquiredDevice, ForegroundAppProps } from 'src/types/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { SUITE } from 'src/actions/suite/constants'; -import { spacings } from '@trezor/theme'; -import { WalletType } from '@suite-common/wallet-types'; import { addWalletThunk } from 'src/actions/wallet/addWalletThunk'; interface AddWalletButtonProps { diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceConnectionText.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceConnectionText.tsx index 1d3fc985664..9346fb160e3 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceConnectionText.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceConnectionText.tsx @@ -1,7 +1,9 @@ +import { ReactNode } from 'react'; + +import styled, { css } from 'styled-components'; + import { Icon, IconName, IconVariant, Text } from '@trezor/components'; import { spacingsPx, typography } from '@trezor/theme'; -import styled, { css } from 'styled-components'; -import { ReactNode } from 'react'; const Container = styled.span<{ $isAction?: boolean }>` ${typography.label} diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceDetail.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceDetail.tsx index 070900240e5..2629d22aaf1 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceDetail.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceDetail.tsx @@ -1,6 +1,7 @@ -import { TruncateWithTooltip, Column } from '@trezor/components'; import { ReactNode } from 'react'; +import { TruncateWithTooltip, Column } from '@trezor/components'; + export const DeviceDetail = ({ label, children }: { label: string; children: ReactNode }) => ( {label} diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceHeader.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceHeader.tsx index 52ca0a15cc4..a3499d69d0a 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceHeader.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceHeader.tsx @@ -1,13 +1,15 @@ import styled from 'styled-components'; +import { motion } from 'framer-motion'; + import { IconButton, IconName, Row, TOOLTIP_DELAY_LONG, Tooltip } from '@trezor/components'; +import { spacings, spacingsPx } from '@trezor/theme'; +import { selectDevice } from '@suite-common/wallet-core'; + import { DeviceStatus } from 'src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceStatus'; import { isWebUsb } from 'src/utils/suite/transport'; import { Translation, WebUsbButton } from 'src/components/suite'; -import { spacings, spacingsPx } from '@trezor/theme'; import { useSelector } from 'src/hooks/suite'; -import { motion } from 'framer-motion'; import { ForegroundAppProps, TrezorDevice } from 'src/types/suite'; -import { selectDevice } from '@suite-common/wallet-core'; import { WebUsbIconButton } from 'src/components/suite/WebUsbButton'; const Container = styled.div<{ $isFullHeaderVisible: boolean }>` diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx index 0ce2f655961..3af39084e4a 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx @@ -1,18 +1,19 @@ import styled from 'styled-components'; + import { variables, Column } from '@trezor/components'; import * as deviceUtils from '@suite-common/suite-utils'; - import { selectDevice, selectDeviceThunk, acquireDevice } from '@suite-common/wallet-core'; +import { spacings } from '@trezor/theme'; + import { useDispatch, useSelector } from 'src/hooks/suite'; +import type { TrezorDevice, AcquiredDevice, ForegroundAppProps } from 'src/types/suite'; +import { redirectAfterWalletSelectedThunk } from 'src/actions/wallet/addWalletThunk'; import { WalletInstance } from './WalletInstance'; import { AddWalletButton } from './AddWalletButton'; - -import type { TrezorDevice, AcquiredDevice, ForegroundAppProps } from 'src/types/suite'; -import { spacings } from '@trezor/theme'; import { CardWithDevice } from '../CardWithDevice'; import { DeviceWarning } from './DeviceWarning'; -import { redirectAfterWalletSelectedThunk } from 'src/actions/wallet/addWalletThunk'; + const WalletsWrapper = styled.div<{ $enabled: boolean }>` opacity: ${({ $enabled }) => ($enabled ? 1 : 0.5)}; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx index 9e6b32c15eb..0f5b287ae95 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx @@ -1,12 +1,16 @@ +import React, { MouseEventHandler } from 'react'; + import * as deviceUtils from '@suite-common/suite-utils'; import { TOOLTIP_DELAY_LONG, TruncateWithTooltip } from '@trezor/components'; -import React, { MouseEventHandler } from 'react'; +import { TrezorDevice } from '@suite-common/suite-types'; + import { Translation } from 'src/components/suite'; -import { DeviceConnectionText } from './DeviceConnectionText'; import { selectLabelingDataForWallet } from 'src/reducers/suite/metadataReducer'; import { useSelector } from 'src/hooks/suite'; import { useWalletLabeling } from 'src/components/suite/labeling/WalletLabeling'; -import { TrezorDevice } from '@suite-common/suite-types'; + +import { DeviceConnectionText } from './DeviceConnectionText'; + type DeviceStatusTextProps = { onRefreshClick?: MouseEventHandler; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/EjectButton.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/EjectButton.tsx index ddf77186670..f524871a574 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/EjectButton.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/EjectButton.tsx @@ -1,8 +1,10 @@ import styled, { useTheme } from 'styled-components'; import { Tooltip, Icon, useElevation } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { Elevation, borders, mapElevationToBackground, spacingsPx } from '@trezor/theme'; + +import { Translation } from 'src/components/suite'; + import { ContentType } from '../types'; const EjectContainer = styled.div<{ $elevation: Elevation }>` diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/EjectConfirmation.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/EjectConfirmation.tsx index caf21530560..f9794c693f6 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/EjectConfirmation.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/EjectConfirmation.tsx @@ -1,12 +1,16 @@ +import { MouseEventHandler, ReactNode } from 'react'; + import styled from 'styled-components'; -import { useDispatch, useSelector } from 'src/hooks/suite'; + import { H3, Button, Text } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { deviceActions } from '@suite-common/wallet-core'; import { analytics, EventType } from '@trezor/suite-analytics'; import { AcquiredDevice } from '@suite-common/suite-types'; -import { MouseEventHandler, ReactNode } from 'react'; import { spacings, spacingsPx } from '@trezor/theme'; + +import { Translation } from 'src/components/suite'; +import { useDispatch, useSelector } from 'src/hooks/suite'; + import { selectSuiteSettings } from '../../../../reducers/suite/suiteReducer'; const Container = styled.div` diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx index 7555980b0a2..4672dd392f4 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx @@ -1,14 +1,17 @@ import styled from 'styled-components'; import { CollapsibleBox, Text, Row } from '@trezor/components'; -import { Translation } from 'src/components/suite'; -import { ViewOnlyRadios } from './ViewOnlyRadios'; import { spacings, spacingsPx } from '@trezor/theme'; -import { useDispatch } from 'src/hooks/suite'; import { toggleRememberDevice } from '@suite-common/wallet-core'; -import { ContentType } from '../types'; import { AcquiredDevice } from '@suite-common/suite-types'; +import { Translation } from 'src/components/suite'; +import { useDispatch } from 'src/hooks/suite'; + +import { ViewOnlyRadios } from './ViewOnlyRadios'; +import { ContentType } from '../types'; + + type ViewOnlyProps = { setContentType: (contentType: ContentType) => void; instance: AcquiredDevice; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnlyRadios.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnlyRadios.tsx index d688f814f7d..fcc46a09f6e 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnlyRadios.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnlyRadios.tsx @@ -2,9 +2,11 @@ import styled, { useTheme } from 'styled-components'; import { Text, Radio, Icon, useElevation, Row, Column, Paragraph } from '@trezor/components'; import { Elevation, borders, mapElevationToBorder, spacings, spacingsPx } from '@trezor/theme'; +import { AcquiredDevice } from '@suite-common/suite-types'; + import { Translation } from 'src/components/suite'; + import { ContentType } from '../types'; -import { AcquiredDevice } from '@suite-common/suite-types'; type ViewOnlyRadiosProps = { isViewOnlyActive: boolean; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx index b5aa45470c8..107d6b3549b 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx @@ -1,3 +1,5 @@ +import { useState } from 'react'; + import styled, { css } from 'styled-components'; import { @@ -18,16 +20,17 @@ import { import { useDispatch, useSelector } from 'src/hooks/suite'; import { AcquiredDevice, ForegroundAppProps } from 'src/types/suite'; import { selectLabelingDataForWallet } from 'src/reducers/suite/metadataReducer'; -import { useWalletLabeling } from '../../../../components/suite/labeling/WalletLabeling'; import { METADATA_LABELING } from 'src/actions/suite/constants'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { FiatHeader } from 'src/components/wallet/FiatHeader'; -import { useState } from 'react'; +import { redirectAfterWalletSelectedThunk } from 'src/actions/wallet/addWalletThunk'; + +import { useWalletLabeling } from '../../../../components/suite/labeling/WalletLabeling'; import { EjectConfirmation, EjectConfirmationDisableViewOnly } from './EjectConfirmation'; import { ContentType } from '../types'; import { ViewOnly } from './ViewOnly'; import { EjectButton } from './EjectButton'; -import { redirectAfterWalletSelectedThunk } from 'src/actions/wallet/addWalletThunk'; + const RelativeContainer = styled.div` position: relative; diff --git a/packages/suite/src/views/suite/SwitchDevice/SwitchDevice.tsx b/packages/suite/src/views/suite/SwitchDevice/SwitchDevice.tsx index e1f7251682b..ab370ad2b8a 100644 --- a/packages/suite/src/views/suite/SwitchDevice/SwitchDevice.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/SwitchDevice.tsx @@ -1,13 +1,13 @@ import * as deviceUtils from '@suite-common/suite-utils'; import { selectDevice, selectDevices } from '@suite-common/wallet-core'; import { Column } from '@trezor/components'; +import { spacings } from '@trezor/theme'; import { ForegroundAppProps } from 'src/types/suite'; import { useSelector } from 'src/hooks/suite'; import { DeviceItem } from './DeviceItem/DeviceItem'; import { SwitchDeviceModal } from './SwitchDeviceModal'; -import { spacings } from '@trezor/theme'; export const SwitchDevice = ({ onCancel }: ForegroundAppProps) => { const selectedDevice = useSelector(selectDevice); diff --git a/packages/suite/src/views/suite/SwitchDevice/SwitchDeviceModal.tsx b/packages/suite/src/views/suite/SwitchDevice/SwitchDeviceModal.tsx index 220ca04df7b..72b8933c1a6 100644 --- a/packages/suite/src/views/suite/SwitchDevice/SwitchDeviceModal.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/SwitchDeviceModal.tsx @@ -1,8 +1,11 @@ import { useEvent } from 'react-use'; + import styled from 'styled-components'; import { motion } from 'framer-motion'; + import { spacings } from '@trezor/theme'; import { NewModal, Column } from '@trezor/components'; + import { TrafficLightOffset } from '../../../components/suite/TrafficLightOffset'; type SwitchDeviceModalProps = { diff --git a/packages/suite/src/views/suite/bridge-requested/index.tsx b/packages/suite/src/views/suite/bridge-requested/index.tsx index 0f2e6514679..49d1f3d0a97 100644 --- a/packages/suite/src/views/suite/bridge-requested/index.tsx +++ b/packages/suite/src/views/suite/bridge-requested/index.tsx @@ -1,14 +1,18 @@ import { useState } from 'react'; + import styled from 'styled-components'; -import { Translation, Modal, Metadata } from 'src/components/suite'; + import { Button, Card, Image, Text } from '@trezor/components'; -import { goto } from 'src/actions/suite/routerActions'; -import { useDispatch, useLayout } from 'src/hooks/suite'; import { desktopApi } from '@trezor/suite-desktop-api'; -import { AutoStart } from 'src/views/settings/SettingsGeneral/AutoStart'; import { isDesktop } from '@trezor/env-utils'; import { spacings } from '@trezor/theme'; +import { Translation, Modal, Metadata } from 'src/components/suite'; +import { goto } from 'src/actions/suite/routerActions'; +import { useDispatch, useLayout } from 'src/hooks/suite'; +import { AutoStart } from 'src/views/settings/SettingsGeneral/AutoStart'; + + const StyledModal = styled(Modal)` ${Modal.BottomBar} { > * { diff --git a/packages/suite/src/views/suite/bridge/index.tsx b/packages/suite/src/views/suite/bridge/index.tsx index 04f3274cb76..46904b8e20e 100644 --- a/packages/suite/src/views/suite/bridge/index.tsx +++ b/packages/suite/src/views/suite/bridge/index.tsx @@ -1,11 +1,14 @@ import styled from 'styled-components'; -import { Translation, Modal, Metadata } from 'src/components/suite'; + import { Button, Link } from '@trezor/components'; +import { DATA_URL } from '@trezor/urls'; + +import { Translation, Modal, Metadata } from 'src/components/suite'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { isWebUsb } from 'src/utils/suite/transport'; import { useOpenSuiteDesktop } from 'src/hooks/suite/useOpenSuiteDesktop'; -import { DATA_URL } from '@trezor/urls'; + // eslint-disable-next-line local-rules/no-override-ds-component const StyledButton = styled(Button)` diff --git a/packages/suite/src/views/suite/notifications/index.tsx b/packages/suite/src/views/suite/notifications/index.tsx index efe2deec44a..8dcc03d6eba 100644 --- a/packages/suite/src/views/suite/notifications/index.tsx +++ b/packages/suite/src/views/suite/notifications/index.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Card } from '@trezor/components'; import { Notifications, Translation } from 'src/components/suite'; diff --git a/packages/suite/src/views/suite/version/index.tsx b/packages/suite/src/views/suite/version/index.tsx index 4b69a7c5bb0..59f70ceb3f1 100644 --- a/packages/suite/src/views/suite/version/index.tsx +++ b/packages/suite/src/views/suite/version/index.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { Link, H2, Paragraph } from '@trezor/components'; -import { Modal } from 'src/components/suite'; import { getCommitHash, getSuiteVersion } from '@trezor/env-utils'; +import { Modal } from 'src/components/suite'; + const Wrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/view-only/MacWindow.tsx b/packages/suite/src/views/view-only/MacWindow.tsx index d93d3765659..187cb2ddcc5 100644 --- a/packages/suite/src/views/view-only/MacWindow.tsx +++ b/packages/suite/src/views/view-only/MacWindow.tsx @@ -1,3 +1,7 @@ +import { ReactNode } from 'react'; + +import styled from 'styled-components'; + import { ElevationContext, useElevation, variables } from '@trezor/components'; import { Elevation, @@ -6,8 +10,6 @@ import { mapElevationToBorder, spacingsPx, } from '@trezor/theme'; -import { ReactNode } from 'react'; -import styled from 'styled-components'; const MAC_WINDOW_HEIGHT = '184px'; diff --git a/packages/suite/src/views/view-only/ViewOnlyPromo.tsx b/packages/suite/src/views/view-only/ViewOnlyPromo.tsx index 9330fdb9426..ad107e6889f 100644 --- a/packages/suite/src/views/view-only/ViewOnlyPromo.tsx +++ b/packages/suite/src/views/view-only/ViewOnlyPromo.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; -import { ViewOnlyPromoContent } from './ViewOnlyPromoContent'; + import { WelcomeLayout } from 'src/components/suite'; +import { ViewOnlyPromoContent } from './ViewOnlyPromoContent'; + const Content = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx b/packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx index 3270baf7c8b..95722de74b1 100644 --- a/packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx +++ b/packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx @@ -1,3 +1,7 @@ +import { ReactNode } from 'react'; + +import styled from 'styled-components'; + import { Button, Card, @@ -9,22 +13,24 @@ import { useElevation, variables, } from '@trezor/components'; -import { FormattedCryptoAmount, Translation } from '../../components/suite'; -import styled from 'styled-components'; import { Elevation, borders, mapElevationToBackground, spacings, spacingsPx } from '@trezor/theme'; +import { selectDevice, toggleRememberDevice } from '@suite-common/wallet-core'; +import { DEFAULT_FLAGSHIP_MODEL } from '@suite-common/suite-constants'; +import { analytics, EventType } from '@trezor/suite-analytics'; + +import { goto } from 'src/actions/suite/routerActions'; + +import { FormattedCryptoAmount, Translation } from '../../components/suite'; import { PriceChartLine } from './images/PriceChartLine'; -import { ReactNode } from 'react'; import { DeviceConnectionText } from '../suite/SwitchDevice/DeviceItem/DeviceConnectionText'; import { DeviceDetail } from '../suite/SwitchDevice/DeviceItem/DeviceDetail'; import { MacWindow } from './MacWindow'; import { useDispatch, useSelector } from '../../hooks/suite'; -import { selectDevice, toggleRememberDevice } from '@suite-common/wallet-core'; import { setFlag } from '../../actions/suite/suiteActions'; import { IllustrativeExample } from './images/IllustrativeExample'; import { IllustrativeExampleArrow } from './images/IllustrativeExampleArrow'; -import { goto } from 'src/actions/suite/routerActions'; -import { DEFAULT_FLAGSHIP_MODEL } from '@suite-common/suite-constants'; -import { analytics, EventType } from '@trezor/suite-analytics'; + + const Callout = styled.div` display: flex; diff --git a/packages/suite/src/views/view-only/ViewOnlyTooltip.tsx b/packages/suite/src/views/view-only/ViewOnlyTooltip.tsx index 9d668c3952c..164ccba25ff 100644 --- a/packages/suite/src/views/view-only/ViewOnlyTooltip.tsx +++ b/packages/suite/src/views/view-only/ViewOnlyTooltip.tsx @@ -1,8 +1,10 @@ +import styled, { useTheme } from 'styled-components'; + import { Button, Icon, Text, Tooltip } from '@trezor/components'; import { borders, palette, spacingsPx, zIndices } from '@trezor/theme'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { selectSuiteFlags } from 'src/reducers/suite/suiteReducer'; -import styled, { useTheme } from 'styled-components'; import { setFlag } from 'src/actions/suite/suiteActions'; import { Translation } from 'src/components/suite'; diff --git a/packages/suite/src/views/wallet/anonymize/components/CoinjoinConfirmation.tsx b/packages/suite/src/views/wallet/anonymize/components/CoinjoinConfirmation.tsx index cff97fca022..b02c7bf5979 100644 --- a/packages/suite/src/views/wallet/anonymize/components/CoinjoinConfirmation.tsx +++ b/packages/suite/src/views/wallet/anonymize/components/CoinjoinConfirmation.tsx @@ -1,10 +1,8 @@ import { useState } from 'react'; -import { useDispatch, useSelector } from 'src/hooks/suite'; + import styled from 'styled-components'; import { Account } from '@suite-common/wallet-types'; -import { Translation, TrezorLink } from 'src/components/suite'; -import { Error } from 'src/components/suite/Error'; import { Button, Card, @@ -18,12 +16,17 @@ import { } from '@trezor/components'; import { spacingsPx, typography } from '@trezor/theme'; import { DATA_TOS_URL, ZKSNACKS_TERMS_URL } from '@trezor/urls'; + +import { Error } from 'src/components/suite/Error'; +import { Translation, TrezorLink } from 'src/components/suite'; +import { useDispatch, useSelector } from 'src/hooks/suite'; import { startCoinjoinSession } from 'src/actions/wallet/coinjoinAccountActions'; import { selectCoinjoinClient, selectStartCoinjoinSessionArguments, } from 'src/reducers/wallet/coinjoinReducer'; import { useCoinjoinSessionBlockers } from 'src/hooks/coinjoin/useCoinjoinSessionBlockers'; + import { Tile, TileProps } from './Tile'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/views/wallet/anonymize/components/Tile.tsx b/packages/suite/src/views/wallet/anonymize/components/Tile.tsx index 72fb4e66855..87dc0f196a2 100644 --- a/packages/suite/src/views/wallet/anonymize/components/Tile.tsx +++ b/packages/suite/src/views/wallet/anonymize/components/Tile.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled, { css } from 'styled-components'; import { Card, Image, PngImage, variables } from '@trezor/components'; diff --git a/packages/suite/src/views/wallet/coinmarket/DCA/CoinmarketDCALanding.tsx b/packages/suite/src/views/wallet/coinmarket/DCA/CoinmarketDCALanding.tsx index 34564f3e6bc..11876a3aaf8 100644 --- a/packages/suite/src/views/wallet/coinmarket/DCA/CoinmarketDCALanding.tsx +++ b/packages/suite/src/views/wallet/coinmarket/DCA/CoinmarketDCALanding.tsx @@ -1,4 +1,7 @@ import React from 'react'; + +import styled from 'styled-components'; + import { Card, Column, @@ -11,12 +14,12 @@ import { Row, Text, } from '@trezor/components'; -import styled from 'styled-components'; import { borders, palette, spacings, spacingsPx } from '@trezor/theme'; -import { Translation, TrezorLink } from 'src/components/suite'; import { COINMARKET_DOWNLOAD_INVITY_APP_URL } from '@trezor/urls'; -import { useSelector } from 'src/hooks/suite'; import { variables } from '@trezor/components/src/config'; + +import { Translation, TrezorLink } from 'src/components/suite'; +import { useSelector } from 'src/hooks/suite'; import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout'; import { CoinmarketContainer } from 'src/views/wallet/coinmarket/common/CoinmarketContainer'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketAddressOptions.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketAddressOptions.tsx index 85031bb0a2e..ba512c857a8 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketAddressOptions.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketAddressOptions.tsx @@ -1,22 +1,24 @@ import { useEffect, ReactElement } from 'react'; import { UseFormReturn, Control, Controller } from 'react-hook-form'; import type { MenuPlacement } from 'react-select'; + import styled from 'styled-components'; +import { CryptoId } from 'invity-api'; import type { AccountAddress } from '@trezor/connect'; -import { Translation } from 'src/components/suite'; import { variables, Select } from '@trezor/components'; +import { spacingsPx, typography } from '@trezor/theme'; +import { formatAmount } from '@suite-common/wallet-utils'; +import { networks } from '@suite-common/wallet-config'; + +import { Translation } from 'src/components/suite'; import type { Account } from 'src/types/wallet'; import { useAccountAddressDictionary } from 'src/hooks/wallet/useAccounts'; import { selectLabelingDataForAccount } from 'src/reducers/suite/metadataReducer'; import { useSelector } from 'src/hooks/suite'; import { CoinmarketBalance } from 'src/views/wallet/coinmarket/common/CoinmarketBalance'; -import { spacingsPx, typography } from '@trezor/theme'; -import { formatAmount } from '@suite-common/wallet-utils'; import { getCoinmarketNetworkDecimals } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import { networks } from '@suite-common/wallet-config'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; -import { CryptoId } from 'invity-api'; import { isCoinmarketExchangeContext } from 'src/utils/wallet/coinmarket/coinmarketTypingUtils'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { FORM_SEND_CRYPTO_CURRENCY_SELECT } from 'src/constants/wallet/coinmarket/form'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketBalance.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketBalance.tsx index 3b68d4635ee..42529b165e7 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketBalance.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketBalance.tsx @@ -1,7 +1,10 @@ +import styled from 'styled-components'; + import { networks, NetworkSymbol } from '@suite-common/wallet-config'; import { TokenAddress } from '@suite-common/wallet-types'; import { amountToSmallestUnit } from '@suite-common/wallet-utils'; import { typography } from '@trezor/theme'; + import { FiatValue, HiddenPlaceholder, Translation } from 'src/components/suite'; import { useFiatFromCryptoValue } from 'src/hooks/suite/useFiatFromCryptoValue'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; @@ -10,7 +13,6 @@ import { coinmarketGetAccountLabel, getCoinmarketNetworkDecimals, } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import styled from 'styled-components'; const CoinmarketBalanceWrapper = styled.div` ${typography.label} diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketCoinLogo.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketCoinLogo.tsx index 4002397acf7..9ea7cc42f52 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketCoinLogo.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketCoinLogo.tsx @@ -1,7 +1,9 @@ +import styled from 'styled-components'; + import { AssetLogo } from '@trezor/components'; + import { CoinmarketCoinLogoProps } from 'src/types/coinmarket/coinmarket'; import { parseCryptoId } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import styled from 'styled-components'; const Wrapper = styled.div``; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketContainer.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketContainer.tsx index 3d797697938..b0f59dee0f5 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketContainer.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketContainer.tsx @@ -1,4 +1,5 @@ import { ElementType } from 'react'; + import { useSelector } from 'src/hooks/suite'; import { CoinmarketFooter } from 'src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketFooter'; import { CoinmarketLayoutHeader } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutHeader'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketCryptoAmount.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketCryptoAmount.tsx index 886586e93c4..9b202339058 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketCryptoAmount.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketCryptoAmount.tsx @@ -1,10 +1,12 @@ -import { spacings } from '@trezor/theme'; -import { FormattedCryptoAmount } from 'src/components/suite'; import styled from 'styled-components'; +import { CryptoId } from 'invity-api'; + +import { spacings } from '@trezor/theme'; import { Row } from '@trezor/components'; + +import { FormattedCryptoAmount } from 'src/components/suite'; import { CoinmarketCoinLogo } from 'src/views/wallet/coinmarket/common/CoinmarketCoinLogo'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; -import { CryptoId } from 'invity-api'; import { CoinmarketTestWrapper } from 'src/views/wallet/coinmarket'; const LogoWrapper = styled.div` diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuy.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuy.tsx index e40ad32b71e..9c06e5783fe 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuy.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuy.tsx @@ -1,6 +1,7 @@ import styled from 'styled-components'; import { Card } from '@trezor/components'; + import { goto } from 'src/actions/suite/routerActions'; import { useDispatch } from 'src/hooks/suite'; import { useCoinmarketDetailContext } from 'src/hooks/wallet/coinmarket/useCoinmarketDetail'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentFailed.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentFailed.tsx index abee70d39c9..9e63ec728ed 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentFailed.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentFailed.tsx @@ -1,10 +1,12 @@ import styled from 'styled-components'; + import { Button, variables, Link, Image } from '@trezor/components'; +import { spacings, spacingsPx } from '@trezor/theme'; + import { useDispatch } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; import { Translation } from 'src/components/suite/Translation'; import { goto } from 'src/actions/suite/routerActions'; -import { spacings, spacingsPx } from '@trezor/theme'; const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentProcessing.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentProcessing.tsx index c11cfb7cfbf..c527f3fd763 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentProcessing.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentProcessing.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { variables, Spinner, Button, Link } from '@trezor/components'; -import { Translation } from 'src/components/suite/Translation'; import { spacingsPx } from '@trezor/theme'; +import { Translation } from 'src/components/suite/Translation'; + const Wrapper = styled.div` display: flex; align-items: center; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentSuccessful.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentSuccessful.tsx index ee0fadc0b81..335f3d055c6 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentSuccessful.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentSuccessful.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { Button, variables, Image } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentWaitingForUser.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentWaitingForUser.tsx index c6c03f564bd..7bc0c8eb0f9 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentWaitingForUser.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentWaitingForUser.tsx @@ -1,14 +1,18 @@ import { useState } from 'react'; + import styled from 'styled-components'; +import { BuyTrade, BuyTradeStatus } from 'invity-api'; + import { Button, variables, Image } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite/Translation'; -import { BuyTrade, BuyTradeStatus } from 'invity-api'; import { Account } from 'src/types/wallet'; import invityAPI from 'src/services/suite/invityAPI'; import { createTxLink } from 'src/utils/wallet/coinmarket/buyUtils'; import { submitRequestForm } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; import { useDispatch } from 'src/hooks/suite'; -import { spacings } from '@trezor/theme'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchange.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchange.tsx index a51a5d4967f..9ec50f93de7 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchange.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchange.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Card } from '@trezor/components'; import { goto } from 'src/actions/suite/routerActions'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentConverting.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentConverting.tsx index 17ccf6f0b9b..2772d25ce63 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentConverting.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentConverting.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { variables, Spinner, Button, Link } from '@trezor/components'; -import { Translation } from 'src/components/suite/Translation'; import { spacingsPx } from '@trezor/theme'; +import { Translation } from 'src/components/suite/Translation'; + const Wrapper = styled.div` display: flex; align-items: center; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentFailed.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentFailed.tsx index 5abde79154d..9e8b6297048 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentFailed.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentFailed.tsx @@ -1,11 +1,12 @@ import styled from 'styled-components'; import { Button, variables, Link, Image } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; + import { useDispatch } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; import { Translation } from 'src/components/suite/Translation'; import { goto } from 'src/actions/suite/routerActions'; -import { spacingsPx } from '@trezor/theme'; import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common/CoinmarketTransactionId'; const Wrapper = styled.div` diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentKYC.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentKYC.tsx index 90086d7fd73..06c4b8f15bd 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentKYC.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentKYC.tsx @@ -1,12 +1,13 @@ import styled from 'styled-components'; +import { ExchangeProviderInfo } from 'invity-api'; import { Button, variables, Link, Image } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; + import { useDispatch } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; import { Translation } from 'src/components/suite/Translation'; -import { ExchangeProviderInfo } from 'invity-api'; import { goto } from 'src/actions/suite/routerActions'; -import { spacingsPx } from '@trezor/theme'; import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common/CoinmarketTransactionId'; const Wrapper = styled.div` diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentSending.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentSending.tsx index 294c0f006fe..44b67313d18 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentSending.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentSending.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { variables, Spinner, Button, Link } from '@trezor/components'; -import { Translation } from 'src/components/suite/Translation'; import { spacingsPx } from '@trezor/theme'; +import { Translation } from 'src/components/suite/Translation'; + const Wrapper = styled.div` display: flex; align-items: center; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentSuccessful.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentSuccessful.tsx index 36863526df5..1556e589b62 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentSuccessful.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailExchange/CoinmarketDetailExchangePaymentSuccessful.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { Button, variables, Image } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSell.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSell.tsx index eb74e7105c6..711ace19bfd 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSell.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSell.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Card } from '@trezor/components'; import { goto } from 'src/actions/suite/routerActions'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentFailed.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentFailed.tsx index ba45a66e606..81a14c8ff37 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentFailed.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentFailed.tsx @@ -1,11 +1,12 @@ import styled from 'styled-components'; import { Button, variables, Link, Image } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; + import { useDispatch } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; import { Translation } from 'src/components/suite/Translation'; import { goto } from 'src/actions/suite/routerActions'; -import { spacingsPx } from '@trezor/theme'; import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common/CoinmarketTransactionId'; const Wrapper = styled.div` diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentPending.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentPending.tsx index 6871f99af14..f7ea48c2110 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentPending.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentPending.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { variables, Spinner, Button, Link } from '@trezor/components'; -import { Translation } from 'src/components/suite/Translation'; import { spacingsPx } from '@trezor/theme'; +import { Translation } from 'src/components/suite/Translation'; + const Wrapper = styled.div` display: flex; align-items: center; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentSuccessful.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentSuccessful.tsx index b21377ddbb2..74a4a583353 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentSuccessful.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSellPaymentSuccessful.tsx @@ -1,10 +1,12 @@ import styled from 'styled-components'; + import { Button, variables, Image } from '@trezor/components'; +import { borders } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; import { goto } from 'src/actions/suite/routerActions'; -import { borders } from '@trezor/theme'; const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersAmounts.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersAmounts.tsx index b92e8a10f39..7aa890d5012 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersAmounts.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersAmounts.tsx @@ -1,5 +1,11 @@ import React from 'react'; + import styled, { useTheme } from 'styled-components'; +import { CryptoId } from 'invity-api'; + +import { spacingsPx } from '@trezor/theme'; +import { Icon } from '@trezor/components'; + import { getCryptoQuoteAmountProps, isCoinmarketBuyContext, @@ -7,10 +13,7 @@ import { } from 'src/utils/wallet/coinmarket/coinmarketTypingUtils'; import { FormattedCryptoAmount } from 'src/components/suite'; import { CoinmarketTradeDetailType } from 'src/types/coinmarket/coinmarket'; -import { spacingsPx } from '@trezor/theme'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; -import { CryptoId } from 'invity-api'; -import { Icon } from '@trezor/components'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; import { CoinmarketFiatAmount } from 'src/views/wallet/coinmarket/common/CoinmarketFiatAmount'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersItem.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersItem.tsx index 73f3180549c..031336b90b2 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersItem.tsx @@ -1,8 +1,11 @@ import styled, { useTheme } from 'styled-components'; +import { SellFiatTrade } from 'invity-api'; + import { Badge, Button, Card, Text } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { spacings, spacingsPx } from '@trezor/theme'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; + +import { Translation } from 'src/components/suite'; import { getCryptoQuoteAmountProps, getProvidersInfoProps, @@ -12,7 +15,6 @@ import { isCoinmarketSellContext, } from 'src/utils/wallet/coinmarket/coinmarketTypingUtils'; import { getTagAndInfoNote } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import { SellFiatTrade } from 'invity-api'; import { CoinmarketFormContextValues } from 'src/types/coinmarket/coinmarketForm'; import { CoinmarketTradeDetailBuySellType, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersPaymentInfo.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersPaymentInfo.tsx index 17db763529a..092f19f0999 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersPaymentInfo.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersPaymentInfo.tsx @@ -1,11 +1,13 @@ +import styled from 'styled-components'; + +import { spacingsPx } from '@trezor/theme'; + import { CoinmarketTradeBuySellType, CoinmarketTradeDetailBuySellType, CoinmarketTradeType, } from 'src/types/coinmarket/coinmarket'; import { Translation } from 'src/components/suite'; -import styled from 'styled-components'; -import { spacingsPx } from '@trezor/theme'; import { CoinmarketPaymentPlainType } from 'src/views/wallet/coinmarket/common/CoinmarketPaymentPlainType'; const PaymentInfoWrapper = styled.div` diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketFooter.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketFooter.tsx index 4ee46c32e32..c892695e69f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketFooter.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketFooter.tsx @@ -1,10 +1,13 @@ -import { variables, Icon, Link, Image, Row } from '@trezor/components'; import { useState, useRef } from 'react'; + import styled, { css } from 'styled-components'; + +import { variables, Icon, Link, Image, Row } from '@trezor/components'; import { useOnClickOutside } from '@trezor/react-utils'; import { DATA_TOS_INVITY_URL, INVITY_URL } from '@trezor/urls'; -import { Translation } from 'src/components/suite'; import { borders, spacings, spacingsPx, zIndices } from '@trezor/theme'; + +import { Translation } from 'src/components/suite'; import { CoinmarketFooterLogoWrapper } from 'src/views/wallet/coinmarket'; import { CoinmarketProvidedByInvity } from 'src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketProvidedByInvity'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketProvidedByInvity.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketProvidedByInvity.tsx index 4f932fca524..e0122de17da 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketProvidedByInvity.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketProvidedByInvity.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; -import { Translation } from 'src/components/suite'; + import { INVITY_URL } from '@trezor/urls'; import { variables, Link, Image } from '@trezor/components'; + +import { Translation } from 'src/components/suite'; import { CoinmarketFooterLogoWrapper } from 'src/views/wallet/coinmarket'; const Wrapper = styled.div` diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccount.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccount.tsx index c487e11a552..bd3aba50f5e 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccount.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccount.tsx @@ -1,5 +1,12 @@ import { Controller } from 'react-hook-form'; +import { createFilter } from 'react-select'; + +import styled from 'styled-components'; +import { FiatCurrencyCode } from 'invity-api'; + import { Row, Select } from '@trezor/components'; +import { spacings, spacingsPx } from '@trezor/theme'; + import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { CoinmarketAccountOptionsGroupOptionProps, @@ -13,13 +20,9 @@ import { CoinmarketFormInputAccountProps, CoinmarketSellFormProps, } from 'src/types/coinmarket/coinmarketForm'; -import { createFilter } from 'react-select'; import { CoinmarketFormInputAccountOption } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccountOption'; import { useCoinmarketFiatValues } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketFiatValues'; import { CoinmarketBalance } from 'src/views/wallet/coinmarket/common/CoinmarketBalance'; -import styled from 'styled-components'; -import { spacings, spacingsPx } from '@trezor/theme'; -import { FiatCurrencyCode } from 'invity-api'; import { AccountTypeBadge } from 'src/components/suite/AccountTypeBadge'; import { useCoinmarketBuildAccountGroups } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketBuildAccountGroups'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccountOption.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccountOption.tsx index 60a1742ff3d..d2517b24e91 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccountOption.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccountOption.tsx @@ -1,5 +1,6 @@ import { amountToSmallestUnit } from '@suite-common/wallet-utils'; import { useElevation } from '@trezor/components'; + import { HiddenPlaceholder } from 'src/components/suite'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCountry.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCountry.tsx index bea4f501d31..9d9a3e76e85 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCountry.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCountry.tsx @@ -1,11 +1,14 @@ import { Control, Controller } from 'react-hook-form'; + +import styled from 'styled-components'; + import { Flag, Select } from '@trezor/components'; +import { borders, spacingsPx } from '@trezor/theme'; + import regional from 'src/constants/wallet/coinmarket/regional'; import { CountryOption } from 'src/types/wallet/coinmarketCommonTypes'; import { getCountryLabelParts } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import styled from 'styled-components'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; -import { borders, spacingsPx } from '@trezor/theme'; import { CoinmarketFormInputLabel } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputLabel'; import { CoinmarketBuySellFormProps, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCryptoSelect.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCryptoSelect.tsx index 0243e00da15..97a5c7e1bf9 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCryptoSelect.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCryptoSelect.tsx @@ -1,11 +1,15 @@ import { Controller } from 'react-hook-form'; +import { useMemo, useState } from 'react'; + import { Select, useElevation } from '@trezor/components'; +import { SelectAssetModal } from '@trezor/product-components'; +import { networks, NetworkSymbol } from '@suite-common/wallet-config'; + import { CoinmarketAccountOptionsGroupOptionProps, CoinmarketCryptoSelectItemProps, CoinmarketTradeBuyExchangeType, } from 'src/types/coinmarket/coinmarket'; -import { useMemo, useState } from 'react'; import { CoinmarketFormOption, CoinmarketFormOptionLabel, @@ -22,8 +26,6 @@ import { import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; import { parseCryptoId } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; -import { SelectAssetModal } from '@trezor/product-components'; -import { networks, NetworkSymbol } from '@suite-common/wallet-config'; import { FORM_CRYPTO_CURRENCY_SELECT, FORM_RECEIVE_CRYPTO_CURRENCY_SELECT, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCurrency.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCurrency.tsx index d38457ca639..7a53621999e 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCurrency.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCurrency.tsx @@ -1,7 +1,9 @@ -import { buildCurrencyOptions } from '@suite-common/wallet-utils'; -import { Select } from '@trezor/components'; import { useMemo } from 'react'; import { Control, Controller } from 'react-hook-form'; + +import { buildCurrencyOptions } from '@suite-common/wallet-utils'; +import { Select } from '@trezor/components'; + import { FORM_FIAT_CURRENCY_SELECT, FORM_FIAT_INPUT, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputCryptoAmount.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputCryptoAmount.tsx index f519c4b90ff..eae06081c4f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputCryptoAmount.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputCryptoAmount.tsx @@ -1,3 +1,11 @@ +import { FieldErrors } from 'react-hook-form'; + +import { getInputState } from '@suite-common/wallet-utils'; +import { formInputsMaxLength } from '@suite-common/validators'; +import { useFormatters } from '@suite-common/formatters'; +import { useDidUpdate } from '@trezor/react-utils'; +import { FormState } from '@suite-common/wallet-types'; + import { useTranslation } from 'src/hooks/suite'; import { NumberInput } from 'src/components/suite'; import { @@ -7,10 +15,7 @@ import { validateMin, validateReserveOrBalance, } from 'src/utils/suite/validation'; -import { getInputState } from '@suite-common/wallet-utils'; -import { formInputsMaxLength } from '@suite-common/validators'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; -import { useFormatters } from '@suite-common/formatters'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { CoinmarketAllFormProps, @@ -19,18 +24,15 @@ import { CoinmarketSellExchangeFormProps, } from 'src/types/coinmarket/coinmarketForm'; import { CoinmarketFormOptionLabel } from 'src/views/wallet/coinmarket'; -import { FieldErrors } from 'react-hook-form'; import { coinmarketGetAccountLabel, getCoinmarketNetworkDecimals, } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import { useDidUpdate } from '@trezor/react-utils'; import { FORM_OUTPUT_AMOUNT, FORM_OUTPUT_MAX } from 'src/constants/wallet/coinmarket/form'; import { CoinmarketAccountOptionsGroupOptionProps, CoinmarketCryptoListProps, } from 'src/types/coinmarket/coinmarket'; -import { FormState } from '@suite-common/wallet-types'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; import { isCoinmarketBuyContext, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputFiat.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputFiat.tsx index 2f5431923ba..88db3ac4a69 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputFiat.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputFiat.tsx @@ -1,10 +1,15 @@ +import { FieldErrors, UseControllerProps } from 'react-hook-form'; + +import styled from 'styled-components'; + +import { getInputState } from '@suite-common/wallet-utils'; +import { formInputsMaxLength } from '@suite-common/validators'; +import { useDidUpdate } from '@trezor/react-utils'; + import { useTranslation } from 'src/hooks/suite'; import { NumberInput } from 'src/components/suite'; import { validateDecimals, validateMin } from 'src/utils/suite/validation'; -import { getInputState } from '@suite-common/wallet-utils'; -import { formInputsMaxLength } from '@suite-common/validators'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; -import { useDidUpdate } from '@trezor/react-utils'; import { CoinmarketFormInputCurrency } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCurrency'; import { CoinmarketAllFormProps, @@ -12,8 +17,6 @@ import { CoinmarketFormInputFiatCryptoProps, CoinmarketSellExchangeFormProps, } from 'src/types/coinmarket/coinmarketForm'; -import styled from 'styled-components'; -import { FieldErrors, UseControllerProps } from 'react-hook-form'; import { FORM_OUTPUT_AMOUNT, FORM_OUTPUT_FIAT } from 'src/constants/wallet/coinmarket/form'; import { isCoinmarketExchangeContext } from 'src/utils/wallet/coinmarket/coinmarketTypingUtils'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputLoader.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputLoader.tsx index 3b2ed8d7f98..5f9a353776e 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputLoader.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputLoader.tsx @@ -1,6 +1,7 @@ +import styled from 'styled-components'; + import { Spinner, useElevation } from '@trezor/components'; import { Elevation, borders, mapElevationToBackground, spacingsPx, zIndices } from '@trezor/theme'; -import styled from 'styled-components'; const CoinmarketFormInputLoaderWrapper = styled.div<{ $elevation: Elevation }>` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputPaymentMethod.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputPaymentMethod.tsx index c9f7952411f..bd80ea39031 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputPaymentMethod.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputPaymentMethod.tsx @@ -1,5 +1,7 @@ import { Control, Controller } from 'react-hook-form'; + import { Select } from '@trezor/components'; + import { CoinmarketPaymentMethodListProps, CoinmarketTradeBuySellType, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherCryptoFiat.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherCryptoFiat.tsx index 1c26cddd694..69429d30cb6 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherCryptoFiat.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherCryptoFiat.tsx @@ -1,4 +1,5 @@ import { TextButton } from '@trezor/components'; + import { Translation } from 'src/components/suite'; interface CoinmarketFormSwitcherCryptoFiatProps { diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherExchangeRates.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherExchangeRates.tsx index 5f6a28e39e2..ada66db43f1 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherExchangeRates.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherExchangeRates.tsx @@ -1,11 +1,14 @@ +import { UseFormSetValue } from 'react-hook-form'; + import styled, { css } from 'styled-components'; + import { Radio } from '@trezor/components'; import { variables } from '@trezor/components/src/config'; -import { Translation } from 'src/components/suite'; import { borders, spacingsPx } from '@trezor/theme'; -import { CoinmarketExchangeFormProps, RateType } from 'src/types/coinmarket/coinmarketForm'; -import { UseFormSetValue } from 'react-hook-form'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; + +import { Translation } from 'src/components/suite'; +import { CoinmarketExchangeFormProps, RateType } from 'src/types/coinmarket/coinmarketForm'; import { FORM_RATE_FIXED, FORM_RATE_FLOATING, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInputs.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInputs.tsx index 2077e0f472d..7c39f83a356 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInputs.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInputs.tsx @@ -1,4 +1,11 @@ +import styled from 'styled-components'; + import { spacings, spacingsPx } from '@trezor/theme'; +import { Row } from '@trezor/components'; +import { TokenAddress } from '@suite-common/wallet-types'; +import { formatAmount } from '@suite-common/wallet-utils'; +import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; + import { Fees } from 'src/components/wallet/Fees/Fees'; import { FORM_CRYPTO_CURRENCY_SELECT, @@ -20,16 +27,11 @@ import { CoinmarketFormInputCryptoSelect } from 'src/views/wallet/coinmarket/com import { CoinmarketFormInputAccount } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputAccount'; import { CoinmarketFormInputCountry } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCountry'; import { CoinmarketFormInputPaymentMethod } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputPaymentMethod'; -import styled from 'styled-components'; import { CoinmarketFormSwitcherExchangeRates } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormSwitcherExchangeRates'; import { CoinmarketFormInputFiatCrypto } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputFiatCrypto'; import { CoinmarketFractionButtons } from 'src/views/wallet/coinmarket/common/CoinmarketFractionButtons'; -import { Row } from '@trezor/components'; import { CoinmarketBalance } from 'src/views/wallet/coinmarket/common/CoinmarketBalance'; -import { TokenAddress } from '@suite-common/wallet-types'; -import { formatAmount } from '@suite-common/wallet-utils'; import { getCoinmarketNetworkDecimals } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; import { isCoinmarketExchangeContext, isCoinmarketSellContext, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormLayout.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormLayout.tsx index 1fcfa50acb0..095af78f1c3 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormLayout.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormLayout.tsx @@ -1,6 +1,7 @@ import styled from 'styled-components'; import { Card } from '@trezor/components'; + import { CoinmarketFormInputs } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInputs'; import { CoinmarketFormOffer } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer'; import { CoinmarketFeaturedOffers } from 'src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffers'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx index 84b1fc16898..54265fba271 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx @@ -1,6 +1,10 @@ -import { Button, TextButton, Row, Column, Paragraph } from '@trezor/components'; +import { useState } from 'react'; + import { CryptoId, ExchangeTrade } from 'invity-api'; + +import { Button, TextButton, Row, Column, Paragraph } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { getCryptoQuoteAmountProps, @@ -9,7 +13,6 @@ import { getSelectQuoteTyped, isCoinmarketExchangeContext, } from 'src/utils/wallet/coinmarket/coinmarketTypingUtils'; -import { useState } from 'react'; import { Translation } from 'src/components/suite'; import { CoinmarketFormOfferItem } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferItem'; import { CoinmarketFormOfferCryptoAmount } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferCryptoAmount'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferCryptoAmount.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferCryptoAmount.tsx index e70e597f16f..f0ba1e0e17c 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferCryptoAmount.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferCryptoAmount.tsx @@ -1,10 +1,11 @@ +import { CryptoId } from 'invity-api'; + import { Row, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; import { FormattedCryptoAmount } from 'src/components/suite'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; import { CoinmarketCoinLogo } from 'src/views/wallet/coinmarket/common/CoinmarketCoinLogo'; -import { CryptoId } from 'invity-api'; interface CoinmarketCryptoAmountProps { amount: string | number; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferFiatAmount.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferFiatAmount.tsx index e0d1032d590..978415e6c97 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferFiatAmount.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferFiatAmount.tsx @@ -1,5 +1,6 @@ import { spacings } from '@trezor/theme'; import { Row, Text } from '@trezor/components'; + import { useSelector } from 'src/hooks/suite'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; import { CoinmarketFormInputCurrency } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCurrency'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferItem.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferItem.tsx index d77858781b7..fa605f4c645 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferItem.tsx @@ -1,5 +1,6 @@ import { Row, Spinner, Card, Paragraph } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { CoinmarketTradeDetailType, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcher.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcher.tsx index 8466bbc5f80..3149c276a72 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcher.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcher.tsx @@ -1,7 +1,9 @@ +import { ExchangeTrade } from 'invity-api'; + import { spacings } from '@trezor/theme'; import { Row, Card, Column, Spinner, Paragraph } from '@trezor/components'; + import { Translation } from 'src/components/suite'; -import { ExchangeTrade } from 'invity-api'; import { CoinmarketTradeDetailType, CoinmarketUtilsProvidersProps, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcherItem.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcherItem.tsx index 49021a81adc..10b907456fe 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcherItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcherItem.tsx @@ -1,9 +1,11 @@ import { ExchangeTrade } from 'invity-api'; -import { CoinmarketUtilsProvidersProps } from 'src/types/coinmarket/coinmarket'; -import { Badge, Radio, Tooltip, Row, Text, useElevation } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import styled from 'styled-components'; + +import { Badge, Radio, Tooltip, Row, Text, useElevation } from '@trezor/components'; import { borders, spacings, spacingsPx, mapElevationToBackground, Elevation } from '@trezor/theme'; + +import { CoinmarketUtilsProvidersProps } from 'src/types/coinmarket/coinmarket'; +import { Translation } from 'src/components/suite'; import { ExchangeType } from 'src/types/coinmarket/coinmarketForm'; import { FORM_EXCHANGE_CEX, FORM_EXCHANGE_DEX } from 'src/constants/wallet/coinmarket/form'; import { CoinmarketUtilsProvider } from 'src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsProvider'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFractionButtons.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFractionButtons.tsx index ed8216e5d0c..3b76f793175 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFractionButtons.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFractionButtons.tsx @@ -1,7 +1,8 @@ import { Button, Row } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { spacings } from '@trezor/theme'; +import { Translation } from 'src/components/suite'; + interface CoinmarketFractionButtonsProps { onFractionClick: (divisor: number) => void; onAllClick: () => void; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketExchangeHeaderSummary.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketExchangeHeaderSummary.tsx index 752fd91f03a..18fcf9abd47 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketExchangeHeaderSummary.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketExchangeHeaderSummary.tsx @@ -1,11 +1,13 @@ import { useTheme } from 'styled-components'; -import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; -import { useSelector } from 'src/hooks/suite'; -import { H3, Icon, Row, Text } from '@trezor/components'; import { CryptoId } from 'invity-api'; -import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; + +import { H3, Icon, Row, Text } from '@trezor/components'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { spacings } from '@trezor/theme'; + +import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; +import { useSelector } from 'src/hooks/suite'; +import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; import { CoinmarketCryptoAmount } from 'src/views/wallet/coinmarket/common/CoinmarketCryptoAmount'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeader.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeader.tsx index 88990284e49..2a2a51d4baa 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeader.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeader.tsx @@ -1,10 +1,12 @@ +import styled from 'styled-components'; + import { H2 } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; +import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; + import { Translation } from 'src/components/suite'; import { ExtendedMessageDescriptor } from 'src/types/suite'; import { INVITY_API_RELOAD_QUOTES_AFTER_SECONDS } from 'src/constants/wallet/coinmarket/metadata'; -import styled from 'styled-components'; -import { spacingsPx } from '@trezor/theme'; -import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; import { getCryptoQuoteAmountProps, isCoinmarketExchangeContext, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderFilter.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderFilter.tsx index cd3405654ba..7bf555bb4be 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderFilter.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderFilter.tsx @@ -1,5 +1,8 @@ import styled from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; +import { Row } from '@trezor/components'; + import { CoinmarketFormInputCountry } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCountry'; import { CoinmarketBuyFormProps, @@ -14,7 +17,6 @@ import { FORM_SEND_CRYPTO_CURRENCY_SELECT, } from 'src/constants/wallet/coinmarket/form'; import { CoinmarketFormInputFiatCrypto } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputFiatCrypto/CoinmarketFormInputFiatCrypto'; -import { Row } from '@trezor/components'; import { CoinmarketOffersExchangeFiltersPanel } from 'src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketOffersExchangeFiltersPanel'; import { CoinmarketFormInputPaymentMethod } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputPaymentMethod'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderSummary.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderSummary.tsx index 062e6cd74c0..393d0994b0b 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderSummary.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderSummary.tsx @@ -1,7 +1,9 @@ -import { H3, Icon, Row } from '@trezor/components'; import styled from 'styled-components'; + +import { H3, Icon, Row } from '@trezor/components'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; import { spacingsPx } from '@trezor/theme'; + import { CoinmarketExchangeHeaderSummary } from 'src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketExchangeHeaderSummary'; import { CoinmarketFiatAmount } from 'src/views/wallet/coinmarket/common/CoinmarketFiatAmount'; import { CoinmarketCryptoAmount } from 'src/views/wallet/coinmarket/common/CoinmarketCryptoAmount'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketOffersExchangeFiltersPanel.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketOffersExchangeFiltersPanel.tsx index 59f5752ed49..3128627708f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketOffersExchangeFiltersPanel.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketOffersExchangeFiltersPanel.tsx @@ -1,3 +1,8 @@ +import styled from 'styled-components'; + +import { Row, Select } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { EXCHANGE_COMPARATOR_KYC_FILTER, @@ -10,9 +15,6 @@ import { EXCHANGE_COMPARATOR_RATE_FILTER_FLOATING_CEX, } from 'src/constants/wallet/coinmarket/form'; import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; -import { Row, Select } from '@trezor/components'; -import styled from 'styled-components'; -import { spacings } from '@trezor/theme'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; const SelectWrapper = styled.div` diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout.tsx index e1edfa9da83..6db4321e9f8 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayout.tsx @@ -2,6 +2,7 @@ import { PropsWithChildren } from 'react'; import { spacings } from '@trezor/theme'; import { Column } from '@trezor/components'; + import { CoinmarketLayoutNavigation } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation'; import { useSelector } from 'src/hooks/suite'; import { selectRouteName } from 'src/reducers/suite/routerReducer'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutHeader.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutHeader.tsx index 77f86575b1b..437ac0ab4b7 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutHeader.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutHeader.tsx @@ -1,7 +1,9 @@ -import { IconButton, Row } from '@trezor/components'; -import { spacings } from '@trezor/theme'; import { PropsWithChildren, useCallback, useMemo } from 'react'; import { useHistory } from 'react-router-dom'; + +import { IconButton, Row } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { PageHeader } from 'src/components/suite/layouts/SuiteLayout'; import { BasicName } from 'src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/BasicName'; import { useLayout, useSelector, useTranslation } from 'src/hooks/suite'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation.tsx index 4500cdfa185..19f052f47fd 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation.tsx @@ -1,4 +1,5 @@ import { Row } from '@trezor/components'; + import { CoinmarketLayoutNavigationItem } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigationItem'; export const CoinmarketLayoutNavigation = () => ( diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigationItem.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigationItem.tsx index d0138495dba..ec66d4a21d4 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigationItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketLayoutNavigation/CoinmarketLayoutNavigationItem.tsx @@ -1,13 +1,15 @@ +import styled, { css } from 'styled-components'; + import { TranslationKey } from '@suite-common/intl-types'; import { Route } from '@suite-common/suite-types'; import { Button, IconName } from '@trezor/components'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; import { typography, borders, spacingsPx } from '@trezor/theme'; + import { goto } from 'src/actions/suite/routerActions'; import { Translation } from 'src/components/suite'; import { NavigationItem } from 'src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import styled, { css } from 'styled-components'; const NavListItemWrapper = styled(NavigationItem)` padding: ${spacingsPx.xs} ${spacingsPx.md}; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersEmpty.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersEmpty.tsx index b39052e16b4..76617362068 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersEmpty.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersEmpty.tsx @@ -1,7 +1,8 @@ -import { Translation } from 'src/components/suite'; import { Card, Paragraph } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { Translation } from 'src/components/suite'; + export const CoinmarketOffersEmpty = () => ( diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchange.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchange.tsx index defebc6f0d7..13442cd7f32 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchange.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchange.tsx @@ -1,3 +1,7 @@ +import { useMemo } from 'react'; + +import { ExchangeTrade } from 'invity-api'; + import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; import { EXCHANGE_COMPARATOR_KYC_FILTER, @@ -8,9 +12,7 @@ import { EXCHANGE_COMPARATOR_RATE_FILTER_FIXED_CEX, EXCHANGE_COMPARATOR_RATE_FILTER_FLOATING_CEX, } from 'src/constants/wallet/coinmarket/form'; -import { ExchangeTrade } from 'invity-api'; import { KYC_DEX, KYC_NO_KYC } from 'src/constants/wallet/coinmarket/kyc'; -import { useMemo } from 'react'; import { CoinmarketOffersExchangeQuotesByTypeSection } from 'src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchangeQuotesByTypeSection'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchangeQuotesByTypeSection.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchangeQuotesByTypeSection.tsx index 13a32bf69bc..6471ae9d772 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchangeQuotesByTypeSection.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchangeQuotesByTypeSection.tsx @@ -1,7 +1,9 @@ import { ExchangeTrade } from 'invity-api'; -import { ExtendedMessageDescriptor, Translation } from 'src/components/suite/Translation'; + import { H3, Icon, Row, Tooltip } from '@trezor/components'; import { spacings } from '@trezor/theme'; + +import { ExtendedMessageDescriptor, Translation } from 'src/components/suite/Translation'; import { CoinmarketOffersItem } from 'src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem'; interface CoinmarketOffersExchangeQuotesByTypeSectionProps { diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem.tsx index bf43bc3b8d6..295fde63177 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem.tsx @@ -1,8 +1,11 @@ import styled, { useTheme } from 'styled-components'; +import { SellFiatTrade } from 'invity-api'; + import { Badge, Button, Card, Row, Text } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { spacings, spacingsPx } from '@trezor/theme'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; + +import { Translation } from 'src/components/suite'; import { CoinmarketTradeDetailMapProps } from 'src/types/coinmarket/coinmarket'; import { getCryptoQuoteAmountProps, @@ -12,7 +15,6 @@ import { isCoinmarketSellContext, } from 'src/utils/wallet/coinmarket/coinmarketTypingUtils'; import { getTagAndInfoNote } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import { SellFiatTrade } from 'invity-api'; import { CoinmarketUtilsKyc } from 'src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsKyc'; import { CoinmarketTestWrapper } from 'src/views/wallet/coinmarket'; import { CoinmarketUtilsPrice } from 'src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsPrice'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentPlainType.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentPlainType.tsx index 83f923c51f7..ca48e5573c2 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentPlainType.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentPlainType.tsx @@ -1,8 +1,10 @@ import { ReactNode } from 'react'; + +import { Column, Text } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { FORM_DEFAULT_PAYMENT_METHOD } from 'src/constants/wallet/coinmarket/form'; import { CoinmarketPaymentMethodType } from 'src/types/coinmarket/coinmarket'; -import { Column, Text } from '@trezor/components'; interface CoinmarketPaymentTypeProps { children?: ReactNode; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentType.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentType.tsx index 4fc36be5cfc..de7158e0fb3 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentType.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentType.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import { Row } from '@trezor/components'; import { spacings } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketProviderInfo.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketProviderInfo.tsx index 26bec749048..c937d0f0392 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketProviderInfo.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketProviderInfo.tsx @@ -1,5 +1,6 @@ import { Row } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import invityAPI from 'src/services/suite/invityAPI'; export interface CoinmarketProviderInfoProps { diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketRefreshTime.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketRefreshTime.tsx index dae66fa6fcc..8ba3df3f2c5 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketRefreshTime.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketRefreshTime.tsx @@ -1,5 +1,7 @@ import { ReactElement } from 'react'; + import styled from 'styled-components'; + import { variables, Spinner, ProgressPie } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoExchangeType.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoExchangeType.tsx index d935004c284..97bcdf970cc 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoExchangeType.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoExchangeType.tsx @@ -1,5 +1,7 @@ -import { Row, Tooltip, Text } from '@trezor/components'; import { ExchangeTrade } from 'invity-api'; + +import { Row, Tooltip, Text } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { CoinmarketExchangeProvidersInfoProps, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoHeader.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoHeader.tsx index 7fff8b9766c..6810934473f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoHeader.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoHeader.tsx @@ -1,6 +1,8 @@ +import { CryptoId } from 'invity-api'; + import { Row, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { CryptoId } from 'invity-api'; + import { Translation } from 'src/components/suite'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; import { parseCryptoId } from 'src/utils/wallet/coinmarket/coinmarketUtils'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoItem.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoItem.tsx index e23c6c7b2f4..35fea2c4633 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoItem.tsx @@ -1,7 +1,9 @@ +import { CryptoId } from 'invity-api'; + import { Account } from '@suite-common/wallet-types'; import { Column, Row, InfoRow, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { CryptoId } from 'invity-api'; + import { AccountLabeling, Translation } from 'src/components/suite'; import { CoinmarketPayGetLabelType, CoinmarketTradeType } from 'src/types/coinmarket/coinmarket'; import { CoinmarketCoinLogo } from 'src/views/wallet/coinmarket/common/CoinmarketCoinLogo'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoPaymentMethod.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoPaymentMethod.tsx index 720d5d29649..8e02f008489 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoPaymentMethod.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoPaymentMethod.tsx @@ -1,4 +1,5 @@ import { InfoRow } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { CoinmarketPaymentMethodType } from 'src/types/coinmarket/coinmarket'; import { CoinmarketPaymentType } from 'src/views/wallet/coinmarket/common/CoinmarketPaymentType'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoProvider.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoProvider.tsx index 19c2d8ae6c6..09492711456 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoProvider.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoProvider.tsx @@ -1,4 +1,5 @@ import { InfoRow } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { CoinmarketGetProvidersInfoProps } from 'src/types/coinmarket/coinmarket'; import { CoinmarketProviderInfo } from 'src/views/wallet/coinmarket/common/CoinmarketProviderInfo'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchange.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchange.tsx index 671c5eb5a3a..c79ec7ec1e1 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchange.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchange.tsx @@ -1,3 +1,5 @@ +import { Fragment } from 'react'; + import { Divider, Card } from '@trezor/components'; import { spacings } from '@trezor/theme'; @@ -10,7 +12,6 @@ import { CoinmarketSelectedOfferStepper, CoinmarketSelectedOfferStepperItemProps, } from 'src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferStepper'; -import { Fragment } from 'react'; import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; import { CoinmarketOfferExchangeSend } from 'src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSend'; import { CoinmarketOfferExchangeSendSwap } from 'src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendSwap'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendApproval.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendApproval.tsx index d38c4ca17ec..d78d4038814 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendApproval.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendApproval.tsx @@ -1,6 +1,8 @@ import { useState } from 'react'; + import styled from 'styled-components'; -import { Translation, AccountLabeling } from 'src/components/suite'; +import { DexApprovalType } from 'invity-api'; + import { Button, Banner, @@ -14,8 +16,9 @@ import { Card, } from '@trezor/components'; import { spacings } from '@trezor/theme'; + +import { Translation, AccountLabeling } from 'src/components/suite'; import { useCoinmarketNavigation } from 'src/hooks/wallet/useCoinmarketNavigation'; -import { DexApprovalType } from 'invity-api'; import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendSwap.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendSwap.tsx index a88241ce32b..595bce255f8 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendSwap.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferExchange/CoinmarketOfferExchangeSendSwap.tsx @@ -1,6 +1,9 @@ import { useState, ChangeEvent } from 'react'; +import { FieldError } from 'react-hook-form'; + +import useDebounce from 'react-use/lib/useDebounce'; import styled, { useTheme } from 'styled-components'; -import { Translation, AccountLabeling, FormattedCryptoAmount } from 'src/components/suite'; + import { Button, Icon, @@ -15,12 +18,12 @@ import { ElevationContext, getInputStateTextColor, } from '@trezor/components'; -import useDebounce from 'react-use/lib/useDebounce'; import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { FieldError } from 'react-hook-form'; import { BottomText } from '@trezor/components/src/components/form/BottomText'; import { TranslationKey } from '@suite-common/intl-types'; import { spacings } from '@trezor/theme'; + +import { Translation, AccountLabeling, FormattedCryptoAmount } from 'src/components/suite'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSell.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSell.tsx index 3a95665f0ed..91f96980e97 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSell.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSell.tsx @@ -1,4 +1,5 @@ import { Fragment } from 'react'; + import { Divider, Card } from '@trezor/components'; import { spacings } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx index 2df83d90527..e92f215e455 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx @@ -1,12 +1,16 @@ import { useState } from 'react'; + import styled, { useTheme } from 'styled-components'; -import { QuestionTooltip, Translation } from 'src/components/suite'; -import { Button, Select, Icon, Row } from '@trezor/components'; import { BankAccount } from 'invity-api'; + +import { Button, Select, Icon, Row } from '@trezor/components'; +import { fontWeights, spacingsPx, typography } from '@trezor/theme'; + +import { QuestionTooltip, Translation } from 'src/components/suite'; import { formatIban } from 'src/utils/wallet/coinmarket/sellUtils'; import { CoinmarketTradeSellType } from 'src/types/coinmarket/coinmarket'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; -import { fontWeights, spacingsPx, typography } from '@trezor/theme'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx index 57b686069ef..4e421cc25d2 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx @@ -1,10 +1,13 @@ import styled from 'styled-components'; -import { Translation, AccountLabeling } from 'src/components/suite'; + import { Button, Spinner } from '@trezor/components'; +import { fontWeights, spacingsPx, typography } from '@trezor/theme'; + +import { Translation, AccountLabeling } from 'src/components/suite'; import { useCoinmarketWatchTrade } from 'src/hooks/wallet/coinmarket/useCoinmarketWatchTrade'; import { CoinmarketTradeSellType } from 'src/types/coinmarket/coinmarket'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; -import { fontWeights, spacingsPx, typography } from '@trezor/theme'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOffer.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOffer.tsx index 7060017b1e6..3cbba82b846 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOffer.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOffer.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { getCryptoQuoteAmountProps, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferInfo.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferInfo.tsx index 1ad8f84b3d4..58188288a7f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferInfo.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferInfo.tsx @@ -1,4 +1,5 @@ import { CryptoId } from 'invity-api'; + import { Column, Divider } from '@trezor/components'; import { spacings } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferStepper.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferStepper.tsx index 064ebb25884..d4095839019 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferStepper.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferStepper.tsx @@ -1,6 +1,8 @@ +import { Fragment } from 'react'; + import { Icon, Row, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { Fragment } from 'react'; + import { Translation } from 'src/components/suite'; import { ExtendedMessageDescriptor } from 'src/types/suite'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerify.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerify.tsx index 50603cd73b7..76f388fde62 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerify.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerify.tsx @@ -1,18 +1,21 @@ +import { useEffect } from 'react'; + +import { CryptoId } from 'invity-api'; + import addressValidator from '@trezor/address-validator'; -import { Translation } from 'src/components/suite'; import { Input, Button, Paragraph, Divider, Column, Tooltip, H4 } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { isHexValid, isInteger } from '@suite-common/wallet-utils'; + +import { Translation } from 'src/components/suite'; import { useTranslation } from 'src/hooks/suite/useTranslation'; import { ConfirmedOnTrezor } from 'src/views/wallet/coinmarket/common/ConfirmedOnTrezor'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; import { CoinmarketTradeBuyExchangeType } from 'src/types/coinmarket/coinmarket'; import { CoinmarketVerifyOptions } from 'src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptions'; import { CoinmarketVerifyAccountReturnProps } from 'src/types/coinmarket/coinmarketVerify'; -import { CryptoId } from 'invity-api'; -import { isHexValid, isInteger } from '@suite-common/wallet-utils'; import { CoinmarketAddressOptions } from 'src/views/wallet/coinmarket/common/CoinmarketAddressOptions'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; -import { useEffect } from 'react'; import { useDispatch } from 'src/hooks/suite'; import { COINMARKET_BUY } from 'src/actions/wallet/constants'; import * as modalActions from 'src/actions/suite/modalActions'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptions.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptions.tsx index d13a22efc05..e44f4125dbd 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptions.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptions.tsx @@ -1,4 +1,5 @@ import { Select } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; import { diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptionsItem.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptionsItem.tsx index be814714b8b..f8b889282c7 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptionsItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketVerify/CoinmarketVerifyOptionsItem.tsx @@ -1,6 +1,9 @@ +import styled, { useTheme } from 'styled-components'; + import { Column, Icon, Row, variables } from '@trezor/components'; import { CoinLogo } from '@trezor/product-components'; import { spacingsPx } from '@trezor/theme'; + import { AccountLabeling, Translation } from 'src/components/suite'; import { FORM_SEND_CRYPTO_CURRENCY_SELECT } from 'src/constants/wallet/coinmarket/form'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; @@ -9,7 +12,6 @@ import { CoinmarketVerifyOptionsItemProps } from 'src/types/coinmarket/coinmarke import { isCoinmarketExchangeContext } from 'src/utils/wallet/coinmarket/coinmarketTypingUtils'; import { parseCryptoId } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { CoinmarketBalance } from 'src/views/wallet/coinmarket/common/CoinmarketBalance'; -import styled, { useTheme } from 'styled-components'; const LogoWrapper = styled.div` padding: 0 0 0 ${spacingsPx.xxs}; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTag.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTag.tsx index 7992522d4fa..54e328e5f35 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTag.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTag.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { variables } from '@trezor/components'; import { borders } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactionId.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactionId.tsx index 9b0cad2df21..694f15a84cf 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactionId.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactionId.tsx @@ -1,11 +1,13 @@ import styled from 'styled-components'; + import { Button, Row } from '@trezor/components'; import { copyToClipboard } from '@trezor/dom-utils'; -import { useDispatch } from 'src/hooks/suite'; -import { Translation } from 'src/components/suite'; import { notificationsActions } from '@suite-common/toast-notifications'; import { spacings, spacingsPx, typography } from '@trezor/theme'; +import { useDispatch } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; + const LabelWrapper = styled.div` width: 100%; flex: auto; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionAmounts.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionAmounts.tsx index 30ceea4c7a2..507b74e3f1e 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionAmounts.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionAmounts.tsx @@ -1,5 +1,6 @@ import { Icon, iconSizes, Row } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { FormattedCryptoAmount, HiddenPlaceholder } from 'src/components/suite'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; import { Trade } from 'src/types/wallet/coinmarketCommonTypes'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionId.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionId.tsx index d77d1f952c4..7133b0f113a 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionId.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionId.tsx @@ -1,5 +1,6 @@ import { Row, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; interface CoinmarketTransactionIdProps { diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionInfo.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionInfo.tsx index b19fce0c0e9..82a7c9a5ccf 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionInfo.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionInfo.tsx @@ -1,5 +1,6 @@ import { Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { FormattedDate } from 'src/components/suite'; import { useTranslation } from 'src/hooks/suite'; import { ExtendedMessageDescriptor } from 'src/types/suite'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionProvider.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionProvider.tsx index 0ba4319148b..077b42a8a54 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionProvider.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionProvider.tsx @@ -1,5 +1,6 @@ import { Flex, FlexProps, useMediaQuery, variables } from '@trezor/components'; import { spacings } from '@trezor/theme'; + import { CoinmarketPaymentMethodType } from 'src/types/coinmarket/coinmarket'; import { CoinmarketPaymentType } from 'src/views/wallet/coinmarket/common/CoinmarketPaymentType'; import { diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionStatus.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionStatus.tsx index 9fdb302f47e..381a1cd5ec7 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionStatus.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionStatus.tsx @@ -1,12 +1,16 @@ import { DefaultTheme, useTheme } from 'styled-components'; +import { BuyTradeStatus, ExchangeTradeStatus, SellTradeStatus } from 'invity-api'; + +import { Icon, Row, Text } from '@trezor/components'; +import { spacings } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { getStatusMessage as getBuyStatusMessage } from 'src/utils/wallet/coinmarket/buyUtils'; import { getStatusMessage as getExchangeStatusMessage } from 'src/utils/wallet/coinmarket/exchangeUtils'; import { getStatusMessage as getSellStatusMessage } from 'src/utils/wallet/coinmarket/sellUtils'; -import { Icon, Row, Text } from '@trezor/components'; import { Trade } from 'src/types/wallet/coinmarketCommonTypes'; -import { BuyTradeStatus, ExchangeTradeStatus, SellTradeStatus } from 'invity-api'; -import { spacings } from '@trezor/theme'; + + const getBuyTradeData = (status: BuyTradeStatus, theme: DefaultTheme) => { const message = getBuyStatusMessage(status); diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionExchange.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionExchange.tsx index 83d0f9c46d1..2542d9143b4 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionExchange.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionExchange.tsx @@ -1,6 +1,7 @@ import { ExchangeProviderInfo } from 'invity-api'; import { Button } from '@trezor/components'; + import { TradeExchange } from 'src/types/wallet/coinmarketCommonTypes'; import { goto } from 'src/actions/suite/routerActions'; import { saveTransactionId } from 'src/actions/wallet/coinmarketExchangeActions'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsBuy.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsBuy.tsx index 53d7ee62df7..f1a632b8642 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsBuy.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsBuy.tsx @@ -1,6 +1,8 @@ import { BuyProviderInfo } from 'invity-api'; -import { saveTransactionDetailId } from 'src/actions/wallet/coinmarketBuyActions'; + import { Button } from '@trezor/components'; + +import { saveTransactionDetailId } from 'src/actions/wallet/coinmarketBuyActions'; import { Account } from 'src/types/wallet'; import { Translation } from 'src/components/suite'; import { TradeBuy } from 'src/types/wallet/coinmarketCommonTypes'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsList.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsList.tsx index 89130e9bc13..9f3b11275c9 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsList.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsList.tsx @@ -1,9 +1,11 @@ +import styled from 'styled-components'; + +import { H3, Paragraph, variables } from '@trezor/components'; +import { spacingsPx, typography } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; -import { H3, Paragraph, variables } from '@trezor/components'; -import styled from 'styled-components'; import { useCoinmarketLoadData } from 'src/hooks/wallet/coinmarket/useCoinmarketLoadData'; -import { spacingsPx, typography } from '@trezor/theme'; import { CoinmarketTransactionSell } from 'src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsSell'; import { CoinmarketTransactionBuy } from 'src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsBuy'; import { CoinmarketTransactionExchange } from 'src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionExchange'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsSell.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsSell.tsx index 6ca5b4a3120..27d2563f6b9 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsSell.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransactionsSell.tsx @@ -1,4 +1,7 @@ import { SellProviderInfo } from 'invity-api'; + +import { Button } from '@trezor/components'; + import { goto } from 'src/actions/suite/routerActions'; import { saveComposedTransactionInfo } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; import { @@ -6,7 +9,6 @@ import { saveTransactionId, setIsFromRedirect, } from 'src/actions/wallet/coinmarketSellActions'; -import { Button } from '@trezor/components'; import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common'; import { Account } from 'src/types/wallet'; import { Translation } from 'src/components/suite'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsKyc.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsKyc.tsx index d869051dccb..93b69957e3f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsKyc.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsKyc.tsx @@ -1,9 +1,11 @@ -import { Banner, Icon, Tooltip } from '@trezor/components'; import { useTheme } from 'styled-components'; +import { ExchangeKYCType } from 'invity-api'; + +import { Banner, Icon, Tooltip } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { TooltipIcon, TooltipText, TooltipWrap } from 'src/views/wallet/coinmarket'; import { CoinmarketExchangeProvidersInfoProps } from 'src/types/coinmarket/coinmarket'; -import { ExchangeKYCType } from 'invity-api'; import { KYC_DEX, KYC_NO_KYC, diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsPrice.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsPrice.tsx index 18a5231ac52..7d4ebb93ab6 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsPrice.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsPrice.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; + import { spacingsPx, typography } from '@trezor/theme'; -import { Translation } from 'src/components/suite'; import { FONT_SIZE, SCREEN_QUERY } from '@trezor/components/src/config/variables'; + +import { Translation } from 'src/components/suite'; import { coinmarketGetAmountLabels } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { CoinmarketFiatAmount } from 'src/views/wallet/coinmarket/common/CoinmarketFiatAmount'; import { CoinmarketCryptoAmount } from 'src/views/wallet/coinmarket/common/CoinmarketCryptoAmount'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsProvider.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsProvider.tsx index 6739ef3df16..2db20cc18e4 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsProvider.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsProvider.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { spacings } from '@trezor/theme'; import { Row } from '@trezor/components'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltip.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltip.tsx index 5fa5af83e45..b83def9002b 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltip.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltip.tsx @@ -1,5 +1,7 @@ -import { Icon, Tooltip } from '@trezor/components'; import { useTheme } from 'styled-components'; + +import { Icon, Tooltip } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useTranslation } from 'src/hooks/suite'; import { TooltipIcon, TooltipText, TooltipWrap } from 'src/views/wallet/coinmarket'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltipFee.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltipFee.tsx index 9b644f7de8c..4a46ee7145a 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltipFee.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltipFee.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { typography } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { CoinmarketOffersItemProps } from 'src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem'; diff --git a/packages/suite/src/views/wallet/coinmarket/common/ConfirmedOnTrezor.tsx b/packages/suite/src/views/wallet/coinmarket/common/ConfirmedOnTrezor.tsx index 775e05005ad..7a930f940b2 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/ConfirmedOnTrezor.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/ConfirmedOnTrezor.tsx @@ -1,10 +1,12 @@ import React from 'react'; +import styled from 'styled-components'; + import { TrezorDevice } from '@suite-common/suite-types'; import { variables } from '@trezor/components'; import { RotateDeviceImage } from '@trezor/product-components'; + import { Translation } from 'src/components/suite'; -import styled from 'styled-components'; const Confirmed = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/index.tsx b/packages/suite/src/views/wallet/coinmarket/index.tsx index 014b83cfd13..323a16d57a9 100644 --- a/packages/suite/src/views/wallet/coinmarket/index.tsx +++ b/packages/suite/src/views/wallet/coinmarket/index.tsx @@ -1,4 +1,6 @@ import styled from 'styled-components'; +import { Margin } from 'recharts/types/util/types'; + import { variables, Spinner } from '@trezor/components'; import { Elevation, @@ -9,7 +11,7 @@ import { spacingsPx, typography, } from '@trezor/theme'; -import { Margin } from 'recharts/types/util/types'; + import { CoinmarketCoinLogo } from 'src/views/wallet/coinmarket/common/CoinmarketCoinLogo'; interface ResponsiveSize { diff --git a/packages/suite/src/views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx b/packages/suite/src/views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx index 5d24eb5bd62..ba9d6f6b6f6 100644 --- a/packages/suite/src/views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx +++ b/packages/suite/src/views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx @@ -1,12 +1,17 @@ import { useEffect } from 'react'; + import styled from 'styled-components'; +import { CryptoId } from 'invity-api'; + +import { variables } from '@trezor/components'; +import { FeeLevel } from '@trezor/connect'; + import { useSelector } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; -import { variables } from '@trezor/components'; import { useCoinmarketRedirect } from 'src/hooks/wallet/useCoinmarketRedirect'; import { Translation } from 'src/components/suite'; -import { FeeLevel } from '@trezor/connect'; -import { CryptoId } from 'invity-api'; + + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/details/CoinjoinLogs.tsx b/packages/suite/src/views/wallet/details/CoinjoinLogs.tsx index fb50521a043..1a325f99f14 100644 --- a/packages/suite/src/views/wallet/details/CoinjoinLogs.tsx +++ b/packages/suite/src/views/wallet/details/CoinjoinLogs.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; + import { desktopApi } from '@trezor/suite-desktop-api'; -import { ActionButton, ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { Card } from '@trezor/components'; + +import { ActionButton, ActionColumn, TextColumn, Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite/useSelector'; import { useAnchor } from 'src/hooks/suite/useAnchor'; import { CoinjoinLogsAnchor } from 'src/constants/suite/anchors'; diff --git a/packages/suite/src/views/wallet/details/CoinjoinSetup/AnonymityLevelSetup.tsx b/packages/suite/src/views/wallet/details/CoinjoinSetup/AnonymityLevelSetup.tsx index eeb2de9886b..c408200fb70 100644 --- a/packages/suite/src/views/wallet/details/CoinjoinSetup/AnonymityLevelSetup.tsx +++ b/packages/suite/src/views/wallet/details/CoinjoinSetup/AnonymityLevelSetup.tsx @@ -1,12 +1,15 @@ import { useMemo, useState } from 'react'; + import { AnimatePresence, HTMLMotionProps, motion } from 'framer-motion'; import styled, { useTheme } from 'styled-components'; +import { Icon, Banner, motionEasing } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { AnonymityStatus } from 'src/constants/suite/coinjoin'; import { useAnonymityStatus, useDispatch } from 'src/hooks/suite'; -import { Icon, Banner, motionEasing } from '@trezor/components'; import { coinjoinAccountUpdateAnonymity } from 'src/actions/wallet/coinjoinAccountActions'; + import { SetupSlider } from './SetupSlider/SetupSlider'; const Label = styled.span` diff --git a/packages/suite/src/views/wallet/details/CoinjoinSetup/CoinjoinSetup.tsx b/packages/suite/src/views/wallet/details/CoinjoinSetup/CoinjoinSetup.tsx index 6ef24786126..03cb88f1354 100644 --- a/packages/suite/src/views/wallet/details/CoinjoinSetup/CoinjoinSetup.tsx +++ b/packages/suite/src/views/wallet/details/CoinjoinSetup/CoinjoinSetup.tsx @@ -1,15 +1,18 @@ import { useDispatch } from 'react-redux'; + import { AnimatePresence, motion } from 'framer-motion'; import styled from 'styled-components'; +import { Card, Radio, motionAnimation, motionEasing, Banner } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite/useSelector'; -import { Card, Radio, motionAnimation, motionEasing, Banner } from '@trezor/components'; import { coinjoinAccountUpdateSetupOption } from 'src/actions/wallet/coinjoinAccountActions'; +import { selectCoinjoinAccountByKey } from 'src/reducers/wallet/coinjoinReducer'; + import { AnonymityLevelSetup } from './AnonymityLevelSetup'; import { MaxMiningFeeSetup } from './MaxMiningFeeSetup'; import { SkipRoundsSetup } from './SkipRoundsSetup'; -import { selectCoinjoinAccountByKey } from 'src/reducers/wallet/coinjoinReducer'; const SetupContainer = styled.div` padding: 18px; diff --git a/packages/suite/src/views/wallet/details/CoinjoinSetup/MaxMiningFeeSetup.tsx b/packages/suite/src/views/wallet/details/CoinjoinSetup/MaxMiningFeeSetup.tsx index e10a507be01..e41931f15c8 100644 --- a/packages/suite/src/views/wallet/details/CoinjoinSetup/MaxMiningFeeSetup.tsx +++ b/packages/suite/src/views/wallet/details/CoinjoinSetup/MaxMiningFeeSetup.tsx @@ -1,13 +1,15 @@ import { useTheme } from 'styled-components'; + import { Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { coinjoinAccountUpdateMaxMiningFee } from 'src/actions/wallet/coinjoinAccountActions'; -import { SetupSlider } from './SetupSlider/SetupSlider'; import { selectDefaultMaxMiningFeeByAccountKey, selectFeeRateMedianByAccountKey, } from 'src/reducers/wallet/coinjoinReducer'; +import { SetupSlider } from './SetupSlider/SetupSlider'; + const min = 1; const max = 500; const unit = 'sat/vB'; diff --git a/packages/suite/src/views/wallet/details/CoinjoinSetup/SetupSlider/SetupSlider.tsx b/packages/suite/src/views/wallet/details/CoinjoinSetup/SetupSlider/SetupSlider.tsx index 75d30da7830..b627b5ab0bd 100644 --- a/packages/suite/src/views/wallet/details/CoinjoinSetup/SetupSlider/SetupSlider.tsx +++ b/packages/suite/src/views/wallet/details/CoinjoinSetup/SetupSlider/SetupSlider.tsx @@ -1,9 +1,12 @@ import { useRef, ReactNode, KeyboardEventHandler, ChangeEventHandler } from 'react'; + import styled from 'styled-components'; -import { useSelector } from 'src/hooks/suite/useSelector'; import { Range, RangeProps, variables } from '@trezor/components'; + +import { useSelector } from 'src/hooks/suite/useSelector'; import { selectCurrentCoinjoinSession } from 'src/reducers/wallet/coinjoinReducer'; + import { SliderInput, SliderInputProps } from './SliderInput'; const Row = styled.div` diff --git a/packages/suite/src/views/wallet/details/CoinjoinSetup/SetupSlider/SliderInput.tsx b/packages/suite/src/views/wallet/details/CoinjoinSetup/SetupSlider/SliderInput.tsx index 61f2e4bf7b2..61d83f36f80 100644 --- a/packages/suite/src/views/wallet/details/CoinjoinSetup/SetupSlider/SliderInput.tsx +++ b/packages/suite/src/views/wallet/details/CoinjoinSetup/SetupSlider/SliderInput.tsx @@ -7,7 +7,9 @@ import { KeyboardEvent, ChangeEvent, } from 'react'; + import styled from 'styled-components'; + import { Input, InputProps, variables } from '@trezor/components'; const LevelContainer = styled.div` diff --git a/packages/suite/src/views/wallet/details/CoinjoinSetup/SkipRoundsSetup.tsx b/packages/suite/src/views/wallet/details/CoinjoinSetup/SkipRoundsSetup.tsx index 7be0f4e889e..2108dd286a3 100644 --- a/packages/suite/src/views/wallet/details/CoinjoinSetup/SkipRoundsSetup.tsx +++ b/packages/suite/src/views/wallet/details/CoinjoinSetup/SkipRoundsSetup.tsx @@ -1,9 +1,11 @@ import { useDispatch } from 'react-redux'; + import styled from 'styled-components'; +import { Switch, variables } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite/useSelector'; -import { Switch, variables } from '@trezor/components'; import { coinjoinAccountToggleSkipRounds } from 'src/actions/wallet/coinjoinAccountActions'; import { selectCurrentCoinjoinSession } from 'src/reducers/wallet/coinjoinReducer'; diff --git a/packages/suite/src/views/wallet/details/RescanAccount.tsx b/packages/suite/src/views/wallet/details/RescanAccount.tsx index 1bafb84fe3d..d11e65d8a2e 100644 --- a/packages/suite/src/views/wallet/details/RescanAccount.tsx +++ b/packages/suite/src/views/wallet/details/RescanAccount.tsx @@ -2,6 +2,7 @@ import { ActionButton, ActionColumn, TextColumn, Translation } from 'src/compone import { useDispatch } from 'src/hooks/suite/useDispatch'; import { rescanCoinjoinAccount } from 'src/actions/wallet/coinjoinAccountActions'; import type { Account } from 'src/types/wallet'; + import { Row } from './Row'; type RescanAccountProps = { diff --git a/packages/suite/src/views/wallet/details/Row.tsx b/packages/suite/src/views/wallet/details/Row.tsx index da286d0cda9..ca5dba06d1d 100644 --- a/packages/suite/src/views/wallet/details/Row.tsx +++ b/packages/suite/src/views/wallet/details/Row.tsx @@ -1,5 +1,6 @@ -import { Row as RowComponent } from '@trezor/components'; import { ReactNode } from 'react'; + +import { Row as RowComponent } from '@trezor/components'; import { spacings } from '@trezor/theme'; interface RowProps { diff --git a/packages/suite/src/views/wallet/details/index.tsx b/packages/suite/src/views/wallet/details/index.tsx index 2de0522e95f..8574794e65b 100644 --- a/packages/suite/src/views/wallet/details/index.tsx +++ b/packages/suite/src/views/wallet/details/index.tsx @@ -2,20 +2,21 @@ import styled from 'styled-components'; import { getAccountTypeTech } from '@suite-common/wallet-utils'; import { Paragraph, variables, Card, Column } from '@trezor/components'; +import { HELP_CENTER_BIP32_URL, HELP_CENTER_XPUB_URL } from '@trezor/urls'; +import { spacings } from '@trezor/theme'; import { ActionButton, ActionColumn, TextColumn, Translation } from 'src/components/suite'; - -import { HELP_CENTER_BIP32_URL, HELP_CENTER_XPUB_URL } from '@trezor/urls'; import { showXpub } from 'src/actions/wallet/publicKeyActions'; import { WalletLayout } from 'src/components/wallet'; import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; +import { AccountTypeDescription } from 'src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription'; +import { AccountTypeBadge } from 'src/components/suite/AccountTypeBadge'; + import { CoinjoinLogs } from './CoinjoinLogs'; import { CoinjoinSetup } from './CoinjoinSetup/CoinjoinSetup'; import { RescanAccount } from './RescanAccount'; -import { spacings } from '@trezor/theme'; import { Row } from './Row'; -import { AccountTypeDescription } from 'src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription'; -import { AccountTypeBadge } from 'src/components/suite/AccountTypeBadge'; + const Heading = styled.h3` color: ${({ theme }) => theme.legacy.TYPE_LIGHT_GREY}; diff --git a/packages/suite/src/views/wallet/receive/Receive.tsx b/packages/suite/src/views/wallet/receive/Receive.tsx index f44c9edf2ef..0ffb0c5a946 100644 --- a/packages/suite/src/views/wallet/receive/Receive.tsx +++ b/packages/suite/src/views/wallet/receive/Receive.tsx @@ -1,15 +1,15 @@ import { selectDevice, selectPendingAccountAddresses } from '@suite-common/wallet-core'; +import { Column } from '@trezor/components'; +import { spacings } from '@trezor/theme'; import { WalletLayout, WalletSubpageHeading } from 'src/components/wallet'; import { useDevice, useSelector } from 'src/hooks/suite'; +import { ConfirmEvmExplanationModal } from 'src/components/suite/modals'; import { FreshAddress } from './components/FreshAddress'; import { UsedAddresses } from './components/UsedAddresses'; import { CoinjoinReceiveWarning } from './components/CoinjoinReceiveWarning'; -import { ConfirmEvmExplanationModal } from 'src/components/suite/modals'; import { ConnectDeviceReceivePromo } from './components/ConnectDevicePromo'; -import { Column } from '@trezor/components'; -import { spacings } from '@trezor/theme'; export const Receive = () => { const isCoinjoinReceiveWarningHidden = useSelector( diff --git a/packages/suite/src/views/wallet/receive/components/CoinjoinReceiveWarning.tsx b/packages/suite/src/views/wallet/receive/components/CoinjoinReceiveWarning.tsx index 42364b81571..a515c8a333c 100644 --- a/packages/suite/src/views/wallet/receive/components/CoinjoinReceiveWarning.tsx +++ b/packages/suite/src/views/wallet/receive/components/CoinjoinReceiveWarning.tsx @@ -1,8 +1,10 @@ import styled, { useTheme } from 'styled-components'; import { darken } from 'polished'; + +import { Button, Icon, variables, Banner } from '@trezor/components'; + import { useDispatch, useSelector } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; -import { Button, Icon, variables, Banner } from '@trezor/components'; import { hideCoinjoinReceiveWarning } from 'src/actions/suite/suiteActions'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; diff --git a/packages/suite/src/views/wallet/receive/components/ConnectDevicePromo.tsx b/packages/suite/src/views/wallet/receive/components/ConnectDevicePromo.tsx index 038eb17ec38..c24ee6c55c9 100644 --- a/packages/suite/src/views/wallet/receive/components/ConnectDevicePromo.tsx +++ b/packages/suite/src/views/wallet/receive/components/ConnectDevicePromo.tsx @@ -1,9 +1,11 @@ import { Column, Image, Text, Banner } from '@trezor/components'; -import { useSelector } from '../../../../hooks/suite'; import { selectDevice } from '@suite-common/wallet-core'; import { DEFAULT_FLAGSHIP_MODEL } from '@suite-common/suite-constants'; + import { Translation } from 'src/components/suite'; +import { useSelector } from '../../../../hooks/suite'; + type ConnectDevicePromoProps = { title: JSX.Element | string; description: JSX.Element | string; diff --git a/packages/suite/src/views/wallet/receive/components/FreshAddress.tsx b/packages/suite/src/views/wallet/receive/components/FreshAddress.tsx index 110549094a0..4b17ddb9b6f 100644 --- a/packages/suite/src/views/wallet/receive/components/FreshAddress.tsx +++ b/packages/suite/src/views/wallet/receive/components/FreshAddress.tsx @@ -1,16 +1,18 @@ import { useMemo } from 'react'; + import styled from 'styled-components'; -import { Translation, QuestionTooltip, ReadMoreLink } from 'src/components/suite'; -import { AppState } from 'src/types/suite'; -import { showAddress } from 'src/actions/wallet/receiveActions'; -import { useDispatch, useSelector } from 'src/hooks/suite/'; import { Button, Card, variables, H2, Tooltip, GradientOverlay } from '@trezor/components'; import { getFirstFreshAddress } from '@suite-common/wallet-utils'; import { AccountsRootState, selectIsAccountUtxoBased } from '@suite-common/wallet-core'; import { networks } from '@suite-common/wallet-config'; -import { EvmExplanationBox } from 'src/components/wallet/EvmExplanationBox'; import { spacingsPx, typography } from '@trezor/theme'; + +import { Translation, QuestionTooltip, ReadMoreLink } from 'src/components/suite'; +import { AppState } from 'src/types/suite'; +import { showAddress } from 'src/actions/wallet/receiveActions'; +import { useDispatch, useSelector } from 'src/hooks/suite/'; +import { EvmExplanationBox } from 'src/components/wallet/EvmExplanationBox'; import { selectIsFirmwareAuthenticityCheckEnabledAndFailed } from 'src/reducers/suite/suiteReducer'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/views/wallet/receive/components/Header.tsx b/packages/suite/src/views/wallet/receive/components/Header.tsx index 50ac6c8ca8d..4d7073d851d 100644 --- a/packages/suite/src/views/wallet/receive/components/Header.tsx +++ b/packages/suite/src/views/wallet/receive/components/Header.tsx @@ -1,6 +1,8 @@ +import styled from 'styled-components'; + import { H2, Paragraph } from '@trezor/components'; + import { Account } from 'src/types/wallet'; -import styled from 'styled-components'; import { Translation } from 'src/components/suite'; const Content = styled.div` diff --git a/packages/suite/src/views/wallet/receive/components/UsedAddresses.tsx b/packages/suite/src/views/wallet/receive/components/UsedAddresses.tsx index a28769f2642..0e2df8a850c 100644 --- a/packages/suite/src/views/wallet/receive/components/UsedAddresses.tsx +++ b/packages/suite/src/views/wallet/receive/components/UsedAddresses.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { AccountAddress } from '@trezor/connect'; diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/BitcoinOptions.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/BitcoinOptions.tsx index 867189ee37e..451081e2784 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/BitcoinOptions.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/BitcoinOptions.tsx @@ -1,16 +1,19 @@ import { useWatch } from 'react-hook-form'; + import styled from 'styled-components'; import { Button, Tooltip, variables } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; +import { selectNetworkBlockchainInfo } from '@suite-common/wallet-core'; + import { Translation } from 'src/components/suite'; import { useSendFormContext } from 'src/hooks/wallet'; import { OpenGuideFromTooltip } from 'src/components/guide'; +import { useSelector } from 'src/hooks/suite'; + import { Locktime } from './Locktime/Locktime'; import { CoinControl } from './CoinControl/CoinControl'; import { OnOffSwitcher } from '../OnOffSwitcher'; -import { selectNetworkBlockchainInfo } from '@suite-common/wallet-core'; -import { useSelector } from 'src/hooks/suite'; import { canLocktimeTxBeBroadcast } from './Locktime/canLocktimeTxBeBroadcast'; const Wrapper = styled.div` diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/CoinControl.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/CoinControl.tsx index 315ae0dae42..a7a7d0aadf7 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/CoinControl.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/CoinControl.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react'; + import styled, { useTheme } from 'styled-components'; import { typography } from '@trezor/theme'; @@ -6,17 +7,19 @@ import { COMPOSE_ERROR_TYPES } from '@suite-common/wallet-constants'; import { fetchAllTransactionsForAccountThunk } from '@suite-common/wallet-core'; import { getTxsPerPage } from '@suite-common/suite-utils'; import { amountToSmallestUnit, formatNetworkAmount } from '@suite-common/wallet-utils'; +import { Card, Checkbox, Icon, Switch, variables } from '@trezor/components'; + import { FormattedCryptoAmount, Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { Pagination } from 'src/components/wallet'; -import { Card, Checkbox, Icon, Switch, variables } from '@trezor/components'; import { useSendFormContext } from 'src/hooks/wallet'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { selectCurrentTargetAnonymity } from 'src/reducers/wallet/coinjoinReducer'; import { selectLabelingDataForSelectedAccount } from 'src/reducers/suite/metadataReducer'; +import { filterAndCategorizeUtxos } from 'src/utils/wallet/filterAndCategorizeUtxosUtils'; + import { UtxoSelectionList } from './UtxoSelectionList'; import { UtxoSearch } from './UtxoSearch'; -import { filterAndCategorizeUtxos } from 'src/utils/wallet/filterAndCategorizeUtxosUtils'; const Row = styled.div` align-items: center; diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSearch.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSearch.tsx index c46ea9eb21a..4f611a280ed 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSearch.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSearch.tsx @@ -1,6 +1,9 @@ import { useCallback, useRef, Dispatch, SetStateAction, ChangeEvent, KeyboardEvent } from 'react'; + import styled, { useTheme } from 'styled-components'; + import { Input, Icon, KEYBOARD_CODE } from '@trezor/components'; + import { useTranslation } from 'src/hooks/suite/useTranslation'; const Container = styled.div` diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelection.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelection.tsx index 197434bc295..864c7490d6c 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelection.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelection.tsx @@ -1,9 +1,11 @@ import { MouseEventHandler } from 'react'; + import styled, { css, useTheme } from 'styled-components'; import { formatNetworkAmount, isSameUtxo } from '@suite-common/wallet-utils'; import { Checkbox, Spinner, TextButton, Tooltip } from '@trezor/components'; import type { AccountUtxo } from '@trezor/connect'; +import { borders, spacingsPx, typography } from '@trezor/theme'; import { openModal } from 'src/actions/suite/modalActions'; import { @@ -17,12 +19,12 @@ import { TransactionTimestamp, UtxoAnonymity } from 'src/components/wallet'; import { useSendFormContext } from 'src/hooks/wallet'; import { useCoinjoinUnavailableUtxos } from 'src/hooks/wallet/form/useCoinjoinUnavailableUtxos'; import { WalletAccountTransaction } from 'src/types/wallet'; -import { UtxoTag } from './UtxoTag'; import { selectIsLabelingInitPossible, selectLabelingDataForSelectedAccount, } from 'src/reducers/suite/metadataReducer'; -import { borders, spacingsPx, typography } from '@trezor/theme'; + +import { UtxoTag } from './UtxoTag'; const transitionSpeed = '0.16s'; diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx index 3ea932513c8..f5c483091ec 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx @@ -1,14 +1,18 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; import { transparentize } from 'polished'; import { selectAccountTransactionsWithNulls } from '@suite-common/wallet-core'; import { Icon, variables, IconName } from '@trezor/components'; -import { useSelector } from 'src/hooks/suite'; import type { AccountUtxo } from '@trezor/connect'; +import { CSSColor } from '@trezor/theme'; + +import { useSelector } from 'src/hooks/suite'; import { useSendFormContext } from 'src/hooks/wallet'; + import { UtxoSelection } from './UtxoSelection'; -import { CSSColor } from '@trezor/theme'; + const Wrapper = styled.section` border-bottom: 1px solid ${({ theme }) => theme.legacy.STROKE_GREY}; diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoTag.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoTag.tsx index 68dadaa72c5..364ba5c30d4 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoTag.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoTag.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import { Icon, Tooltip, IconName } from '@trezor/components'; import { CSSColor } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx index d0384d728d4..90d2cd56f4a 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx @@ -1,13 +1,18 @@ -import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { useEffect } from 'react'; + import styled from 'styled-components'; -import { NumberInput, Translation } from 'src/components/suite'; -import { useSendFormContext } from 'src/hooks/wallet'; + +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { Card, Icon, IconButton } from '@trezor/components'; import { getInputState, isInteger } from '@suite-common/wallet-utils'; -import { useSelector, useTranslation } from 'src/hooks/suite'; import { spacingsPx } from '@trezor/theme'; import { selectNetworkBlockchainInfo } from '@suite-common/wallet-core'; -import { useEffect } from 'react'; + +import { useSelector, useTranslation } from 'src/hooks/suite'; +import { useSendFormContext } from 'src/hooks/wallet'; +import { NumberInput, Translation } from 'src/components/suite'; + + import { canLocktimeTxBeBroadcast } from './canLocktimeTxBeBroadcast'; const Label = styled.div` diff --git a/packages/suite/src/views/wallet/send/Options/CardanoOptions.tsx b/packages/suite/src/views/wallet/send/Options/CardanoOptions.tsx index e007299bc23..0083409a76a 100644 --- a/packages/suite/src/views/wallet/send/Options/CardanoOptions.tsx +++ b/packages/suite/src/views/wallet/send/Options/CardanoOptions.tsx @@ -1,6 +1,8 @@ import styled from 'styled-components'; + import { Button, variables } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; import { useSendFormContext } from 'src/hooks/wallet'; diff --git a/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumData.tsx b/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumData.tsx index 3cc193dd1fc..71ed403018e 100644 --- a/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumData.tsx +++ b/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumData.tsx @@ -1,13 +1,17 @@ import { useEffect } from 'react'; + import styled from 'styled-components'; + import { Textarea, Icon } from '@trezor/components'; -import { Translation } from 'src/components/suite'; -import { useSendFormContext } from 'src/hooks/wallet'; import { getInputState, isHexValid } from '@suite-common/wallet-utils'; import { formInputsMaxLength } from '@suite-common/validators'; -import { useTranslation } from 'src/hooks/suite'; import { spacingsPx } from '@trezor/theme'; +import { Translation } from 'src/components/suite'; +import { useSendFormContext } from 'src/hooks/wallet'; +import { useTranslation } from 'src/hooks/suite'; + + const inputAsciiName = 'ethereumDataAscii'; const inputHexName = 'ethereumDataHex'; const inputAmountName = 'outputs.0.amount'; diff --git a/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumOptions.tsx b/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumOptions.tsx index f076776d653..d8821dff25c 100644 --- a/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumOptions.tsx +++ b/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumOptions.tsx @@ -2,8 +2,10 @@ import styled from 'styled-components'; import { FormOptions } from '@suite-common/wallet-types'; import { Button, Tooltip } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { useSendFormContext } from 'src/hooks/wallet'; + import { EthereumData } from './EthereumData'; import { OnOffSwitcher } from '../OnOffSwitcher'; diff --git a/packages/suite/src/views/wallet/send/Options/OnOffSwitcher.tsx b/packages/suite/src/views/wallet/send/Options/OnOffSwitcher.tsx index c8e66487956..cca77415a69 100644 --- a/packages/suite/src/views/wallet/send/Options/OnOffSwitcher.tsx +++ b/packages/suite/src/views/wallet/send/Options/OnOffSwitcher.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Translation } from 'src/components/suite'; const Wrapper = styled.div` diff --git a/packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx b/packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx index 58f28b2089c..43d3977d1a0 100644 --- a/packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx +++ b/packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx @@ -1,12 +1,14 @@ import { BigNumber } from '@trezor/utils/src/bigNumber'; import { Input, Icon } from '@trezor/components'; -import { Translation } from 'src/components/suite'; -import { useSendFormContext } from 'src/hooks/wallet'; import { getInputState, isInteger } from '@suite-common/wallet-utils'; import { U_INT_32 } from '@suite-common/wallet-constants'; -import { useTranslation } from 'src/hooks/suite'; import { formInputsMaxLength } from '@suite-common/validators'; +import { Translation } from 'src/components/suite'; +import { useSendFormContext } from 'src/hooks/wallet'; +import { useTranslation } from 'src/hooks/suite'; + + interface DestinationTagProps { close: () => void; } diff --git a/packages/suite/src/views/wallet/send/Options/RippleOptions/RippleOptions.tsx b/packages/suite/src/views/wallet/send/Options/RippleOptions/RippleOptions.tsx index 8974ce80c08..725f05007cc 100644 --- a/packages/suite/src/views/wallet/send/Options/RippleOptions/RippleOptions.tsx +++ b/packages/suite/src/views/wallet/send/Options/RippleOptions/RippleOptions.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; import { Button, Tooltip } from '@trezor/components'; + import { useSendFormContext } from 'src/hooks/wallet'; import { Translation } from 'src/components/suite'; + import { DestinationTag } from './DestinationTag'; import { OnOffSwitcher } from '../OnOffSwitcher'; diff --git a/packages/suite/src/views/wallet/send/Outputs/Address.tsx b/packages/suite/src/views/wallet/send/Outputs/Address.tsx index 762935f69fe..249e9d2e501 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Address.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Address.tsx @@ -1,4 +1,5 @@ import { useCallback, useState } from 'react'; + import { checkAddressCheckSum, toChecksumAddress } from 'web3-utils'; import styled, { useTheme } from 'styled-components'; @@ -17,7 +18,6 @@ import { notificationsActions } from '@suite-common/toast-notifications'; import { formInputsMaxLength } from '@suite-common/validators'; import type { Output } from '@suite-common/wallet-types'; import TrezorConnect from '@trezor/connect'; -import { useSelector, useDevice, useDispatch, useTranslation } from 'src/hooks/suite'; import { isAddressValid, isAddressDeprecated, @@ -25,23 +25,22 @@ import { isBech32AddressUppercase, getInputState, } from '@suite-common/wallet-utils'; - -import { AddressLabeling, MetadataLabeling } from 'src/components/suite'; -import { Translation } from '../../../../components/suite/Translation'; +import { getNetworkSymbolForProtocol } from '@suite-common/suite-utils'; +import { HELP_CENTER_EVM_ADDRESS_CHECKSUM } from '@trezor/urls'; +import { spacings } from '@trezor/theme'; +import { CoinLogo } from '@trezor/product-components'; import { scanOrRequestSendFormThunk } from 'src/actions/wallet/send/sendFormThunks'; import { useSendFormContext } from 'src/hooks/wallet'; import { getProtocolInfo } from 'src/utils/suite/protocol'; -import { getNetworkSymbolForProtocol } from '@suite-common/suite-utils'; - import { InputError } from 'src/components/wallet'; import { InputErrorProps } from 'src/components/wallet/InputError'; - -import { HELP_CENTER_EVM_ADDRESS_CHECKSUM } from '@trezor/urls'; -import { spacings } from '@trezor/theme'; -import { CoinLogo } from '@trezor/product-components'; +import { AddressLabeling, MetadataLabeling } from 'src/components/suite'; +import { useSelector, useDevice, useDispatch, useTranslation } from 'src/hooks/suite'; import { captureSentryMessage } from 'src/utils/suite/sentry'; +import { Translation } from '../../../../components/suite/Translation'; + const Container = styled.div` position: relative; `; diff --git a/packages/suite/src/views/wallet/send/Outputs/Amount/Amount.tsx b/packages/suite/src/views/wallet/send/Outputs/Amount/Amount.tsx index dad5e078732..c81f5801f27 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Amount/Amount.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Amount/Amount.tsx @@ -1,7 +1,8 @@ import { useCallback } from 'react'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; + import styled, { useTheme } from 'styled-components'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { Icon, Banner, variables } from '@trezor/components'; import { breakpointMediaQueries } from '@trezor/styles'; import { spacingsPx } from '@trezor/theme'; @@ -30,6 +31,7 @@ import { validateReserveOrBalance, } from 'src/utils/suite/validation'; import { formatTokenSymbol } from 'src/utils/wallet/tokenUtils'; + import { TokenSelect } from './TokenSelect'; import { FiatInput } from './FiatInput'; import { SendMaxSwitch } from './SendMaxSwitch'; diff --git a/packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx b/packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx index 2e56e3ac4c3..4f6b1527726 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx @@ -1,4 +1,9 @@ import { useCallback } from 'react'; +import { Controller } from 'react-hook-form'; +import { useDispatch } from 'react-redux'; + +import styled from 'styled-components'; + import { Timestamp, TokenAddress, @@ -7,11 +12,7 @@ import { Output, } from '@suite-common/wallet-types'; import { BigNumber } from '@trezor/utils/src/bigNumber'; -import styled from 'styled-components'; -import { Controller } from 'react-hook-form'; - import { Select } from '@trezor/components'; -import { useSendFormContext } from 'src/hooks/wallet'; import { fromFiatCurrency, getInputState, @@ -23,14 +24,17 @@ import { getFiatRateKey, } from '@suite-common/wallet-utils'; import { formInputsMaxLength } from '@suite-common/validators'; +import { NetworkSymbol } from '@suite-common/wallet-config'; +import { FiatCurrencyCode } from '@suite-common/suite-config'; +import { selectFiatRatesByFiatRateKey, updateFiatRatesThunk } from '@suite-common/wallet-core'; + +import { useSendFormContext } from 'src/hooks/wallet'; import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { NumberInput } from 'src/components/suite'; import { useSelector, useTranslation } from 'src/hooks/suite'; import { validateDecimals } from 'src/utils/suite/validation'; -import { NetworkSymbol } from '@suite-common/wallet-config'; -import { FiatCurrencyCode } from '@suite-common/suite-config'; -import { selectFiatRatesByFiatRateKey, updateFiatRatesThunk } from '@suite-common/wallet-core'; -import { useDispatch } from 'react-redux'; + + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/send/Outputs/Amount/SendMaxSwitch.tsx b/packages/suite/src/views/wallet/send/Outputs/Amount/SendMaxSwitch.tsx index abe8330b502..8689b081384 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Amount/SendMaxSwitch.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Amount/SendMaxSwitch.tsx @@ -1,8 +1,10 @@ +import styled, { css } from 'styled-components'; + import { Switch } from '@trezor/components'; import { breakpointMediaQueries } from '@trezor/styles'; import { spacingsPx } from '@trezor/theme'; + import { Translation } from 'src/components/suite'; -import styled, { css } from 'styled-components'; // eslint-disable-next-line local-rules/no-override-ds-component const StyledSwitch = styled(Switch)<{ diff --git a/packages/suite/src/views/wallet/send/Outputs/Amount/TokenSelect.tsx b/packages/suite/src/views/wallet/send/Outputs/Amount/TokenSelect.tsx index d0e4a480364..44c89194025 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Amount/TokenSelect.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Amount/TokenSelect.tsx @@ -1,14 +1,19 @@ import { useMemo, useEffect } from 'react'; import { Controller } from 'react-hook-form'; -import { Select } from '@trezor/components'; + import styled from 'styled-components'; + +import { Select } from '@trezor/components'; +import { Output, Timestamp, TokenAddress } from '@suite-common/wallet-types'; +import { updateFiatRatesThunk, selectCurrentFiatRates } from '@suite-common/wallet-core'; +import { NetworkSymbol } from '@suite-common/wallet-config'; +import { FiatCurrencyCode } from '@suite-common/suite-config'; +import { TokenDefinitions, selectCoinDefinitions } from '@suite-common/token-definitions'; + import { useSendFormContext } from 'src/hooks/wallet'; import { Account } from 'src/types/wallet'; -import { Output, Timestamp, TokenAddress } from '@suite-common/wallet-types'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { updateFiatRatesThunk, selectCurrentFiatRates } from '@suite-common/wallet-core'; import { TooltipSymbol, Translation } from 'src/components/suite'; -import { NetworkSymbol } from '@suite-common/wallet-config'; import { enhanceTokensWithRates, formatTokenSymbol, @@ -16,8 +21,6 @@ import { sortTokensWithRates, } from 'src/utils/wallet/tokenUtils'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; -import { FiatCurrencyCode } from '@suite-common/suite-config'; -import { TokenDefinitions, selectCoinDefinitions } from '@suite-common/token-definitions'; import { SUITE } from 'src/actions/suite/constants'; const UnrecognizedTokensHeading = styled.div` diff --git a/packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx b/packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx index 25096d39c67..0edaf00967a 100644 --- a/packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx @@ -1,13 +1,16 @@ import styled from 'styled-components'; -import { useSendFormContext } from 'src/hooks/wallet'; -import { Translation } from 'src/components/suite'; + import { Textarea, IconButton, Row, Tooltip, variables } from '@trezor/components'; import { getInputState, isHexValid } from '@suite-common/wallet-utils'; -import { OpenGuideFromTooltip } from 'src/components/guide'; import { formInputsMaxLength } from '@suite-common/validators'; -import { useTranslation } from 'src/hooks/suite'; import { spacingsPx } from '@trezor/theme'; +import { useSendFormContext } from 'src/hooks/wallet'; +import { Translation } from 'src/components/suite'; +import { OpenGuideFromTooltip } from 'src/components/guide'; +import { useTranslation } from 'src/hooks/suite'; + + const Inputs = styled.div` display: flex; place-items: center space-between; diff --git a/packages/suite/src/views/wallet/send/Outputs/Outputs.tsx b/packages/suite/src/views/wallet/send/Outputs/Outputs.tsx index efae8549e88..d1a27664ad0 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Outputs.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Outputs.tsx @@ -1,4 +1,5 @@ import { useEffect, useLayoutEffect, useRef, useState } from 'react'; + import styled from 'styled-components'; import { motion } from 'framer-motion'; @@ -6,14 +7,15 @@ import { Card, motionEasing } from '@trezor/components'; import { motionEasingStrings } from '@trezor/components/src/config/motion'; import { spacingsPx } from '@trezor/theme'; import { networks } from '@suite-common/wallet-config'; +import { CoinLogo } from '@trezor/product-components'; import { useSendFormContext } from 'src/hooks/wallet'; import { useLayoutSize } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; + import { Address } from './Address'; import { Amount } from './Amount/Amount'; import { OpReturn } from './OpReturn'; -import { CoinLogo } from '@trezor/product-components'; const Container = styled.div<{ $height: number }>` height: ${({ $height }) => ($height ? `${$height}px` : 'auto')}; diff --git a/packages/suite/src/views/wallet/send/SendHeader.tsx b/packages/suite/src/views/wallet/send/SendHeader.tsx index 2fe84c56815..72a80ebb636 100644 --- a/packages/suite/src/views/wallet/send/SendHeader.tsx +++ b/packages/suite/src/views/wallet/send/SendHeader.tsx @@ -1,11 +1,13 @@ import styled from 'styled-components'; + import { Button, Dropdown, DropdownMenuItemProps } from '@trezor/components'; +import { sendFormActions } from '@suite-common/wallet-core'; +import { FADE_IN } from '@trezor/components/src/config/animations'; + import { Translation } from 'src/components/suite'; import { useDevice, useDispatch } from 'src/hooks/suite'; import { useSendFormContext } from 'src/hooks/wallet'; import { WalletSubpageHeading } from 'src/components/wallet'; -import { sendFormActions } from '@suite-common/wallet-core'; -import { FADE_IN } from '@trezor/components/src/config/animations'; import { ConnectDeviceSendPromo } from 'src/views/wallet/receive/components/ConnectDevicePromo'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/views/wallet/send/SendRaw.tsx b/packages/suite/src/views/wallet/send/SendRaw.tsx index 1dd8c68d0cf..f3e57ed824d 100644 --- a/packages/suite/src/views/wallet/send/SendRaw.tsx +++ b/packages/suite/src/views/wallet/send/SendRaw.tsx @@ -1,14 +1,16 @@ import { useForm } from 'react-hook-form'; + import { analytics, EventType } from '@trezor/suite-analytics'; import { Card, Textarea, Button, Tooltip, H3, IconButton, Row } from '@trezor/components'; import { sendFormActions, pushSendFormRawTransactionThunk } from '@suite-common/wallet-core'; +import { tryGetAccountIdentity, getInputState, isHexValid } from '@suite-common/wallet-utils'; +import { spacings } from '@trezor/theme'; import { Translation } from 'src/components/suite'; import { useDispatch, useTranslation } from 'src/hooks/suite'; -import { tryGetAccountIdentity, getInputState, isHexValid } from '@suite-common/wallet-utils'; import { Account } from 'src/types/wallet'; import { OpenGuideFromTooltip } from 'src/components/guide'; -import { spacings } from '@trezor/theme'; + const INPUT_NAME = 'rawTx'; diff --git a/packages/suite/src/views/wallet/send/TotalSent/ReviewButton.tsx b/packages/suite/src/views/wallet/send/TotalSent/ReviewButton.tsx index 8603b5316f2..fbf60396c6c 100644 --- a/packages/suite/src/views/wallet/send/TotalSent/ReviewButton.tsx +++ b/packages/suite/src/views/wallet/send/TotalSent/ReviewButton.tsx @@ -1,12 +1,15 @@ import { useWatch } from 'react-hook-form'; + import styled from 'styled-components'; import { Checkbox, Button, Banner, variables, Tooltip } from '@trezor/components'; +import { isLowAnonymityWarning } from '@suite-common/wallet-utils'; +import { spacingsPx } from '@trezor/theme'; + import { useDevice } from 'src/hooks/suite'; import { useSendFormContext } from 'src/hooks/wallet'; -import { isLowAnonymityWarning } from '@suite-common/wallet-utils'; import { Translation } from 'src/components/suite/Translation'; -import { spacingsPx } from '@trezor/theme'; + const Container = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx b/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx index ad6b9e7f680..c4a43b28ec0 100644 --- a/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx +++ b/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx @@ -1,10 +1,14 @@ import styled from 'styled-components'; + import { Card, Column, InfoRow, Text } from '@trezor/components'; -import { useSendFormContext } from 'src/hooks/wallet'; import { formatNetworkAmount, formatAmount } from '@suite-common/wallet-utils'; +import { spacings } from '@trezor/theme'; + +import { useSendFormContext } from 'src/hooks/wallet'; import { Translation, FiatValue, FormattedCryptoAmount } from 'src/components/suite'; + import { ReviewButton } from './ReviewButton'; -import { spacings } from '@trezor/theme'; + const Container = styled.div` position: sticky; diff --git a/packages/suite/src/views/wallet/send/index.tsx b/packages/suite/src/views/wallet/send/index.tsx index b7ab07ae63d..59c02ea8be1 100644 --- a/packages/suite/src/views/wallet/send/index.tsx +++ b/packages/suite/src/views/wallet/send/index.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; import { Banner } from '@trezor/components'; @@ -14,6 +15,7 @@ import { } from 'src/reducers/wallet/coinjoinReducer'; import { Translation } from 'src/components/suite'; import { ConfirmEvmExplanationModal } from 'src/components/suite/modals'; + import { SendHeader } from './SendHeader'; import { Outputs } from './Outputs/Outputs'; import { Options } from './Options/Options'; diff --git a/packages/suite/src/views/wallet/sign-verify/components/ButtonRow.tsx b/packages/suite/src/views/wallet/sign-verify/components/ButtonRow.tsx index 819d071158a..680c4c8f1f7 100644 --- a/packages/suite/src/views/wallet/sign-verify/components/ButtonRow.tsx +++ b/packages/suite/src/views/wallet/sign-verify/components/ButtonRow.tsx @@ -1,10 +1,13 @@ -import { Translation } from 'src/components/suite'; - -import { useLayoutSize } from 'src/hooks/suite'; -import { Button, variables } from '@trezor/components'; import { useState } from 'react'; + import styled from 'styled-components'; +import { Button, variables } from '@trezor/components'; + +import { Translation } from 'src/components/suite'; +import { useLayoutSize } from 'src/hooks/suite'; + + export const Row = styled.div` position: relative; display: flex; diff --git a/packages/suite/src/views/wallet/sign-verify/components/HiddenAddressRow.tsx b/packages/suite/src/views/wallet/sign-verify/components/HiddenAddressRow.tsx index ccf6b808ac0..5b8fdf64cbf 100644 --- a/packages/suite/src/views/wallet/sign-verify/components/HiddenAddressRow.tsx +++ b/packages/suite/src/views/wallet/sign-verify/components/HiddenAddressRow.tsx @@ -1,8 +1,10 @@ import styled from 'styled-components'; + import { GradientOverlay, useElevation } from '@trezor/components'; -import type { AddressItem } from 'src/hooks/wallet/sign-verify/useSignAddressOptions'; import { borders, nextElevation, spacingsPx } from '@trezor/theme'; +import type { AddressItem } from 'src/hooks/wallet/sign-verify/useSignAddressOptions'; + // eslint-disable-next-line local-rules/no-override-ds-component const StyledGradientOverlay = styled(GradientOverlay)` margin: -${spacingsPx.xs}; diff --git a/packages/suite/src/views/wallet/sign-verify/components/Navigation.tsx b/packages/suite/src/views/wallet/sign-verify/components/Navigation.tsx index 24a2dd2c975..99753407b44 100644 --- a/packages/suite/src/views/wallet/sign-verify/components/Navigation.tsx +++ b/packages/suite/src/views/wallet/sign-verify/components/Navigation.tsx @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { NavigationTab } from './NavigationTab'; const Container = styled.div` diff --git a/packages/suite/src/views/wallet/sign-verify/components/NavigationTab.tsx b/packages/suite/src/views/wallet/sign-verify/components/NavigationTab.tsx index 8c036168902..695e0397dcb 100644 --- a/packages/suite/src/views/wallet/sign-verify/components/NavigationTab.tsx +++ b/packages/suite/src/views/wallet/sign-verify/components/NavigationTab.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { variables } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { ExtendedMessageDescriptor } from 'src/types/suite'; diff --git a/packages/suite/src/views/wallet/sign-verify/components/SignAddressInput.tsx b/packages/suite/src/views/wallet/sign-verify/components/SignAddressInput.tsx index 626950aa849..82390fbdae1 100644 --- a/packages/suite/src/views/wallet/sign-verify/components/SignAddressInput.tsx +++ b/packages/suite/src/views/wallet/sign-verify/components/SignAddressInput.tsx @@ -1,12 +1,16 @@ import { components } from 'react-select'; + import styled from 'styled-components'; + import { Select, SelectProps } from '@trezor/components'; + import type { Account } from 'src/types/wallet'; import type { State as RevealedAddresses } from 'src/reducers/wallet/receiveReducer'; import { useSignAddressOptions, AddressItem, } from 'src/hooks/wallet/sign-verify/useSignAddressOptions'; + import { HiddenAddressRow } from './HiddenAddressRow'; import { VerifyAddressButton } from './VerifyAddressButton'; diff --git a/packages/suite/src/views/wallet/sign-verify/components/VerifyAddressButton.tsx b/packages/suite/src/views/wallet/sign-verify/components/VerifyAddressButton.tsx index 15c032d6410..eb526581fe8 100644 --- a/packages/suite/src/views/wallet/sign-verify/components/VerifyAddressButton.tsx +++ b/packages/suite/src/views/wallet/sign-verify/components/VerifyAddressButton.tsx @@ -1,10 +1,13 @@ import { MouseEvent } from 'react'; + import styled from 'styled-components'; + import { Icon, variables } from '@trezor/components'; +import { spacingsPx } from '@trezor/theme'; + import { showAddress } from 'src/actions/wallet/signVerifyActions'; import { useDispatch } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; -import { spacingsPx } from '@trezor/theme'; const RevealText = styled.div` max-width: 0; diff --git a/packages/suite/src/views/wallet/sign-verify/index.tsx b/packages/suite/src/views/wallet/sign-verify/index.tsx index 893c111051b..da6e7507c2b 100644 --- a/packages/suite/src/views/wallet/sign-verify/index.tsx +++ b/packages/suite/src/views/wallet/sign-verify/index.tsx @@ -1,6 +1,8 @@ import { useEffect, useState } from 'react'; import { FieldError } from 'react-hook-form'; + import styled from 'styled-components'; + import { Input, Button, @@ -11,6 +13,8 @@ import { SelectBar, Tooltip, } from '@trezor/components'; +import { getInputState } from '@suite-common/wallet-utils'; +import { spacingsPx } from '@trezor/theme'; import { WalletLayout, WalletSubpageHeading } from 'src/components/wallet'; import { Translation } from 'src/components/suite'; @@ -18,10 +22,6 @@ import { useDevice, useDispatch, useSelector, useTranslation } from 'src/hooks/s import { sign, verify } from 'src/actions/wallet/signVerifyActions'; import { goto } from 'src/actions/suite/routerActions'; import { TranslationKey } from 'src/components/suite/Translation'; - -import { Navigation, NavPages } from './components/Navigation'; -import { SignAddressInput } from './components/SignAddressInput'; -import { ButtonRow, Row } from './components/ButtonRow'; import { useCopySignedMessage } from 'src/hooks/wallet/sign-verify/useCopySignedMessage'; import { useSignVerifyForm, @@ -29,8 +29,10 @@ import { MAX_LENGTH_MESSAGE, MAX_LENGTH_SIGNATURE, } from 'src/hooks/wallet/sign-verify/useSignVerifyForm'; -import { getInputState } from '@suite-common/wallet-utils'; -import { spacingsPx } from '@trezor/theme'; + +import { Navigation, NavPages } from './components/Navigation'; +import { SignAddressInput } from './components/SignAddressInput'; +import { ButtonRow, Row } from './components/ButtonRow'; const SwitchWrapper = styled.label` display: flex; diff --git a/packages/suite/src/views/wallet/staking/WalletStaking.tsx b/packages/suite/src/views/wallet/staking/WalletStaking.tsx index bac1f0c5add..9b9990e25de 100644 --- a/packages/suite/src/views/wallet/staking/WalletStaking.tsx +++ b/packages/suite/src/views/wallet/staking/WalletStaking.tsx @@ -1,8 +1,10 @@ +import { hasNetworkFeatures } from '@suite-common/wallet-utils'; + import { Translation } from 'src/components/suite'; import { AccountExceptionLayout, WalletLayout } from 'src/components/wallet'; import { useSelector } from 'src/hooks/suite'; + import { CardanoStakingDashboard } from './components/CardanoStakingDashboard'; -import { hasNetworkFeatures } from '@suite-common/wallet-utils'; import { EthStakingDashboard } from './components/EthStakingDashboard/EthStakingDashboard'; export const WalletStaking = () => { diff --git a/packages/suite/src/views/wallet/staking/components/CardanoActionPending.tsx b/packages/suite/src/views/wallet/staking/components/CardanoActionPending.tsx index a57b4e34f7b..ea2e101dd2d 100644 --- a/packages/suite/src/views/wallet/staking/components/CardanoActionPending.tsx +++ b/packages/suite/src/views/wallet/staking/components/CardanoActionPending.tsx @@ -1,6 +1,7 @@ +import { Banner } from '@trezor/components'; + import { Translation } from 'src/components/suite/Translation'; import { useCardanoStaking } from 'src/hooks/wallet/useCardanoStaking'; -import { Banner } from '@trezor/components'; export const CardanoActionPending = () => { const { pendingStakeTx } = useCardanoStaking(); diff --git a/packages/suite/src/views/wallet/staking/components/CardanoPrimitives.ts b/packages/suite/src/views/wallet/staking/components/CardanoPrimitives.ts index cdaae199f9f..8ff6d1eb544 100644 --- a/packages/suite/src/views/wallet/staking/components/CardanoPrimitives.ts +++ b/packages/suite/src/views/wallet/staking/components/CardanoPrimitives.ts @@ -1,6 +1,7 @@ +import styled from 'styled-components'; + import { H2 } from '@trezor/components'; import { borders, typography } from '@trezor/theme'; -import styled from 'styled-components'; export const Heading = styled.div` padding-left: 5px; diff --git a/packages/suite/src/views/wallet/staking/components/CardanoRedelegate.tsx b/packages/suite/src/views/wallet/staking/components/CardanoRedelegate.tsx index 1907c3b997b..dcacbc77287 100644 --- a/packages/suite/src/views/wallet/staking/components/CardanoRedelegate.tsx +++ b/packages/suite/src/views/wallet/staking/components/CardanoRedelegate.tsx @@ -1,14 +1,14 @@ import { useEffect } from 'react'; import { Card, Column, Icon } from '@trezor/components'; +import { DeviceModelInternal } from '@trezor/connect'; +import { spacings } from '@trezor/theme'; import { getReasonForDisabledAction, useCardanoStaking } from 'src/hooks/wallet/useCardanoStaking'; import { Translation } from 'src/components/suite/Translation'; -import { Actions, Title, Heading, Text } from './CardanoPrimitives'; +import { Actions, Title, Heading, Text } from './CardanoPrimitives'; import { DeviceButton } from './DeviceButton'; -import { DeviceModelInternal } from '@trezor/connect'; -import { spacings } from '@trezor/theme'; interface CardanoRedelegateProps { deviceModel: DeviceModelInternal; diff --git a/packages/suite/src/views/wallet/staking/components/CardanoRewards.tsx b/packages/suite/src/views/wallet/staking/components/CardanoRewards.tsx index b15ec69cda7..31193518c7d 100644 --- a/packages/suite/src/views/wallet/staking/components/CardanoRewards.tsx +++ b/packages/suite/src/views/wallet/staking/components/CardanoRewards.tsx @@ -2,6 +2,8 @@ import { useEffect } from 'react'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { Card, Column, Icon } from '@trezor/components'; +import { DeviceModelInternal } from '@trezor/connect'; +import { spacings } from '@trezor/theme'; import { getReasonForDisabledAction, useCardanoStaking } from 'src/hooks/wallet/useCardanoStaking'; import { Translation } from 'src/components/suite/Translation'; @@ -21,8 +23,6 @@ import { Column as CardanoColumn, } from './CardanoPrimitives'; import { CardanoActionPending } from './CardanoActionPending'; -import { DeviceModelInternal } from '@trezor/connect'; -import { spacings } from '@trezor/theme'; interface CardanoRewardsProps { account: Account; diff --git a/packages/suite/src/views/wallet/staking/components/CardanoStake.tsx b/packages/suite/src/views/wallet/staking/components/CardanoStake.tsx index f1d15d7e8cc..8acfac87534 100644 --- a/packages/suite/src/views/wallet/staking/components/CardanoStake.tsx +++ b/packages/suite/src/views/wallet/staking/components/CardanoStake.tsx @@ -3,13 +3,14 @@ import { useEffect } from 'react'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { Card, Column, Icon, Banner } from '@trezor/components'; import { DeviceModelInternal } from '@trezor/connect'; +import { spacings } from '@trezor/theme'; import { Translation } from 'src/components/suite/Translation'; import { HiddenPlaceholder } from 'src/components/suite/HiddenPlaceholder'; import { useCardanoStaking, getReasonForDisabledAction } from 'src/hooks/wallet/useCardanoStaking'; -import { CardanoActionPending } from './CardanoActionPending'; import { Account } from 'src/types/wallet'; +import { CardanoActionPending } from './CardanoActionPending'; import { DeviceButton } from './DeviceButton'; import { Title, @@ -22,7 +23,6 @@ import { Content, StyledH2, } from './CardanoPrimitives'; -import { spacings } from '@trezor/theme'; interface CardanoStakeProps { account: Account; diff --git a/packages/suite/src/views/wallet/staking/components/CardanoStakingDashboard.tsx b/packages/suite/src/views/wallet/staking/components/CardanoStakingDashboard.tsx index f39ab0f6427..1d339f53a41 100644 --- a/packages/suite/src/views/wallet/staking/components/CardanoStakingDashboard.tsx +++ b/packages/suite/src/views/wallet/staking/components/CardanoStakingDashboard.tsx @@ -1,11 +1,14 @@ +import type { SelectedAccountLoaded } from '@suite-common/wallet-types'; +import { DeviceModelInternal } from '@trezor/connect'; + import { WalletLayout } from 'src/components/wallet'; import { useCardanoStaking } from 'src/hooks/wallet/useCardanoStaking'; +import { useDevice } from 'src/hooks/suite'; + import { CardanoRewards } from './CardanoRewards'; import { CardanoStake } from './CardanoStake'; import { CardanoRedelegate } from './CardanoRedelegate'; -import type { SelectedAccountLoaded } from '@suite-common/wallet-types'; -import { useDevice } from 'src/hooks/suite'; -import { DeviceModelInternal } from '@trezor/connect'; + interface CardanoStakingDashboardProps { selectedAccount: SelectedAccountLoaded; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/EthStakingDashboard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/EthStakingDashboard.tsx index 75aec7a8472..eadb9c82713 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/EthStakingDashboard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/EthStakingDashboard.tsx @@ -1,7 +1,9 @@ import { selectAccountHasStaked } from '@suite-common/wallet-core'; import { SelectedAccountLoaded } from '@suite-common/wallet-types'; + import { WalletLayout } from 'src/components/wallet'; import { useSelector } from 'src/hooks/suite'; + import { EmptyStakingCard } from './components/EmptyStakingCard'; import { StakingDashboard } from './components/StakingDashboard'; import { EverstakeFooter } from './components/EverstakeFooter'; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ApproximateInstantEthAmount.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ApproximateInstantEthAmount.tsx index 5f76d3155ad..d84fad9b696 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ApproximateInstantEthAmount.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ApproximateInstantEthAmount.tsx @@ -1,7 +1,8 @@ -import { FormattedCryptoAmount } from 'src/components/suite'; import { Tooltip } from '@trezor/components'; import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { FormattedCryptoAmount } from 'src/components/suite'; + interface ApproximateInstantEthAmountProps { value: string | number; symbol: string; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ApyCard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ApyCard.tsx index 469d38dd03c..38e3a1534e0 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ApyCard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ApyCard.tsx @@ -1,6 +1,9 @@ import { useTheme } from 'styled-components'; + import { Card, Column, Icon } from '@trezor/components'; + import { Translation } from 'src/components/suite'; + import { AccentP, CardBottomContent, GreyP } from './styled'; interface ApyCardProps { diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/EmptyStakingCard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/EmptyStakingCard.tsx index c982bf808ef..3dd408a3386 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/EmptyStakingCard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/EmptyStakingCard.tsx @@ -1,4 +1,5 @@ import { useMemo } from 'react'; + import { Button, Card, @@ -13,12 +14,13 @@ import { IconName, } from '@trezor/components'; import { spacings } from '@trezor/theme'; +import { selectPoolStatsApyData } from '@suite-common/wallet-core'; + import { Translation, StakingFeature } from 'src/components/suite'; import { openModal } from 'src/actions/suite/modalActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { DashboardSection } from 'src/components/dashboard'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { selectPoolStatsApyData } from '@suite-common/wallet-core'; import { useMessageSystemStaking } from 'src/hooks/suite/useMessageSystemStaking'; export const EmptyStakingCard = () => { diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/EverstakeFooter.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/EverstakeFooter.tsx index fb4ef0d92e2..5b140c3a269 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/EverstakeFooter.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/EverstakeFooter.tsx @@ -1,10 +1,13 @@ import styled, { useTheme } from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; -import { Translation } from 'src/components/suite'; -import { EverstakeLogo } from './EverstakeLogo'; import { HELP_CENTER_ETH_STAKING } from '@trezor/urls'; + +import { Translation } from 'src/components/suite'; import { LearnMoreButton } from 'src/components/suite/LearnMoreButton'; +import { EverstakeLogo } from './EverstakeLogo'; + const Wrapper = styled.div` display: flex; align-items: center; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/InstantStakeBanner.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/InstantStakeBanner.tsx index 608ef67116a..9738cd4e3e0 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/InstantStakeBanner.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/InstantStakeBanner.tsx @@ -1,13 +1,16 @@ -import { Banner, Column, H3, Icon, Paragraph, Row } from '@trezor/components'; -import { Translation } from 'src/components/suite'; +import { useEffect, useRef, useState } from 'react'; + import styled, { useTheme } from 'styled-components'; +import { fromWei } from 'web3-utils'; + +import { Banner, Column, H3, Icon, Paragraph, Row } from '@trezor/components'; import { spacings, spacingsPx } from '@trezor/theme'; -import { useSelector } from 'src/hooks/suite'; import { StakeType, WalletAccountTransaction } from '@suite-common/wallet-types'; import { InternalTransfer } from '@trezor/connect'; -import { fromWei } from 'web3-utils'; + +import { useSelector } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; import { getChangedInternalTx, getInstantStakeType } from 'src/utils/suite/stake'; -import { useEffect, useRef, useState } from 'react'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; const IconWrapper = styled.div` diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/PayoutCard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/PayoutCard.tsx index 276a7bfef14..439da9ccfae 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/PayoutCard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/PayoutCard.tsx @@ -1,13 +1,17 @@ import { useMemo } from 'react'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; + import { useTheme } from 'styled-components'; + +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { Card, Column, Icon } from '@trezor/components'; +import { BACKUP_REWARD_PAYOUT_DAYS } from '@suite-common/wallet-constants'; +import { getAccountAutocompoundBalance } from '@suite-common/wallet-utils'; + import { Translation } from 'src/components/suite'; -import { AccentP, CardBottomContent, GreyP } from './styled'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { useSelector } from 'src/hooks/suite'; -import { BACKUP_REWARD_PAYOUT_DAYS } from '@suite-common/wallet-constants'; -import { getAccountAutocompoundBalance } from '@suite-common/wallet-utils'; + +import { AccentP, CardBottomContent, GreyP } from './styled'; interface PayoutCardProps { nextRewardPayout?: number | null; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ProgressLabels/ProgressLabel.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ProgressLabels/ProgressLabel.tsx index 7f9a8fdcdb5..2d687afd428 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ProgressLabels/ProgressLabel.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ProgressLabels/ProgressLabel.tsx @@ -1,9 +1,12 @@ import { ReactNode, useEffect, useRef, useState } from 'react'; + import styled, { DefaultTheme, useTheme } from 'styled-components'; + import { Icon, variables } from '@trezor/components'; -import { ProgressLabelState } from './types'; import { borders, spacingsPx } from '@trezor/theme'; +import { ProgressLabelState } from './types'; + const DEFAULT_LABEL_HEIGHT = 48; const getProgressStateColor = ({ diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ProgressLabels/ProgressLabels.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ProgressLabels/ProgressLabels.tsx index 0b85edfad2f..0fe2d51d825 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ProgressLabels/ProgressLabels.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/ProgressLabels/ProgressLabels.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; + import { ProgressLabelData } from './types'; import { ProgressLabel } from './ProgressLabel'; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingCard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingCard.tsx index 7a776c1dcf7..f9d14778222 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingCard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingCard.tsx @@ -1,19 +1,22 @@ -import { BigNumber } from '@trezor/utils/src/bigNumber'; import styled, { useTheme } from 'styled-components'; + +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { Badge, Button, Card, Icon, Row, Tooltip, variables } from '@trezor/components'; import { spacings, spacingsPx } from '@trezor/theme'; import { selectAccountStakeTransactions } from '@suite-common/wallet-core'; import { getAccountEverstakeStakingPool, isPending } from '@suite-common/wallet-utils'; + import { FiatValue, Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; +import { useMessageSystemStaking } from 'src/hooks/suite/useMessageSystemStaking'; + import { InfoBox, ProgressBar } from './styled'; import { ProgressLabels } from './ProgressLabels/ProgressLabels'; import { useProgressLabelsData } from '../hooks/useProgressLabelsData'; import { useIsTxStatusShown } from '../hooks/useIsTxStatusShown'; import { TrimmedCryptoAmount } from './TrimmedCryptoAmount'; -import { useMessageSystemStaking } from 'src/hooks/suite/useMessageSystemStaking'; const AmountsWrapper = styled.div<{ $isStakeOrUnstakePending: boolean }>` display: flex; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingDashboard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingDashboard.tsx index be2d5921d3f..3be19d3928b 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingDashboard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/StakingDashboard.tsx @@ -1,15 +1,9 @@ +import { useEffect, useMemo } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; import { spacingsPx } from '@trezor/theme'; -import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { useDispatch, useSelector } from 'src/hooks/suite'; -import { Divider, Translation } from 'src/components/suite'; -import { DashboardSection } from 'src/components/dashboard'; -import { StakingCard } from './StakingCard'; -import { ApyCard } from './ApyCard'; -import { PayoutCard } from './PayoutCard'; -import { ClaimCard } from './claim/ClaimCard'; -import { Transactions } from './Transactions'; import { fetchAllTransactionsForAccountThunk, selectAccountStakeTransactions, @@ -18,9 +12,19 @@ import { selectPoolStatsNextRewardPayout, selectValidatorsQueue, } from '@suite-common/wallet-core'; + +import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; +import { useDispatch, useSelector } from 'src/hooks/suite'; +import { Divider, Translation } from 'src/components/suite'; +import { DashboardSection } from 'src/components/dashboard'; import { getDaysToAddToPool, getDaysToUnstake } from 'src/utils/suite/stake'; + +import { StakingCard } from './StakingCard'; +import { ApyCard } from './ApyCard'; +import { PayoutCard } from './PayoutCard'; +import { ClaimCard } from './claim/ClaimCard'; +import { Transactions } from './Transactions'; import { InstantStakeBanner } from './InstantStakeBanner'; -import { useEffect, useMemo } from 'react'; const FlexCol = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/Transactions.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/Transactions.tsx index c5f4d649e08..3223f454b5c 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/Transactions.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/Transactions.tsx @@ -1,11 +1,12 @@ -import { TransactionList } from 'src/views/wallet/transactions/TransactionList/TransactionList'; -import { useSelector } from 'src/hooks/suite'; import { selectAccountStakeTypeTransactions, selectAreAllTransactionsLoaded, selectIsLoadingAccountTransactions, } from '@suite-common/wallet-core'; +import { TransactionList } from 'src/views/wallet/transactions/TransactionList/TransactionList'; +import { useSelector } from 'src/hooks/suite'; + export const Transactions = () => { const selectedAccount = useSelector(state => state.wallet.selectedAccount); const accountKey = selectedAccount.account?.key ?? ''; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/TrimmedCryptoAmount.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/TrimmedCryptoAmount.tsx index e97efdaed85..6ea5fe53dd7 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/TrimmedCryptoAmount.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/TrimmedCryptoAmount.tsx @@ -1,9 +1,11 @@ -import { FormattedCryptoAmount } from 'src/components/suite'; import styled from 'styled-components'; + import { spacingsPx } from '@trezor/theme'; import { Tooltip, variables } from '@trezor/components'; import { BigNumber } from '@trezor/utils/src/bigNumber'; +import { FormattedCryptoAmount } from 'src/components/suite'; + const StyledFormattedCryptoAmount = styled(FormattedCryptoAmount)<{ $isRewards?: boolean; $isSmall?: boolean; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimCard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimCard.tsx index a505234c467..6ca42d02b8c 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimCard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimCard.tsx @@ -1,9 +1,12 @@ import { useEffect, useMemo, useRef } from 'react'; + import { getAccountEverstakeStakingPool, isPending } from '@suite-common/wallet-utils'; import { selectAccountClaimTransactions } from '@suite-common/wallet-core'; import { notificationsActions } from '@suite-common/toast-notifications'; + import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { useDispatch, useSelector } from 'src/hooks/suite'; + import { ClaimReadyCard } from './ClaimReadyCard'; import { ClaimPendingCard } from './ClaimPendingCard'; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimPendingCard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimPendingCard.tsx index 3b1c90a0e7a..758f5cddf17 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimPendingCard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimPendingCard.tsx @@ -1,11 +1,14 @@ import styled, { useTheme } from 'styled-components'; + import { Icon } from '@trezor/components'; +import { variables } from '@trezor/components/src/config'; +import { borders, spacingsPx } from '@trezor/theme'; + import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; -import { FiatValueWrapper, FormattedCryptoAmountWrapper } from './styled'; import { useSelector } from 'src/hooks/suite'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { variables } from '@trezor/components/src/config'; -import { borders, spacingsPx } from '@trezor/theme'; + +import { FiatValueWrapper, FormattedCryptoAmountWrapper } from './styled'; const StyledCard = styled.div` border-radius: ${borders.radii.md}; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimReadyCard.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimReadyCard.tsx index 3078b751e66..1335c7417bf 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimReadyCard.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/ClaimReadyCard.tsx @@ -1,13 +1,16 @@ import styled, { useTheme } from 'styled-components'; -import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; + import { Button, Icon, Paragraph, Tooltip, variables } from '@trezor/components'; import { borders, spacingsPx } from '@trezor/theme'; + +import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; import { openModal } from 'src/actions/suite/modalActions'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; -import { FiatValueWrapper, FormattedCryptoAmountWrapper } from './styled'; import { useMessageSystemStaking } from 'src/hooks/suite/useMessageSystemStaking'; +import { FiatValueWrapper, FormattedCryptoAmountWrapper } from './styled'; + const StyledCard = styled.div` border-radius: ${borders.radii.md}; padding: ${spacingsPx.md} ${spacingsPx.xxl} ${spacingsPx.xxl} ${spacingsPx.md}; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/styled.ts b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/styled.ts index a0efb3ede58..ab6da9bae41 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/styled.ts +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/claim/styled.ts @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { variables } from '@trezor/components'; export const FormattedCryptoAmountWrapper = styled.div` diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/styled.ts b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/styled.ts index c889fb96a9f..49d6db87fa5 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/styled.ts +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/components/styled.ts @@ -1,4 +1,5 @@ import styled from 'styled-components'; + import { Paragraph, variables } from '@trezor/components'; import { borders, spacingsPx } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/hooks/useIsTxStatusShown.ts b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/hooks/useIsTxStatusShown.ts index 6f81be789a9..ce077f4ac04 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/hooks/useIsTxStatusShown.ts +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/hooks/useIsTxStatusShown.ts @@ -1,4 +1,5 @@ import { useEffect, useRef, useState } from 'react'; + import { BigNumber } from '@trezor/utils/src/bigNumber'; export const useIsTxStatusShown = (totalPendingStake: BigNumber, accountDescriptor?: string) => { diff --git a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/hooks/useProgressLabelsData.tsx b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/hooks/useProgressLabelsData.tsx index fdbcbe44e9c..cf9b2038781 100644 --- a/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/hooks/useProgressLabelsData.tsx +++ b/packages/suite/src/views/wallet/staking/components/EthStakingDashboard/hooks/useProgressLabelsData.tsx @@ -1,9 +1,13 @@ import { useMemo } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; -import { ProgressLabelData } from '../components/ProgressLabels/types'; + import { Translation } from 'src/components/suite'; +import { ProgressLabelData } from '../components/ProgressLabels/types'; + const DaysToAddToPool = styled.div` font-size: ${variables.FONT_SIZE.TINY}; color: ${({ theme }) => theme.legacy.TYPE_LIGHT_GREY}; diff --git a/packages/suite/src/views/wallet/tokens/coins/CoinsTable.tsx b/packages/suite/src/views/wallet/tokens/coins/CoinsTable.tsx index 37994d00c4b..225145af6b3 100644 --- a/packages/suite/src/views/wallet/tokens/coins/CoinsTable.tsx +++ b/packages/suite/src/views/wallet/tokens/coins/CoinsTable.tsx @@ -10,9 +10,10 @@ import { sortTokensWithRates, } from 'src/utils/wallet/tokenUtils'; import { useSelector } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; + import { NoTokens } from '../common/NoTokens'; import { TokensTable } from '../common/TokensTable/TokensTable'; -import { Translation } from 'src/components/suite'; interface CoinsTableProps { selectedAccount: SelectedAccountLoaded; diff --git a/packages/suite/src/views/wallet/tokens/common/BlurUrls.tsx b/packages/suite/src/views/wallet/tokens/common/BlurUrls.tsx index da374313063..3b797e7b3d8 100644 --- a/packages/suite/src/views/wallet/tokens/common/BlurUrls.tsx +++ b/packages/suite/src/views/wallet/tokens/common/BlurUrls.tsx @@ -1,9 +1,12 @@ import { Fragment } from 'react'; + import styled from 'styled-components'; + import { Tooltip } from '@trezor/components'; +import { extractUrlsFromText } from '@trezor/utils'; + import { BlurWrapper } from 'src/components/wallet/TransactionItem/TransactionItemBlurWrapper'; import { Translation } from 'src/components/suite'; -import { extractUrlsFromText } from '@trezor/utils'; // eslint-disable-next-line local-rules/no-override-ds-component const StyledTooltip = styled(Tooltip)` diff --git a/packages/suite/src/views/wallet/tokens/common/TokensTable/TokenRow.tsx b/packages/suite/src/views/wallet/tokens/common/TokensTable/TokenRow.tsx index 4301ceb4a9f..8f66fcd8e7d 100644 --- a/packages/suite/src/views/wallet/tokens/common/TokensTable/TokenRow.tsx +++ b/packages/suite/src/views/wallet/tokens/common/TokensTable/TokenRow.tsx @@ -44,7 +44,6 @@ import { useTranslation, } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; -import { BlurUrls } from '../BlurUrls'; import { showAddress } from 'src/actions/wallet/receiveActions'; import { getUnusedAddressFromAccount } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { openModal } from 'src/actions/suite/modalActions'; @@ -55,6 +54,8 @@ import { } from 'src/reducers/suite/suiteReducer'; import { SUITE } from 'src/actions/suite/constants'; +import { BlurUrls } from '../BlurUrls'; + const ContractAddress = styled.div` display: inline-block; max-width: 200px; diff --git a/packages/suite/src/views/wallet/tokens/common/TokensTable/TokensTable.tsx b/packages/suite/src/views/wallet/tokens/common/TokensTable/TokensTable.tsx index c554b586137..3c2f8eb251c 100644 --- a/packages/suite/src/views/wallet/tokens/common/TokensTable/TokensTable.tsx +++ b/packages/suite/src/views/wallet/tokens/common/TokensTable/TokensTable.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; + import styled from 'styled-components'; import { Account } from '@suite-common/wallet-types'; @@ -8,6 +9,7 @@ import { spacings } from '@trezor/theme'; import { Icon, Table, Paragraph, Card, Row, Text } from '@trezor/components'; import { Translation } from 'src/components/suite'; + import { TokenRow } from './TokenRow'; const IconWrapper = styled.div<{ $isActive: boolean }>` diff --git a/packages/suite/src/views/wallet/tokens/hidden-tokens/HiddenTokensTable.tsx b/packages/suite/src/views/wallet/tokens/hidden-tokens/HiddenTokensTable.tsx index 1aefc43312b..a23265a9784 100644 --- a/packages/suite/src/views/wallet/tokens/hidden-tokens/HiddenTokensTable.tsx +++ b/packages/suite/src/views/wallet/tokens/hidden-tokens/HiddenTokensTable.tsx @@ -1,14 +1,15 @@ import { SelectedAccountLoaded } from '@suite-common/wallet-types'; import { TokenManagementAction, selectCoinDefinitions } from '@suite-common/token-definitions'; +import { spacings } from '@trezor/theme'; +import { Banner, H3, Column } from '@trezor/components'; +import { isTestnet } from '@suite-common/wallet-utils'; import { getTokens } from 'src/utils/wallet/tokenUtils'; import { useSelector } from 'src/hooks/suite'; +import { Translation } from 'src/components/suite'; + import { NoTokens } from '../common/NoTokens'; import { TokensTable } from '../common/TokensTable/TokensTable'; -import { Translation } from 'src/components/suite'; -import { spacings } from '@trezor/theme'; -import { Banner, H3, Column } from '@trezor/components'; -import { isTestnet } from '@suite-common/wallet-utils'; interface HiddenTokensTableProps { selectedAccount: SelectedAccountLoaded; diff --git a/packages/suite/src/views/wallet/tokens/index.tsx b/packages/suite/src/views/wallet/tokens/index.tsx index 5c5de728add..2c9d3a10013 100644 --- a/packages/suite/src/views/wallet/tokens/index.tsx +++ b/packages/suite/src/views/wallet/tokens/index.tsx @@ -1,12 +1,14 @@ import { useState, useEffect } from 'react'; +import { Route, Switch } from 'react-router-dom'; import { WalletLayout } from 'src/components/wallet'; import { useDispatch, useSelector } from 'src/hooks/suite'; +import { goto } from 'src/actions/suite/routerActions'; + import { CoinsTable } from './coins/CoinsTable'; -import { Route, Switch } from 'react-router-dom'; import { TokensNavigation } from './TokensNavigation'; import { HiddenTokensTable } from './hidden-tokens/HiddenTokensTable'; -import { goto } from 'src/actions/suite/routerActions'; + export const Tokens = () => { const [searchQuery, setSearchQuery] = useState(''); diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinExplanation/CoinjoinExplanation.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinExplanation/CoinjoinExplanation.tsx index 6187cffa232..1f52264e455 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinExplanation/CoinjoinExplanation.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinExplanation/CoinjoinExplanation.tsx @@ -4,12 +4,13 @@ import { darken } from 'polished'; import { Card, Icon, variables } from '@trezor/components'; import { HELP_CENTER_COINJOIN_URL } from '@trezor/urls'; import { mediaQueries } from '@trezor/styles'; +import { spacings, spacingsPx, typography } from '@trezor/theme'; import { Translation } from 'src/components/suite'; -import { CoinjoinProcessStep, CoinjoinProcessStepProps } from './CoinjoinProcessStep'; -import { spacings, spacingsPx, typography } from '@trezor/theme'; import { LearnMoreButton } from 'src/components/suite/LearnMoreButton'; +import { CoinjoinProcessStep, CoinjoinProcessStepProps } from './CoinjoinProcessStep'; + // eslint-disable-next-line local-rules/no-override-ds-component const Container = styled(Card)` background: ${({ theme }) => theme.backgroundTertiaryDefaultOnElevation0}; diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinExplanation/CoinjoinProcessStep.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinExplanation/CoinjoinProcessStep.tsx index 6757404661c..37bdbce69f8 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinExplanation/CoinjoinProcessStep.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinExplanation/CoinjoinProcessStep.tsx @@ -1,6 +1,9 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { H3, Image, ImageType, Paragraph, variables } from '@trezor/components'; + import { Translation } from 'src/components/suite/Translation'; // eslint-disable-next-line local-rules/no-override-ds-component diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/BalancePrivacyBreakdown/BalancePrivacyBreakdown.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/BalancePrivacyBreakdown/BalancePrivacyBreakdown.tsx index 1b62f6c8d83..267c03b8a5b 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/BalancePrivacyBreakdown/BalancePrivacyBreakdown.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/BalancePrivacyBreakdown/BalancePrivacyBreakdown.tsx @@ -2,6 +2,7 @@ import styled, { useTheme } from 'styled-components'; import { Icon } from '@trezor/components'; import { isZero } from '@suite-common/wallet-utils'; + import { Translation } from 'src/components/suite/Translation'; import { useSelector } from 'src/hooks/suite'; import { @@ -9,6 +10,7 @@ import { selectCurrentCoinjoinSession, } from 'src/reducers/wallet/coinjoinReducer'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; + import { CryptoAmountWithHeader } from './CryptoAmountWithHeader'; const BalanceContainer = styled.div` diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/BalancePrivacyBreakdown/CryptoAmountWithHeader.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/BalancePrivacyBreakdown/CryptoAmountWithHeader.tsx index a969401e7a1..d39ad6cfaa6 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/BalancePrivacyBreakdown/CryptoAmountWithHeader.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/BalancePrivacyBreakdown/CryptoAmountWithHeader.tsx @@ -1,11 +1,14 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; -import { FiatValue } from 'src/components/suite/FiatValue'; -import { FormattedCryptoAmount } from 'src/components/suite/FormattedCryptoAmount'; import { NetworkSymbol } from '@suite-common/wallet-config'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; +import { FiatValue } from 'src/components/suite/FiatValue'; +import { FormattedCryptoAmount } from 'src/components/suite/FormattedCryptoAmount'; + const Container = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinBalanceError.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinBalanceError.tsx index 94fa58d6ca0..54cb5fb4ab6 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinBalanceError.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinBalanceError.tsx @@ -1,6 +1,8 @@ import styled from 'styled-components'; + import { variables } from '@trezor/components'; import { TranslationKey } from '@suite-common/intl-types'; + import { Translation } from 'src/components/suite/Translation'; const StyledBalanceContainer = styled.div` diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinBalanceSection.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinBalanceSection.tsx index c60f6f7f938..d208348bb60 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinBalanceSection.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinBalanceSection.tsx @@ -1,10 +1,13 @@ import { useMemo } from 'react'; + import styled, { useTheme } from 'styled-components'; import { selectHasAccountTransactions } from '@suite-common/wallet-core'; import { Card, Column } from '@trezor/components'; + import { useSelector } from 'src/hooks/suite'; import { selectHasAnonymitySetError } from 'src/reducers/wallet/coinjoinReducer'; + import { BalancePrivacyBreakdown } from './BalancePrivacyBreakdown/BalancePrivacyBreakdown'; import { CoinjoinBalanceError, CoinjoinBalanceErrorProps } from './CoinjoinBalanceError'; import { CoinjoinStatusWheel } from './CoinjoinStatusWheel/CoinjoinStatusWheel'; diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinProgressContent.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinProgressContent.tsx index 73ffe56144b..0a6347a1df9 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinProgressContent.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinProgressContent.tsx @@ -1,5 +1,10 @@ +import { FormattedNumber } from 'react-intl'; + import styled, { useTheme } from 'styled-components'; + import { Spinner, Icon, Tooltip } from '@trezor/components'; +import { spacings, spacingsPx, typography } from '@trezor/theme'; + import { Translation } from 'src/components/suite/Translation'; import { CountdownTimer } from 'src/components/suite/CountdownTimer'; import { useSelector } from 'src/hooks/suite/useSelector'; @@ -9,8 +14,6 @@ import { selectRoundsDurationInHours, } from 'src/reducers/wallet/coinjoinReducer'; import { useCoinjoinSessionBlockers } from 'src/hooks/coinjoin/useCoinjoinSessionBlockers'; -import { FormattedNumber } from 'react-intl'; -import { spacings, spacingsPx, typography } from '@trezor/theme'; export const Container = styled.div<{ $isWide: boolean }>` width: ${({ $isWide }) => `calc(100% - ${$isWide ? 12 : 8}px)`}; diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinProgressWheel.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinProgressWheel.tsx index 5b65cad1a90..84bb151597c 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinProgressWheel.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinProgressWheel.tsx @@ -1,11 +1,10 @@ import { useCallback, useState } from 'react'; + import styled, { css, DefaultTheme, keyframes } from 'styled-components'; -import { Tooltip } from '@trezor/components'; -import { - CoinjoinProgressContent, - Container as ProgressContentContainer, -} from './CoinjoinProgressContent'; import { lighten, rgba } from 'polished'; + +import { Tooltip } from '@trezor/components'; + import { useSelector } from 'src/hooks/suite/useSelector'; import { selectCurrentCoinjoinWheelStates, @@ -23,6 +22,11 @@ import { coinjoinSessionAutostop, } from 'src/actions/wallet/coinjoinAccountActions'; +import { + CoinjoinProgressContent, + Container as ProgressContentContainer, +} from './CoinjoinProgressContent'; + export const DELAYED_SPIN = keyframes` 0% { transform: rotate(0deg); diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusMessage.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusMessage.tsx index 7bf5f33119b..421b279cb8e 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusMessage.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusMessage.tsx @@ -1,4 +1,7 @@ import styled from 'styled-components'; + +import { typography, spacingsPx } from '@trezor/theme'; + import { SESSION_PHASE_MESSAGES } from 'src/constants/suite/coinjoin'; import { Translation } from 'src/components/suite/Translation'; import { CountdownTimer } from 'src/components/suite'; @@ -8,7 +11,6 @@ import { selectCurrentCoinjoinWheelStates, selectCurrentSessionDeadlineInfo, } from 'src/reducers/wallet/coinjoinReducer'; -import { typography, spacingsPx } from '@trezor/theme'; const Cointainer = styled.div` height: 40px; diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusWheel.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusWheel.tsx index 84d563aad7a..802b603a6d9 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusWheel.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusWheel.tsx @@ -1,13 +1,17 @@ import styled from 'styled-components'; + import { Card, Button } from '@trezor/components'; -import { CoinjoinProgressWheel } from './CoinjoinProgressWheel'; -import { CoinjoinStatusMessage } from './CoinjoinStatusMessage'; +import { typography } from '@trezor/theme'; + import { useSelector } from 'src/hooks/suite/useSelector'; import { selectCurrentCoinjoinWheelStates } from 'src/reducers/wallet/coinjoinReducer'; import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { stopCoinjoinSession } from 'src/actions/wallet/coinjoinClientActions'; -import { typography } from '@trezor/theme'; + +import { CoinjoinStatusMessage } from './CoinjoinStatusMessage'; +import { CoinjoinProgressWheel } from './CoinjoinProgressWheel'; + // eslint-disable-next-line local-rules/no-override-ds-component const Container = styled(Card)<{ $isWide?: boolean }>` diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinSummary.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinSummary.tsx index f17581c5eb0..ba8ca086be5 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinSummary.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinSummary.tsx @@ -1,5 +1,7 @@ import styled from 'styled-components'; + import { H3 } from '@trezor/components'; + import { Translation } from 'src/components/suite/Translation'; import { CoinjoinBalanceSection } from './CoinjoinBalanceSection'; diff --git a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx index 5d1b1b7c4fa..8d974e89ffb 100644 --- a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx +++ b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx @@ -1,13 +1,16 @@ import styled from 'styled-components'; import { spacings, spacingsPx, typography } from '@trezor/theme'; +import { Card, Row, variables } from '@trezor/components'; +import { getTitleForNetwork } from '@suite-common/wallet-utils'; +import { CoinLogo } from '@trezor/product-components'; + import { Account } from 'src/types/wallet'; import { Translation } from 'src/components/suite'; -import { Card, Row, variables } from '@trezor/components'; + import { TradeBoxMenu } from './TradeBoxMenu'; import { TradeBoxPrices } from './TradeBoxPrices'; -import { getTitleForNetwork } from '@suite-common/wallet-utils'; -import { CoinLogo } from '@trezor/product-components'; + // eslint-disable-next-line local-rules/no-override-ds-component const StyledCard = styled(Card)` diff --git a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx index 0ff78b1e4d4..50f27e4caf4 100644 --- a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx +++ b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx @@ -1,14 +1,18 @@ +import { ReactNode } from 'react'; + +import styled, { css } from 'styled-components'; + import { Route } from '@suite-common/suite-types'; import { Account } from '@suite-common/wallet-types'; import { Button, variables } from '@trezor/components'; import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; import { EventType, analytics } from '@trezor/suite-analytics'; import { spacingsPx } from '@trezor/theme'; -import { ReactNode } from 'react'; + import { goto } from 'src/actions/suite/routerActions'; import { Translation } from 'src/components/suite'; import { useDevice, useDispatch } from 'src/hooks/suite'; -import styled, { css } from 'styled-components'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx index a5161e3b885..7fc28607b5c 100644 --- a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx +++ b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx @@ -1,10 +1,14 @@ +import { PropsWithChildren, ReactNode } from 'react'; + import styled from 'styled-components'; + import { variables } from '@trezor/components'; import { spacingsPx, typography } from '@trezor/theme'; -import { PropsWithChildren, ReactNode } from 'react'; +import { networks } from '@suite-common/wallet-config'; + import { PriceTicker, Translation, TrendTicker } from 'src/components/suite'; import { Account } from 'src/types/wallet'; -import { networks } from '@suite-common/wallet-config'; + const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/NoSearchResults.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/NoSearchResults.tsx index a1479ead448..691592e1fd2 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/NoSearchResults.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/NoSearchResults.tsx @@ -1,10 +1,13 @@ import { useState } from 'react'; + import styled from 'styled-components'; + import { Card, Column, variables } from '@trezor/components'; -import { Translation } from 'src/components/suite'; import { getWeakRandomNumberInRange } from '@trezor/utils'; import { typography } from '@trezor/theme'; +import { Translation } from 'src/components/suite'; + const NoResults = styled.div` text-align: center; color: ${({ theme }) => theme.legacy.TYPE_DARK_GREY}; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionCandidates.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionCandidates.tsx index dec60139855..b8b5f8a56d0 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionCandidates.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionCandidates.tsx @@ -1,7 +1,9 @@ import styled from 'styled-components'; + import { resolveStaticPath } from '@suite-common/suite-utils'; import { Card, SVG_IMAGES, variables } from '@trezor/components'; import { zIndices } from '@trezor/theme'; + import { useSelector } from 'src/hooks/suite'; import { selectCoinjoinAccountByKey } from 'src/reducers/wallet/coinjoinReducer'; import { TransactionTypeIcon } from 'src/components/wallet/TransactionItem/TransactionTypeIcon'; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionGroupedList.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionGroupedList.tsx index 92add38607c..1a13e31630e 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionGroupedList.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionGroupedList.tsx @@ -4,14 +4,16 @@ import { groupJointTransactions, } from '@suite-common/wallet-utils'; import { getNetwork } from '@suite-common/wallet-config'; + import { CoinjoinBatchItem } from 'src/components/wallet/TransactionItem/CoinjoinBatchItem'; import { useSelector } from 'src/hooks/suite'; import { Account, WalletAccountTransaction } from 'src/types/wallet'; import { TransactionItem } from 'src/components/wallet/TransactionItem/TransactionItem'; -import { TransactionsGroup } from './TransactionsGroup/TransactionsGroup'; import { selectLabelingDataForAccount } from 'src/reducers/suite/metadataReducer'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; +import { TransactionsGroup } from './TransactionsGroup/TransactionsGroup'; + interface TransactionGroupedListProps { transactionGroups: GroupedTransactionsByDate; symbol: WalletAccountTransaction['symbol']; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionList.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionList.tsx index 819602cf989..2727ed99aa2 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionList.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionList.tsx @@ -1,4 +1,5 @@ import { useEffect, useMemo, useRef, useState } from 'react'; + import styled from 'styled-components'; import useDebounce from 'react-use/lib/useDebounce'; @@ -12,19 +13,21 @@ import { groupTransactionsByDate, isPending, } from '@suite-common/wallet-utils'; +import { getTxsPerPage } from '@suite-common/suite-utils'; +import { SkeletonStack } from '@trezor/components'; + import { Translation } from 'src/components/suite'; import { DashboardSection } from 'src/components/dashboard'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { Account, WalletAccountTransaction } from 'src/types/wallet'; -import { TransactionListActions } from './TransactionListActions/TransactionListActions'; import { Pagination } from 'src/components/wallet'; +import { findAnchorTransactionPage } from 'src/utils/suite/anchor'; +import { selectLabelingDataForAccount } from 'src/reducers/suite/metadataReducer'; + +import { TransactionListActions } from './TransactionListActions/TransactionListActions'; import { SkeletonTransactionItem } from './SkeletonTransactionItem'; import { NoSearchResults } from './NoSearchResults'; -import { findAnchorTransactionPage } from 'src/utils/suite/anchor'; import { TransactionCandidates } from './TransactionCandidates'; -import { selectLabelingDataForAccount } from 'src/reducers/suite/metadataReducer'; -import { getTxsPerPage } from '@suite-common/suite-utils'; -import { SkeletonStack } from '@trezor/components'; import { PendingGroupHeader } from './TransactionsGroup/PendingGroupHeader'; import { TransactionGroupedList } from './TransactionGroupedList'; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/ExportAction.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/ExportAction.tsx index 26c69cd2c70..922b644bb3a 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/ExportAction.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/ExportAction.tsx @@ -1,18 +1,21 @@ import { useState, useCallback } from 'react'; + import { Spinner, Dropdown } from '@trezor/components'; import { analytics, EventType } from '@trezor/suite-analytics'; +import { notificationsActions } from '@suite-common/toast-notifications'; +import { fetchAllTransactionsForAccountThunk } from '@suite-common/wallet-core'; +import { ExportFileType } from '@suite-common/wallet-types'; +import { getTitleForNetwork, getTitleForCoinjoinAccount } from '@suite-common/wallet-utils'; +import { AccountLabels } from '@suite-common/metadata-types'; + import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; import { useTranslation } from 'src/hooks/suite/useTranslation'; import { useSelector } from 'src/hooks/suite/useSelector'; -import { notificationsActions } from '@suite-common/toast-notifications'; -import { fetchAllTransactionsForAccountThunk } from '@suite-common/wallet-core'; import { exportTransactionsThunk } from 'src/actions/wallet/exportTransactionsActions'; -import { ExportFileType } from '@suite-common/wallet-types'; import { Account } from 'src/types/wallet'; -import { getTitleForNetwork, getTitleForCoinjoinAccount } from '@suite-common/wallet-utils'; import { selectLabelingDataForSelectedAccount } from 'src/reducers/suite/metadataReducer'; -import { AccountLabels } from '@suite-common/metadata-types'; + export interface ExportActionProps { account: Account; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx index 226049cd14a..1e0430d3602 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx @@ -1,15 +1,20 @@ -import styled from 'styled-components'; -import { SearchAction } from 'src/components/wallet/SearchAction'; -import { ExportAction } from './ExportAction'; import { Dispatch, SetStateAction, useCallback, useEffect, useState } from 'react'; -import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; + +import styled from 'styled-components'; + + import { notificationsActions } from '@suite-common/toast-notifications'; import { fetchAllTransactionsForAccountThunk } from '@suite-common/wallet-core'; import { Account } from '@suite-common/wallet-types'; import { AccountLabels } from '@suite-common/metadata-types'; + +import { useDispatch, useSelector, useTranslation } from 'src/hooks/suite'; +import { SearchAction } from 'src/components/wallet/SearchAction'; import { SUITE } from 'src/actions/suite/constants'; +import { ExportAction } from './ExportAction'; + const Wrapper = styled.div` display: flex; align-items: center; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/CommonComponents.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/CommonComponents.tsx index 83f21c185b1..7cfb5f92d56 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/CommonComponents.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/CommonComponents.tsx @@ -1,6 +1,8 @@ import styled from 'styled-components'; + import { variables } from '@trezor/components'; import { zIndices } from '@trezor/theme'; + import { HiddenPlaceholder } from 'src/components/suite'; import { SUBPAGE_NAV_HEIGHT } from 'src/constants/suite/layout'; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/DayHeader.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/DayHeader.tsx index 7a36a1043fe..4e609ab1af5 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/DayHeader.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/DayHeader.tsx @@ -1,9 +1,12 @@ import { FormattedDate } from 'react-intl'; + import { BigNumber } from '@trezor/utils/src/bigNumber'; import { useFormatters } from '@suite-common/formatters'; import { isTestnet, parseTransactionDateKey } from '@suite-common/wallet-utils'; -import { FormattedCryptoAmount, HiddenPlaceholder } from 'src/components/suite'; import { NetworkSymbol } from '@suite-common/wallet-config'; + +import { FormattedCryptoAmount, HiddenPlaceholder } from 'src/components/suite'; + import { ColAmount, ColDate, ColFiat, HeaderWrapper } from './CommonComponents'; interface DayHeaderProps { diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/PendingGroupHeader.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/PendingGroupHeader.tsx index c7f24b0307e..de7ac8a27bc 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/PendingGroupHeader.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/PendingGroupHeader.tsx @@ -1,4 +1,5 @@ import { Translation } from 'src/components/suite'; + import { ColPending, HeaderWrapper } from './CommonComponents'; type PendingGroupHeaderProps = { txsCount: number }; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/TransactionsGroup.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/TransactionsGroup.tsx index 2f30c072e40..86c999b7e6d 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/TransactionsGroup.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionsGroup/TransactionsGroup.tsx @@ -1,8 +1,8 @@ import { useState, ReactNode } from 'react'; + import styled from 'styled-components'; -import { WalletAccountTransaction } from 'src/types/wallet'; + import { NetworkSymbol } from '@suite-common/wallet-config'; -import { DayHeader } from './DayHeader'; import { getFiatRateKey, isNftTokenTransfer, @@ -12,10 +12,14 @@ import { } from '@suite-common/wallet-utils'; import { FiatCurrencyCode } from '@suite-common/suite-config'; import { selectHistoricFiatRates } from '@suite-common/wallet-core'; -import { useSelector } from 'src/hooks/suite'; import { Timestamp, TokenAddress } from '@suite-common/wallet-types'; import { isTokenDefinitionKnown, selectCoinDefinitions } from '@suite-common/token-definitions'; +import { useSelector } from 'src/hooks/suite'; +import { WalletAccountTransaction } from 'src/types/wallet'; + +import { DayHeader } from './DayHeader'; + const TransactionsGroupWrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/wallet/transactions/Transactions.tsx b/packages/suite/src/views/wallet/transactions/Transactions.tsx index 255b74f0ccd..e3515327efc 100644 --- a/packages/suite/src/views/wallet/transactions/Transactions.tsx +++ b/packages/suite/src/views/wallet/transactions/Transactions.tsx @@ -1,12 +1,17 @@ import { ReactNode } from 'react'; -import { WalletLayout, CoinjoinAccountDiscoveryProgress } from 'src/components/wallet'; -import { useSelector } from 'src/hooks/suite'; -import { AppState } from 'src/types/suite'; +import styled from 'styled-components'; + import { selectAccountTransactions, selectIsLoadingAccountTransactions, } from '@suite-common/wallet-core'; +import { spacingsPx } from '@trezor/theme'; + +import { WalletLayout, CoinjoinAccountDiscoveryProgress } from 'src/components/wallet'; +import { useSelector } from 'src/hooks/suite'; +import { AppState } from 'src/types/suite'; + import { NoTransactions } from './components/NoTransactions'; import { AccountEmpty } from './components/AccountEmpty'; import { TransactionList } from './TransactionList/TransactionList'; @@ -14,8 +19,8 @@ import { TransactionSummary } from './components/TransactionSummary'; import { CoinjoinExplanation } from './CoinjoinExplanation/CoinjoinExplanation'; import { CoinjoinSummary } from './CoinjoinSummary/CoinjoinSummary'; import { TradeBox } from './TradeBox/TradeBox'; -import styled from 'styled-components'; -import { spacingsPx } from '@trezor/theme'; + + const AccountLayout = styled(WalletLayout)` display: flex; diff --git a/packages/suite/src/views/wallet/transactions/components/InfoCard.tsx b/packages/suite/src/views/wallet/transactions/components/InfoCard.tsx index bfac34062e7..5661ef1a9b6 100644 --- a/packages/suite/src/views/wallet/transactions/components/InfoCard.tsx +++ b/packages/suite/src/views/wallet/transactions/components/InfoCard.tsx @@ -1,9 +1,12 @@ import { ReactNode } from 'react'; + import styled from 'styled-components'; + import { variables, Card, SkeletonRectangle } from '@trezor/components'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; + import { HiddenPlaceholder, FormattedCryptoAmount, Sign } from 'src/components/suite'; import { Account } from 'src/types/wallet'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; const InfoCardContent = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/transactions/components/NoTransactions.tsx b/packages/suite/src/views/wallet/transactions/components/NoTransactions.tsx index 0d35318c02c..2bfdadd4f47 100644 --- a/packages/suite/src/views/wallet/transactions/components/NoTransactions.tsx +++ b/packages/suite/src/views/wallet/transactions/components/NoTransactions.tsx @@ -1,7 +1,8 @@ +import { getNetwork } from '@suite-common/wallet-config'; + import { AccountExceptionLayout } from 'src/components/wallet'; import { Translation, TrezorLink } from 'src/components/suite'; import { Account } from 'src/types/wallet'; -import { getNetwork } from '@suite-common/wallet-config'; interface NoTransactionsProps { account: Account; diff --git a/packages/suite/src/views/wallet/transactions/components/SummaryCards.tsx b/packages/suite/src/views/wallet/transactions/components/SummaryCards.tsx index 742a7a2573d..ac92a211dd8 100644 --- a/packages/suite/src/views/wallet/transactions/components/SummaryCards.tsx +++ b/packages/suite/src/views/wallet/transactions/components/SummaryCards.tsx @@ -1,15 +1,17 @@ import styled from 'styled-components'; -import { BigNumber } from '@trezor/utils/src/bigNumber'; -import { Translation, HiddenPlaceholder, FormattedDate } from 'src/components/suite'; -import { Account } from 'src/types/wallet'; +import { BigNumber } from '@trezor/utils/src/bigNumber'; import { useFormatters } from '@suite-common/formatters'; import { variables } from '@trezor/components'; +import { DISCREET_PLACEHOLDER, useShouldRedactNumbers } from '@suite-common/wallet-utils'; -import { InfoCard } from './InfoCard'; +import { Translation, HiddenPlaceholder, FormattedDate } from 'src/components/suite'; +import { Account } from 'src/types/wallet'; import { AggregatedAccountHistory, GraphRange } from 'src/types/wallet/graph'; import { sumFiatValueMap } from 'src/utils/wallet/graph'; -import { DISCREET_PLACEHOLDER, useShouldRedactNumbers } from '@suite-common/wallet-utils'; + +import { InfoCard } from './InfoCard'; + const InfoCardsWrapper = styled.div` display: grid; diff --git a/packages/suite/src/views/wallet/transactions/components/TransactionSummary.tsx b/packages/suite/src/views/wallet/transactions/components/TransactionSummary.tsx index ef79942741a..ce7eaf2daef 100644 --- a/packages/suite/src/views/wallet/transactions/components/TransactionSummary.tsx +++ b/packages/suite/src/views/wallet/transactions/components/TransactionSummary.tsx @@ -1,6 +1,9 @@ import styled from 'styled-components'; import { getUnixTime } from 'date-fns'; +import { calcTicks, calcTicksFromData } from '@suite-common/suite-utils'; +import { variables, Button, Card } from '@trezor/components'; + import { Account } from 'src/types/wallet'; import { GraphRangeSelector, @@ -10,14 +13,11 @@ import { } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { getGraphDataForInterval, updateGraphData } from 'src/actions/wallet/graphActions'; - -import { calcTicks, calcTicksFromData } from '@suite-common/suite-utils'; -import { variables, Button, Card } from '@trezor/components'; +import { aggregateBalanceHistory, getMinMaxValueFromData } from 'src/utils/wallet/graph'; +import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { TransactionSummaryDropdown } from './TransactionSummaryDropdown'; import { SummaryCards } from './SummaryCards'; -import { aggregateBalanceHistory, getMinMaxValueFromData } from 'src/utils/wallet/graph'; -import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; const Wrapper = styled.div` display: flex; diff --git a/packages/transport/src/api/abstract.ts b/packages/transport/src/api/abstract.ts index ecab0a4fbfe..1ca42b102ed 100644 --- a/packages/transport/src/api/abstract.ts +++ b/packages/transport/src/api/abstract.ts @@ -1,4 +1,5 @@ import { TypedEmitter, getSynchronize } from '@trezor/utils'; + import type { AnyError, AsyncResultWithTypedError, @@ -8,7 +9,6 @@ import type { PathInternal, } from '../types'; import { success, error, unknownError } from '../utils/result'; - import * as ERRORS from '../errors'; export interface AbstractApiConstructorParams { diff --git a/packages/transport/src/api/udp.ts b/packages/transport/src/api/udp.ts index 7ba4f4b0620..a95a9421d73 100644 --- a/packages/transport/src/api/udp.ts +++ b/packages/transport/src/api/udp.ts @@ -1,4 +1,5 @@ import UDP from 'dgram'; + import { createTimeoutPromise, isNotUndefined, arrayPartition } from '@trezor/utils'; import { diff --git a/packages/transport/src/api/usb.ts b/packages/transport/src/api/usb.ts index 7c736e9569f..7cd17860a9e 100644 --- a/packages/transport/src/api/usb.ts +++ b/packages/transport/src/api/usb.ts @@ -12,7 +12,6 @@ import { TREZOR_USB_DESCRIPTORS, WEBUSB_BOOTLOADER_PRODUCT, } from '../constants'; - import * as ERRORS from '../errors'; interface ConstructorParams extends AbstractApiConstructorParams { diff --git a/packages/transport/src/sessions/background-browser.ts b/packages/transport/src/sessions/background-browser.ts index 7ef9353a007..a63bf9e79c2 100644 --- a/packages/transport/src/sessions/background-browser.ts +++ b/packages/transport/src/sessions/background-browser.ts @@ -1,6 +1,5 @@ import type { Descriptor } from '../types'; import { SessionsBackground } from './background'; - import { HandleMessageParams, HandleMessageResponse, SessionsBackgroundInterface } from './types'; /** diff --git a/packages/transport/src/transports/abstract.ts b/packages/transport/src/transports/abstract.ts index e9747017518..f8dad7b7784 100644 --- a/packages/transport/src/transports/abstract.ts +++ b/packages/transport/src/transports/abstract.ts @@ -1,4 +1,5 @@ import * as protobuf from 'protobufjs/light'; + import { scheduleAction, ScheduleActionParams, ScheduledAction, TypedEmitter } from '@trezor/utils'; import { PROTOCOL_MALFORMED, TransportProtocol } from '@trezor/protocol'; import { MessageFromTrezor } from '@trezor/protobuf'; @@ -15,7 +16,6 @@ import { PathPublic, } from '../types'; import { success, error, unknownError } from '../utils/result'; - import * as ERRORS from '../errors'; import { ACTION_TIMEOUT, TRANSPORT } from '../constants'; diff --git a/packages/transport/src/transports/abstractApi.ts b/packages/transport/src/transports/abstractApi.ts index 7ebd3afc05e..713f5676e81 100644 --- a/packages/transport/src/transports/abstractApi.ts +++ b/packages/transport/src/transports/abstractApi.ts @@ -1,6 +1,6 @@ -import { SessionsBackground } from '../sessions/background'; import { v1 as v1Protocol } from '@trezor/protocol'; +import { SessionsBackground } from '../sessions/background'; import { AbstractTransport, AbstractTransportParams, diff --git a/packages/transport/src/transports/bridge.ts b/packages/transport/src/transports/bridge.ts index 143cc14feba..b02fe0b9d58 100644 --- a/packages/transport/src/transports/bridge.ts +++ b/packages/transport/src/transports/bridge.ts @@ -5,6 +5,7 @@ import { v1 as protocolV1, TransportProtocol, } from '@trezor/protocol'; + import { bridgeApiCall } from '../utils/bridgeApiCall'; import * as bridgeApiResult from '../utils/bridgeApiResult'; import { createProtocolMessage } from '../utils/bridgeProtocolMessage'; @@ -15,7 +16,6 @@ import { AbstractTransportParams, AbstractTransportMethodParams, } from './abstract'; - import * as ERRORS from '../errors'; import { AnyError, diff --git a/packages/transport/src/transports/nodeusb.browser.ts b/packages/transport/src/transports/nodeusb.browser.ts index 3a4edc92eff..110872765d4 100644 --- a/packages/transport/src/transports/nodeusb.browser.ts +++ b/packages/transport/src/transports/nodeusb.browser.ts @@ -1,5 +1,4 @@ import { AbstractTransport, AbstractTransportParams } from './abstract'; - import { WRONG_ENVIRONMENT } from '../errors'; import { empty, emptySync } from '../utils/resultEmpty'; diff --git a/packages/transport/src/transports/nodeusb.ts b/packages/transport/src/transports/nodeusb.ts index 1ce9ef42e67..78ded1fcf54 100644 --- a/packages/transport/src/transports/nodeusb.ts +++ b/packages/transport/src/transports/nodeusb.ts @@ -1,4 +1,5 @@ import { WebUSB } from 'usb'; + import { AbstractTransportParams } from './abstract'; import { AbstractApiTransport } from './abstractApi'; import { UsbApi } from '../api/usb'; diff --git a/packages/transport/src/transports/udp.browser.ts b/packages/transport/src/transports/udp.browser.ts index c02cf1ce088..7a791d373e0 100644 --- a/packages/transport/src/transports/udp.browser.ts +++ b/packages/transport/src/transports/udp.browser.ts @@ -1,5 +1,4 @@ import { AbstractTransport } from './abstract'; - import { error } from '../utils/result'; import { WRONG_ENVIRONMENT } from '../errors'; diff --git a/packages/transport/src/transports/udp.ts b/packages/transport/src/transports/udp.ts index 56e7430b04b..a9fed5de947 100644 --- a/packages/transport/src/transports/udp.ts +++ b/packages/transport/src/transports/udp.ts @@ -1,5 +1,4 @@ import { AbstractTransportParams } from './abstract'; - import { UdpApi } from '../api/udp'; import { AbstractApiTransport } from './abstractApi'; diff --git a/packages/transport/src/transports/webusb.browser.ts b/packages/transport/src/transports/webusb.browser.ts index 5056d641cd1..b499358b5be 100644 --- a/packages/transport/src/transports/webusb.browser.ts +++ b/packages/transport/src/transports/webusb.browser.ts @@ -1,7 +1,6 @@ import { AbstractTransportMethodParams, AbstractTransportParams } from './abstract'; import { AbstractApiTransport } from './abstractApi'; import { UsbApi } from '../api/usb'; - import { BrowserSessionsBackground } from '../sessions/background-browser'; const defaultSessionsBackgroundUrl = diff --git a/packages/transport/src/transports/webusb.ts b/packages/transport/src/transports/webusb.ts index f3bd27e8350..a862c05e1c4 100644 --- a/packages/transport/src/transports/webusb.ts +++ b/packages/transport/src/transports/webusb.ts @@ -1,5 +1,4 @@ import { AbstractTransport, AbstractTransportParams } from './abstract'; - import { WRONG_ENVIRONMENT } from '../errors'; import { empty, emptySync } from '../utils/resultEmpty'; diff --git a/packages/transport/src/utils/bridgeApiCall.ts b/packages/transport/src/utils/bridgeApiCall.ts index 5df05698f4d..50ae541b901 100644 --- a/packages/transport/src/utils/bridgeApiCall.ts +++ b/packages/transport/src/utils/bridgeApiCall.ts @@ -1,10 +1,9 @@ import fetch from 'cross-fetch'; -import { success, error, unknownError } from './result'; +import { PROTOCOL_MALFORMED } from '@trezor/protocol/src/errors'; +import { success, error, unknownError } from './result'; import * as ERRORS from '../errors'; - -import { PROTOCOL_MALFORMED } from '@trezor/protocol/src/errors'; import { applyBridgeApiCallHeaders } from './applyBridgeApiCallHeaders'; export type HttpRequestOptions = { diff --git a/packages/transport/src/utils/bridgeApiResult.ts b/packages/transport/src/utils/bridgeApiResult.ts index 0833d3544a1..2c03c767d5f 100644 --- a/packages/transport/src/utils/bridgeApiResult.ts +++ b/packages/transport/src/utils/bridgeApiResult.ts @@ -1,7 +1,6 @@ // input checks for high-level transports import type { Descriptor, Session } from '../types'; - import { success, error } from './result'; import { validateProtocolMessage } from './bridgeProtocolMessage'; import * as ERRORS from '../errors'; diff --git a/packages/transport/src/utils/bridgeProtocolMessage.ts b/packages/transport/src/utils/bridgeProtocolMessage.ts index 6758477978f..903bf585246 100644 --- a/packages/transport/src/utils/bridgeProtocolMessage.ts +++ b/packages/transport/src/utils/bridgeProtocolMessage.ts @@ -1,4 +1,5 @@ import type { TransportProtocol } from '@trezor/protocol'; + import type { BridgeProtocolMessage } from '../types'; // validate expected body: diff --git a/packages/transport/src/utils/send.ts b/packages/transport/src/utils/send.ts index 0eda34f81b5..9983fbdf2f6 100644 --- a/packages/transport/src/utils/send.ts +++ b/packages/transport/src/utils/send.ts @@ -2,6 +2,7 @@ // // Logic of "call" is broken to two parts - sending and receiving import { Root } from 'protobufjs/light'; + import { encode as encodeProtobuf, createMessageFromName } from '@trezor/protobuf'; import { TransportProtocolEncode } from '@trezor/protocol'; diff --git a/packages/transport/tests/abstractUsb.test.ts b/packages/transport/tests/abstractUsb.test.ts index d2eeb6a8336..7e45366f523 100644 --- a/packages/transport/tests/abstractUsb.test.ts +++ b/packages/transport/tests/abstractUsb.test.ts @@ -1,7 +1,8 @@ import { v1 as v1Protocol } from '@trezor/protocol'; +import * as messages from '@trezor/protobuf/messages.json'; + import { AbstractApiTransport } from '../src/transports/abstractApi'; import { UsbApi } from '../src/api/usb'; -import * as messages from '@trezor/protobuf/messages.json'; import { PathPublic, Session } from '../src/types'; // create devices otherwise returned from navigator.usb.getDevices diff --git a/packages/transport/tests/apiUdp.test.ts b/packages/transport/tests/apiUdp.test.ts index a0fd7fda933..0ae1a9f7091 100644 --- a/packages/transport/tests/apiUdp.test.ts +++ b/packages/transport/tests/apiUdp.test.ts @@ -1,4 +1,5 @@ import UDP from 'dgram'; + import { UdpApi } from '../src/api/udp'; // mock dgram api diff --git a/packages/transport/tests/build-receive.test.ts b/packages/transport/tests/build-receive.test.ts index 201cff72df5..6b0f0fa94ab 100644 --- a/packages/transport/tests/build-receive.test.ts +++ b/packages/transport/tests/build-receive.test.ts @@ -1,5 +1,7 @@ import * as protobuf from 'protobufjs/light'; + import { v1 as v1Protocol, bridge as bridgeProtocol } from '@trezor/protocol'; + import { buildMessage, createChunks } from '../src/utils/send'; import { receiveAndParse } from '../src/utils/receive'; diff --git a/packages/utxo-lib/src/address.ts b/packages/utxo-lib/src/address.ts index d831712feea..9721feb4a0a 100644 --- a/packages/utxo-lib/src/address.ts +++ b/packages/utxo-lib/src/address.ts @@ -3,6 +3,7 @@ // - `fromBase58Check` method is using additional "network" param and bs58check.decodeAddress instead of bs58check.decode. checking multibyte version (Zcash and Decred support). import { bech32, bech32m } from 'bech32'; + import * as bs58check from './bs58check'; import * as bscript from './script'; import * as payments from './payments'; diff --git a/packages/utxo-lib/src/bip32.ts b/packages/utxo-lib/src/bip32.ts index ebb65afb129..48e91d62592 100644 --- a/packages/utxo-lib/src/bip32.ts +++ b/packages/utxo-lib/src/bip32.ts @@ -7,6 +7,7 @@ import ecc from 'tiny-secp256k1'; import * as wif from 'wif'; + import { typeforce } from './types/typeforce'; import * as bs58check from './bs58check'; import * as crypto from './crypto'; diff --git a/packages/utxo-lib/src/bs58check.ts b/packages/utxo-lib/src/bs58check.ts index b82009ac561..b551b2d441a 100644 --- a/packages/utxo-lib/src/bs58check.ts +++ b/packages/utxo-lib/src/bs58check.ts @@ -1,7 +1,8 @@ -import { bitcoin as BITCOIN_NETWORK, isNetworkType } from './networks'; import bchaddrjs from 'bchaddrjs'; import bs58 from 'bs58'; import bs58check from 'bs58check'; + +import { bitcoin as BITCOIN_NETWORK, isNetworkType } from './networks'; import { blake256 } from './crypto'; export function decodeBlake(buffer: Buffer) { diff --git a/packages/utxo-lib/src/bufferutils.ts b/packages/utxo-lib/src/bufferutils.ts index 517704f01fa..f78e75ad743 100644 --- a/packages/utxo-lib/src/bufferutils.ts +++ b/packages/utxo-lib/src/bufferutils.ts @@ -9,7 +9,9 @@ import BN from 'bn.js'; import pushdata from 'pushdata-bitcoin'; import * as varuint from 'varuint-bitcoin'; import { Int64LE } from 'int64-buffer'; + import { bufferUtils } from '@trezor/utils'; + import * as types from './types'; const OUT_OF_RANGE_ERROR = 'value out of range'; diff --git a/packages/utxo-lib/src/coinselect/coinselectUtils.ts b/packages/utxo-lib/src/coinselect/coinselectUtils.ts index 057fd680d3a..635c1e565c0 100644 --- a/packages/utxo-lib/src/coinselect/coinselectUtils.ts +++ b/packages/utxo-lib/src/coinselect/coinselectUtils.ts @@ -1,4 +1,5 @@ import BN from 'bn.js'; + import { CoinSelectPaymentType, CoinSelectAlgorithm, diff --git a/packages/utxo-lib/src/coinselect/inputs/accumulative.ts b/packages/utxo-lib/src/coinselect/inputs/accumulative.ts index 24d6371baef..feab043e016 100644 --- a/packages/utxo-lib/src/coinselect/inputs/accumulative.ts +++ b/packages/utxo-lib/src/coinselect/inputs/accumulative.ts @@ -1,4 +1,5 @@ import BN from 'bn.js'; + import { bignumberOrNaN, sumOrNaN, diff --git a/packages/utxo-lib/src/coinselect/inputs/branchAndBound.ts b/packages/utxo-lib/src/coinselect/inputs/branchAndBound.ts index 1d13736921d..979f2e87c1a 100644 --- a/packages/utxo-lib/src/coinselect/inputs/branchAndBound.ts +++ b/packages/utxo-lib/src/coinselect/inputs/branchAndBound.ts @@ -1,4 +1,5 @@ import BN from 'bn.js'; + import { bignumberOrNaN, sumOrNaN, diff --git a/packages/utxo-lib/src/coinselect/outputs/split.ts b/packages/utxo-lib/src/coinselect/outputs/split.ts index 5c0000ae851..66bf3ba5fa3 100644 --- a/packages/utxo-lib/src/coinselect/outputs/split.ts +++ b/packages/utxo-lib/src/coinselect/outputs/split.ts @@ -1,4 +1,5 @@ import BN from 'bn.js'; + import { bignumberOrNaN, sumOrNaN, diff --git a/packages/utxo-lib/src/compose/sorting/randomSortingStrategy.ts b/packages/utxo-lib/src/compose/sorting/randomSortingStrategy.ts index 0bffe1c0c74..859142621a3 100644 --- a/packages/utxo-lib/src/compose/sorting/randomSortingStrategy.ts +++ b/packages/utxo-lib/src/compose/sorting/randomSortingStrategy.ts @@ -1,6 +1,7 @@ +import { arrayShuffle, getRandomInt } from '@trezor/utils'; + import { SortingStrategy } from './sortingStrategy'; import { convertOutput } from './convertOutput'; -import { arrayShuffle, getRandomInt } from '@trezor/utils'; export const randomSortingStrategy: SortingStrategy = ({ result, request, convertedInputs }) => { const nonChangeOutputPermutation: number[] = []; diff --git a/packages/utxo-lib/src/derivation.ts b/packages/utxo-lib/src/derivation.ts index f029336879c..51d51e048ce 100644 --- a/packages/utxo-lib/src/derivation.ts +++ b/packages/utxo-lib/src/derivation.ts @@ -1,5 +1,7 @@ import bs58 from 'bs58'; + import { throwError } from '@trezor/utils'; + import { p2pkh, p2sh, p2wpkh, p2tr } from './payments'; import { fromBase58 } from './bip32'; import { bitcoin, Network } from './networks'; diff --git a/packages/utxo-lib/src/payments/p2ms.ts b/packages/utxo-lib/src/payments/p2ms.ts index d68c3f54832..8bc2fe941dd 100644 --- a/packages/utxo-lib/src/payments/p2ms.ts +++ b/packages/utxo-lib/src/payments/p2ms.ts @@ -1,6 +1,7 @@ // upstream: https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/ts_src/payments/p2ms.ts import ecc from 'tiny-secp256k1'; + import { bitcoin as BITCOIN_NETWORK } from '../networks'; import * as bscript from '../script'; import * as lazy from './lazy'; diff --git a/packages/utxo-lib/src/payments/p2pk.ts b/packages/utxo-lib/src/payments/p2pk.ts index 2c649bfcb54..38e5cf4d08f 100644 --- a/packages/utxo-lib/src/payments/p2pk.ts +++ b/packages/utxo-lib/src/payments/p2pk.ts @@ -1,6 +1,7 @@ // https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/ts_src/payments/p2pk.ts import ecc from 'tiny-secp256k1'; + import { bitcoin as BITCOIN_NETWORK } from '../networks'; import * as bscript from '../script'; import * as lazy from './lazy'; diff --git a/packages/utxo-lib/src/payments/p2pkh.ts b/packages/utxo-lib/src/payments/p2pkh.ts index 20a8eaf6da6..f4732eb6788 100644 --- a/packages/utxo-lib/src/payments/p2pkh.ts +++ b/packages/utxo-lib/src/payments/p2pkh.ts @@ -4,6 +4,7 @@ // - using bs58check.encodeAddress instead of bs58check.encode import ecc from 'tiny-secp256k1'; + import * as bs58check from '../bs58check'; import * as bcrypto from '../crypto'; import { bitcoin as BITCOIN_NETWORK } from '../networks'; diff --git a/packages/utxo-lib/src/payments/p2tr.ts b/packages/utxo-lib/src/payments/p2tr.ts index 387d3339374..0c4aaa0b280 100644 --- a/packages/utxo-lib/src/payments/p2tr.ts +++ b/packages/utxo-lib/src/payments/p2tr.ts @@ -3,6 +3,7 @@ import ecc from 'tiny-secp256k1'; import { bech32m } from 'bech32'; + import { bitcoin as BITCOIN_NETWORK } from '../networks'; import * as bcrypto from '../crypto'; import * as bscript from '../script'; diff --git a/packages/utxo-lib/src/payments/p2wpkh.ts b/packages/utxo-lib/src/payments/p2wpkh.ts index 44dba547aef..a49e466256c 100644 --- a/packages/utxo-lib/src/payments/p2wpkh.ts +++ b/packages/utxo-lib/src/payments/p2wpkh.ts @@ -2,6 +2,7 @@ import ecc from 'tiny-secp256k1'; import { bech32 } from 'bech32'; + import * as bcrypto from '../crypto'; import { bitcoin as BITCOIN_NETWORK } from '../networks'; import * as bscript from '../script'; diff --git a/packages/utxo-lib/src/payments/p2wsh.ts b/packages/utxo-lib/src/payments/p2wsh.ts index 83557d1c3bd..70e01089d65 100644 --- a/packages/utxo-lib/src/payments/p2wsh.ts +++ b/packages/utxo-lib/src/payments/p2wsh.ts @@ -2,6 +2,7 @@ import ecc from 'tiny-secp256k1'; import { bech32 } from 'bech32'; + import * as bcrypto from '../crypto'; import { bitcoin as BITCOIN_NETWORK } from '../networks'; import * as bscript from '../script'; diff --git a/packages/utxo-lib/src/script/index.ts b/packages/utxo-lib/src/script/index.ts index 0a188a198d7..1811d04ab17 100644 --- a/packages/utxo-lib/src/script/index.ts +++ b/packages/utxo-lib/src/script/index.ts @@ -5,6 +5,7 @@ import * as bip66 from 'bip66'; import pushdata from 'pushdata-bitcoin'; import ecc from 'tiny-secp256k1'; + import * as scriptNumber from './scriptNumber'; import * as scriptSignature from './scriptSignature'; import { OPS, REVERSE_OPS } from './ops'; diff --git a/packages/utxo-lib/src/script/scriptSignature.ts b/packages/utxo-lib/src/script/scriptSignature.ts index 2d7c0e70093..c2ca64146ee 100644 --- a/packages/utxo-lib/src/script/scriptSignature.ts +++ b/packages/utxo-lib/src/script/scriptSignature.ts @@ -1,6 +1,7 @@ // upstream: https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/ts_src/script_signature.ts import * as bip66 from 'bip66'; + import * as types from '../types'; const ZERO = Buffer.alloc(1, 0); diff --git a/packages/utxo-lib/src/transaction/base.ts b/packages/utxo-lib/src/transaction/base.ts index d869ec9d9ff..cde5812f1bf 100644 --- a/packages/utxo-lib/src/transaction/base.ts +++ b/packages/utxo-lib/src/transaction/base.ts @@ -1,9 +1,9 @@ import * as varuint from 'varuint-bitcoin'; + import { reverseBuffer, getChunkSize } from '../bufferutils'; import * as bcrypto from '../crypto'; import * as types from '../types'; import * as bscript from '../script'; - import { bitcoin as BITCOIN_NETWORK, Network, isNetworkType } from '../networks'; export function varSliceSize(someScript: Buffer) { diff --git a/packages/utxo-lib/src/transaction/dash.ts b/packages/utxo-lib/src/transaction/dash.ts index 5bc6350eb2a..618930b213c 100644 --- a/packages/utxo-lib/src/transaction/dash.ts +++ b/packages/utxo-lib/src/transaction/dash.ts @@ -1,4 +1,5 @@ import * as varuint from 'varuint-bitcoin'; + import { BufferReader, BufferWriter } from '../bufferutils'; import { TransactionBase, TransactionOptions, varSliceSize, vectorSize } from './base'; diff --git a/packages/utxo-lib/src/transaction/decred.ts b/packages/utxo-lib/src/transaction/decred.ts index 10ada38f469..67ec57ed365 100644 --- a/packages/utxo-lib/src/transaction/decred.ts +++ b/packages/utxo-lib/src/transaction/decred.ts @@ -1,6 +1,7 @@ // https://devdocs.decred.org/developer-guides/transactions/transaction-format/ import * as varuint from 'varuint-bitcoin'; + import { BufferReader, BufferWriter } from '../bufferutils'; import * as bcrypto from '../crypto'; import { TransactionBase, TransactionOptions, varSliceSize, EMPTY_SCRIPT } from './base'; diff --git a/packages/utxo-lib/src/transaction/zcash.ts b/packages/utxo-lib/src/transaction/zcash.ts index fc9cd5051f0..dba76653338 100644 --- a/packages/utxo-lib/src/transaction/zcash.ts +++ b/packages/utxo-lib/src/transaction/zcash.ts @@ -3,6 +3,7 @@ import * as varuint from 'varuint-bitcoin'; import { blake2b } from 'blakejs'; + import { BufferReader, BufferWriter, varIntSize } from '../bufferutils'; import { TransactionBase, TransactionOptions, varSliceSize, EMPTY_SCRIPT } from './base'; import { hash256 } from '../crypto'; diff --git a/packages/utxo-lib/src/types/coinselect.ts b/packages/utxo-lib/src/types/coinselect.ts index 14d9b68dde4..bd1e6cddfbd 100644 --- a/packages/utxo-lib/src/types/coinselect.ts +++ b/packages/utxo-lib/src/types/coinselect.ts @@ -1,4 +1,5 @@ import BN from 'bn.js'; + import { TransactionInputOutputSortingStrategy } from './compose'; export type CoinSelectPaymentType = 'p2pkh' | 'p2sh' | 'p2tr' | 'p2wpkh' | 'p2wsh'; diff --git a/packages/utxo-lib/tests/coinselect/coinselectUtils.test.ts b/packages/utxo-lib/tests/coinselect/coinselectUtils.test.ts index 12083a3ed14..a43a1827e35 100644 --- a/packages/utxo-lib/tests/coinselect/coinselectUtils.test.ts +++ b/packages/utxo-lib/tests/coinselect/coinselectUtils.test.ts @@ -1,4 +1,5 @@ import BN from 'bn.js'; + import { bignumberOrNaN, getFee, getDustAmount } from '../../src/coinselect/coinselectUtils'; describe('coinselectUtils', () => { diff --git a/packages/utxo-lib/tests/coinselect/test.utils.ts b/packages/utxo-lib/tests/coinselect/test.utils.ts index 4f692ecbfd1..a6081eedce6 100644 --- a/packages/utxo-lib/tests/coinselect/test.utils.ts +++ b/packages/utxo-lib/tests/coinselect/test.utils.ts @@ -1,4 +1,5 @@ import BN from 'bn.js'; + import { INPUT_SCRIPT_LENGTH, OUTPUT_SCRIPT_LENGTH } from '../../src/coinselect/coinselectUtils'; function addScriptLength(values: any[], scriptLength: number) { diff --git a/packages/utxo-lib/tests/compose.test.ts b/packages/utxo-lib/tests/compose.test.ts index 14037ef9808..74a19c536d6 100644 --- a/packages/utxo-lib/tests/compose.test.ts +++ b/packages/utxo-lib/tests/compose.test.ts @@ -1,11 +1,11 @@ +import { getRandomInt } from '@trezor/utils'; + import { composeTx } from '../src/compose'; import * as NETWORKS from '../src/networks'; - import { verifyTxBytes } from './compose.utils'; import { composeTxFixture } from './__fixtures__/compose'; import { fixturesCrossCheck } from './__fixtures__/compose.crosscheck'; -import { getRandomInt } from '@trezor/utils'; jest.mock('@trezor/utils', () => ({ ...jest.requireActual('@trezor/utils'), diff --git a/packages/utxo-lib/tests/script.test.ts b/packages/utxo-lib/tests/script.test.ts index d7e510f0d97..1b1708dcaa0 100644 --- a/packages/utxo-lib/tests/script.test.ts +++ b/packages/utxo-lib/tests/script.test.ts @@ -1,9 +1,9 @@ -import * as bscript from '../src/script'; +import minimalData from 'minimaldata'; +import * as bscript from '../src/script'; import { fixtures } from './__fixtures__/script'; import { templates } from './__fixtures__/templates'; -import minimalData from 'minimaldata'; describe('script', () => { // TODO From c4ab992b7f0a7b46d56e3b5060ddb28f955de933 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 12:32:11 +0100 Subject: [PATCH 24/29] chore: enable import/order rule for whole codebase - manual fixies --- .../connect/src/types/api/stellarSignTransaction.ts | 1 - packages/suite-build/webpack.config.ts | 1 - packages/suite/src/reducers/store.ts | 1 - packages/suite/src/types/wallet/coinjoin.ts | 3 +-- .../dashboard/AssetsView/AssetCard/AssetCard.tsx | 12 ++---------- 5 files changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/connect/src/types/api/stellarSignTransaction.ts b/packages/connect/src/types/api/stellarSignTransaction.ts index 2771aa9b106..19931f1b77c 100644 --- a/packages/connect/src/types/api/stellarSignTransaction.ts +++ b/packages/connect/src/types/api/stellarSignTransaction.ts @@ -1,5 +1,4 @@ import type { Params, Response } from '../params'; - // todo:maybe we could unify terminology SignTransaction vs SignTx (across all methods) import type { StellarSignTransaction, StellarSignedTx } from './stellar'; diff --git a/packages/suite-build/webpack.config.ts b/packages/suite-build/webpack.config.ts index ce550c90975..78a7e619491 100644 --- a/packages/suite-build/webpack.config.ts +++ b/packages/suite-build/webpack.config.ts @@ -2,7 +2,6 @@ import { merge } from 'webpack-merge'; // Env utils import { project, isDev } from './utils/env'; - // Configs import base from './configs/base.webpack.config'; import dev from './configs/dev.webpack.config'; diff --git a/packages/suite/src/reducers/store.ts b/packages/suite/src/reducers/store.ts index 564b801303a..ab0405fa75c 100644 --- a/packages/suite/src/reducers/store.ts +++ b/packages/suite/src/reducers/store.ts @@ -20,7 +20,6 @@ import walletReducers from 'src/reducers/wallet'; import onboardingReducers from 'src/reducers/onboarding'; import recoveryReducers from 'src/reducers/recovery'; import backupReducers from 'src/reducers/backup'; - // toastMiddleware can be used only in suite-desktop and suite-web // it's not included into `@suite-middlewares` index import toastMiddleware from 'src/middlewares/suite/toastMiddleware'; diff --git a/packages/suite/src/types/wallet/coinjoin.ts b/packages/suite/src/types/wallet/coinjoin.ts index 96e8dda7652..e5e82515c1e 100644 --- a/packages/suite/src/types/wallet/coinjoin.ts +++ b/packages/suite/src/types/wallet/coinjoin.ts @@ -1,6 +1,5 @@ -import { NetworkSymbol } from '@suite-common/wallet-config'; import { PartialRecord } from '@trezor/type-utils'; - +import { NetworkSymbol } from '@suite-common/wallet-config'; // @trezor/coinjoin package is meant to be imported dynamically // importing types is safe, but importing an enum thru index will bundle whole lib import { diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCard.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCard.tsx index 349420228c9..c9bcdeb1da9 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCard.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetCard/AssetCard.tsx @@ -21,8 +21,8 @@ import { Account, RatesByKey } from '@suite-common/wallet-types'; import { isTestnet } from '@suite-common/wallet-utils'; import { selectAssetAccountsThatStaked } from '@suite-common/wallet-core'; import { selectCoinDefinitions } from '@suite-common/token-definitions'; - import { FiatCurrencyCode } from '@suite-common/suite-config'; + import { AmountUnitSwitchWrapper, CoinBalance, @@ -30,23 +30,15 @@ import { Translation, TrendTicker, } from 'src/components/suite'; - - import { useAccountSearch, useLoadingSkeleton, useSelector } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; - - import { FiatHeader } from 'src/components/wallet/FiatHeader'; import { useFiatFromCryptoValue } from 'src/hooks/suite/useFiatFromCryptoValue'; import { ArrowIcon, styledHoverOnParentOfArrowIcon } from '../ArrowIcon'; import { CoinmarketBuyButton } from '../CoinmarketBuyButton'; import { AssetCardInfo, AssetCardInfoSkeleton } from './AssetCardInfo'; - - import { AssetCardTokensAndStakingInfo } from './AssetCardTokensAndStakingInfo'; - - import { handleTokensAndStakingData } from '../assetsViewUtils'; // eslint-disable-next-line local-rules/no-override-ds-component @@ -88,8 +80,8 @@ const FailedContainer = styled.div` display: flex; align-items: center; gap: ${spacingsPx.xs}; - ${typography.hint} + ${typography.hint} ${variables.SCREEN_QUERY.MOBILE} { border-bottom: 1px solid ${({ theme }) => theme.borderElevation2}; } From c56c7d7e2ee82a73efd171dcaa42185514628b41 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 13:15:42 +0100 Subject: [PATCH 25/29] chore: enable import/order rule for whole codebase - prettier fix --- packages/components/src/components/DataAnalytics.tsx | 1 - .../components/ElevationContext/ElevationContext.stories.tsx | 1 - packages/components/src/components/Flex/Flex.tsx | 1 - packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx | 1 - packages/components/src/components/Markdown/Markdown.tsx | 1 - .../components/src/components/NewModal/NewModalBackdrop.tsx | 1 - packages/components/src/components/Timerange/Timerange.tsx | 1 - .../src/components/buttons/Button/buttons.stories.tsx | 1 - packages/connect-popup/e2e/tests/popup-pages.test.ts | 1 - .../connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts | 1 - packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts | 1 - packages/connect/src/api/bitcoin/refTx.ts | 1 - .../connect/src/api/ethereum/api/ethereumSignTransaction.ts | 1 - packages/connect/src/events/transport.ts | 1 - .../src/components/CoinLogo/coinLogos.stories.tsx | 1 - .../PassphraseTypeCard/PassphraseTypeCardHeading.tsx | 1 - .../src/components/SelectAssetModal/AssetItemNotFound.tsx | 1 - .../src/components/SelectAssetModal/SelectAssetModal.tsx | 1 - packages/suite-web/src/Main.tsx | 2 -- .../src/actions/onboarding/__tests__/onboardingActions.test.ts | 1 - .../suite/src/actions/suite/__tests__/analyticsActions.test.ts | 1 - .../suite/src/actions/suite/__tests__/protocolActions.test.ts | 1 - packages/suite/src/actions/suite/desktopUpdateActions.ts | 1 - packages/suite/src/actions/suite/metadataActions.ts | 1 - packages/suite/src/actions/suite/protocolActions.ts | 1 - packages/suite/src/actions/wallet/coinjoinClientActions.ts | 1 - packages/suite/src/actions/wallet/formDraftActions.ts | 1 - packages/suite/src/actions/wallet/graphActions.ts | 1 - packages/suite/src/actions/wallet/signVerifyActions.ts | 1 - packages/suite/src/components/guide/Feedback.tsx | 1 - packages/suite/src/components/guide/GuideHeader.tsx | 1 - packages/suite/src/components/guide/GuideSearch.tsx | 1 - packages/suite/src/components/onboarding/Hologram.tsx | 1 - packages/suite/src/components/onboarding/OnboardingLayout.tsx | 1 - packages/suite/src/components/onboarding/OnboardingStepBox.tsx | 1 - .../suite/src/components/suite/AmountUnitSwitchWrapper.tsx | 1 - packages/suite/src/components/suite/CountdownTimer.tsx | 1 - .../components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx | 1 - packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx | 1 - packages/suite/src/components/suite/Ticker/PriceTicker.tsx | 1 - .../suite/src/components/suite/__tests__/NumberInput.test.tsx | 1 - .../suite/src/components/suite/banners/MessageSystemBanner.tsx | 1 - .../suite/graph/TransactionsGraph/GraphTooltipAccount.tsx | 1 - .../suite/graph/TransactionsGraph/GraphYAxisTick.tsx | 1 - .../suite/labeling/MetadataLabeling/MetadataLabeling.tsx | 1 - .../suite/src/components/suite/labeling/WalletLabeling.tsx | 1 - .../layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx | 1 - .../suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx | 1 - .../suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx | 1 - .../layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx | 1 - .../Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx | 1 - .../components/suite/layouts/SuiteLayout/useAppShortcuts.tsx | 1 - .../components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx | 1 - .../src/components/suite/modals/ConfirmEvmExplanationModal.tsx | 1 - .../suite/modals/ModalSwitcher/ForegroundAppModal.tsx | 1 - .../ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx | 1 - .../TransactionReviewModal/TransactionReviewModalContent.tsx | 1 - .../TransactionReviewOutputList/TransactionReviewOutput.tsx | 2 -- .../TransactionReviewModal/TransactionReviewSummary.tsx | 1 - .../AccountTypeSelect/AccountTypeDescription.tsx | 1 - .../AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx | 1 - .../CustomBackends/CustomBackends.tsx | 1 - .../ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx | 1 - .../CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx | 1 - .../modals/ReduxModal/UserContextModal/DisableTorModal.tsx | 1 - .../MetadataProviderModal/MetadataProviderModal.tsx | 1 - .../MultiShareBackupModal/MultiShareBackupModal.tsx | 1 - .../MultiShareBackupModal/MultiShareBackupStep5Done.tsx | 1 - .../modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx | 1 - .../StakeModal/StakingInfoCards/EstimatedGains.tsx | 1 - .../StakeModal/StakingInfoCards/StakingInfoCards.tsx | 1 - .../UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx | 1 - .../TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx | 1 - .../UserContextModal/TxDetailModal/BasicTxDetails.tsx | 1 - .../UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx | 1 - .../TxDetailModal/ChangeFee/DecreasedOutputs.tsx | 1 - .../ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx | 1 - .../UserContextModal/TxDetailModal/TxDetailModal.tsx | 1 - .../UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx | 1 - .../UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx | 2 -- .../ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx | 1 - .../NotificationRenderer/CoinProtocolRenderer.tsx | 1 - .../src/components/suite/notifications/ToastNotification.tsx | 1 - packages/suite/src/components/wallet/Fees/CustomFee.tsx | 2 -- packages/suite/src/components/wallet/Fees/Fees.tsx | 2 -- .../components/wallet/TransactionItem/InstantStakeBadge.tsx | 2 -- .../src/components/wallet/TransactionItem/TransactionItem.tsx | 2 -- .../src/components/wallet/TransactionItem/TransactionRow.tsx | 2 -- .../TransactionItem/TransactionTarget/TargetAddressLabel.tsx | 1 - .../TransactionItem/TransactionTarget/TransactionTarget.tsx | 1 - .../wallet/WalletLayout/AccountBanners/AccountBanners.tsx | 3 --- .../wallet/WalletLayout/AccountBanners/ContextMessage.tsx | 1 - .../wallet/WalletLayout/AccountBanners/XRPReserve.tsx | 1 - .../wallet/WalletLayout/AccountsMenu/AccountGroup.tsx | 1 - .../wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx | 1 - .../wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx | 1 - .../wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx | 1 - .../suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx | 1 - packages/suite/src/hooks/suite/useDefaultAccountLabel.ts | 1 - packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts | 1 - .../coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx | 1 - .../src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts | 1 - .../wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx | 1 - .../suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts | 1 - packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts | 1 - packages/suite/src/hooks/wallet/useSendForm.ts | 1 - .../suite/src/reducers/suite/__tests__/protocolReducer.test.ts | 1 - .../src/reducers/wallet/__tests__/coinjoinReducer.test.ts | 1 - packages/suite/src/reducers/wallet/receiveReducer.ts | 1 - packages/suite/src/reducers/wallet/settingsReducer.ts | 1 - packages/suite/src/services/suite/metadata/DropboxProvider.ts | 1 - packages/suite/src/support/extraDependencies.ts | 2 -- packages/suite/src/support/suite/useTor.tsx | 1 - packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts | 2 -- packages/suite/src/utils/wallet/graph/utils.ts | 1 - packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx | 2 -- .../src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx | 2 -- .../suite/src/views/dashboard/AssetsView/assetsViewUtils.ts | 1 - .../suite/src/views/dashboard/DashboardPassphraseBanner.tsx | 1 - packages/suite/src/views/dashboard/PromoBanner.tsx | 1 - .../src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx | 2 -- .../onboarding/steps/SelectBackupType/SelectBackupType.tsx | 1 - .../src/views/password-manager/PasswordManager/EntryForm.tsx | 1 - .../views/password-manager/PasswordManager/PasswordsList.tsx | 2 -- .../src/views/settings/SettingsDevice/MultiShareBackup.tsx | 1 - .../src/views/settings/SettingsGeneral/AutomaticUpdate.tsx | 1 - packages/suite/src/views/settings/SettingsLoader.tsx | 1 - packages/suite/src/views/suite/ErrorPage.tsx | 1 - .../src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx | 1 - .../views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx | 1 - .../suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx | 1 - .../src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx | 1 - packages/suite/src/views/suite/bridge-requested/index.tsx | 1 - packages/suite/src/views/suite/bridge/index.tsx | 1 - packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx | 2 -- .../CoinmarketDetailBuyPaymentWaitingForUser.tsx | 1 - .../CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx | 1 - .../CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx | 1 - .../CoinmarketTransaction/CoinmarketTransactionStatus.tsx | 2 -- .../views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx | 2 -- packages/suite/src/views/wallet/details/index.tsx | 1 - .../Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx | 1 - .../wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx | 1 - .../views/wallet/send/Options/EthereumOptions/EthereumData.tsx | 1 - .../views/wallet/send/Options/RippleOptions/DestinationTag.tsx | 1 - .../suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx | 2 -- packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx | 1 - packages/suite/src/views/wallet/send/SendRaw.tsx | 1 - .../suite/src/views/wallet/send/TotalSent/ReviewButton.tsx | 1 - packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx | 1 - .../src/views/wallet/sign-verify/components/ButtonRow.tsx | 1 - .../wallet/staking/components/CardanoStakingDashboard.tsx | 1 - packages/suite/src/views/wallet/tokens/index.tsx | 1 - .../CoinjoinStatusWheel/CoinjoinStatusWheel.tsx | 1 - .../suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx | 1 - .../src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx | 1 - .../src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx | 1 - .../TransactionList/TransactionListActions/ExportAction.tsx | 1 - .../TransactionListActions/TransactionListActions.tsx | 2 -- packages/suite/src/views/wallet/transactions/Transactions.tsx | 2 -- .../src/views/wallet/transactions/components/SummaryCards.tsx | 1 - packages/utxo-lib/tests/compose.test.ts | 1 - packages/utxo-lib/tests/script.test.ts | 1 - 163 files changed, 185 deletions(-) diff --git a/packages/components/src/components/DataAnalytics.tsx b/packages/components/src/components/DataAnalytics.tsx index ba6afe52835..c880922a8b9 100644 --- a/packages/components/src/components/DataAnalytics.tsx +++ b/packages/components/src/components/DataAnalytics.tsx @@ -11,7 +11,6 @@ import { CollapsibleBox } from './CollapsibleBox/CollapsibleBox'; import { Card } from './Card/Card'; import { Switch } from './form/Switch/Switch'; - const Wrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx b/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx index 129ace1de78..123248eacb1 100644 --- a/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx +++ b/packages/components/src/components/ElevationContext/ElevationContext.stories.tsx @@ -21,7 +21,6 @@ import { ElevationUp, } from './ElevationContext'; - const UiBox = styled.div<{ $elevation: Elevation }>` background-color: ${mapElevationToBackground}; border: 1px solid ${mapElevationToBorder}; diff --git a/packages/components/src/components/Flex/Flex.tsx b/packages/components/src/components/Flex/Flex.tsx index 4634fe219cc..4bac71a0615 100644 --- a/packages/components/src/components/Flex/Flex.tsx +++ b/packages/components/src/components/Flex/Flex.tsx @@ -13,7 +13,6 @@ import { import { makePropsTransient, TransientProps } from '../../utils/transientProps'; import { useElevation } from '../ElevationContext/ElevationContext'; - export const allowedFlexFrameProps = [ 'margin', 'width', diff --git a/packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx b/packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx index c1b6322dd05..cc8553f28a6 100644 --- a/packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx +++ b/packages/components/src/components/HotkeyBadge/HotkeyBadge.tsx @@ -13,7 +13,6 @@ import { import { ElevationDown, useElevation } from '../ElevationContext/ElevationContext'; import { Keys, keyboardKeys } from './keyboardKeys'; - export const Container = styled.div<{ $elevation: Elevation; $isActive: boolean }>` display: flex; gap: ${spacingsPx.xxs}; diff --git a/packages/components/src/components/Markdown/Markdown.tsx b/packages/components/src/components/Markdown/Markdown.tsx index c898c62756c..3ad56b5f766 100644 --- a/packages/components/src/components/Markdown/Markdown.tsx +++ b/packages/components/src/components/Markdown/Markdown.tsx @@ -6,7 +6,6 @@ import { typography } from '@trezor/theme'; import { variables } from '../../config'; - const StyledMarkdown = styled.div` ${typography.hint} diff --git a/packages/components/src/components/NewModal/NewModalBackdrop.tsx b/packages/components/src/components/NewModal/NewModalBackdrop.tsx index 56089d43d6d..4d42fa6bdd3 100644 --- a/packages/components/src/components/NewModal/NewModalBackdrop.tsx +++ b/packages/components/src/components/NewModal/NewModalBackdrop.tsx @@ -6,7 +6,6 @@ import styled from 'styled-components'; import { zIndices, spacings } from '@trezor/theme'; - import { NewModalAlignment } from './types'; import { mapAlignmentToAlignItems, mapAlignmentToJustifyContent } from './utils'; import { useModalTarget } from './NewModalProvider'; diff --git a/packages/components/src/components/Timerange/Timerange.tsx b/packages/components/src/components/Timerange/Timerange.tsx index 35204258a1d..ad39c88e705 100644 --- a/packages/components/src/components/Timerange/Timerange.tsx +++ b/packages/components/src/components/Timerange/Timerange.tsx @@ -7,7 +7,6 @@ import type { Locale } from 'date-fns'; import { mediaQueries } from '@trezor/styles'; import { borders, spacingsPx, zIndices } from '@trezor/theme'; - import { Button } from '../buttons/Button/Button'; type Selection = { diff --git a/packages/components/src/components/buttons/Button/buttons.stories.tsx b/packages/components/src/components/buttons/Button/buttons.stories.tsx index 4dac9402fe9..e120c3a9599 100644 --- a/packages/components/src/components/buttons/Button/buttons.stories.tsx +++ b/packages/components/src/components/buttons/Button/buttons.stories.tsx @@ -7,7 +7,6 @@ import { Button } from '../../../index'; import { StoryColumn } from '../../../support/Story'; import { ButtonVariant } from '../buttonStyleUtils'; - const variants: Array = ['primary', 'tertiary', 'info', 'warning', 'destructive']; const meta: Meta = { diff --git a/packages/connect-popup/e2e/tests/popup-pages.test.ts b/packages/connect-popup/e2e/tests/popup-pages.test.ts index fcae9e676f3..2501726d290 100644 --- a/packages/connect-popup/e2e/tests/popup-pages.test.ts +++ b/packages/connect-popup/e2e/tests/popup-pages.test.ts @@ -12,7 +12,6 @@ import { waitAndClick, } from '../support/helpers'; - const url = process.env.URL || 'http://localhost:8088/'; const bridgeVersion = '2.0.33'; diff --git a/packages/connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts b/packages/connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts index e8669f19e36..8ec92e17bc1 100644 --- a/packages/connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts +++ b/packages/connect/e2e/__fixtures__/cardanoGetAddressDerivations.ts @@ -4,7 +4,6 @@ import { MessagesSchema } from '@trezor/protobuf'; import commonFixtures from '../../../../submodules/trezor-common/tests/fixtures/cardano/get_base_address.derivations.json'; - const { CardanoAddressType, CardanoDerivationType } = MessagesSchema; const legacyResults = { diff --git a/packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts b/packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts index 8c580fa03e4..59f5937e3c2 100644 --- a/packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts +++ b/packages/connect/e2e/__fixtures__/cardanoSignTransaction.ts @@ -2,7 +2,6 @@ import { MessagesSchema } from '@trezor/protobuf'; import { NETWORK_IDS, PROTOCOL_MAGICS } from '../../src/constants/cardano'; - const { CardanoAddressType, CardanoCVoteRegistrationFormat, diff --git a/packages/connect/src/api/bitcoin/refTx.ts b/packages/connect/src/api/bitcoin/refTx.ts index 778663b7efc..a2aeca99414 100644 --- a/packages/connect/src/api/bitcoin/refTx.ts +++ b/packages/connect/src/api/bitcoin/refTx.ts @@ -24,7 +24,6 @@ import type { import type { RefTransaction, TransactionOptions } from '../../types/api/bitcoin'; import { PROTO } from '../../constants'; - // Referenced transactions are not required if: // - all internal inputs script_type === SPENDTAPROOT // - zcash tx version is NU5 (or greater) diff --git a/packages/connect/src/api/ethereum/api/ethereumSignTransaction.ts b/packages/connect/src/api/ethereum/api/ethereumSignTransaction.ts index 0a40ebf6e4b..cf1c4e8943f 100644 --- a/packages/connect/src/api/ethereum/api/ethereumSignTransaction.ts +++ b/packages/connect/src/api/ethereum/api/ethereumSignTransaction.ts @@ -23,7 +23,6 @@ import { EthereumSignTransaction as EthereumSignTransactionSchema, } from '../../../types'; - type Params = { path: number[]; network?: EthereumNetworkInfo; diff --git a/packages/connect/src/events/transport.ts b/packages/connect/src/events/transport.ts index b1157bbbbce..f0d83f8442f 100644 --- a/packages/connect/src/events/transport.ts +++ b/packages/connect/src/events/transport.ts @@ -4,7 +4,6 @@ import { TRANSPORT } from '@trezor/transport/src/constants'; import { serializeError } from '../constants/errors'; import type { MessageFactoryFn } from '../types/utils'; - export { TRANSPORT } from '@trezor/transport/src/constants'; export const TRANSPORT_EVENT = 'TRANSPORT_EVENT'; diff --git a/packages/product-components/src/components/CoinLogo/coinLogos.stories.tsx b/packages/product-components/src/components/CoinLogo/coinLogos.stories.tsx index 04218cb39d2..03056d600af 100644 --- a/packages/product-components/src/components/CoinLogo/coinLogos.stories.tsx +++ b/packages/product-components/src/components/CoinLogo/coinLogos.stories.tsx @@ -7,7 +7,6 @@ import { NetworkSymbol } from '@suite-common/wallet-config'; import { CoinLogo } from '../../index'; import { COINS } from './coins'; - const CoinName = styled.div` margin-bottom: 0.5rem; color: ${({ theme }) => theme.legacy.TYPE_LIGHT_GREY}; diff --git a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx index f3e2f3131a2..4b7607f5313 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx +++ b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx @@ -8,7 +8,6 @@ import { Tooltip, TooltipProps, Column, Row, Icon } from '@trezor/components'; import { WalletType } from './types'; - const IconWrapper = styled.div<{ $type: WalletType }>` width: 38px; height: 38px; diff --git a/packages/product-components/src/components/SelectAssetModal/AssetItemNotFound.tsx b/packages/product-components/src/components/SelectAssetModal/AssetItemNotFound.tsx index dc74a0bbc0a..243cd7df5b3 100644 --- a/packages/product-components/src/components/SelectAssetModal/AssetItemNotFound.tsx +++ b/packages/product-components/src/components/SelectAssetModal/AssetItemNotFound.tsx @@ -5,7 +5,6 @@ import { spacings } from '@trezor/theme'; import { SelectAssetNetworkProps, SelectAssetSearchCategoryType } from './SelectAssetModal'; - interface AssetItemNotFoundProps { searchCategory: SelectAssetSearchCategoryType; networkCategories: SelectAssetNetworkProps[]; diff --git a/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx b/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx index d169d6b5b0d..50721401ff8 100644 --- a/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx +++ b/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx @@ -17,7 +17,6 @@ import { AssetItem } from './AssetItem'; import { NetworkTabs } from './NetworkTabs'; import { AssetItemNotFound } from './AssetItemNotFound'; - export interface SelectAssetOptionCurrencyProps { type: 'currency'; value: string; // CryptoId (networkId + contractAddress) diff --git a/packages/suite-web/src/Main.tsx b/packages/suite-web/src/Main.tsx index 9b13e15d91e..0d32c8955dd 100644 --- a/packages/suite-web/src/Main.tsx +++ b/packages/suite-web/src/Main.tsx @@ -28,8 +28,6 @@ import { ModalContextProvider } from 'src/support/suite/ModalContext'; import AppRouter from './support/Router'; import { useCypress } from './support/useCypress'; - - const Main = () => { useCypress(); useTor(); diff --git a/packages/suite/src/actions/onboarding/__tests__/onboardingActions.test.ts b/packages/suite/src/actions/onboarding/__tests__/onboardingActions.test.ts index 900caae8c0b..8db3ce3e8e3 100644 --- a/packages/suite/src/actions/onboarding/__tests__/onboardingActions.test.ts +++ b/packages/suite/src/actions/onboarding/__tests__/onboardingActions.test.ts @@ -6,7 +6,6 @@ import { Action } from 'src/types/suite'; import fixtures from '../__fixtures__/onboardingActions'; - // todo fighting with typescript here. How to keep string literal being exported from fixtures and not converted // to string? if exported as const, it makes all properties readonly and thus not assignable to reducer which // expects mutable properties; diff --git a/packages/suite/src/actions/suite/__tests__/analyticsActions.test.ts b/packages/suite/src/actions/suite/__tests__/analyticsActions.test.ts index 6b61098f2f9..50ebd37c650 100644 --- a/packages/suite/src/actions/suite/__tests__/analyticsActions.test.ts +++ b/packages/suite/src/actions/suite/__tests__/analyticsActions.test.ts @@ -4,7 +4,6 @@ import { extraDependencies } from 'src/support/extraDependencies'; import { configureStore } from 'src/support/tests/configureStore'; import { init } from 'src/actions/suite/analyticsActions'; - const analyticsReducer = prepareAnalyticsReducer(extraDependencies); type AnalyticsState = ReturnType; diff --git a/packages/suite/src/actions/suite/__tests__/protocolActions.test.ts b/packages/suite/src/actions/suite/__tests__/protocolActions.test.ts index ff920c45a52..48673ffac5a 100644 --- a/packages/suite/src/actions/suite/__tests__/protocolActions.test.ts +++ b/packages/suite/src/actions/suite/__tests__/protocolActions.test.ts @@ -4,7 +4,6 @@ import { NETWORK_TO_PROTOCOLS } from '@suite-common/suite-constants'; import { configureStore } from 'src/support/tests/configureStore'; import protocolReducer, { State as ProtocolState } from 'src/reducers/suite/protocolReducer'; - import * as protocolActions from '../protocolActions'; import * as protocolConstants from '../constants/protocolConstants'; diff --git a/packages/suite/src/actions/suite/desktopUpdateActions.ts b/packages/suite/src/actions/suite/desktopUpdateActions.ts index a57299f39ad..3db2bbfeb93 100644 --- a/packages/suite/src/actions/suite/desktopUpdateActions.ts +++ b/packages/suite/src/actions/suite/desktopUpdateActions.ts @@ -7,7 +7,6 @@ import { Dispatch, GetState } from 'src/types/suite'; import { UpdateState, UpdateModalVisibility } from 'src/reducers/suite/desktopUpdateReducer'; import { getAppUpdatePayload } from 'src/utils/suite/analytics'; - export type DesktopUpdateAction = | { type: typeof DESKTOP_UPDATE.CHECKING } | { type: typeof DESKTOP_UPDATE.AVAILABLE; payload: UpdateInfo } diff --git a/packages/suite/src/actions/suite/metadataActions.ts b/packages/suite/src/actions/suite/metadataActions.ts index d38735df649..453df45bedc 100644 --- a/packages/suite/src/actions/suite/metadataActions.ts +++ b/packages/suite/src/actions/suite/metadataActions.ts @@ -18,7 +18,6 @@ import * as metadataUtils from 'src/utils/suite/metadata'; import { selectSelectedProviderForLabels } from 'src/reducers/suite/metadataReducer'; import type { AbstractMetadataProvider, PasswordManagerState } from 'src/types/suite/metadata'; - export type MetadataAction = | { type: typeof METADATA.ENABLE } | { type: typeof METADATA.DISABLE } diff --git a/packages/suite/src/actions/suite/protocolActions.ts b/packages/suite/src/actions/suite/protocolActions.ts index 66104dda02d..9d1dc3c6421 100644 --- a/packages/suite/src/actions/suite/protocolActions.ts +++ b/packages/suite/src/actions/suite/protocolActions.ts @@ -8,7 +8,6 @@ import type { Dispatch } from 'src/types/suite'; import type { SendFormState } from 'src/reducers/suite/protocolReducer'; import * as routerActions from 'src/actions/suite/routerActions'; - import { PROTOCOL } from './constants'; export type ProtocolAction = diff --git a/packages/suite/src/actions/wallet/coinjoinClientActions.ts b/packages/suite/src/actions/wallet/coinjoinClientActions.ts index 003420d86f0..3351518c686 100644 --- a/packages/suite/src/actions/wallet/coinjoinClientActions.ts +++ b/packages/suite/src/actions/wallet/coinjoinClientActions.ts @@ -38,7 +38,6 @@ import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; import * as COINJOIN from './constants/coinjoinConstants'; - const clientEnable = (symbol: Account['symbol']) => ({ type: COINJOIN.CLIENT_ENABLE, diff --git a/packages/suite/src/actions/wallet/formDraftActions.ts b/packages/suite/src/actions/wallet/formDraftActions.ts index 9ade4f324ec..3d22da1e63e 100644 --- a/packages/suite/src/actions/wallet/formDraftActions.ts +++ b/packages/suite/src/actions/wallet/formDraftActions.ts @@ -7,7 +7,6 @@ import { Dispatch, GetState } from 'src/types/suite'; import { FORM_DRAFT } from './constants'; - export type FormDraftAction = | { type: typeof FORM_DRAFT.STORE_DRAFT; diff --git a/packages/suite/src/actions/wallet/graphActions.ts b/packages/suite/src/actions/wallet/graphActions.ts index 2486b9d52cf..a58052b6088 100644 --- a/packages/suite/src/actions/wallet/graphActions.ts +++ b/packages/suite/src/actions/wallet/graphActions.ts @@ -25,7 +25,6 @@ import { SET_SELECTED_VIEW, } from './constants/graphConstants'; - export type GraphAction = | { type: typeof ACCOUNT_GRAPH_SUCCESS; diff --git a/packages/suite/src/actions/wallet/signVerifyActions.ts b/packages/suite/src/actions/wallet/signVerifyActions.ts index 8e17b2937c3..2eac4dd33ae 100644 --- a/packages/suite/src/actions/wallet/signVerifyActions.ts +++ b/packages/suite/src/actions/wallet/signVerifyActions.ts @@ -9,7 +9,6 @@ import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; import { SIGN_VERIFY } from './constants'; - export type SignVerifyAction = | { type: typeof SIGN_VERIFY.SIGN_SUCCESS; signSignature: string } | { type: typeof SIGN_VERIFY.VERIFY_SUCCESS }; diff --git a/packages/suite/src/components/guide/Feedback.tsx b/packages/suite/src/components/guide/Feedback.tsx index e308e35fc03..01bb8166c6f 100644 --- a/packages/suite/src/components/guide/Feedback.tsx +++ b/packages/suite/src/components/guide/Feedback.tsx @@ -22,7 +22,6 @@ import { useDevice, useDispatch, useSelector } from 'src/hooks/suite'; import { sendFeedback, setView } from 'src/actions/suite/guideActions'; import { GuideViewWrapper, GuideHeader, GuideContent } from 'src/components/guide'; - const Headline = styled.div` font-size: ${variables.FONT_SIZE.TINY}; font-weight: ${variables.FONT_WEIGHT.DEMI_BOLD}; diff --git a/packages/suite/src/components/guide/GuideHeader.tsx b/packages/suite/src/components/guide/GuideHeader.tsx index e42b70364b2..79ea11ffac4 100644 --- a/packages/suite/src/components/guide/GuideHeader.tsx +++ b/packages/suite/src/components/guide/GuideHeader.tsx @@ -11,7 +11,6 @@ import { close } from 'src/actions/suite/guideActions'; import { useDispatch } from 'src/hooks/suite'; import { HeaderBreadcrumb, ContentScrolledContext } from 'src/components/guide'; - const HeaderWrapper = styled.div<{ $noLabel?: boolean; $isScrolled: boolean }>` display: flex; align-items: center; diff --git a/packages/suite/src/components/guide/GuideSearch.tsx b/packages/suite/src/components/guide/GuideSearch.tsx index c8f3e22d535..cde56565947 100644 --- a/packages/suite/src/components/guide/GuideSearch.tsx +++ b/packages/suite/src/components/guide/GuideSearch.tsx @@ -11,7 +11,6 @@ import { useTranslation } from 'src/hooks/suite'; import { GuideNode } from 'src/components/guide'; import { useGuideSearch } from 'src/hooks/guide'; - const Wrapper = styled.div` margin-bottom: ${spacingsPx.xs}; `; diff --git a/packages/suite/src/components/onboarding/Hologram.tsx b/packages/suite/src/components/onboarding/Hologram.tsx index e8e54cb6048..1ef72695976 100644 --- a/packages/suite/src/components/onboarding/Hologram.tsx +++ b/packages/suite/src/components/onboarding/Hologram.tsx @@ -12,7 +12,6 @@ import { DeviceModelInternal } from '@trezor/connect'; import { Translation, TrezorLink } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; - const HologramSubHeading = styled.span` font-size: ${variables.FONT_SIZE.SMALL}; font-weight: ${variables.FONT_WEIGHT.MEDIUM}; diff --git a/packages/suite/src/components/onboarding/OnboardingLayout.tsx b/packages/suite/src/components/onboarding/OnboardingLayout.tsx index 8e778461530..aa50c4f8f0b 100644 --- a/packages/suite/src/components/onboarding/OnboardingLayout.tsx +++ b/packages/suite/src/components/onboarding/OnboardingLayout.tsx @@ -17,7 +17,6 @@ import { GuideButton, GuideRouter } from 'src/components/guide'; import { MessageSystemBanner } from 'src/components/suite/banners'; import { ModalContextProvider } from 'src/support/suite/ModalContext'; - import { TrafficLightOffset } from '../suite/TrafficLightOffset'; const Wrapper = styled.div` diff --git a/packages/suite/src/components/onboarding/OnboardingStepBox.tsx b/packages/suite/src/components/onboarding/OnboardingStepBox.tsx index 43530aa48ba..5bd74ba2668 100644 --- a/packages/suite/src/components/onboarding/OnboardingStepBox.tsx +++ b/packages/suite/src/components/onboarding/OnboardingStepBox.tsx @@ -17,7 +17,6 @@ import { CollapsibleOnboardingCardProps, } from './CollapsibleOnboardingCard'; - const WrapperWrapper = styled.div` z-index: ${zIndices.onboardingForeground}; `; diff --git a/packages/suite/src/components/suite/AmountUnitSwitchWrapper.tsx b/packages/suite/src/components/suite/AmountUnitSwitchWrapper.tsx index 5ab3bf08591..69581e68bb9 100644 --- a/packages/suite/src/components/suite/AmountUnitSwitchWrapper.tsx +++ b/packages/suite/src/components/suite/AmountUnitSwitchWrapper.tsx @@ -10,7 +10,6 @@ import { useBitcoinAmountUnit } from 'src/hooks/wallet/useBitcoinAmountUnit'; import { Translation } from './Translation'; - const Container = styled.div` position: relative; display: flex; diff --git a/packages/suite/src/components/suite/CountdownTimer.tsx b/packages/suite/src/components/suite/CountdownTimer.tsx index c97a42485be..1967741247d 100644 --- a/packages/suite/src/components/suite/CountdownTimer.tsx +++ b/packages/suite/src/components/suite/CountdownTimer.tsx @@ -2,7 +2,6 @@ import { FormattedNumber } from 'react-intl'; import styled from 'styled-components'; - import { TranslationKey } from '@suite-common/intl-types'; import { useCountdownTimer } from 'src/hooks/suite'; diff --git a/packages/suite/src/components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx b/packages/suite/src/components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx index 3a9a7c6ddc2..93e33acedf2 100644 --- a/packages/suite/src/components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx +++ b/packages/suite/src/components/suite/PrerequisitesGuide/PrerequisitesGuide.tsx @@ -27,7 +27,6 @@ import { DeviceUpdateRequired } from './DeviceUpdateRequired'; import { DeviceDisconnectRequired } from './DeviceDisconnectRequired'; import { MultiShareBackupInProgress } from './MultiShareBackupInProgress'; - const Wrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx b/packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx index 5040c22aa47..1b443f035b3 100644 --- a/packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx +++ b/packages/suite/src/components/suite/Ticker/NoRatesTooltip.tsx @@ -6,7 +6,6 @@ import { Translation, TooltipSymbol } from 'src/components/suite'; import { TranslationKey } from '../Translation'; - const NoRatesMessage = styled.div` ${typography.label}; display: flex; diff --git a/packages/suite/src/components/suite/Ticker/PriceTicker.tsx b/packages/suite/src/components/suite/Ticker/PriceTicker.tsx index f53c9047d26..ea244a8cf22 100644 --- a/packages/suite/src/components/suite/Ticker/PriceTicker.tsx +++ b/packages/suite/src/components/suite/Ticker/PriceTicker.tsx @@ -8,7 +8,6 @@ import { FiatValue } from 'src/components/suite'; import { NoRatesTooltip } from './NoRatesTooltip'; import { LastUpdateTooltip } from './LastUpdateTooltip'; - const FiatRateWrapper = styled.span` ${typography.callout} display: flex; diff --git a/packages/suite/src/components/suite/__tests__/NumberInput.test.tsx b/packages/suite/src/components/suite/__tests__/NumberInput.test.tsx index 25b218f8c46..0c8870d3a76 100644 --- a/packages/suite/src/components/suite/__tests__/NumberInput.test.tsx +++ b/packages/suite/src/components/suite/__tests__/NumberInput.test.tsx @@ -5,7 +5,6 @@ import { render } from '@testing-library/react'; import { Store } from 'redux'; import userEvent from '@testing-library/user-event'; - import { configureMockStore } from '@suite-common/test-utils'; import suiteReducer, { SuiteState } from 'src/reducers/suite/suiteReducer'; diff --git a/packages/suite/src/components/suite/banners/MessageSystemBanner.tsx b/packages/suite/src/components/suite/banners/MessageSystemBanner.tsx index cc5243143a8..5658d4e39cc 100644 --- a/packages/suite/src/components/suite/banners/MessageSystemBanner.tsx +++ b/packages/suite/src/components/suite/banners/MessageSystemBanner.tsx @@ -9,7 +9,6 @@ import { useDispatch, useSelector } from 'src/hooks/suite'; import { getTorUrlIfAvailable } from 'src/utils/suite/tor'; import { selectLanguage, selectTorState } from 'src/reducers/suite/suiteReducer'; - type MessageSystemBannerProps = { message: Message; }; diff --git a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx index bf97271f1ff..f44b18ac21a 100644 --- a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx +++ b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphTooltipAccount.tsx @@ -11,7 +11,6 @@ import { CommonAggregatedHistory, GraphRange } from 'src/types/wallet/graph'; import type { CryptoGraphProps } from './TransactionsGraph'; import { GraphTooltipBase } from './GraphTooltipBase'; - const StyledCryptoAmount = styled(FormattedCryptoAmount)` margin-right: 2px; `; diff --git a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphYAxisTick.tsx b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphYAxisTick.tsx index 2279b12993c..d2288abde5b 100644 --- a/packages/suite/src/components/suite/graph/TransactionsGraph/GraphYAxisTick.tsx +++ b/packages/suite/src/components/suite/graph/TransactionsGraph/GraphYAxisTick.tsx @@ -2,7 +2,6 @@ import { useRef, useLayoutEffect } from 'react'; import { useTheme } from 'styled-components'; - import { useFormatters } from '@suite-common/formatters'; import { NetworkSymbol } from '@suite-common/wallet-config'; diff --git a/packages/suite/src/components/suite/labeling/MetadataLabeling/MetadataLabeling.tsx b/packages/suite/src/components/suite/labeling/MetadataLabeling/MetadataLabeling.tsx index 65e2a6f8561..543e0986e37 100644 --- a/packages/suite/src/components/suite/labeling/MetadataLabeling/MetadataLabeling.tsx +++ b/packages/suite/src/components/suite/labeling/MetadataLabeling/MetadataLabeling.tsx @@ -20,7 +20,6 @@ import { withEditable } from './withEditable'; import { withDropdown } from './withDropdown'; import { AccountTypeBadge } from '../../AccountTypeBadge'; - const LabelValue = styled.div` overflow: hidden; text-overflow: ellipsis; diff --git a/packages/suite/src/components/suite/labeling/WalletLabeling.tsx b/packages/suite/src/components/suite/labeling/WalletLabeling.tsx index f0a34b5dd60..b25cc817790 100644 --- a/packages/suite/src/components/suite/labeling/WalletLabeling.tsx +++ b/packages/suite/src/components/suite/labeling/WalletLabeling.tsx @@ -9,7 +9,6 @@ import { useTranslation } from 'src/hooks/suite/useTranslation'; import { useSelector } from 'src/hooks/suite/useSelector'; import { selectLabelingDataForWallet } from 'src/reducers/suite/metadataReducer'; - interface WalletLabellingProps { device: TrezorDevice; shouldUseDeviceLabel?: boolean; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx index fe9a5518180..998a9f1bdea 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/DeviceSelector/DeviceSelector.tsx @@ -15,7 +15,6 @@ import { ViewOnlyTooltip } from 'src/views/view-only/ViewOnlyTooltip'; import { SidebarDeviceStatus } from './SidebarDeviceStatus'; - const CaretContainer = styled.div` background: transparent; padding: 10px; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx index 0cab65a72a5..2d9cb0aebbf 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/MobileMenu/MobileNavigation.tsx @@ -10,7 +10,6 @@ import { MAIN_MENU_ITEMS } from 'src/constants/suite/menu'; import { useAccountSearch, useSelector, useDispatch } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; - interface ComponentProps { isActive: boolean; isDisabled?: boolean; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx index 39c0302b74b..194f3487e16 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/NavigationItem.tsx @@ -19,7 +19,6 @@ import { useDispatch, useSelector } from 'src/hooks/suite'; import { goto } from 'src/actions/suite/routerActions'; import { selectRouteName } from 'src/reducers/suite/routerReducer'; - export const NavigationItemBase = styled.div.attrs(() => ({ tabIndex: 0, }))` diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx index 1233bb57198..dc40b0feaea 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/NavBackends.tsx @@ -13,7 +13,6 @@ import { goto } from 'src/actions/suite/routerActions'; import type { CustomBackend } from 'src/types/wallet'; import { openModal } from 'src/actions/suite/modalActions'; - // eslint-disable-next-line local-rules/no-override-ds-component const StyledDropdown = styled(Dropdown)` display: block; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx index b4889bfa6ca..5b4d4a63d13 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/Sidebar/QuickActions/Update/UpdateStatusActionBarIcon.tsx @@ -21,7 +21,6 @@ import { UpdateVariant, } from './updateQuickActionTypes'; - type MapArgs = { $variant: UpdateVariant; theme: DefaultTheme; diff --git a/packages/suite/src/components/suite/layouts/SuiteLayout/useAppShortcuts.tsx b/packages/suite/src/components/suite/layouts/SuiteLayout/useAppShortcuts.tsx index 7f058414dc9..1395f04012e 100644 --- a/packages/suite/src/components/suite/layouts/SuiteLayout/useAppShortcuts.tsx +++ b/packages/suite/src/components/suite/layouts/SuiteLayout/useAppShortcuts.tsx @@ -7,7 +7,6 @@ import { closeModalApp, goto } from 'src/actions/suite/routerActions'; import { addWalletThunk } from 'src/actions/wallet/addWalletThunk'; import { useDispatch, useSelector } from 'src/hooks/suite'; - export const useAppShortcuts = () => { const selectedDevice = useSelector(selectDevice); const dispatch = useDispatch(); diff --git a/packages/suite/src/components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx b/packages/suite/src/components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx index f707f5f5d15..eda98dc40db 100644 --- a/packages/suite/src/components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx +++ b/packages/suite/src/components/suite/layouts/WelcomeLayout/WelcomeLayout.tsx @@ -33,7 +33,6 @@ import { MAX_ONBOARDING_WIDTH } from 'src/constants/suite/layout'; import { NavSettings } from './NavSettings'; import { TrafficLightOffset } from '../../TrafficLightOffset'; - const MessageContainer = styled.div` margin: ${spacingsPx.xxs} ${spacingsPx.xs} ${spacingsPx.xs}; `; diff --git a/packages/suite/src/components/suite/modals/ConfirmEvmExplanationModal.tsx b/packages/suite/src/components/suite/modals/ConfirmEvmExplanationModal.tsx index 8c5b3361ecb..b95487436bb 100644 --- a/packages/suite/src/components/suite/modals/ConfirmEvmExplanationModal.tsx +++ b/packages/suite/src/components/suite/modals/ConfirmEvmExplanationModal.tsx @@ -12,7 +12,6 @@ import { onCancel } from 'src/actions/suite/modalActions'; import { TranslationKey } from 'src/components/suite/Translation'; import { SUITE } from 'src/actions/suite/constants'; - const ImageWrapper = styled.div` position: relative; width: 97.5%; diff --git a/packages/suite/src/components/suite/modals/ModalSwitcher/ForegroundAppModal.tsx b/packages/suite/src/components/suite/modals/ModalSwitcher/ForegroundAppModal.tsx index 632aa6ed3f4..a1410e0dcb3 100644 --- a/packages/suite/src/components/suite/modals/ModalSwitcher/ForegroundAppModal.tsx +++ b/packages/suite/src/components/suite/modals/ModalSwitcher/ForegroundAppModal.tsx @@ -15,7 +15,6 @@ import { BridgeRequested } from 'src/views/suite/bridge-requested'; import { MultiShareBackupModal } from '../ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal'; - // would not work if defined directly in the switch const FirmwareType = () => ; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx index 1d3304920fe..dcb4989647e 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceConfirmationModal/NoBackupModal.tsx @@ -7,7 +7,6 @@ import { Translation } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite/useDispatch'; import { SettingsAnchor } from 'src/constants/suite/anchors'; - export const NoBackupModal = () => { const dispatch = useDispatch(); diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModalContent.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModalContent.tsx index e6552baa8f2..48a20baf901 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModalContent.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewModalContent.tsx @@ -32,7 +32,6 @@ import { TransactionReviewSummary } from './TransactionReviewSummary'; import { TransactionReviewOutputList } from './TransactionReviewOutputList/TransactionReviewOutputList'; import { TransactionReviewEvmExplanation } from './TransactionReviewEvmExplanation'; - const StyledModal = styled(Modal)` ${Modal.Body} { padding: 10px; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutput.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutput.tsx index 95eab9ff959..505776af8be 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutput.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewOutputList/TransactionReviewOutput.tsx @@ -20,8 +20,6 @@ import { OutputElementLine, } from './TransactionReviewOutputElement'; - - const getFeeLabel = (networkType: Account['networkType']) => { switch (networkType) { case 'ethereum': diff --git a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewSummary.tsx b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewSummary.tsx index 2320a7fa48b..097f68341af 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewSummary.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/TransactionReviewModal/TransactionReviewSummary.tsx @@ -15,7 +15,6 @@ import { Account } from 'src/types/wallet'; import { useSelector } from 'src/hooks/suite/useSelector'; import { selectLabelingDataForSelectedAccount } from 'src/reducers/suite/metadataReducer'; - const Wrapper = styled.div` padding: 20px 15px 12px; display: flex; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx index 2438a02266f..632fe960428 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeDescription.tsx @@ -12,7 +12,6 @@ import { Translation } from 'src/components/suite'; import { LearnMoreButton } from 'src/components/suite/LearnMoreButton'; import { useTranslation } from 'src/hooks/suite'; - interface AccountTypeDescriptionProps { bip43Path: Bip43PathTemplate; accountType?: AccountType; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx index 970be85f2e7..e6d481a44b8 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/AdvancedCoinSettingsModal.tsx @@ -10,7 +10,6 @@ import { useSelector } from 'src/hooks/suite'; import { CustomBackends } from './CustomBackends/CustomBackends'; - const Section = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/CustomBackends.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/CustomBackends.tsx index 7f4905d801e..192fb4be57d 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/CustomBackends.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AdvancedCoinSettingsModal/CustomBackends/CustomBackends.tsx @@ -17,7 +17,6 @@ import { BackendInput } from './BackendInput'; import { BackendTypeSelect } from './BackendTypeSelect'; import { TorModal, TorResult } from './TorModal'; - const Wrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx index 2a31ddb16d6..d0cda63bad4 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModal.tsx @@ -10,7 +10,6 @@ import { Dispatch, GetState } from 'src/types/suite'; import { onCancel } from 'src/actions/suite/modalActions'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; - interface ConfirmUnverifiedModalProps { action: { event: () => (dispatch: Dispatch) => void; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx index 0429e72ee79..4ff1b5509d1 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/CriticalCoinjoinPhaseModal/CoinjoinPhaseProgress.tsx @@ -9,7 +9,6 @@ import { SESSION_PHASE_MESSAGES } from 'src/constants/suite/coinjoin'; import { Translation } from 'src/components/suite/Translation'; import { CountdownTimer } from 'src/components/suite/CountdownTimer'; - const Container = styled.div` padding: ${spacingsPx.xxl} ${spacingsPx.xxxl} 0; `; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DisableTorModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DisableTorModal.tsx index 65e745c1d3f..86e5ac1a37b 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DisableTorModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/DisableTorModal.tsx @@ -15,7 +15,6 @@ import { isOnionUrl } from 'src/utils/suite/tor'; import { useCustomBackends } from 'src/hooks/settings/backends'; import { AdvancedCoinSettingsModal } from 'src/components/suite/modals'; - const BackendRowWrapper = styled.div` display: flex; width: 100%; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MetadataProviderModal/MetadataProviderModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MetadataProviderModal/MetadataProviderModal.tsx index f529a9d0182..08d9a4a18ba 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MetadataProviderModal/MetadataProviderModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MetadataProviderModal/MetadataProviderModal.tsx @@ -10,7 +10,6 @@ import { useDispatch } from 'src/hooks/suite'; import { connectProvider } from 'src/actions/suite/metadataProviderActions'; import { MetadataProviderType } from 'src/types/suite/metadata'; - import { DropboxLogo } from './DropboxLogo'; import { GoogleDriveLogo } from './GoogleDriveLogo'; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal.tsx index 6766cfc9946..d912143274f 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupModal.tsx @@ -21,7 +21,6 @@ import { isAdditionalShamirBackupInProgress } from '../../../../../../utils/devi import { MultiShareBackupStep3VerifyOwnership } from './MultiShareBackupStep3VerifyOwnership'; import { MultiShareBackupStep4BackupSeed } from './MultiShareBackupStep4BackupSeed'; - type Steps = 'first-info' | 'second-info' | 'verify-ownership' | 'backup-seed' | 'done'; type MultiShareBackupModalProps = { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep5Done.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep5Done.tsx index 741cf8d7199..a4da4c17bec 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep5Done.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/MultiShareBackupModal/MultiShareBackupStep5Done.tsx @@ -10,7 +10,6 @@ import { Translation } from 'src/components/suite'; import { Body, Section } from './multiShareModalLayout'; - const GradientCallout = styled.div` background-image: linear-gradient( to right, diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx index b76230c324a..dc5ca558ab6 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/SafetyChecksModal.tsx @@ -16,7 +16,6 @@ import { useDevice, useDispatch } from 'src/hooks/suite'; import { Translation } from 'src/components/suite'; import { applySettings } from 'src/actions/settings/deviceSettingsActions'; - /** * A Modal that allows user to set the `safety_checks` feature of connected Trezor. * Only supports setting it to `Strict` or `PromptTemporarily`. diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/EstimatedGains.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/EstimatedGains.tsx index 51cd482af25..98efe4ca743 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/EstimatedGains.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/EstimatedGains.tsx @@ -14,7 +14,6 @@ import { CRYPTO_INPUT } from 'src/types/wallet/stakeForms'; import { FiatValue, FormattedCryptoAmount, TrezorLink } from 'src/components/suite'; import { calculateGains } from 'src/utils/suite/stake'; - const Heading = styled.div` margin-bottom: ${spacingsPx.xl}; `; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/StakingInfoCards.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/StakingInfoCards.tsx index 8c4e81ff297..9f6f3bcbbed 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/StakingInfoCards.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/StakeModal/StakingInfoCards/StakingInfoCards.tsx @@ -6,7 +6,6 @@ import { StakingInfo } from 'src/components/suite/StakingProcess/StakingInfo'; import { EstimatedGains } from './EstimatedGains'; - export const StakingInfoCards = () => { const cards = [ { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx index a99c63970f5..e5e4c8fa0fa 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/Data.tsx @@ -7,7 +7,6 @@ import { TranslationKey } from '@suite-common/intl-types'; import { Translation } from 'src/components/suite'; - const Container = styled.div` display: grid; grid-template-columns: 130px 3fr; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx index 8415fb0b7a5..749ff18c6ee 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/AdvancedTxDetails/IODetails/IODetails.tsx @@ -17,7 +17,6 @@ import { FormattedNftAmount } from 'src/components/suite/FormattedNftAmount'; import { AnalyzeInExplorerBanner } from './AnalyzeInExplorerBanner'; import { IOAddress } from '../../IOAddress'; - export const blurFix = css` margin-left: -10px; margin-right: -10px; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx index 44d1055be0f..d228dab9c46 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/BasicTxDetails.tsx @@ -21,7 +21,6 @@ import { TransactionHeader } from 'src/components/wallet/TransactionItem/Transac import { IOAddress } from './IOAddress'; - const Wrapper = styled.div<{ $elevation: Elevation }>` background: ${mapElevationToBackground}; padding: ${spacingsPx.lg}; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx index b0a4a5d6bf7..b8ee5a4144f 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/ChangeFee.tsx @@ -16,7 +16,6 @@ import { AffectedTransactions } from './AffectedTransactions'; import { DecreasedOutputs } from './DecreasedOutputs'; import { ReplaceTxButton } from './ReplaceTxButton'; - const Wrapper = styled.div` margin: 12px 0; `; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/DecreasedOutputs.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/DecreasedOutputs.tsx index fed8d17ec93..f67534611ac 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/DecreasedOutputs.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/ChangeFee/DecreasedOutputs.tsx @@ -14,7 +14,6 @@ import { useRbfContext } from 'src/hooks/wallet/useRbfForm'; import { GreyCard } from './GreyCard'; import { WarnHeader } from './WarnHeader'; - const OutputsWrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx index 1e03a6430b4..8e6d225e76c 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/IOAddress.tsx @@ -5,7 +5,6 @@ import styled, { css, useTheme } from 'styled-components'; import { Icon, Link, Paragraph } from '@trezor/components'; import { copyToClipboard } from '@trezor/dom-utils'; - import { HiddenPlaceholder } from 'src/components/suite/HiddenPlaceholder'; const IconWrapper = styled.div` diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/TxDetailModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/TxDetailModal.tsx index 101ba9628d0..97b3b123c28 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/TxDetailModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/TxDetailModal/TxDetailModal.tsx @@ -22,7 +22,6 @@ import { BasicTxDetails } from './BasicTxDetails'; import { AdvancedTxDetails, TabID } from './AdvancedTxDetails/AdvancedTxDetails'; import { ChangeFee } from './ChangeFee/ChangeFee'; - const PhishingBanner = styled.div` margin-bottom: ${spacingsPx.xs}; padding: ${spacingsPx.xs} ${spacingsPx.sm}; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx index 65be5014a50..063ac30ab82 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/Inputs.tsx @@ -13,7 +13,6 @@ import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReduce import { validateDecimals, validateLimitsBigNum, validateMin } from 'src/utils/suite/validation'; import { useUnstakeEthFormContext } from 'src/hooks/wallet/useUnstakeEthForm'; - const HStack = styled.div` display: flex; gap: 14px; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx index 0bce3a08a91..ce65ff37568 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm/UnstakeEthForm.tsx @@ -17,8 +17,6 @@ import { ApproximateInstantEthAmount } from 'src/views/wallet/staking/components import { Options } from './Options'; import UnstakeFees from './Fees'; - - const DividerWrapper = styled.div` & > div { background: ${({ theme }) => theme.borderElevation2}; diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx index 43cd16618b3..9040cb8704f 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeModal.tsx @@ -20,7 +20,6 @@ import { UnstakeEthFormContext, useUnstakeEthForm } from 'src/hooks/wallet/useUn import { UnstakeButton } from './UnstakeEthForm/UnstakeButton'; import { UnstakeEthForm } from './UnstakeEthForm/UnstakeEthForm'; - interface UnstakeModalModalProps { onCancel?: () => void; } diff --git a/packages/suite/src/components/suite/notifications/NotificationRenderer/CoinProtocolRenderer.tsx b/packages/suite/src/components/suite/notifications/NotificationRenderer/CoinProtocolRenderer.tsx index 2576197f7c9..4c224974b92 100644 --- a/packages/suite/src/components/suite/notifications/NotificationRenderer/CoinProtocolRenderer.tsx +++ b/packages/suite/src/components/suite/notifications/NotificationRenderer/CoinProtocolRenderer.tsx @@ -12,7 +12,6 @@ import { Translation } from 'src/components/suite'; import { useDispatch, useSelector } from 'src/hooks/suite'; import type { NotificationRendererProps } from 'src/components/suite'; - import { ConditionalActionRenderer } from './ConditionalActionRenderer'; const Row = styled.span` diff --git a/packages/suite/src/components/suite/notifications/ToastNotification.tsx b/packages/suite/src/components/suite/notifications/ToastNotification.tsx index e4384a154c9..eb948b0c211 100644 --- a/packages/suite/src/components/suite/notifications/ToastNotification.tsx +++ b/packages/suite/src/components/suite/notifications/ToastNotification.tsx @@ -12,7 +12,6 @@ import { getNotificationIcon, getVariantColor } from 'src/utils/suite/notificati import { ToastNotificationVariant } from '../../../types/suite'; - const Wrapper = styled.div<{ $variant: ToastNotificationVariant; $isTall: boolean }>` display: flex; align-items: ${({ $isTall }) => ($isTall ? 'start' : 'center')}; diff --git a/packages/suite/src/components/wallet/Fees/CustomFee.tsx b/packages/suite/src/components/wallet/Fees/CustomFee.tsx index da145124a18..fd47b570f45 100644 --- a/packages/suite/src/components/wallet/Fees/CustomFee.tsx +++ b/packages/suite/src/components/wallet/Fees/CustomFee.tsx @@ -35,8 +35,6 @@ import { LearnMoreButton } from 'src/components/suite/LearnMoreButton'; import { InputError } from '../InputError'; - - const Wrapper = styled.div` display: flex; width: 100%; diff --git a/packages/suite/src/components/wallet/Fees/Fees.tsx b/packages/suite/src/components/wallet/Fees/Fees.tsx index 2a470c32233..3e346f781f6 100644 --- a/packages/suite/src/components/wallet/Fees/Fees.tsx +++ b/packages/suite/src/components/wallet/Fees/Fees.tsx @@ -30,8 +30,6 @@ import { ExtendedMessageDescriptor } from 'src/types/suite'; import { CustomFee } from './CustomFee'; import { FeeDetails } from './FeeDetails'; - - const Container = styled.div` overflow: hidden; /* prevent scrollbar when custom fee is opened */ width: 100%; diff --git a/packages/suite/src/components/wallet/TransactionItem/InstantStakeBadge.tsx b/packages/suite/src/components/wallet/TransactionItem/InstantStakeBadge.tsx index 9a2bcc34dd4..3095b3e9249 100644 --- a/packages/suite/src/components/wallet/TransactionItem/InstantStakeBadge.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/InstantStakeBadge.tsx @@ -14,8 +14,6 @@ import { WalletAccountTransaction } from 'src/types/wallet'; import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer'; import { getInstantStakeType } from 'src/utils/suite/stake'; - - const Wrapper = styled.div` display: flex; gap: ${spacingsPx.xxs}; diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionItem.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionItem.tsx index 67c6c84d30f..4f1fd64a176 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionItem.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionItem.tsx @@ -45,8 +45,6 @@ import { } from './CommonComponents'; import { BlurWrapper } from './TransactionItemBlurWrapper'; - - // eslint-disable-next-line local-rules/no-override-ds-component const Wrapper = styled(Card)<{ $isPending: boolean; diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionRow.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionRow.tsx index d6471e53243..2cc8e4df9b7 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionRow.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionRow.tsx @@ -18,8 +18,6 @@ import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { TransactionTargetLayout } from './TransactionTargetLayout'; import { StyledFormattedCryptoAmount } from './CommonComponents'; - - export const CustomRow = ({ transaction, title, diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TargetAddressLabel.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TargetAddressLabel.tsx index 2173e134ec9..018af01b24d 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TargetAddressLabel.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TargetAddressLabel.tsx @@ -7,7 +7,6 @@ import { WalletAccountTransaction } from 'src/types/wallet'; import { Translation, AddressLabeling } from 'src/components/suite'; import { AccountLabels } from 'src/types/suite/metadata'; - const TruncatedSpan = styled.span<{ $isBlurred?: boolean }>` overflow: hidden; text-overflow: ellipsis; diff --git a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TransactionTarget.tsx b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TransactionTarget.tsx index 0840e5172d1..9d5e79e7256 100644 --- a/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TransactionTarget.tsx +++ b/packages/suite/src/components/wallet/TransactionItem/TransactionTarget/TransactionTarget.tsx @@ -24,7 +24,6 @@ import { TargetAddressLabel } from './TargetAddressLabel'; import { TransactionTargetLayout } from '../TransactionTargetLayout'; import { StyledFormattedCryptoAmount, StyledFormattedNftAmount } from '../CommonComponents'; - interface BaseTransfer { singleRowLayout?: boolean; useAnimation?: boolean; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/AccountBanners.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/AccountBanners.tsx index 872250203dc..32faa5babea 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/AccountBanners.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/AccountBanners.tsx @@ -19,9 +19,6 @@ import { StakeEthBanner } from './StakeEthBanner'; import { EvmExplanationBanner } from './EvmExplanationBanner'; import { TaprootBanner } from './TaprootBanner'; - - - const BannersWrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/ContextMessage.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/ContextMessage.tsx index 79d0f251eed..d8f439eed47 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/ContextMessage.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/ContextMessage.tsx @@ -7,7 +7,6 @@ import { NotificationCard } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { selectLanguage } from 'src/reducers/suite/suiteReducer'; - type ContextMessageProps = { context: (typeof Context)[keyof typeof Context]; }; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/XRPReserve.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/XRPReserve.tsx index d47a8e996d3..be8c888fee6 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountBanners/XRPReserve.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountBanners/XRPReserve.tsx @@ -5,7 +5,6 @@ import { HELP_CENTER_XRP_URL } from '@trezor/urls'; import { NotificationCard, Translation } from 'src/components/suite'; import type { Account } from 'src/types/wallet/index'; - interface XRPReserveProps { account: Account | undefined; } diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountGroup.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountGroup.tsx index ede3185a339..4aa1242f81b 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountGroup.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountGroup.tsx @@ -10,7 +10,6 @@ import { Account } from 'src/types/wallet'; import { AnimationWrapper } from '../../AnimationWrapper'; - const ICON_SIZE = 18; const IconWrapper = styled.div<{ $isActive: boolean }>` diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx index a47fb9028bf..a6a2d65e5d1 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountItemsGroup.tsx @@ -13,7 +13,6 @@ import { useSelector } from 'src/hooks/suite'; import { selectLocalCurrency } from 'src/reducers/wallet/settingsReducer'; import { selectRouteName } from 'src/reducers/suite/routerReducer'; - import { AccountItem } from './AccountItem'; const Section = styled.div<{ $selected?: boolean }>` diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx index 3923e2705d3..45495cf51cd 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx @@ -17,7 +17,6 @@ import { AccountsList } from './AccountsList'; import { AccountsMenuNotice } from './AccountsMenuNotice'; import { RefreshAfterDiscoveryNeeded } from './RefreshAfterDiscoveryNeeded'; - const Wrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx index b33cf7488b9..a94e437244f 100644 --- a/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx +++ b/packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AddAccountButton.tsx @@ -6,7 +6,6 @@ import { TrezorDevice } from 'src/types/suite'; import { useDiscovery, useDispatch } from 'src/hooks/suite'; import { openModal } from 'src/actions/suite/modalActions'; - const getExplanationMessage = (device: TrezorDevice | undefined, discoveryIsRunning: boolean) => { let message; if (device && !device.connected) { diff --git a/packages/suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx b/packages/suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx index fc29e3d69be..1c47a0454dc 100644 --- a/packages/suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx +++ b/packages/suite/src/hooks/suite/__tests__/useFilteredModal.test.tsx @@ -8,7 +8,6 @@ import type { State as ModalState } from 'src/reducers/suite/modalReducer'; import { useFilteredModal } from '../useFilteredModal'; import { filters, fixtures } from '../__fixtures__/useFilteredModal'; - const mockStore = configureStore<{ modal: ModalState }, any>(); type Result = ModalState | null; diff --git a/packages/suite/src/hooks/suite/useDefaultAccountLabel.ts b/packages/suite/src/hooks/suite/useDefaultAccountLabel.ts index b420a9f34c4..dc7f7a4bf6d 100644 --- a/packages/suite/src/hooks/suite/useDefaultAccountLabel.ts +++ b/packages/suite/src/hooks/suite/useDefaultAccountLabel.ts @@ -5,7 +5,6 @@ import { AccountType, NetworkSymbol } from '@suite-common/wallet-config'; import { useTranslation } from './useTranslation'; - export interface GetDefaultAccountLabelParams { accountType: AccountType; symbol: NetworkSymbol; diff --git a/packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts b/packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts index df118815da9..5cc6d29d321 100644 --- a/packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts +++ b/packages/suite/src/hooks/suite/useFiatFromCryptoValue.ts @@ -1,4 +1,3 @@ - import { NetworkSymbol } from '@suite-common/wallet-config'; import { getFiatRateKey, toFiatCurrency } from '@suite-common/wallet-utils'; import { selectFiatRatesByFiatRateKey } from '@suite-common/wallet-core'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx index c634833da7b..e4cd467e4f2 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues.tsx @@ -15,7 +15,6 @@ import { } from 'src/constants/wallet/coinmarket/form'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; - export const useCoinmarketBuyFormDefaultValues = ( accountSymbol: Account['symbol'], buyInfo: BuyInfo | undefined, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts index f3b11122b4d..46d329ade91 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketSellForm.ts @@ -55,7 +55,6 @@ import { useCoinmarketCurrencySwitcher } from 'src/hooks/wallet/coinmarket/form/ import { useCoinmarketAccount } from 'src/hooks/wallet/coinmarket/form/common/useCoinmarketAccount'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; - import { useCoinmarketInitializer } from './common/useCoinmarketInitializer'; export const useCoinmarketSellForm = ({ diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx index bfe9724702f..d5ddf2cfd37 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketVerifyAccount.tsx @@ -26,7 +26,6 @@ import { } from 'src/types/coinmarket/coinmarketVerify'; import { useAccountAddressDictionary } from 'src/hooks/wallet/useAccounts'; - const getSelectAccountOptions = ( suiteReceiveAccounts: Account[] | undefined, device: TrezorDevice | undefined, diff --git a/packages/suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts b/packages/suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts index ba8a834f8be..b18174da3b5 100644 --- a/packages/suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts +++ b/packages/suite/src/hooks/wallet/useCoinmarketRecomposeAndSign.ts @@ -1,6 +1,5 @@ import { useCallback } from 'react'; - import { notificationsActions } from '@suite-common/toast-notifications'; import { DEFAULT_VALUES, DEFAULT_PAYMENT } from '@suite-common/wallet-constants'; import { FormState } from '@suite-common/wallet-types'; diff --git a/packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts b/packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts index 60457f5276e..5cecfd9e454 100644 --- a/packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts +++ b/packages/suite/src/hooks/wallet/useCoinmarketRedirect.ts @@ -9,7 +9,6 @@ import * as coinmarketBuyActions from 'src/actions/wallet/coinmarketBuyActions'; import * as coinmarketSellActions from 'src/actions/wallet/coinmarketSellActions'; import { saveComposedTransactionInfo } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; - interface OfferRedirectParams { symbol: Account['symbol']; index: Account['index']; diff --git a/packages/suite/src/hooks/wallet/useSendForm.ts b/packages/suite/src/hooks/wallet/useSendForm.ts index 1beb91cf8e1..4e87f43c383 100644 --- a/packages/suite/src/hooks/wallet/useSendForm.ts +++ b/packages/suite/src/hooks/wallet/useSendForm.ts @@ -38,7 +38,6 @@ import { useBitcoinAmountUnit } from './useBitcoinAmountUnit'; import { useUtxoSelection } from './form/useUtxoSelection'; import { useExcludedUtxos } from './form/useExcludedUtxos'; - export const SendContext = createContext(null); SendContext.displayName = 'SendContext'; diff --git a/packages/suite/src/reducers/suite/__tests__/protocolReducer.test.ts b/packages/suite/src/reducers/suite/__tests__/protocolReducer.test.ts index 14b6ba6c29a..eee215605db 100644 --- a/packages/suite/src/reducers/suite/__tests__/protocolReducer.test.ts +++ b/packages/suite/src/reducers/suite/__tests__/protocolReducer.test.ts @@ -3,7 +3,6 @@ import type { Action } from 'src/types/suite'; import protocolReducer, { State } from '../protocolReducer'; import fixtures from '../__fixtures__/protocolReducer'; - describe('Protocol reducer', () => { fixtures.forEach(f => { it(f.description, () => { diff --git a/packages/suite/src/reducers/wallet/__tests__/coinjoinReducer.test.ts b/packages/suite/src/reducers/wallet/__tests__/coinjoinReducer.test.ts index 614bac25e52..65db9af53f3 100644 --- a/packages/suite/src/reducers/wallet/__tests__/coinjoinReducer.test.ts +++ b/packages/suite/src/reducers/wallet/__tests__/coinjoinReducer.test.ts @@ -8,7 +8,6 @@ import { } from '../coinjoinReducer'; import { actionFixtures, selectorFixtures } from '../__fixtures__/coinjoinReducer'; - describe('Coinjoin reducer actions', () => { actionFixtures.forEach(f => { it(f.description, () => { diff --git a/packages/suite/src/reducers/wallet/receiveReducer.ts b/packages/suite/src/reducers/wallet/receiveReducer.ts index aa67a486273..9545214bdec 100644 --- a/packages/suite/src/reducers/wallet/receiveReducer.ts +++ b/packages/suite/src/reducers/wallet/receiveReducer.ts @@ -5,7 +5,6 @@ import { ReceiveInfo } from '@suite-common/wallet-types'; import { RECEIVE } from 'src/actions/wallet/constants'; import { Action as SuiteAction } from 'src/types/suite'; - export type State = ReceiveInfo[]; const showAddress = (draft: State, path: string, address: string) => { diff --git a/packages/suite/src/reducers/wallet/settingsReducer.ts b/packages/suite/src/reducers/wallet/settingsReducer.ts index a2a9c57fa80..f099d7feb9e 100644 --- a/packages/suite/src/reducers/wallet/settingsReducer.ts +++ b/packages/suite/src/reducers/wallet/settingsReducer.ts @@ -8,7 +8,6 @@ import { WALLET_SETTINGS } from 'src/actions/settings/constants'; import * as walletSettingsActions from 'src/actions/settings/walletSettingsActions'; import { Action, AppState } from 'src/types/suite'; - export type State = WalletSettings; export const initialState: State = { diff --git a/packages/suite/src/services/suite/metadata/DropboxProvider.ts b/packages/suite/src/services/suite/metadata/DropboxProvider.ts index 60f2eaa124a..288199b88b7 100644 --- a/packages/suite/src/services/suite/metadata/DropboxProvider.ts +++ b/packages/suite/src/services/suite/metadata/DropboxProvider.ts @@ -9,7 +9,6 @@ import { getOauthReceiverUrl, } from 'src/utils/suite/oauth'; - // Dropbox messed up types, that's why @ts-expect-error occurs in this file class DropboxProvider extends AbstractMetadataProvider { diff --git a/packages/suite/src/support/extraDependencies.ts b/packages/suite/src/support/extraDependencies.ts index b9ad8fb7d65..2c5127b54ce 100644 --- a/packages/suite/src/support/extraDependencies.ts +++ b/packages/suite/src/support/extraDependencies.ts @@ -40,8 +40,6 @@ import { AppState, ButtonRequest, TrezorDevice } from '../types/suite'; import { METADATA, STORAGE } from '../actions/suite/constants'; import { selectSuiteSettings } from '../reducers/suite/suiteReducer'; - - const connectSrc = resolveStaticPath('connect/'); // 'https://localhost:8088/'; // 'https://connect.corp.sldev.cz/develop/'; diff --git a/packages/suite/src/support/suite/useTor.tsx b/packages/suite/src/support/suite/useTor.tsx index 371f20ac0e8..3e92b348cc0 100644 --- a/packages/suite/src/support/suite/useTor.tsx +++ b/packages/suite/src/support/suite/useTor.tsx @@ -14,7 +14,6 @@ import { } from 'src/actions/suite/suiteActions'; import { selectTorState } from 'src/reducers/suite/suiteReducer'; - export const useTor = () => { const { torBootstrap, isTorEnabling } = useSelector(selectTorState); const dispatch = useDispatch(); diff --git a/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts b/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts index bff8cc2f18a..342a6960d16 100644 --- a/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts +++ b/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts @@ -36,8 +36,6 @@ import { CoinmarketTradeType, } from 'src/types/coinmarket/coinmarket'; - - export const cryptoPlatformSeparator = '--'; interface ParsedCryptoId { diff --git a/packages/suite/src/utils/wallet/graph/utils.ts b/packages/suite/src/utils/wallet/graph/utils.ts index d0a8971f435..a09b770cd6b 100644 --- a/packages/suite/src/utils/wallet/graph/utils.ts +++ b/packages/suite/src/utils/wallet/graph/utils.ts @@ -11,7 +11,6 @@ import { FiatCurrencyCode } from '@suite-common/suite-config'; import { CommonAggregatedHistory, GraphData, GraphRange, GraphScale } from 'src/types/wallet/graph'; - import { ObjectType, TypeName, sumFiatValueMapInPlace } from './utilsShared'; export const deviceGraphDataFilterFn = (d: GraphData, deviceState: StaticSessionId | undefined) => { diff --git a/packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx b/packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx index c0babb42700..8146112d549 100644 --- a/packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/AssetsView.tsx @@ -28,8 +28,6 @@ import { useNetworkSupport } from 'src/hooks/settings/useNetworkSupport'; import { AssetCard, AssetCardSkeleton } from './AssetCard/AssetCard'; import { AssetTable } from './AssetTable/AssetTable'; - - const InfoMessage = styled.div` padding: ${spacingsPx.md} ${spacingsPx.xl}; display: flex; diff --git a/packages/suite/src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx b/packages/suite/src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx index a0f5c6ac90d..acc280f026c 100644 --- a/packages/suite/src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx +++ b/packages/suite/src/views/dashboard/AssetsView/CoinmarketBuyButton.tsx @@ -8,8 +8,6 @@ import * as routerActions from 'src/actions/suite/routerActions'; import { Translation } from 'src/components/suite'; import { useDispatch, useAccountSearch } from 'src/hooks/suite'; - - type CoinmarketBuyButtonProps = { symbol: NetworkSymbol; 'data-testid'?: string; diff --git a/packages/suite/src/views/dashboard/AssetsView/assetsViewUtils.ts b/packages/suite/src/views/dashboard/AssetsView/assetsViewUtils.ts index 7ffc7ebe78e..3dae8884a23 100644 --- a/packages/suite/src/views/dashboard/AssetsView/assetsViewUtils.ts +++ b/packages/suite/src/views/dashboard/AssetsView/assetsViewUtils.ts @@ -1,4 +1,3 @@ - import { FiatCurrencyCode } from '@suite-common/suite-config'; import { TokenDefinition } from '@suite-common/token-definitions'; import { NetworkSymbol } from '@suite-common/wallet-config'; diff --git a/packages/suite/src/views/dashboard/DashboardPassphraseBanner.tsx b/packages/suite/src/views/dashboard/DashboardPassphraseBanner.tsx index 88b3026cc08..a5cffcd0b02 100644 --- a/packages/suite/src/views/dashboard/DashboardPassphraseBanner.tsx +++ b/packages/suite/src/views/dashboard/DashboardPassphraseBanner.tsx @@ -16,7 +16,6 @@ import { selectSuiteFlags } from 'src/reducers/suite/suiteReducer'; import { bannerAnimationConfig } from './banner-animations'; - const Container = styled(motion.div)` width: 100%; `; diff --git a/packages/suite/src/views/dashboard/PromoBanner.tsx b/packages/suite/src/views/dashboard/PromoBanner.tsx index f6f1646cfad..10eda006707 100644 --- a/packages/suite/src/views/dashboard/PromoBanner.tsx +++ b/packages/suite/src/views/dashboard/PromoBanner.tsx @@ -13,7 +13,6 @@ import { useLayoutSize } from 'src/hooks/suite/useLayoutSize'; import { HORIZONTAL_LAYOUT_PADDINGS } from 'src/constants/suite/layout'; import { useSelector } from 'src/hooks/suite'; - const Container = styled.div` position: absolute; bottom: 0; diff --git a/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx b/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx index f87648ee53b..2bbdc9bdc1d 100644 --- a/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx +++ b/packages/suite/src/views/dashboard/T3T1PromoBanner/T3T1PromoBanner.tsx @@ -15,8 +15,6 @@ import { selectIsDashboardT3T1PromoBannerShown } from 'src/reducers/suite/suiteR import { setFlag } from 'src/actions/suite/suiteActions'; import { Translation, TrezorLink } from 'src/components/suite'; - - import { T3T1PromoLogo } from './T3T1PromoLogo'; import { bannerAnimationConfig } from '../banner-animations'; diff --git a/packages/suite/src/views/onboarding/steps/SelectBackupType/SelectBackupType.tsx b/packages/suite/src/views/onboarding/steps/SelectBackupType/SelectBackupType.tsx index 3338ed99582..a189606b5ac 100644 --- a/packages/suite/src/views/onboarding/steps/SelectBackupType/SelectBackupType.tsx +++ b/packages/suite/src/views/onboarding/steps/SelectBackupType/SelectBackupType.tsx @@ -33,7 +33,6 @@ import { OptionText, SelectedOption } from './OptionWithContent'; import { FloatingSelections } from './FloatingSelections'; import { typesToLabelMap } from './typesToLabelMap'; - const SELECT_ELEMENT_HEIGHT = 84; const SELECT_ELEMENT_HEIGHT_MOBILE = 62; diff --git a/packages/suite/src/views/password-manager/PasswordManager/EntryForm.tsx b/packages/suite/src/views/password-manager/PasswordManager/EntryForm.tsx index 426d179a391..c3f19155daf 100644 --- a/packages/suite/src/views/password-manager/PasswordManager/EntryForm.tsx +++ b/packages/suite/src/views/password-manager/PasswordManager/EntryForm.tsx @@ -15,7 +15,6 @@ import * as metadataUtils from 'src/utils/suite/metadata'; import { PATH } from 'src/actions/suite/constants/metadataPasswordsConstants'; import { getDisplayKey } from 'src/utils/suite/passwords'; - const FormWrapper = styled.div` display: flex; flex: 1; diff --git a/packages/suite/src/views/password-manager/PasswordManager/PasswordsList.tsx b/packages/suite/src/views/password-manager/PasswordManager/PasswordsList.tsx index 941498a67a3..4d308b976a3 100644 --- a/packages/suite/src/views/password-manager/PasswordManager/PasswordsList.tsx +++ b/packages/suite/src/views/password-manager/PasswordManager/PasswordsList.tsx @@ -14,8 +14,6 @@ import { } from './PasswordEntry'; import { EntryForm } from './EntryForm'; - - const Wrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/settings/SettingsDevice/MultiShareBackup.tsx b/packages/suite/src/views/settings/SettingsDevice/MultiShareBackup.tsx index cc061355723..d0a77ea84da 100644 --- a/packages/suite/src/views/settings/SettingsDevice/MultiShareBackup.tsx +++ b/packages/suite/src/views/settings/SettingsDevice/MultiShareBackup.tsx @@ -14,7 +14,6 @@ import { useDispatch, useSelector } from 'src/hooks/suite'; import { goto } from '../../../actions/suite/routerActions'; - const doesSupportMultiShare = (device: TrezorDevice | undefined): boolean => { if (device?.features === undefined) { return false; diff --git a/packages/suite/src/views/settings/SettingsGeneral/AutomaticUpdate.tsx b/packages/suite/src/views/settings/SettingsGeneral/AutomaticUpdate.tsx index ac5dcb5f676..2d63168d5df 100644 --- a/packages/suite/src/views/settings/SettingsGeneral/AutomaticUpdate.tsx +++ b/packages/suite/src/views/settings/SettingsGeneral/AutomaticUpdate.tsx @@ -10,7 +10,6 @@ import { SettingsAnchor } from 'src/constants/suite/anchors'; import { useSelector } from '../../../hooks/suite'; - const PositionedSwitch = styled.div` align-self: center; `; diff --git a/packages/suite/src/views/settings/SettingsLoader.tsx b/packages/suite/src/views/settings/SettingsLoader.tsx index 22f58e92b42..d1fbf0226bc 100644 --- a/packages/suite/src/views/settings/SettingsLoader.tsx +++ b/packages/suite/src/views/settings/SettingsLoader.tsx @@ -8,7 +8,6 @@ import { spacings, spacingsPx } from '@trezor/theme'; import { Translation } from 'src/components/suite'; - const Container = styled(motion.div)` background-color: ${({ theme }) => theme.backgroundTertiaryDefaultOnElevation0}; border-radius: 48px; diff --git a/packages/suite/src/views/suite/ErrorPage.tsx b/packages/suite/src/views/suite/ErrorPage.tsx index c8c5e1ad200..e9148ed4f01 100644 --- a/packages/suite/src/views/suite/ErrorPage.tsx +++ b/packages/suite/src/views/suite/ErrorPage.tsx @@ -4,7 +4,6 @@ import { Paragraph, H2, Button, Link, Image } from '@trezor/components'; import { Translation } from 'src/components/suite'; - const Wrapper = styled.div` display: flex; flex: 1; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx index 3af39084e4a..724fbbf37a5 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceItem.tsx @@ -14,7 +14,6 @@ import { AddWalletButton } from './AddWalletButton'; import { CardWithDevice } from '../CardWithDevice'; import { DeviceWarning } from './DeviceWarning'; - const WalletsWrapper = styled.div<{ $enabled: boolean }>` opacity: ${({ $enabled }) => ($enabled ? 1 : 0.5)}; pointer-events: ${({ $enabled }) => ($enabled ? 'unset' : 'none')}; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx index 0f5b287ae95..7f1b2e8a6b9 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/DeviceStatusText.tsx @@ -11,7 +11,6 @@ import { useWalletLabeling } from 'src/components/suite/labeling/WalletLabeling' import { DeviceConnectionText } from './DeviceConnectionText'; - type DeviceStatusTextProps = { onRefreshClick?: MouseEventHandler; device: TrezorDevice; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx index 4672dd392f4..6a6bdd581ea 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/ViewOnly.tsx @@ -11,7 +11,6 @@ import { useDispatch } from 'src/hooks/suite'; import { ViewOnlyRadios } from './ViewOnlyRadios'; import { ContentType } from '../types'; - type ViewOnlyProps = { setContentType: (contentType: ContentType) => void; instance: AcquiredDevice; diff --git a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx index 107d6b3549b..b44342f633e 100644 --- a/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx +++ b/packages/suite/src/views/suite/SwitchDevice/DeviceItem/WalletInstance.tsx @@ -31,7 +31,6 @@ import { ContentType } from '../types'; import { ViewOnly } from './ViewOnly'; import { EjectButton } from './EjectButton'; - const RelativeContainer = styled.div` position: relative; border-radius: 16px; diff --git a/packages/suite/src/views/suite/bridge-requested/index.tsx b/packages/suite/src/views/suite/bridge-requested/index.tsx index 49d1f3d0a97..d9497a2f5aa 100644 --- a/packages/suite/src/views/suite/bridge-requested/index.tsx +++ b/packages/suite/src/views/suite/bridge-requested/index.tsx @@ -12,7 +12,6 @@ import { goto } from 'src/actions/suite/routerActions'; import { useDispatch, useLayout } from 'src/hooks/suite'; import { AutoStart } from 'src/views/settings/SettingsGeneral/AutoStart'; - const StyledModal = styled(Modal)` ${Modal.BottomBar} { > * { diff --git a/packages/suite/src/views/suite/bridge/index.tsx b/packages/suite/src/views/suite/bridge/index.tsx index 46904b8e20e..eea739753a7 100644 --- a/packages/suite/src/views/suite/bridge/index.tsx +++ b/packages/suite/src/views/suite/bridge/index.tsx @@ -9,7 +9,6 @@ import { useDispatch, useSelector } from 'src/hooks/suite'; import { isWebUsb } from 'src/utils/suite/transport'; import { useOpenSuiteDesktop } from 'src/hooks/suite/useOpenSuiteDesktop'; - // eslint-disable-next-line local-rules/no-override-ds-component const StyledButton = styled(Button)` path { diff --git a/packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx b/packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx index 95722de74b1..35af050d14e 100644 --- a/packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx +++ b/packages/suite/src/views/view-only/ViewOnlyPromoContent.tsx @@ -30,8 +30,6 @@ import { setFlag } from '../../actions/suite/suiteActions'; import { IllustrativeExample } from './images/IllustrativeExample'; import { IllustrativeExampleArrow } from './images/IllustrativeExampleArrow'; - - const Callout = styled.div` display: flex; flex-direction: row; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentWaitingForUser.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentWaitingForUser.tsx index 7bc0c8eb0f9..8f09bf2997c 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentWaitingForUser.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailBuy/CoinmarketDetailBuyPaymentWaitingForUser.tsx @@ -13,7 +13,6 @@ import { createTxLink } from 'src/utils/wallet/coinmarket/buyUtils'; import { submitRequestForm } from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; import { useDispatch } from 'src/hooks/suite'; - const Wrapper = styled.div` display: flex; align-items: center; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx index e92f215e455..be9a3146da0 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellBankAccount.tsx @@ -11,7 +11,6 @@ import { formatIban } from 'src/utils/wallet/coinmarket/sellUtils'; import { CoinmarketTradeSellType } from 'src/types/coinmarket/coinmarket'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; - const Wrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx index 4e421cc25d2..7084e187702 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketOfferSell/CoinmarketOfferSellTransaction.tsx @@ -8,7 +8,6 @@ import { useCoinmarketWatchTrade } from 'src/hooks/wallet/coinmarket/useCoinmark import { CoinmarketTradeSellType } from 'src/types/coinmarket/coinmarket'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; - const Wrapper = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionStatus.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionStatus.tsx index 381a1cd5ec7..da29aff29e9 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionStatus.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketTransactions/CoinmarketTransaction/CoinmarketTransactionStatus.tsx @@ -10,8 +10,6 @@ import { getStatusMessage as getExchangeStatusMessage } from 'src/utils/wallet/c import { getStatusMessage as getSellStatusMessage } from 'src/utils/wallet/coinmarket/sellUtils'; import { Trade } from 'src/types/wallet/coinmarketCommonTypes'; - - const getBuyTradeData = (status: BuyTradeStatus, theme: DefaultTheme) => { const message = getBuyStatusMessage(status); diff --git a/packages/suite/src/views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx b/packages/suite/src/views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx index ba9d6f6b6f6..ff0cc01cbdb 100644 --- a/packages/suite/src/views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx +++ b/packages/suite/src/views/wallet/coinmarket/redirect/CoinmarketRedirect.tsx @@ -11,8 +11,6 @@ import { Account } from 'src/types/wallet'; import { useCoinmarketRedirect } from 'src/hooks/wallet/useCoinmarketRedirect'; import { Translation } from 'src/components/suite'; - - const Wrapper = styled.div` display: flex; justify-content: center; diff --git a/packages/suite/src/views/wallet/details/index.tsx b/packages/suite/src/views/wallet/details/index.tsx index 8574794e65b..1c85062612e 100644 --- a/packages/suite/src/views/wallet/details/index.tsx +++ b/packages/suite/src/views/wallet/details/index.tsx @@ -17,7 +17,6 @@ import { CoinjoinSetup } from './CoinjoinSetup/CoinjoinSetup'; import { RescanAccount } from './RescanAccount'; import { Row } from './Row'; - const Heading = styled.h3` color: ${({ theme }) => theme.legacy.TYPE_LIGHT_GREY}; font-size: ${variables.FONT_SIZE.SMALL}; diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx index f5c483091ec..e4850aa1b82 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/CoinControl/UtxoSelectionList.tsx @@ -13,7 +13,6 @@ import { useSendFormContext } from 'src/hooks/wallet'; import { UtxoSelection } from './UtxoSelection'; - const Wrapper = styled.section` border-bottom: 1px solid ${({ theme }) => theme.legacy.STROKE_GREY}; margin: 12px 0 16px; diff --git a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx index 90d2cd56f4a..3ee2b8112a3 100644 --- a/packages/suite/src/views/wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx +++ b/packages/suite/src/views/wallet/send/Options/BitcoinOptions/Locktime/Locktime.tsx @@ -12,7 +12,6 @@ import { useSelector, useTranslation } from 'src/hooks/suite'; import { useSendFormContext } from 'src/hooks/wallet'; import { NumberInput, Translation } from 'src/components/suite'; - import { canLocktimeTxBeBroadcast } from './canLocktimeTxBeBroadcast'; const Label = styled.div` diff --git a/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumData.tsx b/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumData.tsx index 71ed403018e..4f04e402479 100644 --- a/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumData.tsx +++ b/packages/suite/src/views/wallet/send/Options/EthereumOptions/EthereumData.tsx @@ -11,7 +11,6 @@ import { Translation } from 'src/components/suite'; import { useSendFormContext } from 'src/hooks/wallet'; import { useTranslation } from 'src/hooks/suite'; - const inputAsciiName = 'ethereumDataAscii'; const inputHexName = 'ethereumDataHex'; const inputAmountName = 'outputs.0.amount'; diff --git a/packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx b/packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx index 43d3977d1a0..5a7a3f79b0e 100644 --- a/packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx +++ b/packages/suite/src/views/wallet/send/Options/RippleOptions/DestinationTag.tsx @@ -8,7 +8,6 @@ import { Translation } from 'src/components/suite'; import { useSendFormContext } from 'src/hooks/wallet'; import { useTranslation } from 'src/hooks/suite'; - interface DestinationTagProps { close: () => void; } diff --git a/packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx b/packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx index 4f6b1527726..75807a937cb 100644 --- a/packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/Amount/FiatInput.tsx @@ -34,8 +34,6 @@ import { NumberInput } from 'src/components/suite'; import { useSelector, useTranslation } from 'src/hooks/suite'; import { validateDecimals } from 'src/utils/suite/validation'; - - const Wrapper = styled.div` display: flex; width: 100%; diff --git a/packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx b/packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx index 0edaf00967a..2f2b3a98b57 100644 --- a/packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx +++ b/packages/suite/src/views/wallet/send/Outputs/OpReturn.tsx @@ -10,7 +10,6 @@ import { Translation } from 'src/components/suite'; import { OpenGuideFromTooltip } from 'src/components/guide'; import { useTranslation } from 'src/hooks/suite'; - const Inputs = styled.div` display: flex; place-items: center space-between; diff --git a/packages/suite/src/views/wallet/send/SendRaw.tsx b/packages/suite/src/views/wallet/send/SendRaw.tsx index f3e57ed824d..dc2a9f34270 100644 --- a/packages/suite/src/views/wallet/send/SendRaw.tsx +++ b/packages/suite/src/views/wallet/send/SendRaw.tsx @@ -11,7 +11,6 @@ import { useDispatch, useTranslation } from 'src/hooks/suite'; import { Account } from 'src/types/wallet'; import { OpenGuideFromTooltip } from 'src/components/guide'; - const INPUT_NAME = 'rawTx'; type SendRawProps = { diff --git a/packages/suite/src/views/wallet/send/TotalSent/ReviewButton.tsx b/packages/suite/src/views/wallet/send/TotalSent/ReviewButton.tsx index fbf60396c6c..7abc4e30b69 100644 --- a/packages/suite/src/views/wallet/send/TotalSent/ReviewButton.tsx +++ b/packages/suite/src/views/wallet/send/TotalSent/ReviewButton.tsx @@ -10,7 +10,6 @@ import { useDevice } from 'src/hooks/suite'; import { useSendFormContext } from 'src/hooks/wallet'; import { Translation } from 'src/components/suite/Translation'; - const Container = styled.div` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx b/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx index c4a43b28ec0..ba440d591ba 100644 --- a/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx +++ b/packages/suite/src/views/wallet/send/TotalSent/TotalSent.tsx @@ -9,7 +9,6 @@ import { Translation, FiatValue, FormattedCryptoAmount } from 'src/components/su import { ReviewButton } from './ReviewButton'; - const Container = styled.div` position: sticky; top: 80px; diff --git a/packages/suite/src/views/wallet/sign-verify/components/ButtonRow.tsx b/packages/suite/src/views/wallet/sign-verify/components/ButtonRow.tsx index 680c4c8f1f7..6543e897667 100644 --- a/packages/suite/src/views/wallet/sign-verify/components/ButtonRow.tsx +++ b/packages/suite/src/views/wallet/sign-verify/components/ButtonRow.tsx @@ -7,7 +7,6 @@ import { Button, variables } from '@trezor/components'; import { Translation } from 'src/components/suite'; import { useLayoutSize } from 'src/hooks/suite'; - export const Row = styled.div` position: relative; display: flex; diff --git a/packages/suite/src/views/wallet/staking/components/CardanoStakingDashboard.tsx b/packages/suite/src/views/wallet/staking/components/CardanoStakingDashboard.tsx index 1d339f53a41..c9d74c11798 100644 --- a/packages/suite/src/views/wallet/staking/components/CardanoStakingDashboard.tsx +++ b/packages/suite/src/views/wallet/staking/components/CardanoStakingDashboard.tsx @@ -9,7 +9,6 @@ import { CardanoRewards } from './CardanoRewards'; import { CardanoStake } from './CardanoStake'; import { CardanoRedelegate } from './CardanoRedelegate'; - interface CardanoStakingDashboardProps { selectedAccount: SelectedAccountLoaded; } diff --git a/packages/suite/src/views/wallet/tokens/index.tsx b/packages/suite/src/views/wallet/tokens/index.tsx index 2c9d3a10013..fc4d79af225 100644 --- a/packages/suite/src/views/wallet/tokens/index.tsx +++ b/packages/suite/src/views/wallet/tokens/index.tsx @@ -9,7 +9,6 @@ import { CoinsTable } from './coins/CoinsTable'; import { TokensNavigation } from './TokensNavigation'; import { HiddenTokensTable } from './hidden-tokens/HiddenTokensTable'; - export const Tokens = () => { const [searchQuery, setSearchQuery] = useState(''); diff --git a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusWheel.tsx b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusWheel.tsx index 802b603a6d9..3ecec8c1361 100644 --- a/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusWheel.tsx +++ b/packages/suite/src/views/wallet/transactions/CoinjoinSummary/CoinjoinStatusWheel/CoinjoinStatusWheel.tsx @@ -12,7 +12,6 @@ import { stopCoinjoinSession } from 'src/actions/wallet/coinjoinClientActions'; import { CoinjoinStatusMessage } from './CoinjoinStatusMessage'; import { CoinjoinProgressWheel } from './CoinjoinProgressWheel'; - // eslint-disable-next-line local-rules/no-override-ds-component const Container = styled(Card)<{ $isWide?: boolean }>` position: relative; diff --git a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx index 8d974e89ffb..b8c1c36fb82 100644 --- a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx +++ b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBox.tsx @@ -11,7 +11,6 @@ import { Translation } from 'src/components/suite'; import { TradeBoxMenu } from './TradeBoxMenu'; import { TradeBoxPrices } from './TradeBoxPrices'; - // eslint-disable-next-line local-rules/no-override-ds-component const StyledCard = styled(Card)` flex-flow: row wrap; diff --git a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx index 50f27e4caf4..38108bb8109 100644 --- a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx +++ b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxMenu.tsx @@ -13,7 +13,6 @@ import { goto } from 'src/actions/suite/routerActions'; import { Translation } from 'src/components/suite'; import { useDevice, useDispatch } from 'src/hooks/suite'; - const Wrapper = styled.div` display: flex; gap: ${spacingsPx.sm}; diff --git a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx index 7fc28607b5c..5e1f2ca69a5 100644 --- a/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx +++ b/packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx @@ -9,7 +9,6 @@ import { networks } from '@suite-common/wallet-config'; import { PriceTicker, Translation, TrendTicker } from 'src/components/suite'; import { Account } from 'src/types/wallet'; - const Wrapper = styled.div` display: flex; gap: 42px; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/ExportAction.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/ExportAction.tsx index 922b644bb3a..4e20e3716cf 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/ExportAction.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/ExportAction.tsx @@ -16,7 +16,6 @@ import { exportTransactionsThunk } from 'src/actions/wallet/exportTransactionsAc import { Account } from 'src/types/wallet'; import { selectLabelingDataForSelectedAccount } from 'src/reducers/suite/metadataReducer'; - export interface ExportActionProps { account: Account; searchQuery: string; diff --git a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx index 1e0430d3602..e5e762f6100 100644 --- a/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx +++ b/packages/suite/src/views/wallet/transactions/TransactionList/TransactionListActions/TransactionListActions.tsx @@ -1,9 +1,7 @@ - import { Dispatch, SetStateAction, useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; - import { notificationsActions } from '@suite-common/toast-notifications'; import { fetchAllTransactionsForAccountThunk } from '@suite-common/wallet-core'; import { Account } from '@suite-common/wallet-types'; diff --git a/packages/suite/src/views/wallet/transactions/Transactions.tsx b/packages/suite/src/views/wallet/transactions/Transactions.tsx index e3515327efc..19923855b51 100644 --- a/packages/suite/src/views/wallet/transactions/Transactions.tsx +++ b/packages/suite/src/views/wallet/transactions/Transactions.tsx @@ -20,8 +20,6 @@ import { CoinjoinExplanation } from './CoinjoinExplanation/CoinjoinExplanation'; import { CoinjoinSummary } from './CoinjoinSummary/CoinjoinSummary'; import { TradeBox } from './TradeBox/TradeBox'; - - const AccountLayout = styled(WalletLayout)` display: flex; flex-direction: column; diff --git a/packages/suite/src/views/wallet/transactions/components/SummaryCards.tsx b/packages/suite/src/views/wallet/transactions/components/SummaryCards.tsx index ac92a211dd8..3dd1c08da42 100644 --- a/packages/suite/src/views/wallet/transactions/components/SummaryCards.tsx +++ b/packages/suite/src/views/wallet/transactions/components/SummaryCards.tsx @@ -12,7 +12,6 @@ import { sumFiatValueMap } from 'src/utils/wallet/graph'; import { InfoCard } from './InfoCard'; - const InfoCardsWrapper = styled.div` display: grid; margin-top: 20px; diff --git a/packages/utxo-lib/tests/compose.test.ts b/packages/utxo-lib/tests/compose.test.ts index 74a19c536d6..e89209b5431 100644 --- a/packages/utxo-lib/tests/compose.test.ts +++ b/packages/utxo-lib/tests/compose.test.ts @@ -6,7 +6,6 @@ import { verifyTxBytes } from './compose.utils'; import { composeTxFixture } from './__fixtures__/compose'; import { fixturesCrossCheck } from './__fixtures__/compose.crosscheck'; - jest.mock('@trezor/utils', () => ({ ...jest.requireActual('@trezor/utils'), getRandomInt: jest.fn(), diff --git a/packages/utxo-lib/tests/script.test.ts b/packages/utxo-lib/tests/script.test.ts index 1b1708dcaa0..e264d7a0855 100644 --- a/packages/utxo-lib/tests/script.test.ts +++ b/packages/utxo-lib/tests/script.test.ts @@ -4,7 +4,6 @@ import * as bscript from '../src/script'; import { fixtures } from './__fixtures__/script'; import { templates } from './__fixtures__/templates'; - describe('script', () => { // TODO describe('isCanonicalPubKey', () => { From 0d3742109343e9b970b37e8f136b87ffc68bd092 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 13:25:21 +0100 Subject: [PATCH 26/29] chore: remove all import/order offs --- packages/connect-web/eslint.config.mjs | 1 - packages/connect/eslint.config.mjs | 1 - packages/eslint/src/eslint.config.mjs | 1 - packages/request-manager/eslint.config.mjs | 1 - packages/suite-web/eslint.config.mjs | 1 - packages/suite/eslint.config.mjs | 1 - packages/transport/eslint.config.mjs | 1 - packages/utxo-lib/eslint.config.mjs | 1 - 8 files changed, 8 deletions(-) diff --git a/packages/connect-web/eslint.config.mjs b/packages/connect-web/eslint.config.mjs index 5569543a784..f81636fa2d8 100644 --- a/packages/connect-web/eslint.config.mjs +++ b/packages/connect-web/eslint.config.mjs @@ -7,7 +7,6 @@ export default [ 'no-underscore-dangle': 'off', // underscore is used camelcase: 'off', // camelcase is used 'jest/valid-expect': 'off', // because of cypress tests - 'import/order': 'off', // Todo: fix and solve }, }, ]; diff --git a/packages/connect/eslint.config.mjs b/packages/connect/eslint.config.mjs index e7f5b0b09fd..1838b0075e2 100644 --- a/packages/connect/eslint.config.mjs +++ b/packages/connect/eslint.config.mjs @@ -14,7 +14,6 @@ export default [ 'error', { additionalTestBlockFunctions: ['conditionalTest'] }, ], - 'import/order': 'off', // Todo: fix and solve 'import/no-default-export': 'off', // Todo: shall be solved one day, but now its heavily used }, }, diff --git a/packages/eslint/src/eslint.config.mjs b/packages/eslint/src/eslint.config.mjs index 8800186fcca..9d310dd721f 100644 --- a/packages/eslint/src/eslint.config.mjs +++ b/packages/eslint/src/eslint.config.mjs @@ -96,7 +96,6 @@ export default [ rules: { // '@typescript-eslint/no-shadow': 'off', 'import/no-default-export': 'off', - 'import/order': 'off', // 'no-console': 'off', // 'react/jsx-no-undef': 'off', // 'no-catch-shadow': 'off', diff --git a/packages/request-manager/eslint.config.mjs b/packages/request-manager/eslint.config.mjs index 4f1bd071bb6..ef851c90a97 100644 --- a/packages/request-manager/eslint.config.mjs +++ b/packages/request-manager/eslint.config.mjs @@ -6,7 +6,6 @@ export default [ files: ['**/e2e/**/*'], rules: { 'no-console': 'off', // used in e2e tests - 'import/order': 'off', // Todo: fix and solve }, }, ]; diff --git a/packages/suite-web/eslint.config.mjs b/packages/suite-web/eslint.config.mjs index 1691ab3b7ee..cd73ecac3ec 100644 --- a/packages/suite-web/eslint.config.mjs +++ b/packages/suite-web/eslint.config.mjs @@ -5,7 +5,6 @@ export default [ { rules: { 'jest/valid-expect': 'off', // because of cypress tests - 'import/order': 'off', // Todo: fix and solve 'import/no-default-export': 'off', // Todo: fix and solve 'no-console': 'off', // It's used in cypress tests }, diff --git a/packages/suite/eslint.config.mjs b/packages/suite/eslint.config.mjs index 488a8977c6b..cd720d3a866 100644 --- a/packages/suite/eslint.config.mjs +++ b/packages/suite/eslint.config.mjs @@ -11,7 +11,6 @@ export default [ }, ], 'no-restricted-syntax': 'off', // Todo: this should be fixed in codebase and this line removed - 'import/order': 'off', // Todo: fix and solve 'import/no-default-export': 'off', // Todo: shall be solved one day, usually its legacy Components 'no-console': 'off', // Todo: we use it a lot, shall be disabled more granulary I think }, diff --git a/packages/transport/eslint.config.mjs b/packages/transport/eslint.config.mjs index 4298837f58b..723658343d1 100644 --- a/packages/transport/eslint.config.mjs +++ b/packages/transport/eslint.config.mjs @@ -6,7 +6,6 @@ export default [ rules: { 'no-console': 'off', '@typescript-eslint/no-unused-vars': 'off', - 'import/order': 'off', // Todo: we shall enable this in future PR }, }, ]; diff --git a/packages/utxo-lib/eslint.config.mjs b/packages/utxo-lib/eslint.config.mjs index 7e85c09a1ee..4979e7c8960 100644 --- a/packages/utxo-lib/eslint.config.mjs +++ b/packages/utxo-lib/eslint.config.mjs @@ -8,7 +8,6 @@ export default [ 'prefer-object-spread': 'off', // prefer Object.assign 'no-underscore-dangle': 'off', // underscore is used 'no-console': 'warn', - 'import/order': 'off', '@typescript-eslint/no-unused-vars': 'off', }, }, From 2634229051e5e85ae43159122b78eeb6396e1aec Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 13:31:03 +0100 Subject: [PATCH 27/29] chore: ignore some rules in packages --- packages/connect-explorer/eslint.config.mjs | 9 +-------- packages/connect-web/eslint.config.mjs | 1 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/connect-explorer/eslint.config.mjs b/packages/connect-explorer/eslint.config.mjs index cf7306d7eef..79b467cd8f3 100644 --- a/packages/connect-explorer/eslint.config.mjs +++ b/packages/connect-explorer/eslint.config.mjs @@ -21,18 +21,11 @@ export default [ 'react/no-unescaped-entities': 'off', }, }, - - // Typescript { rules: { + 'import/no-default-export': 'off', // Todo: shall be fixed '@typescript-eslint/no-restricted-imports': 'off', '@typescript-eslint/no-shadow': 'off', - }, - }, - - // React - { - rules: { 'react/jsx-filename-extension': [ 'error', { diff --git a/packages/connect-web/eslint.config.mjs b/packages/connect-web/eslint.config.mjs index f81636fa2d8..0bf263b9606 100644 --- a/packages/connect-web/eslint.config.mjs +++ b/packages/connect-web/eslint.config.mjs @@ -7,6 +7,7 @@ export default [ 'no-underscore-dangle': 'off', // underscore is used camelcase: 'off', // camelcase is used 'jest/valid-expect': 'off', // because of cypress tests + 'import/no-default-export': 'off', // Todo: shall be fixed }, }, ]; From 74df31eca68c33d1d6b76ac7ebbe70cafa6f0747 Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 14:15:06 +0100 Subject: [PATCH 28/29] chore: no-control-regex as it becames recommanded --- packages/utils/src/asciiUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/src/asciiUtils.ts b/packages/utils/src/asciiUtils.ts index 115f518ccdf..f0d3d2b1610 100644 --- a/packages/utils/src/asciiUtils.ts +++ b/packages/utils/src/asciiUtils.ts @@ -1,5 +1,5 @@ // Regular expression to match non-ASCII characters -const nonAsciiPattern = /[^\x00-\x7F]/g; +const nonAsciiPattern = /[^\x20-\x7E]/g; export function isAscii(value?: string): boolean { if (!value) return true; From b3a0ee30c14add8a2757c6736247d008703d974a Mon Sep 17 00:00:00 2001 From: Peter Sanderson Date: Wed, 6 Nov 2024 14:51:11 +0100 Subject: [PATCH 29/29] chore: wip --- packages/eslint/src/typescriptConfig.mjs | 1 + .../suite/src/actions/suite/__tests__/routerActions.test.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/eslint/src/typescriptConfig.mjs b/packages/eslint/src/typescriptConfig.mjs index 503d3b65fee..5a458762163 100644 --- a/packages/eslint/src/typescriptConfig.mjs +++ b/packages/eslint/src/typescriptConfig.mjs @@ -38,6 +38,7 @@ export const typescriptConfig = [ '@typescript-eslint/no-explicit-any': 'off', // Todo: write description '@typescript-eslint/ban-ts-comment': 'off', // Todo: just temporary, reconsider to remove it '@typescript-eslint/no-empty-object-type': 'off', // Todo: we shall solve this, this is bad practice + '@typescript-eslint/triple-slash-reference': 'off', // Todo: solve before merge }, }, ]; diff --git a/packages/suite/src/actions/suite/__tests__/routerActions.test.ts b/packages/suite/src/actions/suite/__tests__/routerActions.test.ts index d3764856667..cf48ae836e0 100644 --- a/packages/suite/src/actions/suite/__tests__/routerActions.test.ts +++ b/packages/suite/src/actions/suite/__tests__/routerActions.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ import { configureStore } from 'src/support/tests/configureStore'; import suiteReducer from 'src/reducers/suite/suiteReducer'; import routerReducer from 'src/reducers/suite/routerReducer'; @@ -10,6 +9,7 @@ import * as routerActions from '../routerActions'; type SuiteState = ReturnType; type RouterState = ReturnType; + interface InitialState { suite?: Partial; router?: Exclude;