Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make import path consistent #1909

Merged
merged 16 commits into from
Jun 21, 2024
2 changes: 1 addition & 1 deletion packages/blockchain-data/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"generate-types": "typechain --target=ethers-v5 --out-dir=src/typechain/types 'abi/*.json'",
"lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0",
"test": "jest",
"test:watch": "jest --watch",
"test:e2e": "jest --runInBand --testMatch \"**/?(*.)+(e2e).[jt]s?(x)\"",
"test:watch": "jest --watch",
"typecheck": "tsc --noEmit --jsx preserve"
},
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
} from '@biom3/react';
import { Checkout } from '@imtbl/checkout-sdk';
import { Environment } from '@imtbl/config';
import { getRemoteImage } from 'lib/utils';
import { useTranslation } from 'react-i18next';
import { getRemoteImage } from '../../lib/utils';

export interface ChangedYourMindDrawerProps {
visible: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MenuItem, AllIconKeys } from '@biom3/react';
import { useTranslation } from 'react-i18next';
import { TokenImage } from 'components/TokenImage/TokenImage';
import { TokenImage } from '../TokenImage/TokenImage';

export interface CoinSelectorOptionProps {
testId?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { describe, it, cy } from 'local-cypress';
import { mount } from 'cypress/react18';
import { Environment } from '@imtbl/config';
import { Web3Provider } from '@ethersproject/providers';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { ViewContextTestComponent } from '../../context/view-context/test-components/ViewContextTestComponent';
import { cyIntercept, cySmartGet } from '../../lib/testUtils';
import { ConnectLoader, ConnectLoaderParams } from './ConnectLoader';
import { StrongCheckoutWidgetsConfig } from '../../lib/withDefaultWidgetConfig';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import React, {
useMemo,
useReducer,
} from 'react';
import { ErrorView } from 'views/error/ErrorView';
import { ErrorView } from '../../views/error/ErrorView';
import {
ConnectLoaderActions,
ConnectLoaderContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, cy } from 'local-cypress';
import { mount } from 'cypress/react18';
import { Button } from '@biom3/react';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { ViewContextTestComponent } from '../../context/view-context/test-components/ViewContextTestComponent';
import { cySmartGet } from '../../lib/testUtils';
import { SimpleLayout } from '../SimpleLayout/SimpleLayout';
import { FeesBreakdown } from './FeesBreakdown';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
Drawer, Box, Divider, MenuItem,
} from '@biom3/react';
import { formatZeroAmount, tokenValueFormat } from 'lib/utils';
import { useTranslation } from 'react-i18next';
import { FormattedFee } from 'widgets/swap/functions/swapFees';
import { formatZeroAmount, tokenValueFormat } from '../../lib/utils';
import { FormattedFee } from '../../widgets/swap/functions/swapFees';
import { feeItemContainerStyles, feeItemLoadingStyles, feesBreakdownContentStyles } from './FeesBreakdownStyles';
import { FeeItem } from './FeeItem';
import { FooterLogo } from '../Footer/FooterLogo';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount } from 'cypress/react18';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { ViewContextTestComponent } from '../../context/view-context/test-components/ViewContextTestComponent';
import { SimpleLayout } from '../SimpleLayout/SimpleLayout';
import { FooterButton } from './FooterButton';
import { cySmartGet } from '../../lib/testUtils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount } from 'cypress/react18';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { ViewContextTestComponent } from '../../context/view-context/test-components/ViewContextTestComponent';
import { SimpleLayout } from '../SimpleLayout/SimpleLayout';
import { cySmartGet } from '../../lib/testUtils';
import { FooterLogo } from './FooterLogo';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mount } from 'cypress/react18';
import { WidgetTheme } from '@imtbl/checkout-sdk';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { Environment } from '@imtbl/config';
import { ViewContextTestComponent } from '../../context/view-context/test-components/ViewContextTestComponent';
import { SimpleLayout } from '../SimpleLayout/SimpleLayout';
import { cySmartGet } from '../../lib/testUtils';
import { QuickswapFooter } from './QuickswapFooter';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Body, Box } from '@biom3/react';
import { WidgetTheme } from '@imtbl/checkout-sdk';
import { useTranslation } from 'react-i18next';
import { Environment } from '@imtbl/config';
import { getRemoteImage } from 'lib/utils';
import { getRemoteImage } from '../../lib/utils';
import { quickswapFooterStyles, quickswapFooterDisclaimerTextStyles, quickswapFooterLogoStyles } from './FooterStyles';

