mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-10-22 11:22:43 +02:00
Move swaps constants to the shared constants directory (#10614)
This commit is contained in:
parent
3d4dfc74a8
commit
153bbc6053
@ -13,7 +13,7 @@ import {
|
||||
QUOTES_EXPIRED_ERROR,
|
||||
QUOTES_NOT_AVAILABLE_ERROR,
|
||||
SWAPS_FETCH_ORDER_CONFLICT,
|
||||
} from '../../../ui/app/helpers/constants/swaps';
|
||||
} from '../../../shared/constants/swaps';
|
||||
import {
|
||||
fetchTradesInfo as defaultFetchTradesInfo,
|
||||
fetchSwapsFeatureLiveness as defaultFetchSwapsFeatureLiveness,
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
ROPSTEN_NETWORK_ID,
|
||||
MAINNET_NETWORK_ID,
|
||||
} from '../../../../shared/constants/network';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../../../ui/app/helpers/constants/swaps';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../../../shared/constants/swaps';
|
||||
import { createTestProviderTools } from '../../../stub/provider';
|
||||
import SwapsController, {
|
||||
utils,
|
||||
|
@ -9,7 +9,7 @@ import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||
import TransactionListItem from '../transaction-list-item';
|
||||
import Button from '../../ui/button';
|
||||
import { TOKEN_CATEGORY_HASH } from '../../../helpers/constants/transactions';
|
||||
import { SWAPS_CONTRACT_ADDRESS } from '../../../helpers/constants/swaps';
|
||||
import { SWAPS_CONTRACT_ADDRESS } from '../../../../../shared/constants/swaps';
|
||||
import { TRANSACTION_TYPES } from '../../../../../shared/constants/transaction';
|
||||
|
||||
const PAGE_INCREMENT = 10;
|
||||
|
@ -56,7 +56,7 @@ import {
|
||||
QUOTES_NOT_AVAILABLE_ERROR,
|
||||
SWAP_FAILED_ERROR,
|
||||
SWAPS_FETCH_ORDER_CONFLICT,
|
||||
} from '../../helpers/constants/swaps';
|
||||
} from '../../../../shared/constants/swaps';
|
||||
import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction';
|
||||
|
||||
const GAS_PRICES_LOADING_STATES = {
|
||||
|
@ -2,7 +2,7 @@ import { useSelector } from 'react-redux';
|
||||
import { useRouteMatch } from 'react-router-dom';
|
||||
import { getTokens } from '../ducks/metamask/metamask';
|
||||
import { ASSET_ROUTE } from '../helpers/constants/routes';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../helpers/constants/swaps';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../../shared/constants/swaps';
|
||||
|
||||
/**
|
||||
* Returns a token object for the asset that is currently being viewed.
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { TRANSACTION_TYPES } from '../../../shared/constants/transaction';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../helpers/constants/swaps';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../../shared/constants/swaps';
|
||||
import { getSwapsTokensReceivedFromTxMeta } from '../pages/swaps/swaps.util';
|
||||
import { useTokenFiatAmount } from './useTokenFiatAmount';
|
||||
|
||||
|
@ -30,7 +30,7 @@ import {
|
||||
ERROR_FETCHING_QUOTES,
|
||||
QUOTES_NOT_AVAILABLE_ERROR,
|
||||
OFFLINE_FOR_MAINTENANCE,
|
||||
} from '../../../helpers/constants/swaps';
|
||||
} from '../../../../../shared/constants/swaps';
|
||||
import { ASSET_ROUTE, DEFAULT_ROUTE } from '../../../helpers/constants/routes';
|
||||
|
||||
import { getRenderableNetworkFeesForQuote } from '../swaps.util';
|
||||
|
@ -36,7 +36,7 @@ import { useTokenTracker } from '../../../hooks/useTokenTracker';
|
||||
import { useTokenFiatAmount } from '../../../hooks/useTokenFiatAmount';
|
||||
import { useEthFiatAmount } from '../../../hooks/useEthFiatAmount';
|
||||
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../../helpers/constants/swaps';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../../../../shared/constants/swaps';
|
||||
|
||||
import { resetSwapsPostFetchState, removeToken } from '../../../store/actions';
|
||||
import { fetchTokenPrice, fetchTokenBalance } from '../swaps.util';
|
||||
|
@ -44,7 +44,7 @@ import {
|
||||
QUOTES_NOT_AVAILABLE_ERROR,
|
||||
SWAP_FAILED_ERROR,
|
||||
OFFLINE_FOR_MAINTENANCE,
|
||||
} from '../../helpers/constants/swaps';
|
||||
} from '../../../../shared/constants/swaps';
|
||||
import { MAINNET_CHAIN_ID } from '../../../../shared/constants/network';
|
||||
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../helpers/constants/swaps';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../../../shared/constants/swaps';
|
||||
|
||||
export const TRADES_BASE_PROD_URL =
|
||||
'https://api.metaswap.codefi.network/trades?';
|
||||
|
@ -5,7 +5,7 @@ import { isValidAddress } from 'ethereumjs-util';
|
||||
import {
|
||||
ETH_SWAPS_TOKEN_OBJECT,
|
||||
METASWAP_API_HOST,
|
||||
} from '../../helpers/constants/swaps';
|
||||
} from '../../../../shared/constants/swaps';
|
||||
import {
|
||||
calcTokenValue,
|
||||
calcTokenAmount,
|
||||
|
@ -73,7 +73,7 @@ import {
|
||||
getRenderableNetworkFeesForQuote,
|
||||
} from '../swaps.util';
|
||||
import { useTokenTracker } from '../../../hooks/useTokenTracker';
|
||||
import { QUOTES_EXPIRED_ERROR } from '../../../helpers/constants/swaps';
|
||||
import { QUOTES_EXPIRED_ERROR } from '../../../../../shared/constants/swaps';
|
||||
import CountdownTimer from '../countdown-timer';
|
||||
import SwapsFooter from '../swaps-footer';
|
||||
import ViewQuotePriceDifference from './view-quote-price-difference';
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
getValueFromWeiHex,
|
||||
hexToDecimal,
|
||||
} from '../helpers/utils/conversions.util';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../helpers/constants/swaps';
|
||||
import { ETH_SWAPS_TOKEN_OBJECT } from '../../../shared/constants/swaps';
|
||||
|
||||
/**
|
||||
* One of the only remaining valid uses of selecting the network subkey of the
|
||||
|
Loading…
Reference in New Issue
Block a user