From 197490f2805d933dee581539d86aed0a934e8a06 Mon Sep 17 00:00:00 2001 From: Martin Homola Date: Mon, 27 Jan 2025 17:46:44 +0100 Subject: [PATCH] chore(trading): rename package from invity to trading --- .../e2e/support/pageActions/marketActions.ts | 2 +- packages/suite/package.json | 2 +- .../__tests__/tradingBuyActions.test.ts | 2 +- .../__tests__/tradingExchangeActions.test.ts | 2 +- .../wallet/trading/tradingCommonActions.ts | 2 +- .../src/actions/wallet/tradingBuyActions.ts | 2 +- .../actions/wallet/tradingExchangeActions.ts | 2 +- .../src/actions/wallet/tradingSellActions.ts | 2 +- .../common/useTradingBuildAccountGroups.ts | 2 +- .../form/common/useTradingPreviousRoute.ts | 2 +- .../wallet/trading/form/useTradingBuyForm.tsx | 2 +- .../trading/form/useTradingCommonForm.tsx | 2 +- .../trading/form/useTradingExchangeForm.ts | 2 +- .../useTradingExchangeWatchSendApproval.ts | 2 +- .../wallet/trading/form/useTradingSellForm.ts | 2 +- .../wallet/trading/useServerEnviroment.ts | 2 +- .../hooks/wallet/trading/useTradingDetail.ts | 2 +- .../wallet/trading/useTradingWatchTrade.ts | 2 +- .../__tests__/tradingMiddleware.test.ts | 4 ++-- .../middlewares/wallet/tradingMiddleware.ts | 2 +- .../suite/src/reducers/suite/suiteReducer.ts | 2 +- .../src/reducers/wallet/tradingReducer.ts | 2 +- packages/suite/src/types/trading/trading.ts | 2 +- .../suite/src/types/trading/tradingDetail.ts | 2 +- .../suite/src/types/trading/tradingForm.ts | 2 +- .../wallet/trading/tradingTypingUtils.ts | 2 +- .../src/utils/wallet/trading/tradingUtils.ts | 2 +- .../settings/SettingsDebug/InvityApi.tsx | 4 ++-- .../TradingDetailBuy/TradingDetailBuy.tsx | 2 +- .../TradingDetailBuyPaymentWaitingForUser.tsx | 2 +- .../TradingDetailExchange.tsx | 2 +- .../TradingDetailSell/TradingDetailSell.tsx | 2 +- .../TradingFeaturedOffersAmounts.tsx | 2 +- .../TradingFeaturedOffersItem.tsx | 2 +- .../TradingFeaturedOffersPaymentInfo.tsx | 2 +- .../TradingFormInputCountry.tsx | 2 +- .../common/TradingForm/TradingFormOffer.tsx | 2 +- .../TradingForm/TradingFormOfferItem.tsx | 2 +- .../TradingForm/TradingFormOffersSwitcher.tsx | 2 +- .../TradingExchangeHeaderSummary.tsx | 2 +- .../TradingOffersExchangeFiltersPanel.tsx | 2 +- .../TradingLayout/TradingLayoutHeader.tsx | 2 +- .../TradingOffers/TradingOffersExchange.tsx | 2 +- .../common/TradingPaymentPlainType.tsx | 2 +- .../trading/common/TradingPaymentType.tsx | 2 +- .../trading/common/TradingProviderInfo.tsx | 2 +- .../TradingInfo/TradingInfoExchangeType.tsx | 2 +- .../TradingInfo/TradingInfoItem.tsx | 2 +- .../TradingInfo/TradingInfoPaymentMethod.tsx | 2 +- .../TradingOfferExchange.tsx | 2 +- .../TradingOfferExchangeSend.tsx | 2 +- .../TradingOfferExchangeSendApproval.tsx | 2 +- .../TradingOfferExchangeSendSwap.tsx | 2 +- .../TradingOfferSell/TradingOfferSell.tsx | 2 +- .../TradingOfferSellBankAccount.tsx | 2 +- .../TradingOfferSellTransaction.tsx | 2 +- .../TradingVerify/TradingVerify.tsx | 2 +- .../TradingTransactionProvider.tsx | 2 +- .../TradingUtils/TradingUtilsProvider.tsx | 2 +- packages/suite/tsconfig.json | 2 +- suite-common/{invity => trading}/package.json | 2 +- suite-common/{invity => trading}/src/index.ts | 0 .../{invity => trading}/src/invityAPI.ts | 2 +- .../{invity => trading}/src/regional.ts | 0 suite-common/{invity => trading}/src/types.ts | 0 .../{invity => trading}/tsconfig.json | 0 yarn.lock | 22 +++++++++---------- 67 files changed, 75 insertions(+), 75 deletions(-) rename suite-common/{invity => trading}/package.json (92%) rename suite-common/{invity => trading}/src/index.ts (100%) rename suite-common/{invity => trading}/src/invityAPI.ts (99%) rename suite-common/{invity => trading}/src/regional.ts (100%) rename suite-common/{invity => trading}/src/types.ts (100%) rename suite-common/{invity => trading}/tsconfig.json (100%) diff --git a/packages/suite-desktop-core/e2e/support/pageActions/marketActions.ts b/packages/suite-desktop-core/e2e/support/pageActions/marketActions.ts index 888d78bb73f..f562eb229a5 100644 --- a/packages/suite-desktop-core/e2e/support/pageActions/marketActions.ts +++ b/packages/suite-desktop-core/e2e/support/pageActions/marketActions.ts @@ -2,7 +2,7 @@ import { Locator, Page } from '@playwright/test'; import { FiatCurrencyCode } from '@suite-common/suite-config'; import { NetworkSymbol } from '@suite-common/wallet-config'; -import { regional } from '@suite-common/invity'; +import { regional } from '@suite-common/trading'; import { expect } from '../customMatchers'; import { step, TrezorUserEnvLinkProxy } from '../common'; diff --git a/packages/suite/package.json b/packages/suite/package.json index c4e0ea92120..824f2e9bbc2 100644 --- a/packages/suite/package.json +++ b/packages/suite/package.json @@ -37,7 +37,6 @@ "@suite-common/formatters": "workspace:*", "@suite-common/icons": "workspace:*", "@suite-common/intl-types": "workspace:*", - "@suite-common/invity": "workspace:*", "@suite-common/logger": "workspace:*", "@suite-common/message-system": "workspace:*", "@suite-common/metadata-types": "workspace:*", @@ -50,6 +49,7 @@ "@suite-common/test-utils": "workspace:*", "@suite-common/toast-notifications": "workspace:*", "@suite-common/token-definitions": "workspace:*", + "@suite-common/trading": "workspace:*", "@suite-common/validators": "workspace:*", "@suite-common/wallet-config": "workspace:*", "@suite-common/wallet-constants": "workspace:*", diff --git a/packages/suite/src/actions/wallet/__tests__/tradingBuyActions.test.ts b/packages/suite/src/actions/wallet/__tests__/tradingBuyActions.test.ts index 17ae42ec153..e310dd6212a 100644 --- a/packages/suite/src/actions/wallet/__tests__/tradingBuyActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/tradingBuyActions.test.ts @@ -1,6 +1,6 @@ import { BuyTrade, BuyTradeQuoteRequest, CryptoId } from 'invity-api'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { configureStore } from 'src/support/tests/configureStore'; import { tradingReducer } from 'src/reducers/wallet/tradingReducer'; diff --git a/packages/suite/src/actions/wallet/__tests__/tradingExchangeActions.test.ts b/packages/suite/src/actions/wallet/__tests__/tradingExchangeActions.test.ts index def79e824ad..96425a7b76b 100644 --- a/packages/suite/src/actions/wallet/__tests__/tradingExchangeActions.test.ts +++ b/packages/suite/src/actions/wallet/__tests__/tradingExchangeActions.test.ts @@ -1,6 +1,6 @@ import { CryptoId, ExchangeTrade, ExchangeTradeQuoteRequest } from 'invity-api'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { configureStore } from 'src/support/tests/configureStore'; import { tradingReducer } from 'src/reducers/wallet/tradingReducer'; diff --git a/packages/suite/src/actions/wallet/trading/tradingCommonActions.ts b/packages/suite/src/actions/wallet/trading/tradingCommonActions.ts index 0fab8cb0fba..5821bbe1418 100644 --- a/packages/suite/src/actions/wallet/trading/tradingCommonActions.ts +++ b/packages/suite/src/actions/wallet/trading/tradingCommonActions.ts @@ -16,7 +16,7 @@ import { selectSelectedDevice, toggleRememberDevice, } from '@suite-common/wallet-core'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import { GetState, Dispatch } from 'src/types/suite'; import * as modalActions from 'src/actions/suite/modalActions'; diff --git a/packages/suite/src/actions/wallet/tradingBuyActions.ts b/packages/suite/src/actions/wallet/tradingBuyActions.ts index efa470c2b47..470f6fc278c 100644 --- a/packages/suite/src/actions/wallet/tradingBuyActions.ts +++ b/packages/suite/src/actions/wallet/tradingBuyActions.ts @@ -7,7 +7,7 @@ import { FiatCurrencyCode, } from 'invity-api'; -import { invityAPI, regional } from '@suite-common/invity'; +import { invityAPI, regional } from '@suite-common/trading'; import { Account } from 'src/types/wallet'; import { Dispatch } from 'src/types/suite'; diff --git a/packages/suite/src/actions/wallet/tradingExchangeActions.ts b/packages/suite/src/actions/wallet/tradingExchangeActions.ts index 0a713f883ae..e137281d143 100644 --- a/packages/suite/src/actions/wallet/tradingExchangeActions.ts +++ b/packages/suite/src/actions/wallet/tradingExchangeActions.ts @@ -6,7 +6,7 @@ import { CryptoId, } from 'invity-api'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { Account } from 'src/types/wallet'; import { Dispatch } from 'src/types/suite'; diff --git a/packages/suite/src/actions/wallet/tradingSellActions.ts b/packages/suite/src/actions/wallet/tradingSellActions.ts index 17e05d39b00..5b4e287a957 100644 --- a/packages/suite/src/actions/wallet/tradingSellActions.ts +++ b/packages/suite/src/actions/wallet/tradingSellActions.ts @@ -6,7 +6,7 @@ import { SellProviderInfo, } from 'invity-api'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { Account } from 'src/types/wallet'; import { Dispatch } from 'src/types/suite'; diff --git a/packages/suite/src/hooks/wallet/trading/form/common/useTradingBuildAccountGroups.ts b/packages/suite/src/hooks/wallet/trading/form/common/useTradingBuildAccountGroups.ts index 2fd564832b4..5689e3954dd 100644 --- a/packages/suite/src/hooks/wallet/trading/form/common/useTradingBuildAccountGroups.ts +++ b/packages/suite/src/hooks/wallet/trading/form/common/useTradingBuildAccountGroups.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react'; import { selectAccounts, selectSelectedDevice } from '@suite-common/wallet-core'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import { useDefaultAccountLabel, useSelector } from 'src/hooks/suite'; import { selectAccountLabels } from 'src/reducers/suite/metadataReducer'; diff --git a/packages/suite/src/hooks/wallet/trading/form/common/useTradingPreviousRoute.ts b/packages/suite/src/hooks/wallet/trading/form/common/useTradingPreviousRoute.ts index 6a3d248a411..fe0dbedeb1c 100644 --- a/packages/suite/src/hooks/wallet/trading/form/common/useTradingPreviousRoute.ts +++ b/packages/suite/src/hooks/wallet/trading/form/common/useTradingPreviousRoute.ts @@ -1,4 +1,4 @@ -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import { useSelector } from 'src/hooks/suite'; import { selectRouter } from 'src/reducers/suite/routerReducer'; diff --git a/packages/suite/src/hooks/wallet/trading/form/useTradingBuyForm.tsx b/packages/suite/src/hooks/wallet/trading/form/useTradingBuyForm.tsx index c75f5c2768b..a200c7dca17 100644 --- a/packages/suite/src/hooks/wallet/trading/form/useTradingBuyForm.tsx +++ b/packages/suite/src/hooks/wallet/trading/form/useTradingBuyForm.tsx @@ -10,7 +10,7 @@ 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 { invityAPI, type TradingBuyType } from '@suite-common/invity'; +import { invityAPI, type TradingBuyType } from '@suite-common/trading'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { createQuoteLink, createTxLink, getAmountLimits } from 'src/utils/wallet/trading/buyUtils'; diff --git a/packages/suite/src/hooks/wallet/trading/form/useTradingCommonForm.tsx b/packages/suite/src/hooks/wallet/trading/form/useTradingCommonForm.tsx index 5ee4ddcf953..20679688860 100644 --- a/packages/suite/src/hooks/wallet/trading/form/useTradingCommonForm.tsx +++ b/packages/suite/src/hooks/wallet/trading/form/useTradingCommonForm.tsx @@ -1,6 +1,6 @@ import { createContext, useContext } from 'react'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import { TradingFormContextValues } from 'src/types/trading/tradingForm'; diff --git a/packages/suite/src/hooks/wallet/trading/form/useTradingExchangeForm.ts b/packages/suite/src/hooks/wallet/trading/form/useTradingExchangeForm.ts index 8e796320b9f..6a4c859b627 100644 --- a/packages/suite/src/hooks/wallet/trading/form/useTradingExchangeForm.ts +++ b/packages/suite/src/hooks/wallet/trading/form/useTradingExchangeForm.ts @@ -15,7 +15,7 @@ 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 { invityAPI, type TradingExchangeType } from '@suite-common/invity'; +import { invityAPI, type TradingExchangeType } from '@suite-common/trading'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { saveQuoteRequest, saveQuotes } from 'src/actions/wallet/tradingExchangeActions'; diff --git a/packages/suite/src/hooks/wallet/trading/form/useTradingExchangeWatchSendApproval.ts b/packages/suite/src/hooks/wallet/trading/form/useTradingExchangeWatchSendApproval.ts index edaf9b80adf..f4fa72fe9a5 100644 --- a/packages/suite/src/hooks/wallet/trading/form/useTradingExchangeWatchSendApproval.ts +++ b/packages/suite/src/hooks/wallet/trading/form/useTradingExchangeWatchSendApproval.ts @@ -3,7 +3,7 @@ import { useTimeoutFn, useUnmount } from 'react-use'; import { ExchangeTrade } from 'invity-api'; -import { invityAPI, type TradingExchangeType } from '@suite-common/invity'; +import { invityAPI, type TradingExchangeType } from '@suite-common/trading'; import { useDispatch } from 'src/hooks/suite'; import { saveSelectedQuote } from 'src/actions/wallet/tradingExchangeActions'; diff --git a/packages/suite/src/hooks/wallet/trading/form/useTradingSellForm.ts b/packages/suite/src/hooks/wallet/trading/form/useTradingSellForm.ts index bf09dcde579..509795f319e 100644 --- a/packages/suite/src/hooks/wallet/trading/form/useTradingSellForm.ts +++ b/packages/suite/src/hooks/wallet/trading/form/useTradingSellForm.ts @@ -9,7 +9,7 @@ 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 { invityAPI, type TradingSellType } from '@suite-common/invity'; +import { invityAPI, type TradingSellType } from '@suite-common/trading'; import { useDispatch, useSelector } from 'src/hooks/suite'; import { diff --git a/packages/suite/src/hooks/wallet/trading/useServerEnviroment.ts b/packages/suite/src/hooks/wallet/trading/useServerEnviroment.ts index 457319b1453..e083861c9e7 100644 --- a/packages/suite/src/hooks/wallet/trading/useServerEnviroment.ts +++ b/packages/suite/src/hooks/wallet/trading/useServerEnviroment.ts @@ -1,4 +1,4 @@ -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { useSelector } from 'src/hooks/suite'; diff --git a/packages/suite/src/hooks/wallet/trading/useTradingDetail.ts b/packages/suite/src/hooks/wallet/trading/useTradingDetail.ts index 374c1ec3f5d..70a69020451 100644 --- a/packages/suite/src/hooks/wallet/trading/useTradingDetail.ts +++ b/packages/suite/src/hooks/wallet/trading/useTradingDetail.ts @@ -1,6 +1,6 @@ import { createContext, useContext } from 'react'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import { useSelector } from 'src/hooks/suite'; import { diff --git a/packages/suite/src/hooks/wallet/trading/useTradingWatchTrade.ts b/packages/suite/src/hooks/wallet/trading/useTradingWatchTrade.ts index 57eb1d7f50f..f72c6a6c359 100644 --- a/packages/suite/src/hooks/wallet/trading/useTradingWatchTrade.ts +++ b/packages/suite/src/hooks/wallet/trading/useTradingWatchTrade.ts @@ -11,7 +11,7 @@ import { WatchSellTradeResponse, } from 'invity-api'; -import { invityAPI, type TradingType } from '@suite-common/invity'; +import { invityAPI, type TradingType } from '@suite-common/trading'; import { Trade, TradeType } from 'src/types/wallet/tradingCommonTypes'; import { saveTrade as saveBuyTrade } from 'src/actions/wallet/tradingBuyActions'; diff --git a/packages/suite/src/middlewares/wallet/__tests__/tradingMiddleware.test.ts b/packages/suite/src/middlewares/wallet/__tests__/tradingMiddleware.test.ts index c38670d97e3..b1dd6c1693d 100644 --- a/packages/suite/src/middlewares/wallet/__tests__/tradingMiddleware.test.ts +++ b/packages/suite/src/middlewares/wallet/__tests__/tradingMiddleware.test.ts @@ -1,5 +1,5 @@ import { UI } from '@trezor/connect'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { configureStore } from 'src/support/tests/configureStore'; import { tradingReducer, initialState } from 'src/reducers/wallet/tradingReducer'; @@ -13,7 +13,7 @@ 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'; -jest.mock('@suite-common/invity'); +jest.mock('@suite-common/trading'); invityAPI.setInvityServersEnvironment = () => {}; invityAPI.createInvityAPIKey = () => {}; invityAPI.getInfo = () => diff --git a/packages/suite/src/middlewares/wallet/tradingMiddleware.ts b/packages/suite/src/middlewares/wallet/tradingMiddleware.ts index b3e15a56978..2e6902b2a75 100644 --- a/packages/suite/src/middlewares/wallet/tradingMiddleware.ts +++ b/packages/suite/src/middlewares/wallet/tradingMiddleware.ts @@ -2,7 +2,7 @@ import { MiddlewareAPI } from 'redux'; import { UI } from '@trezor/connect'; import { accountsActions } from '@suite-common/wallet-core'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { AppState, Action, Dispatch } from 'src/types/suite'; import { TRADING_COMMON, TRADING_EXCHANGE, TRADING_SELL } from 'src/actions/wallet/constants'; diff --git a/packages/suite/src/reducers/suite/suiteReducer.ts b/packages/suite/src/reducers/suite/suiteReducer.ts index 27cdf6f6ea1..e12b41cd798 100644 --- a/packages/suite/src/reducers/suite/suiteReducer.ts +++ b/packages/suite/src/reducers/suite/suiteReducer.ts @@ -1,6 +1,6 @@ import produce from 'immer'; -import type { InvityServerEnvironment } from '@suite-common/invity'; +import type { InvityServerEnvironment } from '@suite-common/trading'; import { Feature, selectIsFeatureDisabled } from '@suite-common/message-system'; import { isDeviceAcquired } from '@suite-common/suite-utils'; import { discoveryActions, DeviceRootState, selectSelectedDevice } from '@suite-common/wallet-core'; diff --git a/packages/suite/src/reducers/wallet/tradingReducer.ts b/packages/suite/src/reducers/wallet/tradingReducer.ts index ea31819cafe..e60d93eda19 100644 --- a/packages/suite/src/reducers/wallet/tradingReducer.ts +++ b/packages/suite/src/reducers/wallet/tradingReducer.ts @@ -13,7 +13,7 @@ import type { import type { PrecomposedTransactionFinal } from '@suite-common/wallet-types'; import type { FeeLevel } from '@trezor/connect'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import type { WalletAction, Account } from 'src/types/wallet'; import type { BuyInfo } from 'src/actions/wallet/tradingBuyActions'; diff --git a/packages/suite/src/types/trading/trading.ts b/packages/suite/src/types/trading/trading.ts index 612626c4395..b66b11a0e90 100644 --- a/packages/suite/src/types/trading/trading.ts +++ b/packages/suite/src/types/trading/trading.ts @@ -28,7 +28,7 @@ import type { TradingPaymentMethodType, TradingSellType, TradingType, -} from '@suite-common/invity'; +} from '@suite-common/trading'; import { GetDefaultAccountLabelParams } from 'src/hooks/suite/useDefaultAccountLabel'; import { State } from 'src/reducers/wallet/tradingReducer'; diff --git a/packages/suite/src/types/trading/tradingDetail.ts b/packages/suite/src/types/trading/tradingDetail.ts index 4737c1e55d5..6f4284d3c67 100644 --- a/packages/suite/src/types/trading/tradingDetail.ts +++ b/packages/suite/src/types/trading/tradingDetail.ts @@ -1,5 +1,5 @@ import type { SelectedAccountLoaded } from '@suite-common/wallet-types'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import type { TradingTradeCommonProps } from 'src/reducers/wallet/tradingReducer'; import type { Account } from 'src/types/wallet'; diff --git a/packages/suite/src/types/trading/tradingForm.ts b/packages/suite/src/types/trading/tradingForm.ts index f5d0c17b525..66c2ac2cdfb 100644 --- a/packages/suite/src/types/trading/tradingForm.ts +++ b/packages/suite/src/types/trading/tradingForm.ts @@ -28,7 +28,7 @@ import type { TradingSellType, TradingTradeType, TradingType, -} from '@suite-common/invity'; +} from '@suite-common/trading'; import { TradingAccountOptionsGroupOptionProps, diff --git a/packages/suite/src/utils/wallet/trading/tradingTypingUtils.ts b/packages/suite/src/utils/wallet/trading/tradingTypingUtils.ts index fd45b2b8673..ca7c8ffac03 100644 --- a/packages/suite/src/utils/wallet/trading/tradingTypingUtils.ts +++ b/packages/suite/src/utils/wallet/trading/tradingTypingUtils.ts @@ -7,7 +7,7 @@ import type { TradingSellType, TradingTradeType, TradingType, -} from '@suite-common/invity'; +} from '@suite-common/trading'; import { FORM_FIAT_CURRENCY_SELECT, FORM_OUTPUT_CURRENCY } from 'src/constants/wallet/trading/form'; import { diff --git a/packages/suite/src/utils/wallet/trading/tradingUtils.ts b/packages/suite/src/utils/wallet/trading/tradingUtils.ts index cc7047d3df0..dcb927429f6 100644 --- a/packages/suite/src/utils/wallet/trading/tradingUtils.ts +++ b/packages/suite/src/utils/wallet/trading/tradingUtils.ts @@ -21,7 +21,7 @@ import { sortByCoin, } from '@suite-common/wallet-utils'; import { BigNumber } from '@trezor/utils'; -import { regional, type TradingTradeType, type TradingType } from '@suite-common/invity'; +import { regional, type TradingTradeType, type TradingType } from '@suite-common/trading'; import { Account } from 'src/types/wallet'; import { ExtendedMessageDescriptor, Route, TrezorDevice } from 'src/types/suite'; diff --git a/packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx b/packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx index f7cb0a54418..51b928ab64b 100644 --- a/packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx +++ b/packages/suite/src/views/settings/SettingsDebug/InvityApi.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components'; -import type { InvityServerEnvironment } from '@suite-common/invity'; -import { invityAPI } from '@suite-common/invity'; +import type { InvityServerEnvironment } from '@suite-common/trading'; +import { invityAPI } from '@suite-common/trading'; import { SettingsSectionItem } from 'src/components/settings'; import { ActionColumn, ActionSelect, TextColumn } from 'src/components/suite'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuy.tsx b/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuy.tsx index 1f9778cc198..a68cf3ea32a 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuy.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuy.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components'; import { Card } from '@trezor/components'; -import type { TradingBuyType } from '@suite-common/invity'; +import type { TradingBuyType } from '@suite-common/trading'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch } from 'src/hooks/suite'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuyPaymentWaitingForUser.tsx b/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuyPaymentWaitingForUser.tsx index 4664deaa7d1..05309d7f27c 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuyPaymentWaitingForUser.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailBuy/TradingDetailBuyPaymentWaitingForUser.tsx @@ -5,7 +5,7 @@ import { BuyTrade, BuyTradeStatus } from 'invity-api'; import { Button, variables, Image } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { Translation } from 'src/components/suite/Translation'; import { Account } from 'src/types/wallet'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailExchange/TradingDetailExchange.tsx b/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailExchange/TradingDetailExchange.tsx index 67768903215..e099be0e9b0 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailExchange/TradingDetailExchange.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailExchange/TradingDetailExchange.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components'; import { Card } from '@trezor/components'; -import type { TradingExchangeType } from '@suite-common/invity'; +import type { TradingExchangeType } from '@suite-common/trading'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch } from 'src/hooks/suite'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailSell/TradingDetailSell.tsx b/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailSell/TradingDetailSell.tsx index a0aeb86b985..3607908a73b 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailSell/TradingDetailSell.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingDetail/TradingDetailSell/TradingDetailSell.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components'; import { Card } from '@trezor/components'; -import type { TradingSellType } from '@suite-common/invity'; +import type { TradingSellType } from '@suite-common/trading'; import { goto } from 'src/actions/suite/routerActions'; import { useDispatch } from 'src/hooks/suite'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersAmounts.tsx b/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersAmounts.tsx index a2e90500a9f..e9f0fa0d32a 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersAmounts.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersAmounts.tsx @@ -5,7 +5,7 @@ import { CryptoId } from 'invity-api'; import { spacingsPx } from '@trezor/theme'; import { Icon } from '@trezor/components'; -import type { TradingTradeType } from '@suite-common/invity'; +import type { TradingTradeType } from '@suite-common/trading'; import { getCryptoQuoteAmountProps, diff --git a/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersItem.tsx b/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersItem.tsx index cdf05683840..682fff549da 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersItem.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersItem.tsx @@ -4,7 +4,7 @@ import { SellFiatTrade } from 'invity-api'; import { Badge, Button, Card, Text } from '@trezor/components'; import { spacings, spacingsPx } from '@trezor/theme'; import { SCREEN_QUERY } from '@trezor/components/src/config/variables'; -import type { TradingTradeType, TradingType } from '@suite-common/invity'; +import type { TradingTradeType, TradingType } from '@suite-common/trading'; import { Translation } from 'src/components/suite'; import { diff --git a/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersPaymentInfo.tsx b/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersPaymentInfo.tsx index 539c1cd37da..ea4c713503e 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersPaymentInfo.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingFeaturedOffers/TradingFeaturedOffersPaymentInfo.tsx @@ -1,7 +1,7 @@ import styled from 'styled-components'; import { spacingsPx } from '@trezor/theme'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import { TradingTradeBuySellType, TradingTradeDetailBuySellType } from 'src/types/trading/trading'; import { Translation } from 'src/components/suite'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormInput/TradingFormInputCountry.tsx b/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormInput/TradingFormInputCountry.tsx index e3be370e099..db4b5ba1d2c 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormInput/TradingFormInputCountry.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormInput/TradingFormInputCountry.tsx @@ -2,7 +2,7 @@ import { Control, Controller } from 'react-hook-form'; import { Flag, Select, Row } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { regional } from '@suite-common/invity'; +import { regional } from '@suite-common/trading'; import { CountryOption } from 'src/types/wallet/tradingCommonTypes'; import { getCountryLabelParts } from 'src/utils/wallet/trading/tradingUtils'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffer.tsx b/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffer.tsx index 2a6efc9ccbd..2a2f3ef2c29 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffer.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffer.tsx @@ -4,7 +4,7 @@ import { CryptoId } from 'invity-api'; import { Button, TextButton, Row, Column, Paragraph } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import type { TradingTradeType, TradingType } from '@suite-common/invity'; +import type { TradingTradeType, TradingType } from '@suite-common/trading'; import { useTradingFormContext } from 'src/hooks/wallet/trading/form/useTradingCommonForm'; import { diff --git a/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOfferItem.tsx b/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOfferItem.tsx index 6581e613470..21b4c0752c9 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOfferItem.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOfferItem.tsx @@ -1,4 +1,4 @@ -import type { TradingTradeType } from '@suite-common/invity'; +import type { TradingTradeType } from '@suite-common/trading'; import { Row, Spinner, Card, Paragraph } from '@trezor/components'; import { spacings } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffersSwitcher.tsx b/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffersSwitcher.tsx index 9c8d982a622..a81b7d4fd8a 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffersSwitcher.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingForm/TradingFormOffersSwitcher.tsx @@ -1,6 +1,6 @@ import { spacings } from '@trezor/theme'; import { Row, Card, Column, Spinner, Paragraph } from '@trezor/components'; -import type { TradingTradeType } from '@suite-common/invity'; +import type { TradingTradeType } from '@suite-common/trading'; import { Translation } from 'src/components/suite'; import { TradingUtilsProvidersProps } from 'src/types/trading/trading'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingHeader/TradingExchangeHeaderSummary.tsx b/packages/suite/src/views/wallet/trading/common/TradingHeader/TradingExchangeHeaderSummary.tsx index 9274f00f872..2b9b2d93b0b 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingHeader/TradingExchangeHeaderSummary.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingHeader/TradingExchangeHeaderSummary.tsx @@ -4,7 +4,7 @@ import { CryptoId } from 'invity-api'; import { H3, Icon, Row, Text } from '@trezor/components'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { spacings } from '@trezor/theme'; -import type { TradingExchangeType } from '@suite-common/invity'; +import type { TradingExchangeType } from '@suite-common/trading'; import { useSelector } from 'src/hooks/suite'; import { FiatValue, FormattedCryptoAmount, Translation } from 'src/components/suite'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingHeader/TradingOffersExchangeFiltersPanel.tsx b/packages/suite/src/views/wallet/trading/common/TradingHeader/TradingOffersExchangeFiltersPanel.tsx index 2acb060388f..9dc06d73bac 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingHeader/TradingOffersExchangeFiltersPanel.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingHeader/TradingOffersExchangeFiltersPanel.tsx @@ -2,7 +2,7 @@ import styled from 'styled-components'; import { Row, Select } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import type { TradingExchangeType } from '@suite-common/invity'; +import type { TradingExchangeType } from '@suite-common/trading'; import { Translation } from 'src/components/suite'; import { diff --git a/packages/suite/src/views/wallet/trading/common/TradingLayout/TradingLayoutHeader.tsx b/packages/suite/src/views/wallet/trading/common/TradingLayout/TradingLayoutHeader.tsx index cc40b844c52..5bcfa33aaa9 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingLayout/TradingLayoutHeader.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingLayout/TradingLayoutHeader.tsx @@ -3,7 +3,7 @@ import { PropsWithChildren, useMemo } from 'react'; import { IconButton, Row, Box, Button } from '@trezor/components'; import { spacings } from '@trezor/theme'; import { Route } from '@suite-common/suite-types'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import { PageHeader } from 'src/components/suite/layouts/SuiteLayout'; import { BasicName } from 'src/components/suite/layouts/SuiteLayout/PageHeader/PageNames/BasicName'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingOffers/TradingOffersExchange.tsx b/packages/suite/src/views/wallet/trading/common/TradingOffers/TradingOffersExchange.tsx index db5b7aa8f26..b0ab8dbe5df 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingOffers/TradingOffersExchange.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingOffers/TradingOffersExchange.tsx @@ -2,7 +2,7 @@ import { useMemo } from 'react'; import { ExchangeTrade } from 'invity-api'; -import type { TradingExchangeType } from '@suite-common/invity'; +import type { TradingExchangeType } from '@suite-common/trading'; import { EXCHANGE_COMPARATOR_KYC_FILTER, diff --git a/packages/suite/src/views/wallet/trading/common/TradingPaymentPlainType.tsx b/packages/suite/src/views/wallet/trading/common/TradingPaymentPlainType.tsx index 6c45f0ee46c..b80bd4cbed2 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingPaymentPlainType.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingPaymentPlainType.tsx @@ -1,4 +1,4 @@ -import type { TradingPaymentMethodType } from '@suite-common/invity'; +import type { TradingPaymentMethodType } from '@suite-common/trading'; import { Text } from '@trezor/components'; import { Translation } from 'src/components/suite'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingPaymentType.tsx b/packages/suite/src/views/wallet/trading/common/TradingPaymentType.tsx index c64f11c81ca..2ac6fa8917b 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingPaymentType.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingPaymentType.tsx @@ -1,6 +1,6 @@ import { Row } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { invityAPI, type TradingPaymentMethodType } from '@suite-common/invity'; +import { invityAPI, type TradingPaymentMethodType } from '@suite-common/trading'; import { TradingPaymentPlainType } from 'src/views/wallet/trading/common/TradingPaymentPlainType'; import { TradingIcon } from 'src/views/wallet/trading/common/TradingIcon'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingProviderInfo.tsx b/packages/suite/src/views/wallet/trading/common/TradingProviderInfo.tsx index ef17648027e..e371a0f0c31 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingProviderInfo.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingProviderInfo.tsx @@ -1,6 +1,6 @@ import { Row, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { Translation } from 'src/components/suite'; import { TradingIcon } from 'src/views/wallet/trading/common/TradingIcon'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoExchangeType.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoExchangeType.tsx index bdfbcb43051..2baac365dea 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoExchangeType.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoExchangeType.tsx @@ -1,7 +1,7 @@ import { ExchangeTrade } from 'invity-api'; import { Row, Tooltip, Text } from '@trezor/components'; -import type { TradingTradeType } from '@suite-common/invity'; +import type { TradingTradeType } from '@suite-common/trading'; import { Translation } from 'src/components/suite'; import { TradingExchangeProvidersInfoProps } from 'src/types/trading/trading'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoItem.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoItem.tsx index be56b68b66d..c914b59a02b 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoItem.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoItem.tsx @@ -3,7 +3,7 @@ import { CryptoId } from 'invity-api'; import { Account } from '@suite-common/wallet-types'; import { Column, Row, InfoItem, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import type { TradingType } from '@suite-common/invity'; +import type { TradingType } from '@suite-common/trading'; import { AccountLabeling, Translation } from 'src/components/suite'; import { TradingPayGetLabelType } from 'src/types/trading/trading'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoPaymentMethod.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoPaymentMethod.tsx index 5e0b8cd8a64..61882a15596 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoPaymentMethod.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingInfo/TradingInfoPaymentMethod.tsx @@ -1,4 +1,4 @@ -import type { TradingPaymentMethodType } from '@suite-common/invity'; +import type { TradingPaymentMethodType } from '@suite-common/trading'; import { InfoItem } from '@trezor/components'; import { Translation } from 'src/components/suite'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchange.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchange.tsx index 3a2552d83a7..9158f8d0c31 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchange.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchange.tsx @@ -2,7 +2,7 @@ import { Fragment } from 'react'; import { Divider, Card } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import type { TradingExchangeType } from '@suite-common/invity'; +import type { TradingExchangeType } from '@suite-common/trading'; import { TradingSelectedOfferInfo } from 'src/views/wallet/trading/common/TradingSelectedOffer/TradingSelectedOfferInfo'; import { TradingVerify } from 'src/views/wallet/trading/common/TradingSelectedOffer/TradingVerify/TradingVerify'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSend.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSend.tsx index 84bf21f77a9..7ceb770cfc8 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSend.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSend.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react'; import { Button, Column, Divider, InfoItem, Spinner, Text } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import type { TradingExchangeType } from '@suite-common/invity'; +import type { TradingExchangeType } from '@suite-common/trading'; import { useTradingFormContext } from 'src/hooks/wallet/trading/form/useTradingCommonForm'; import { useTradingWatchTrade } from 'src/hooks/wallet/trading/useTradingWatchTrade'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendApproval.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendApproval.tsx index b9e80ffc3e5..37d800109ca 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendApproval.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendApproval.tsx @@ -16,7 +16,7 @@ import { Card, } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import type { TradingExchangeType } from '@suite-common/invity'; +import type { TradingExchangeType } from '@suite-common/trading'; import { Translation, AccountLabeling } from 'src/components/suite'; import { useTradingNavigation } from 'src/hooks/wallet/useTradingNavigation'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendSwap.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendSwap.tsx index 4cb17e62460..8068a1cfb4e 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendSwap.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferExchange/TradingOfferExchangeSendSwap.tsx @@ -21,7 +21,7 @@ import { BottomText } from '@trezor/components/src/components/form/BottomText'; import { TranslationKey } from '@suite-common/intl-types'; import { spacings } from '@trezor/theme'; import { getDisplaySymbol } from '@suite-common/wallet-config'; -import type { TradingExchangeType } from '@suite-common/invity'; +import type { TradingExchangeType } from '@suite-common/trading'; import { Translation, AccountLabeling, FormattedCryptoAmount } from 'src/components/suite'; import { useTradingFormContext } from 'src/hooks/wallet/trading/form/useTradingCommonForm'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSell.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSell.tsx index 57b5e3d69ca..853cd5e7360 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSell.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSell.tsx @@ -2,7 +2,7 @@ import { Fragment } from 'react'; import { Divider, Card } from '@trezor/components'; import { spacings } from '@trezor/theme'; -import type { TradingSellType } from '@suite-common/invity'; +import type { TradingSellType } from '@suite-common/trading'; import { useTradingFormContext } from 'src/hooks/wallet/trading/form/useTradingCommonForm'; import { TradingOfferSellProps } from 'src/types/trading/tradingForm'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellBankAccount.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellBankAccount.tsx index 55e4faa444e..d16cb08bcd7 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellBankAccount.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellBankAccount.tsx @@ -5,7 +5,7 @@ import { BankAccount } from 'invity-api'; import { Button, Select, Icon, Row } from '@trezor/components'; import { fontWeights, spacingsPx, typography } from '@trezor/theme'; -import type { TradingSellType } from '@suite-common/invity'; +import type { TradingSellType } from '@suite-common/trading'; import { QuestionTooltip, Translation } from 'src/components/suite'; import { formatIban } from 'src/utils/wallet/trading/sellUtils'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellTransaction.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellTransaction.tsx index 07f9329cf03..e96cea4f010 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellTransaction.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingOfferSell/TradingOfferSellTransaction.tsx @@ -2,7 +2,7 @@ import styled from 'styled-components'; import { Button, Column, Spinner, Text } from '@trezor/components'; import { spacings, spacingsPx, typography } from '@trezor/theme'; -import type { TradingSellType } from '@suite-common/invity'; +import type { TradingSellType } from '@suite-common/trading'; import { Translation, AccountLabeling } from 'src/components/suite'; import { useTradingWatchTrade } from 'src/hooks/wallet/trading/useTradingWatchTrade'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingVerify/TradingVerify.tsx b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingVerify/TradingVerify.tsx index 89e996449bf..2a8c9d824da 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingVerify/TradingVerify.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingSelectedOffer/TradingVerify/TradingVerify.tsx @@ -7,7 +7,7 @@ import { Input, Button, Paragraph, Divider, Column, Tooltip } from '@trezor/comp import { spacings } from '@trezor/theme'; import { isHexValid, isInteger } from '@suite-common/wallet-utils'; import { getDisplaySymbol } from '@suite-common/wallet-config'; -import { TradingExchangeType } from '@suite-common/invity'; +import { TradingExchangeType } from '@suite-common/trading'; import { Translation } from 'src/components/suite'; import { useTranslation } from 'src/hooks/suite/useTranslation'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingTransactions/TradingTransaction/TradingTransactionProvider.tsx b/packages/suite/src/views/wallet/trading/common/TradingTransactions/TradingTransaction/TradingTransactionProvider.tsx index 4366660b9a7..4c77d00dc7a 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingTransactions/TradingTransaction/TradingTransactionProvider.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingTransactions/TradingTransaction/TradingTransactionProvider.tsx @@ -1,4 +1,4 @@ -import type { TradingPaymentMethodType } from '@suite-common/invity'; +import type { TradingPaymentMethodType } from '@suite-common/trading'; import { Flex, FlexProps, useMediaQuery, variables } from '@trezor/components'; import { spacings } from '@trezor/theme'; diff --git a/packages/suite/src/views/wallet/trading/common/TradingUtils/TradingUtilsProvider.tsx b/packages/suite/src/views/wallet/trading/common/TradingUtils/TradingUtilsProvider.tsx index 612bc6c2376..6c1832a543f 100644 --- a/packages/suite/src/views/wallet/trading/common/TradingUtils/TradingUtilsProvider.tsx +++ b/packages/suite/src/views/wallet/trading/common/TradingUtils/TradingUtilsProvider.tsx @@ -2,7 +2,7 @@ import styled from 'styled-components'; import { spacings } from '@trezor/theme'; import { Row } from '@trezor/components'; -import { invityAPI } from '@suite-common/invity'; +import { invityAPI } from '@suite-common/trading'; import { Translation } from 'src/components/suite'; import { TradingUtilsProvidersProps } from 'src/types/trading/trading'; diff --git a/packages/suite/tsconfig.json b/packages/suite/tsconfig.json index 22418443b0a..21d7904589f 100644 --- a/packages/suite/tsconfig.json +++ b/packages/suite/tsconfig.json @@ -33,7 +33,6 @@ { "path": "../../suite-common/intl-types" }, - { "path": "../../suite-common/invity" }, { "path": "../../suite-common/logger" }, { "path": "../../suite-common/message-system" @@ -66,6 +65,7 @@ { "path": "../../suite-common/token-definitions" }, + { "path": "../../suite-common/trading" }, { "path": "../../suite-common/validators" }, diff --git a/suite-common/invity/package.json b/suite-common/trading/package.json similarity index 92% rename from suite-common/invity/package.json rename to suite-common/trading/package.json index 10ac75113b8..237f9ea625e 100644 --- a/suite-common/invity/package.json +++ b/suite-common/trading/package.json @@ -1,5 +1,5 @@ { - "name": "@suite-common/invity", + "name": "@suite-common/trading", "version": "1.0.0", "private": true, "license": "See LICENSE.md in repo root", diff --git a/suite-common/invity/src/index.ts b/suite-common/trading/src/index.ts similarity index 100% rename from suite-common/invity/src/index.ts rename to suite-common/trading/src/index.ts diff --git a/suite-common/invity/src/invityAPI.ts b/suite-common/trading/src/invityAPI.ts similarity index 99% rename from suite-common/invity/src/invityAPI.ts rename to suite-common/trading/src/invityAPI.ts index 33256c4c93a..d2b1375ade0 100644 --- a/suite-common/invity/src/invityAPI.ts +++ b/suite-common/trading/src/invityAPI.ts @@ -31,7 +31,7 @@ import type { TradingPaymentMethodType, TradingType, TradingWatchTradeResponsePropsMap, -} from '@suite-common/invity'; +} from '@suite-common/trading'; import { getSuiteVersion, isDesktop, isNative } from '@trezor/env-utils'; type BodyType = diff --git a/suite-common/invity/src/regional.ts b/suite-common/trading/src/regional.ts similarity index 100% rename from suite-common/invity/src/regional.ts rename to suite-common/trading/src/regional.ts diff --git a/suite-common/invity/src/types.ts b/suite-common/trading/src/types.ts similarity index 100% rename from suite-common/invity/src/types.ts rename to suite-common/trading/src/types.ts diff --git a/suite-common/invity/tsconfig.json b/suite-common/trading/tsconfig.json similarity index 100% rename from suite-common/invity/tsconfig.json rename to suite-common/trading/tsconfig.json diff --git a/yarn.lock b/yarn.lock index f25cccbb642..1b06395957e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9589,16 +9589,6 @@ __metadata: languageName: unknown linkType: soft -"@suite-common/invity@workspace:*, @suite-common/invity@workspace:suite-common/invity": - version: 0.0.0-use.local - resolution: "@suite-common/invity@workspace:suite-common/invity" - dependencies: - "@trezor/env-utils": "workspace:*" - "@trezor/utils": "workspace:*" - "@types/invity-api": "npm:^1.1.2" - languageName: unknown - linkType: soft - "@suite-common/logger@workspace:*, @suite-common/logger@workspace:suite-common/logger": version: 0.0.0-use.local resolution: "@suite-common/logger@workspace:suite-common/logger" @@ -9771,6 +9761,16 @@ __metadata: languageName: unknown linkType: soft +"@suite-common/trading@workspace:*, @suite-common/trading@workspace:suite-common/trading": + version: 0.0.0-use.local + resolution: "@suite-common/trading@workspace:suite-common/trading" + dependencies: + "@trezor/env-utils": "workspace:*" + "@trezor/utils": "workspace:*" + "@types/invity-api": "npm:^1.1.2" + languageName: unknown + linkType: soft + "@suite-common/validators@workspace:*, @suite-common/validators@workspace:suite-common/validators": version: 0.0.0-use.local resolution: "@suite-common/validators@workspace:suite-common/validators" @@ -12667,7 +12667,6 @@ __metadata: "@suite-common/formatters": "workspace:*" "@suite-common/icons": "workspace:*" "@suite-common/intl-types": "workspace:*" - "@suite-common/invity": "workspace:*" "@suite-common/logger": "workspace:*" "@suite-common/message-system": "workspace:*" "@suite-common/metadata-types": "workspace:*" @@ -12680,6 +12679,7 @@ __metadata: "@suite-common/test-utils": "workspace:*" "@suite-common/toast-notifications": "workspace:*" "@suite-common/token-definitions": "workspace:*" + "@suite-common/trading": "workspace:*" "@suite-common/validators": "workspace:*" "@suite-common/wallet-config": "workspace:*" "@suite-common/wallet-constants": "workspace:*"