export interface QuickswapFooterProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mount } from 'cypress/react18';
import { describe } from 'local-cypress';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { ViewContextTestComponent } from '../../../context/view-context/test-components/ViewContextTestComponent';
import { SelectForm } from './SelectForm';
import { cySmartGet } from '../../../lib/testUtils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
import { useMemo, useState } from 'react';
import { Environment } from '@imtbl/config';
import { WidgetTheme } from '@imtbl/checkout-sdk';
import { TokenImage } from 'components/TokenImage/TokenImage';
import { TokenImage } from '../../TokenImage/TokenImage';
import { FormControlWrapper } from '../FormControlWrapper/FormControlWrapper';
import { CoinSelector } from '../../CoinSelector/CoinSelector';
import { CoinSelectorOptionProps } from '../../CoinSelector/CoinSelectorOption';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mount } from 'cypress/react18';
import { describe } from 'local-cypress';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { ViewContextTestComponent } from '../../../context/view-context/test-components/ViewContextTestComponent';
import { cySmartGet } from '../../../lib/testUtils';
import { TextInputForm } from './TextInputForm';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable no-console */
import { describe, it } from 'local-cypress';
import { mount } from 'cypress/react18';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { WidgetTheme } from '@imtbl/checkout-sdk';
import { ButtCon } from '@biom3/react';
import { ViewContextTestComponent } from '../../context/view-context/test-components/ViewContextTestComponent';
import { cySmartGet } from '../../lib/testUtils';
import { SimpleLayout } from '../SimpleLayout/SimpleLayout';
import { HeaderNavigation } from './HeaderNavigation';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box } from '@biom3/react';
import { Fit, Layout, useRive } from '@rive-app/react-canvas-lite';
import { Environment } from '@imtbl/config';
import { CHECKOUT_CDN_BASE_URL } from 'lib';
import { CHECKOUT_CDN_BASE_URL } from '../../lib';
import { heroBackGroundStyles, heroImageStyles } from './HeroImageStyles';

interface RocketHeroProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ import {
Drawer,
Heading,
} from '@biom3/react';
import {
useCallback, useMemo, useEffect,
} from 'react';
import { useTranslation } from 'react-i18next';
import { Web3Provider } from '@ethersproject/providers';
import { ChainId, Checkout } from '@imtbl/checkout-sdk';
import { Environment } from '@imtbl/config';
import { FooterLogo } from 'components/Footer/FooterLogo';
import { getL1ChainId } from 'lib';
import { getChainNameById } from 'lib/chains';
import { FooterLogo } from '../Footer/FooterLogo';
import { getL1ChainId } from '../../lib';
import { getChainNameById } from '../../lib/chains';
import {
isMetaMaskProvider,
isWalletConnectProvider,
} from 'lib/provider';
import { getRemoteImage } from 'lib/utils';
import {
useCallback, useMemo, useEffect,
} from 'react';
import { useTranslation } from 'react-i18next';
} from '../../lib/provider';
import { getRemoteImage } from '../../lib/utils';

