From 21868e08e612f7398d92937d279ac39363808868 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 9 Mar 2021 12:36:44 -0330 Subject: [PATCH] Move the METASWAP_API_HOST constant to the swaps constant file (#10612) --- ui/app/helpers/constants/swaps.js | 2 ++ ui/app/pages/swaps/swaps.util.js | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/app/helpers/constants/swaps.js b/ui/app/helpers/constants/swaps.js index 1850d23e0..7ae20c5ae 100644 --- a/ui/app/helpers/constants/swaps.js +++ b/ui/app/helpers/constants/swaps.js @@ -21,3 +21,5 @@ export const DEFAULT_ERC20_APPROVE_GAS = '0x1d4c0'; export const SWAPS_CONTRACT_ADDRESS = '0x881d40237659c251811cec9c364ef91dc08d300c'; + +export const METASWAP_API_HOST = 'https://api.metaswap.codefi.network'; diff --git a/ui/app/pages/swaps/swaps.util.js b/ui/app/pages/swaps/swaps.util.js index 934caf509..aed3ce2f0 100644 --- a/ui/app/pages/swaps/swaps.util.js +++ b/ui/app/pages/swaps/swaps.util.js @@ -2,7 +2,10 @@ import log from 'loglevel'; import BigNumber from 'bignumber.js'; import abi from 'human-standard-token-abi'; import { isValidAddress } from 'ethereumjs-util'; -import { ETH_SWAPS_TOKEN_OBJECT } from '../../helpers/constants/swaps'; +import { + ETH_SWAPS_TOKEN_OBJECT, + METASWAP_API_HOST, +} from '../../helpers/constants/swaps'; import { calcTokenValue, calcTokenAmount, @@ -27,8 +30,6 @@ const TOKEN_TRANSFER_LOG_TOPIC_HASH = const CACHE_REFRESH_ONE_HOUR = 3600000; -const METASWAP_API_HOST = 'https://api.metaswap.codefi.network'; - const getBaseApi = function (type) { switch (type) { case 'trade':