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 37111525168..78b202e285b 100644 --- a/packages/suite/src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/verifyAddress.ts +++ b/packages/suite/src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/verifyAddress.ts @@ -3,8 +3,11 @@ import { testMocks } from '@suite-common/test-utils'; 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, XRP_ACCOUNT } from './accounts'; +import { + BTC_ACCOUNT, + ETH_ACCOUNT, + XRP_ACCOUNT, +} from 'src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/accounts'; const { getSuiteDevice } = testMocks; const UNAVAILABLE_DEVICE = getSuiteDevice({ available: false }); 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 2309dd8f338..3446b2507e7 100644 --- a/packages/suite/src/actions/wallet/coinmarket/__tests__/coinmarketCommonActions.test.ts +++ b/packages/suite/src/actions/wallet/coinmarket/__tests__/coinmarketCommonActions.test.ts @@ -2,16 +2,16 @@ import { configureStore } from 'src/support/tests/configureStore'; import { coinmarketReducer, ComposedTransactionInfo } from 'src/reducers/wallet/coinmarketReducer'; import selectedAccountReducer from 'src/reducers/wallet/selectedAccountReducer'; -import * as coinmarketCommonActions from '../coinmarketCommonActions'; -import { DEFAULT_STORE } from '../__fixtures__/coinmarketCommonActions/store'; -import { - VERIFY_BUY_ADDRESS_FIXTURES, - VERIFY_EXCHANGE_ADDRESS_FIXTURES, -} from '../__fixtures__/coinmarketCommonActions/verifyAddress'; 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, + VERIFY_EXCHANGE_ADDRESS_FIXTURES, +} from 'src/actions/wallet/coinmarket/__fixtures__/coinmarketCommonActions/verifyAddress'; +import * as coinmarketCommonActions from 'src/actions/wallet/coinmarket/coinmarketCommonActions'; interface InitialState { device?: DeepPartial; diff --git a/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts b/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts index 1b4d4a11b40..e5f93d725c9 100644 --- a/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts +++ b/packages/suite/src/actions/wallet/coinmarket/coinmarketCommonActions.ts @@ -21,10 +21,14 @@ import { Account } from 'src/types/wallet'; 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 { COINMARKET_BUY, COINMARKET_EXCHANGE, COINMARKET_COMMON } from '../constants'; import { AddressDisplayOptions } from '@suite-common/wallet-types'; import { selectAddressDisplayType } from 'src/reducers/suite/suiteReducer'; import { CryptoId } from 'invity-api'; +import { + COINMARKET_BUY, + COINMARKET_COMMON, + COINMARKET_EXCHANGE, +} from 'src/actions/wallet/constants'; export type CoinmarketCommonAction = | { diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx index e866b701903..955061dd21b 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm.tsx @@ -13,7 +13,6 @@ import { } from 'src/utils/wallet/coinmarket/buyUtils'; import { useFormDraft } from 'src/hooks/wallet/useFormDraft'; import { AmountLimits } from 'src/types/wallet/coinmarketCommonTypes'; -import { useCoinmarketBuyFormDefaultValues } from './useCoinmarketBuyFormDefaultValues'; import { CoinmarketTradeBuyType, UseCoinmarketFormProps } from 'src/types/coinmarket/coinmarket'; import { addIdsToQuotes, @@ -24,10 +23,6 @@ import { CoinmarketBuyFormContextProps, CoinmarketBuyFormProps, } from 'src/types/coinmarket/coinmarketForm'; -import { - getFilteredSuccessQuotes, - useCoinmarketCommonOffers, -} from '../offers/useCoinmarketCommonOffers'; 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'; @@ -49,6 +44,11 @@ import { useCoinmarketModalCrypto } from 'src/hooks/wallet/coinmarket/form/commo import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; import { networks } from '@suite-common/wallet-config'; import { analytics, EventType } from '@trezor/suite-analytics'; +import { + getFilteredSuccessQuotes, + useCoinmarketCommonOffers, +} from 'src/hooks/wallet/coinmarket/offers/useCoinmarketCommonOffers'; +import { useCoinmarketBuyFormDefaultValues } from 'src/hooks/wallet/coinmarket/form/useCoinmarketBuyFormDefaultValues'; export const useCoinmarketBuyForm = ({ selectedAccount, diff --git a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts index 1113d9b80a6..a9c2dc76d80 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/form/useCoinmarketExchangeForm.ts @@ -55,13 +55,13 @@ import { useCoinmarketLoadData } from 'src/hooks/wallet/coinmarket/useCoinmarket 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 { useCoinmarketFiatValues } from './common/useCoinmarketFiatValues'; import { CoinmarketExchangeStepType } from 'src/types/coinmarket/coinmarketOffers'; 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'; export const useCoinmarketExchangeForm = ({ selectedAccount, diff --git a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketDetail.ts b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketDetail.ts index 0a458303247..b33422735a6 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketDetail.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketDetail.ts @@ -6,7 +6,6 @@ import { CoinmarketUseDetailOutputProps, CoinmarketUseDetailProps, } from 'src/types/coinmarket/coinmarketDetail'; -import { useCoinmarketWatchTrade } from './useCoinmarketWatchTrade'; import { Trade, TradeBuy } from 'src/types/wallet/coinmarketCommonTypes'; import { CoinmarketGetDetailDataProps, @@ -16,8 +15,9 @@ import { CoinmarketTradeMapProps, CoinmarketTradeType, } from 'src/types/coinmarket/coinmarket'; -import { useServerEnvironment } from './useServerEnviroment'; import { useCoinmarketLoadData } from 'src/hooks/wallet/coinmarket/useCoinmarketLoadData'; +import { useServerEnvironment } from 'src/hooks/wallet/coinmarket/useServerEnviroment'; +import { useCoinmarketWatchTrade } from 'src/hooks/wallet/coinmarket/useCoinmarketWatchTrade'; const isBuyTrade = (trade: Trade): trade is TradeBuy => trade.tradeType === 'buy'; diff --git a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketWatchTrade.ts b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketWatchTrade.ts index e03485d21fe..7a6c6f0cd1f 100644 --- a/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketWatchTrade.ts +++ b/packages/suite/src/hooks/wallet/coinmarket/useCoinmarketWatchTrade.ts @@ -2,7 +2,6 @@ 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 { useFormDraft } from '../useFormDraft'; 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'; @@ -21,6 +20,7 @@ import { CoinmarketUseWatchTradeProps, CoinmarketWatchTradeProps, } from 'src/types/coinmarket/coinmarket'; +import { useFormDraft } from 'src/hooks/wallet/useFormDraft'; export const tradeFinalStatuses: Record = { buy: ['SUCCESS', 'ERROR', 'BLOCKED'] satisfies BuyTradeFinalStatus[], diff --git a/packages/suite/src/types/coinmarket/coinmarketDetail.ts b/packages/suite/src/types/coinmarket/coinmarketDetail.ts index b3779d5035d..5c735399250 100644 --- a/packages/suite/src/types/coinmarket/coinmarketDetail.ts +++ b/packages/suite/src/types/coinmarket/coinmarketDetail.ts @@ -2,12 +2,11 @@ import type { CoinmarketTradeCommonProps } from 'src/reducers/wallet/coinmarketR 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, CoinmarketTradeType, -} from './coinmarket'; +} from 'src/types/coinmarket/coinmarket'; export interface CoinmarketDetailContextValues extends CoinmarketTradeCommonProps { diff --git a/packages/suite/src/types/coinmarket/coinmarketOffers.ts b/packages/suite/src/types/coinmarket/coinmarketOffers.ts index 6d66a7a5220..a90e02c7094 100644 --- a/packages/suite/src/types/coinmarket/coinmarketOffers.ts +++ b/packages/suite/src/types/coinmarket/coinmarketOffers.ts @@ -1,10 +1,10 @@ import { CryptoId } from 'invity-api'; -import { CoinmarketTradeType } from './coinmarket'; +import { CoinmarketTradeType } from 'src/types/coinmarket/coinmarket'; import { CoinmarketBuyFormContextProps, CoinmarketExchangeFormContextProps, CoinmarketSellFormContextProps, -} from './coinmarketForm'; +} from 'src/types/coinmarket/coinmarketForm'; export type CoinmarketBuyAddressOptionsType = { address?: string; diff --git a/packages/suite/src/utils/wallet/coinmarket/__tests__/buyUtils.test.ts b/packages/suite/src/utils/wallet/coinmarket/__tests__/buyUtils.test.ts index 5c220478305..208ae8c238e 100644 --- a/packages/suite/src/utils/wallet/coinmarket/__tests__/buyUtils.test.ts +++ b/packages/suite/src/utils/wallet/coinmarket/__tests__/buyUtils.test.ts @@ -1,5 +1,10 @@ -import * as fixtures from '../__fixtures__/buyUtils'; -import { getAmountLimits, createQuoteLink, getStatusMessage, createTxLink } from '../buyUtils'; +import * as fixtures from 'src/utils/wallet/coinmarket/__fixtures__/buyUtils'; +import { + getAmountLimits, + createQuoteLink, + getStatusMessage, + createTxLink, +} from 'src/utils/wallet/coinmarket/buyUtils'; const { QUOTE_REQUEST_FIAT, 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 2771e02d5ab..0967789b82e 100644 --- a/packages/suite/src/utils/wallet/coinmarket/__tests__/coinmarketUtils.test.ts +++ b/packages/suite/src/utils/wallet/coinmarket/__tests__/coinmarketUtils.test.ts @@ -14,13 +14,13 @@ import { coinmarketGetAmountLabels, coinmarketGetAccountLabel, testnetToProdCryptoId, -} from '../coinmarketUtils'; +} from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { FIXTURE_ACCOUNTS, accountBtc, accountEth, coinDefinitions, -} from '../__fixtures__/coinmarketUtils'; +} from 'src/utils/wallet/coinmarket/__fixtures__/coinmarketUtils'; 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'; 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 daed7980517..61a303de716 100644 --- a/packages/suite/src/utils/wallet/coinmarket/__tests__/exchangeUtils.test.ts +++ b/packages/suite/src/utils/wallet/coinmarket/__tests__/exchangeUtils.test.ts @@ -1,12 +1,12 @@ import { CryptoId } from 'invity-api'; -import * as fixtures from '../__fixtures__/exchangeUtils'; +import * as fixtures from 'src/utils/wallet/coinmarket/__fixtures__/exchangeUtils'; import { coinmarketGetExchangeReceiveCryptoId, getAmountLimits, getStatusMessage, getSuccessQuotesOrdered, isQuoteError, -} from '../exchangeUtils'; +} from 'src/utils/wallet/coinmarket/exchangeUtils'; const { MIN_MAX_QUOTES_OK, MIN_MAX_QUOTES_LOW, MIN_MAX_QUOTES_CANNOT_TRADE } = fixtures; diff --git a/packages/suite/src/utils/wallet/coinmarket/__tests__/sellUtils.test.ts b/packages/suite/src/utils/wallet/coinmarket/__tests__/sellUtils.test.ts index 25bc5f443cd..24aff0b66b8 100644 --- a/packages/suite/src/utils/wallet/coinmarket/__tests__/sellUtils.test.ts +++ b/packages/suite/src/utils/wallet/coinmarket/__tests__/sellUtils.test.ts @@ -1,7 +1,12 @@ -import * as fixtures from '../__fixtures__/sellUtils'; -import { getStatusMessage, formatIban, getAmountLimits, createQuoteLink } from '../sellUtils'; +import { + getStatusMessage, + formatIban, + getAmountLimits, + createQuoteLink, +} from 'src/utils/wallet/coinmarket/sellUtils'; import { Account } from 'src/types/wallet'; import { ComposedTransactionInfo } from 'src/reducers/wallet/coinmarketReducer'; +import * as fixtures from 'src/utils/wallet/coinmarket/__fixtures__/sellUtils'; const { QUOTE_REQUEST_FIAT, diff --git a/packages/suite/src/views/wallet/coinmarket/DCA/CoinmarketDCALanding.tsx b/packages/suite/src/views/wallet/coinmarket/DCA/CoinmarketDCALanding.tsx index 9572ee0fea1..bc28666076a 100644 --- a/packages/suite/src/views/wallet/coinmarket/DCA/CoinmarketDCALanding.tsx +++ b/packages/suite/src/views/wallet/coinmarket/DCA/CoinmarketDCALanding.tsx @@ -13,13 +13,13 @@ import { } from '@trezor/components'; import { UseCoinmarketProps } from 'src/types/coinmarket/coinmarket'; import { withSelectedAccountLoaded } from 'src/components/wallet'; -import { CoinmarketLayout } from '../common/CoinmarketLayoutNew/CoinmarketLayout'; 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 { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout'; const IconWrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/buy/CoinmarketBuyForm.tsx b/packages/suite/src/views/wallet/coinmarket/buy/CoinmarketBuyForm.tsx index 8f782a7705a..07f6d9358c1 100644 --- a/packages/suite/src/views/wallet/coinmarket/buy/CoinmarketBuyForm.tsx +++ b/packages/suite/src/views/wallet/coinmarket/buy/CoinmarketBuyForm.tsx @@ -1,9 +1,9 @@ import { withSelectedAccountLoaded } from 'src/components/wallet'; import { UseCoinmarketProps } from 'src/types/coinmarket/coinmarket'; -import { CoinmarketLayout } from '../common/CoinmarketLayoutNew/CoinmarketLayout'; -import { CoinmarketFormLayout } from '../common/CoinmarketForm/CoinmarketFormLayout'; import { useCoinmarketBuyForm } from 'src/hooks/wallet/coinmarket/form/useCoinmarketBuyForm'; import { CoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; +import { CoinmarketFormLayout } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormLayout'; +import { CoinmarketLayout } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout'; const CoinmarketBuyComponent = (props: UseCoinmarketProps) => { const coinmarketBuyContextValues = useCoinmarketBuyForm(props); 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 c66bd6ea1ae..5abde79154d 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,12 +1,12 @@ import styled from 'styled-components'; import { Button, variables, Link, Image } from '@trezor/components'; -import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common'; 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` display: flex; 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 ffa2758f0e2..5b426773d05 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,13 +1,13 @@ import styled from 'styled-components'; import { Button, variables, Link, Image } from '@trezor/components'; -import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common'; 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` display: flex; 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 feefc46b8f3..ba45a66e606 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,12 +1,12 @@ import styled from 'styled-components'; import { Button, variables, Link, Image } from '@trezor/components'; -import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common'; 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` 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 b95dd55e9e4..b129c582a06 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersAmounts.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersAmounts.tsx @@ -1,9 +1,7 @@ import React from 'react'; import styled, { useTheme } from 'styled-components'; -import { CoinmarketFiatAmount } from '../CoinmarketFiatAmount'; import { getCryptoQuoteAmountProps } from 'src/utils/wallet/coinmarket/coinmarketTypingUtils'; import { FormattedCryptoAmount } from 'src/components/suite'; -import { useCoinmarketInfo } from '../../../../../hooks/wallet/coinmarket/useCoinmarketInfo'; import { CoinmarketTradeDetailType } from 'src/types/coinmarket/coinmarket'; import { spacingsPx } from '@trezor/theme'; import { useCoinmarketFormContext } from 'src/hooks/wallet/coinmarket/form/useCoinmarketCommonForm'; @@ -13,6 +11,8 @@ import { } from 'src/hooks/wallet/coinmarket/offers/useCoinmarketCommonOffers'; 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'; const Arrow = styled.div` display: flex; 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 585756af40d..23a880d439a 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersItem.tsx @@ -2,7 +2,6 @@ import styled, { useTheme } from 'styled-components'; import { Badge, Button, Card, Text } from '@trezor/components'; import { Translation } from 'src/components/suite'; import { spacings, spacingsPx } from '@trezor/theme'; -import { CoinmarketUtilsProvider } from '../CoinmarketUtils/CoinmarketUtilsProvider'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; import { isCoinmarketBuyOffers, @@ -17,13 +16,14 @@ import { import { getTagAndInfoNote } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { SellFiatTrade } from 'invity-api'; import { CoinmarketFormContextValues } from 'src/types/coinmarket/coinmarketForm'; -import { CoinmarketFeaturedOffersAmounts } from './CoinmarketFeaturedOffersAmounts'; -import { CoinmarketFeaturedOffersPaymentInfo } from './CoinmarketFeaturedOffersPaymentInfo'; import { CoinmarketTradeDetailBuySellType, CoinmarketTradeDetailType, CoinmarketTradeType, } from 'src/types/coinmarket/coinmarket'; +import { CoinmarketFeaturedOffersAmounts } from 'src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersAmounts'; +import { CoinmarketUtilsProvider } from 'src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsProvider'; +import { CoinmarketFeaturedOffersPaymentInfo } from 'src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersPaymentInfo'; const Offer = styled.div` display: flex; 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 4067f68b6fe..17db763529a 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersPaymentInfo.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFeaturedOffers/CoinmarketFeaturedOffersPaymentInfo.tsx @@ -4,9 +4,9 @@ import { CoinmarketTradeType, } from 'src/types/coinmarket/coinmarket'; import { Translation } from 'src/components/suite'; -import { CoinmarketPaymentPlainType } from '../CoinmarketPaymentPlainType'; import styled from 'styled-components'; import { spacingsPx } from '@trezor/theme'; +import { CoinmarketPaymentPlainType } from 'src/views/wallet/coinmarket/common/CoinmarketPaymentPlainType'; const PaymentInfoWrapper = styled.div` display: flex; 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 929ddbd9ecd..cec4bd1a73f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketFooter.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketFooter.tsx @@ -3,10 +3,10 @@ import { useState, useRef } from 'react'; import styled, { css } from 'styled-components'; import { useOnClickOutside } from '@trezor/react-utils'; import { DATA_TOS_INVITY_URL, INVITY_URL } from '@trezor/urls'; -import { CoinmarketProvidedByInvity } from './CoinmarketProvidedByInvity'; import { Translation } from 'src/components/suite'; import { borders, spacingsPx, zIndices } from '@trezor/theme'; import { CoinmarketFooterLogoWrapper } from 'src/views/wallet/coinmarket'; +import { CoinmarketProvidedByInvity } from 'src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketProvidedByInvity'; const Wrapper = styled.div` display: flex; 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 fb305941103..5f6a28e39e2 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 @@ -3,7 +3,6 @@ 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 { CoinmarketFormInputLabel } from './CoinmarketFormInputLabel'; import { CoinmarketExchangeFormProps, RateType } from 'src/types/coinmarket/coinmarketForm'; import { UseFormSetValue } from 'react-hook-form'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; @@ -12,6 +11,7 @@ import { FORM_RATE_FLOATING, FORM_RATE_TYPE, } from 'src/constants/wallet/coinmarket/form'; +import { CoinmarketFormInputLabel } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputLabel'; const RadioItems = styled.div` display: flex; 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 e1c39602e65..c840f7d9c16 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffer.tsx @@ -27,12 +27,12 @@ import { } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { CoinmarketFormOfferFiatAmount } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOfferFiatAmount'; import { isCoinmarketExchangeOffers } from 'src/hooks/wallet/coinmarket/offers/useCoinmarketCommonOffers'; -import { CoinmarketFormOffersSwitcher } from './CoinmarketFormOffersSwitcher'; import { ExchangeTrade } from 'invity-api'; import { CoinmarketTradeDetailType, CoinmarketTradeType } from 'src/types/coinmarket/coinmarket'; import { CoinmarketFormContextValues } from 'src/types/coinmarket/coinmarketForm'; import { FORM_EXCHANGE_DEX, FORM_EXCHANGE_TYPE } from 'src/constants/wallet/coinmarket/form'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; +import { CoinmarketFormOffersSwitcher } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcher'; const CoinmarketFormOfferHeader = styled.div` display: flex; 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 ebfb9f12d9d..25d3f6b9d94 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcher.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcher.tsx @@ -13,7 +13,6 @@ import { CoinmarketTradeDetailType, CoinmarketUtilsProvidersProps, } from 'src/types/coinmarket/coinmarket'; -import { CoinmarketFormOffersSwitcherItem } from './CoinmarketFormOffersSwitcherItem'; import { CoinmarketExchangeFormContextProps } from 'src/types/coinmarket/coinmarketForm'; import { FORM_EXCHANGE_CEX, @@ -27,6 +26,7 @@ import { CoinmarketFormOfferSpinnerWrapper, CoinmarketSpinnerWrapper, } from 'src/views/wallet/coinmarket'; +import { CoinmarketFormOffersSwitcherItem } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcherItem'; const BestOffers = styled.div<{ $elevation: Elevation }>` padding: ${spacingsPx.xxs}; 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 d850b12a503..fda88d25c4d 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcherItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormOffersSwitcherItem.tsx @@ -1,12 +1,12 @@ import { ExchangeTrade } from 'invity-api'; import { CoinmarketUtilsProvidersProps } from 'src/types/coinmarket/coinmarket'; import { Badge, Radio, Tooltip } from '@trezor/components'; -import { CoinmarketUtilsProvider } from '../CoinmarketUtils/CoinmarketUtilsProvider'; import { Translation } from 'src/components/suite'; import styled, { css } from 'styled-components'; import { borders, spacingsPx } from '@trezor/theme'; 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'; const Offer = styled.div<{ $isSelected: boolean }>` padding: ${spacingsPx.md}; 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 ad7ff5c5783..2733da2e89c 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketExchangeHeaderSummary.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketExchangeHeaderSummary.tsx @@ -3,11 +3,11 @@ import { useCoinmarketOffersContext } from 'src/hooks/wallet/coinmarket/offers/u import { CoinmarketTradeExchangeType } from 'src/types/coinmarket/coinmarket'; import { useSelector } from 'src/hooks/suite'; import { H3, Icon, Row, Text } from '@trezor/components'; -import { CoinmarketCryptoAmount } from '../CoinmarketCryptoAmount'; import { CryptoId } from 'invity-api'; import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { spacings } from '@trezor/theme'; +import { CoinmarketCryptoAmount } from 'src/views/wallet/coinmarket/common/CoinmarketCryptoAmount'; interface CoinmarketExchangeHeaderSummaryProps { sendAmount: string | number | undefined; 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 25d4cb0df86..3fcc3dd249d 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderFilter.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderFilter.tsx @@ -1,6 +1,5 @@ import styled from 'styled-components'; import { spacingsPx } from '@trezor/theme'; -import { CoinmarketFormInputPaymentMethod } from '../CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputPaymentMethod'; import { CoinmarketFormInputCountry } from 'src/views/wallet/coinmarket/common/CoinmarketForm/CoinmarketFormInput/CoinmarketFormInputCountry'; import { isCoinmarketBuyOffers, @@ -20,8 +19,9 @@ 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 { CoinmarketOffersExchangeFiltersPanel } from './CoinmarketOffersExchangeFiltersPanel'; 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'; const InputWrapper = styled.div` width: 254px; 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 c4837a5ab78..1ded88d625f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderSummary.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeaderSummary.tsx @@ -1,6 +1,5 @@ import { H3, Icon, Row } from '@trezor/components'; import styled from 'styled-components'; -import { CoinmarketCryptoAmount, CoinmarketFiatAmount } from '..'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; import { CoinmarketCryptoAmountProps } from 'src/types/coinmarket/coinmarketOffers'; import { @@ -8,8 +7,10 @@ import { isCoinmarketSellOffers, useCoinmarketOffersContext, } from 'src/hooks/wallet/coinmarket/offers/useCoinmarketCommonOffers'; -import { CoinmarketExchangeHeaderSummary } from './CoinmarketExchangeHeaderSummary'; 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'; const IconWrapper = styled.div` margin-left: ${spacingsPx.sm}; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/BuyTransaction.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/BuyTransaction.tsx index d83a9ef4b04..31650ca5943 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/BuyTransaction.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/BuyTransaction.tsx @@ -23,7 +23,6 @@ import { getStatusMessage } from 'src/utils/wallet/coinmarket/buyUtils'; import { TradeBuy } from 'src/types/wallet/coinmarketCommonTypes'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { useCoinmarketNavigation } from 'src/hooks/wallet/useCoinmarketNavigation'; -import { CoinmarketTransactionStatus } from './CoinmarketTransactionStatus'; import { useCoinmarketWatchTrade } from 'src/hooks/wallet/coinmarket/useCoinmarketWatchTrade'; import { CoinmarketTradeBuyType } from 'src/types/coinmarket/coinmarket'; import { @@ -32,6 +31,7 @@ import { } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { CoinmarketTestWrapper } from 'src/views/wallet/coinmarket'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; +import { CoinmarketTransactionStatus } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/CoinmarketTransactionStatus'; const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/CoinmarketAccountTransactions.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/CoinmarketAccountTransactions.tsx index 8b3c78cb257..4c9d000696f 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/CoinmarketAccountTransactions.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/CoinmarketAccountTransactions.tsx @@ -2,12 +2,11 @@ import { Translation } from 'src/components/suite'; import { useSelector } from 'src/hooks/suite'; import { H2, variables } from '@trezor/components'; import styled from 'styled-components'; - -import { BuyTransaction } from './BuyTransaction'; -import { SellTransaction } from './SellTransaction'; -import { ExchangeTransaction } from './ExchangeTransaction'; import { useCoinmarketLoadData } from 'src/hooks/wallet/coinmarket/useCoinmarketLoadData'; import { spacingsPx } from '@trezor/theme'; +import { BuyTransaction } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/BuyTransaction'; +import { SellTransaction } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/SellTransaction'; +import { ExchangeTransaction } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/ExchangeTransaction'; const Wrapper = styled.div` margin-bottom: 48px; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/ExchangeTransaction.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/ExchangeTransaction.tsx index 4a799c2cf0e..b9ac0266ca3 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/ExchangeTransaction.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/ExchangeTransaction.tsx @@ -9,9 +9,9 @@ import { saveTransactionId } from 'src/actions/wallet/coinmarketExchangeActions' import { Account } from 'src/types/wallet'; import { Translation, FormattedDate, FormattedCryptoAmount } from 'src/components/suite'; import { useDispatch } from 'src/hooks/suite'; -import { CoinmarketTransactionStatus } from './CoinmarketTransactionStatus'; import { useCoinmarketWatchTrade } from 'src/hooks/wallet/coinmarket/useCoinmarketWatchTrade'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; +import { CoinmarketTransactionStatus } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/CoinmarketTransactionStatus'; const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/SellTransaction.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/SellTransaction.tsx index 8a793bf8d63..ddeafbcc9ed 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/SellTransaction.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/SellTransaction.tsx @@ -18,9 +18,9 @@ import { } from 'src/components/suite'; import { TradeSell } from 'src/types/wallet/coinmarketCommonTypes'; import { useDispatch, useSelector } from 'src/hooks/suite'; -import { CoinmarketTransactionStatus } from './CoinmarketTransactionStatus'; import { useCoinmarketWatchTrade } from 'src/hooks/wallet/coinmarket/useCoinmarketWatchTrade'; import { useCoinmarketInfo } from 'src/hooks/wallet/coinmarket/useCoinmarketInfo'; +import { CoinmarketTransactionStatus } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/CoinmarketAccountTransactions/CoinmarketTransactionStatus'; const Wrapper = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout.tsx index 3f0c82abe01..e627e132132 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayout.tsx @@ -5,8 +5,8 @@ import { WalletLayout, WalletSubpageHeading } from 'src/components/wallet'; import type { SelectedAccountLoaded } from '@suite-common/wallet-types'; import { CoinmarketFooter } from 'src/views/wallet/coinmarket/common'; import { spacingsPx } from '@trezor/theme'; -import { CoinmarketLayoutNavigation } from './CoinmarketLayoutNavigation/CoinmarketLayoutNavigation'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; +import { CoinmarketLayoutNavigation } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation'; const CoinmarketWrapper = styled.div` padding: 0 ${spacingsPx.lg}; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation.tsx index 483375f43ff..9198d9635f4 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayoutNavigation/CoinmarketLayoutNavigation.tsx @@ -1,11 +1,13 @@ import styled from 'styled-components'; import { useDevice, useSelector } from 'src/hooks/suite'; -import CoinmarketLayoutNavigationItem from './CoinmarketLayoutNavigationItem'; +import { FirmwareType } from '@trezor/connect'; +import { CoinmarketLayoutNavigationItem } from './CoinmarketLayoutNavigationItem'; import { Divider } from '@trezor/components'; import { spacings } from '@trezor/theme'; import regional from 'src/constants/wallet/coinmarket/regional'; import { getIsTorEnabled } from 'src/utils/suite/tor'; import { SelectedAccountLoaded } from '@suite-common/wallet-types'; +import { CoinmarketLayoutNavigationItem } from 'src/views/wallet/coinmarket/common/CoinmarketLayoutNew/CoinmarketLayoutNavigation/CoinmarketLayoutNavigationItem'; import { hasBitcoinOnlyFirmware } from '@trezor/device-utils'; const List = styled.div` diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffers.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffers.tsx index 3b201503047..6218214a9fb 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffers.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffers.tsx @@ -1,12 +1,12 @@ -import { CoinmarketOffersEmpty } from './CoinmarketOffersEmpty'; -import { CoinmarketHeader } from '../CoinmarketHeader/CoinmarketHeader'; -import { CoinmarketOffersItem } from './CoinmarketOffersItem'; import { isCoinmarketExchangeOffers, useCoinmarketOffersContext, } from 'src/hooks/wallet/coinmarket/offers/useCoinmarketCommonOffers'; import { getBestRatedQuote } from 'src/utils/wallet/coinmarket/coinmarketUtils'; -import { CoinmarketOffersExchange } from './CoinmarketOffersExchange'; +import { CoinmarketHeader } from 'src/views/wallet/coinmarket/common/CoinmarketHeader/CoinmarketHeader'; +import { CoinmarketOffersEmpty } from 'src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersEmpty'; +import { CoinmarketOffersExchange } from 'src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchange'; +import { CoinmarketOffersItem } from 'src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem'; export const CoinmarketOffers = () => { const context = useCoinmarketOffersContext(); 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 7b0235bef5f..3746e0efd5e 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchange.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchange.tsx @@ -10,9 +10,9 @@ import { EXCHANGE_COMPARATOR_RATE_FILTER_FLOATING_CEX, } from 'src/constants/wallet/coinmarket/form'; import { ExchangeTrade } from 'invity-api'; -import { CoinmarketOffersExchangeQuotesByTypeSection } from './CoinmarketOffersExchangeQuotesByTypeSection'; 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'; export const CoinmarketOffersExchange = () => { const { 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 9a4d2b3d593..13a32bf69bc 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchangeQuotesByTypeSection.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersExchangeQuotesByTypeSection.tsx @@ -1,8 +1,8 @@ import { ExchangeTrade } from 'invity-api'; import { ExtendedMessageDescriptor, Translation } from 'src/components/suite/Translation'; import { H3, Icon, Row, Tooltip } from '@trezor/components'; -import { CoinmarketOffersItem } from './CoinmarketOffersItem'; import { spacings } from '@trezor/theme'; +import { CoinmarketOffersItem } from 'src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem'; interface CoinmarketOffersExchangeQuotesByTypeSectionProps { quotes: ExchangeTrade[]; 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 96f877ace3e..79b428e9067 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem.tsx @@ -2,8 +2,6 @@ import styled, { useTheme } from 'styled-components'; import { Badge, Button, Card, Row, Text } from '@trezor/components'; import { Translation } from 'src/components/suite'; import { spacings, spacingsPx } from '@trezor/theme'; -import { CoinmarketUtilsProvider } from '../CoinmarketUtils/CoinmarketUtilsProvider'; -import { CoinmarketUtilsPrice } from '../CoinmarketUtils/CoinmarketUtilsPrice'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; import { isCoinmarketExchangeOffers, @@ -20,6 +18,8 @@ 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'; +import { CoinmarketUtilsProvider } from 'src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsProvider'; const Offer = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentType.tsx b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentType.tsx index c43d7b0f7c9..bf960a59a18 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentType.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketPaymentType.tsx @@ -1,8 +1,8 @@ import { ReactNode } from 'react'; import styled from 'styled-components'; import { BuyCryptoPaymentMethod, SellCryptoPaymentMethod } from 'invity-api'; -import { CoinmarketPaymentPlainType } from './CoinmarketPaymentPlainType'; import invityAPI from 'src/services/suite/invityAPI'; +import { CoinmarketPaymentPlainType } from 'src/views/wallet/coinmarket/common/CoinmarketPaymentPlainType'; const Wrapper = styled.div` display: flex; 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 bf66612d72f..47b47dbaad7 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferInfo.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketSelectedOfferInfo.tsx @@ -1,6 +1,5 @@ import { CryptoId } from 'invity-api'; import { Column } from '@trezor/components'; -import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common'; import { coinmarketGetAmountLabels } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { CoinmarketInfoHeader } from 'src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoHeader'; import { CoinmarketInfoItem } from 'src/views/wallet/coinmarket/common/CoinmarketSelectedOffer/CoinmarketInfo/CoinmarketInfoItem'; @@ -12,6 +11,7 @@ import { CoinmarketInfoExchangeType } from 'src/views/wallet/coinmarket/common/C import { CoinmarketSelectedOfferInfoProps } from 'src/types/coinmarket/coinmarketForm'; import { CoinmarketUtilsKyc } from 'src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsKyc'; import { CoinmarketExchangeProvidersInfoProps } from 'src/types/coinmarket/coinmarket'; +import { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common/CoinmarketTransactionId'; export const CoinmarketSelectedOfferInfo = ({ account, 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 75b9331873b..cf19ef8900a 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsPrice.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsPrice.tsx @@ -1,4 +1,3 @@ -import { CoinmarketCryptoAmount, CoinmarketFiatAmount } from '..'; import styled from 'styled-components'; import { spacingsPx, typography } from '@trezor/theme'; import { Translation } from 'src/components/suite'; @@ -6,6 +5,8 @@ import { FONT_SIZE, SCREEN_QUERY } from '@trezor/components/src/config/variables import { CoinmarketCryptoAmountProps } from 'src/types/coinmarket/coinmarketOffers'; import { coinmarketGetAmountLabels } from 'src/utils/wallet/coinmarket/coinmarketUtils'; import { useCoinmarketOffersContext } from 'src/hooks/wallet/coinmarket/offers/useCoinmarketCommonOffers'; +import { CoinmarketFiatAmount } from 'src/views/wallet/coinmarket/common/CoinmarketFiatAmount'; +import { CoinmarketCryptoAmount } from 'src/views/wallet/coinmarket/common/CoinmarketCryptoAmount'; const PriceWrap = styled.div``; 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 f5dc9ea2a52..5fa5af83e45 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltip.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltip.tsx @@ -1,10 +1,10 @@ import { Icon, Tooltip } from '@trezor/components'; -import { CoinmarketOffersItemProps } from '../CoinmarketOffers/CoinmarketOffersItem'; import { useTheme } from 'styled-components'; -import { CoinmarketUtilsTooltipFee } from './CoinmarketUtilsTooltipFee'; import { Translation } from 'src/components/suite'; import { useTranslation } from 'src/hooks/suite'; import { TooltipIcon, TooltipText, TooltipWrap } from 'src/views/wallet/coinmarket'; +import { CoinmarketUtilsTooltipFee } from 'src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltipFee'; +import { CoinmarketOffersItemProps } from 'src/views/wallet/coinmarket/common/CoinmarketOffers/CoinmarketOffersItem'; // IN TESTING MODE export const CoinmarketUtilsTooltip = ({ quote }: Pick) => { 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 56604d2e4c7..9b644f7de8c 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltipFee.tsx +++ b/packages/suite/src/views/wallet/coinmarket/common/CoinmarketUtils/CoinmarketUtilsTooltipFee.tsx @@ -1,7 +1,7 @@ -import { CoinmarketOffersItemProps } from '../CoinmarketOffers/CoinmarketOffersItem'; 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'; const TooltipRow = styled.div` display: flex; diff --git a/packages/suite/src/views/wallet/coinmarket/common/index.ts b/packages/suite/src/views/wallet/coinmarket/common/index.ts index b36d1f7e1a4..3dd98ee2bf9 100644 --- a/packages/suite/src/views/wallet/coinmarket/common/index.ts +++ b/packages/suite/src/views/wallet/coinmarket/common/index.ts @@ -1,10 +1,10 @@ -export { CoinmarketAddressOptions } from './CoinmarketAddressOptions'; -export { CoinmarketCryptoAmount } from './CoinmarketCryptoAmount'; -export { CoinmarketFiatAmount } from './CoinmarketFiatAmount'; -export { CoinmarketFooter } from './CoinmarketFooter/CoinmarketFooter'; -export { CoinmarketFractionButtons } from './CoinmarketFractionButtons'; -export { CoinmarketPaymentType } from './CoinmarketPaymentType'; -export { CoinmarketProviderInfo } from './CoinmarketProviderInfo'; -export { CoinmarketRefreshTime } from './CoinmarketRefreshTime'; -export { CoinmarketTag } from './CoinmarketTag'; -export { CoinmarketTransactionId } from './CoinmarketTransactionId'; +export { CoinmarketAddressOptions } from 'src/views/wallet/coinmarket/common/CoinmarketAddressOptions'; +export { CoinmarketCryptoAmount } from 'src/views/wallet/coinmarket/common/CoinmarketCryptoAmount'; +export { CoinmarketFiatAmount } from 'src/views/wallet/coinmarket/common/CoinmarketFiatAmount'; +export { CoinmarketFooter } from 'src/views/wallet/coinmarket/common/CoinmarketFooter/CoinmarketFooter'; +export { CoinmarketFractionButtons } from 'src/views/wallet/coinmarket/common/CoinmarketFractionButtons'; +export { CoinmarketPaymentType } from 'src/views/wallet/coinmarket/common/CoinmarketPaymentType'; +export { CoinmarketProviderInfo } from 'src/views/wallet/coinmarket/common/CoinmarketProviderInfo'; +export { CoinmarketRefreshTime } from 'src/views/wallet/coinmarket/common/CoinmarketRefreshTime'; +export { CoinmarketTag } from 'src/views/wallet/coinmarket/common/CoinmarketTag'; +export { CoinmarketTransactionId } from 'src/views/wallet/coinmarket/common/CoinmarketTransactionId'; diff --git a/packages/suite/src/views/wallet/coinmarket/index.tsx b/packages/suite/src/views/wallet/coinmarket/index.tsx index 5a5726ef320..7f8cc66bf6d 100644 --- a/packages/suite/src/views/wallet/coinmarket/index.tsx +++ b/packages/suite/src/views/wallet/coinmarket/index.tsx @@ -11,7 +11,7 @@ import { } from '@trezor/theme'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; import { Margin } from 'recharts/types/util/types'; -import { CoinmarketCoinLogo } from './common/CoinmarketCoinLogo'; +import { CoinmarketCoinLogo } from 'src/views/wallet/coinmarket/common/CoinmarketCoinLogo'; interface ResponsiveSize { $responsiveSize: keyof typeof variables.SCREEN_SIZE; diff --git a/packages/suite/src/views/wallet/coinmarket/sell_new/CoinmarketSellDetail.tsx b/packages/suite/src/views/wallet/coinmarket/sell_new/CoinmarketSellDetail.tsx index 54776e70352..ddf8a8f655e 100644 --- a/packages/suite/src/views/wallet/coinmarket/sell_new/CoinmarketSellDetail.tsx +++ b/packages/suite/src/views/wallet/coinmarket/sell_new/CoinmarketSellDetail.tsx @@ -4,8 +4,8 @@ import { useCoinmarketDetail, } from 'src/hooks/wallet/coinmarket/useCoinmarketDetail'; import { UseCoinmarketProps } from 'src/types/coinmarket/coinmarket'; +import { CoinmarketDetailSell } from 'src/views/wallet/coinmarket/common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSell'; import { withCoinmarketLayoutWrap } from 'src/views/wallet/coinmarket/common/CoinmarketLayout/withCoinmarketLayoutWrap'; -import { CoinmarketDetailSell } from '../common/CoinmarketDetail/CoinmarketDetailSell/CoinmarketDetailSell'; const CoinmarketSellDetailComponent = (props: UseCoinmarketProps) => { const coinmarketDetailContext = useCoinmarketDetail({