export interface NetworkSwitchDrawerProps {
visible: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
Drawer, Box, Button, Heading, CloudImage,
} from '@biom3/react';
import { useCallback, useState } from 'react';
import { ETH_TOKEN_SYMBOL } from 'lib';
import { Environment } from '@imtbl/config';
import { getRemoteImage } from 'lib/utils';
import { useTranslation } from 'react-i18next';
import { ETH_TOKEN_SYMBOL } from '../../lib';
import { getRemoteImage } from '../../lib/utils';
import {
containerStyles,
headingTextStyles,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from '@biom3/react';
import { useTranslation } from 'react-i18next';
import { Environment } from '@imtbl/config';
import { getImxTokenImage } from 'lib/utils';
import { getImxTokenImage } from '../../lib/utils';
import {
containerStyles,
contentTextStyles,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, it } from 'local-cypress';
import { mount } from 'cypress/react18';
import { ViewContextTestComponent } from 'context/view-context/test-components/ViewContextTestComponent';
import { ViewContextTestComponent } from '../../context/view-context/test-components/ViewContextTestComponent';
import { cySmartGet } from '../../lib/testUtils';
import { StatusView } from './StatusView';
import { StatusType } from './StatusType';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { ComponentProps } from 'react';
import { BiomeCombinedProviders, Box } from '@biom3/react';
import { widgetTheme } from 'lib/theme';
import { StrongCheckoutWidgetsConfig } from 'lib/withDefaultWidgetConfig';
import { usePortalId } from 'lib/hooks/usePortalId';
import { widgetTheme } from '../../lib/theme';
import { StrongCheckoutWidgetsConfig } from '../../lib/withDefaultWidgetConfig';
import { usePortalId } from '../../lib/hooks/usePortalId';
import { containerStyles } from './themeProviderStyles';

export interface ThemeProviderProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useMemo, useState } from 'react';
import { Environment } from '@imtbl/config';
import { getDefaultTokenImage } from 'lib/utils';
import { WidgetTheme } from '@imtbl/checkout-sdk';
import { getDefaultTokenImage } from '../../lib/utils';

type ImageProps = {
name?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import {
Box, Button, EllipsizedText, FramedImage, Logo,
} from '@biom3/react';
import { useContext, useEffect, useState } from 'react';
import { BridgeContext } from 'widgets/bridge/context/BridgeContext';
import { isWalletConnectProvider } from 'lib/provider';
import { useTranslation } from 'react-i18next';
import { BridgeContext } from '../../widgets/bridge/context/BridgeContext';
import { isWalletConnectProvider } from '../../lib/provider';
import {
UserJourney,
useAnalytics,
} from 'context/analytics-provider/SegmentAnalyticsProvider';
import { BridgeWidgetViews } from 'context/view-context/BridgeViewContextTypes';
import { useTranslation } from 'react-i18next';
import { useWalletConnect } from 'lib/hooks/useWalletConnect';
} from '../../context/analytics-provider/SegmentAnalyticsProvider';
import { BridgeWidgetViews } from '../../context/view-context/BridgeViewContextTypes';
import { useWalletConnect } from '../../lib/hooks/useWalletConnect';
import {
headingStyles, rawImageStyle, wcStickerLogoStyles, wcWalletLogoStyles, wcWalletLogoWrapperStyles,
} from './ChangeWalletStyles';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { TransactionResponse } from '@ethersproject/providers';
import { useContext, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { UserJourney, useAnalytics } from 'context/analytics-provider/SegmentAnalyticsProvider';
import { ViewActions, ViewContext } from 'context/view-context/ViewContext';
import { BridgeWidgetViews } from 'context/view-context/BridgeViewContextTypes';
import { LoadingView } from 'views/loading/LoadingView';
import { UserJourney, useAnalytics } from '../../context/analytics-provider/SegmentAnalyticsProvider';
import { ViewActions, ViewContext } from '../../context/view-context/ViewContext';
import { BridgeWidgetViews } from '../../context/view-context/BridgeViewContextTypes';
import { LoadingView } from '../../views/loading/LoadingView';

interface ClaimWithdrawalInProgressProps {
transactionResponse: TransactionResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
} from '@biom3/react';
import { Checkout } from '@imtbl/checkout-sdk';
import { useState, useEffect } from 'react';
import { UserJourney, useAnalytics } from 'context/analytics-provider/SegmentAnalyticsProvider';
import { PASSPORT_URL } from 'lib';
import { useTranslation } from 'react-i18next';
import { UserJourney, useAnalytics } from '../../context/analytics-provider/SegmentAnalyticsProvider';
import { PASSPORT_URL } from '../../lib';
import {
noTransactionsBodyStyle, noTransactionsContainerStyle, passportBodyStyle, containerStyles,
} from './noTransactionStyles';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import {
Body,
Box, Button, CloudImage, Drawer, Heading,
} from '@biom3/react';
import { ETH_TOKEN_SYMBOL } from 'lib';
import { useTranslation } from 'react-i18next';
import { useContext } from 'react';
import { BridgeContext } from 'widgets/bridge/context/BridgeContext';
import { getEthTokenImage } from 'lib/utils';
import { ETH_TOKEN_SYMBOL } from '../../lib';
import { getEthTokenImage } from '../../lib/utils';
import { BridgeContext } from '../../widgets/bridge/context/BridgeContext';
import {
actionButtonContainerStyles, actionButtonStyles, containerStyles, contentTextStyles,
} from './NotEnoughEthToWithdrawStyles';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Body, Box, Link } from '@biom3/react';
import { Checkout } from '@imtbl/checkout-sdk';
import { PASSPORT_URL } from 'lib';
import { useState, useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { PASSPORT_URL } from '../../lib';
import { supportMessageBoxStyle, bodyStyle } from './SupportMessageStyles';

type SupportMessageProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import {
Box, Icon, Body, EllipsizedText, FramedImage,
} from '@biom3/react';
import { ChainSlug } from '@imtbl/checkout-sdk';
import { networkName } from 'lib';
import { getChainIdBySlug } from 'lib/chains';
import { Transaction } from 'lib/clients';
import { Environment } from '@imtbl/config';
import { networkName } from '../../lib';
import { getChainIdBySlug } from '../../lib/chains';
import { Transaction } from '../../lib/clients';
import { getChainImage } from '../../lib/utils';

export interface TransactionDetailsProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
MenuItem,
Link,
} from '@biom3/react';
import { UserJourney, useAnalytics } from 'context/analytics-provider/SegmentAnalyticsProvider';
import { Transaction } from 'lib/clients/checkoutApiType';
import { MouseEvent, useMemo } from 'react';
import { TokenImage } from 'components/TokenImage/TokenImage';
import { Environment } from '@imtbl/config';
import { UserJourney, useAnalytics } from '../../context/analytics-provider/SegmentAnalyticsProvider';
import { Transaction } from '../../lib/clients/checkoutApiType';
import { TokenImage } from '../TokenImage/TokenImage';
import { containerStyles } from './transactionItemStyles';
import { TransactionDetails } from './TransactionDetails';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import {
Icon,
MenuItem,
} from '@biom3/react';
import { UserJourney, useAnalytics } from 'context/analytics-provider/SegmentAnalyticsProvider';
import { Transaction, TransactionStatus } from 'lib/clients/checkoutApiType';
import { useContext, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { BridgeWidgetViews } from 'context/view-context/BridgeViewContextTypes';
import { ViewActions, ViewContext } from 'context/view-context/ViewContext';
import { TokenImage } from 'components/TokenImage/TokenImage';
import { Environment } from '@imtbl/config';
import { UserJourney, useAnalytics } from '../../context/analytics-provider/SegmentAnalyticsProvider';
import { Transaction, TransactionStatus } from '../../lib/clients/checkoutApiType';
import { BridgeWidgetViews } from '../../context/view-context/BridgeViewContextTypes';
import { ViewActions, ViewContext } from '../../context/view-context/ViewContext';
import { TokenImage } from '../TokenImage/TokenImage';
import { actionsContainerStyles, actionsLayoutStyles, containerStyles } from './transactionItemStyles';
import { TransactionDetails } from './TransactionDetails';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import {
useEffect,
useState,
} from 'react';
import { AXELAR_SCAN_URL } from 'lib';
import { Transaction, TransactionStatus } from 'lib/clients';
import { CryptoFiatContext } from 'context/crypto-fiat-context/CryptoFiatContext';
import { calculateCryptoToFiat, getTokenImageByAddress, isNativeToken } from 'lib/utils';
import { utils } from 'ethers';
import { useTranslation } from 'react-i18next';
import { AXELAR_SCAN_URL } from '../../lib';
import { Transaction, TransactionStatus } from '../../lib/clients';
import { CryptoFiatContext } from '../../context/crypto-fiat-context/CryptoFiatContext';
import { calculateCryptoToFiat, getTokenImageByAddress, isNativeToken } from '../../lib/utils';
import { TransactionItem } from './TransactionItem';
import { KnownNetworkMap } from './transactionsType';
import { containerStyles, transactionsListStyle } from './TransactionListStyles';
Expand Down
Loading
Loading