From 300bf86146d13e199921665d35e09e9a59c3c1ce Mon Sep 17 00:00:00 2001 From: 0xChqrles Date: Wed, 1 May 2024 11:29:45 +0200 Subject: [PATCH] moved some constants back to frontend --- packages/core/src/constants/misc.ts | 3 --- .../frontend/src/components/TransactionModal/index.tsx | 1 - packages/frontend/src/constants/misc.ts | 3 +++ .../src/pages/Token/LaunchForm/Confirm/StandardAmm.tsx | 8 ++------ 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/core/src/constants/misc.ts b/packages/core/src/constants/misc.ts index 44e85e41..ffefea1f 100644 --- a/packages/core/src/constants/misc.ts +++ b/packages/core/src/constants/misc.ts @@ -41,9 +41,6 @@ export enum LiquidityType { EKUBO_NFT = 'EKUBO_NFT', } -export const STARKNET_POLLING = 3_000 // 3s -export const STARKNET_MAX_BLOCK_TIME = 3600 * 2 // 2h - export const MIN_STARTING_MCAP = 5_000 // $5k export const RECOMMENDED_STARTING_MCAP = 10_000 // $12k diff --git a/packages/frontend/src/components/TransactionModal/index.tsx b/packages/frontend/src/components/TransactionModal/index.tsx index 7a4bdf8f..083a17ef 100644 --- a/packages/frontend/src/components/TransactionModal/index.tsx +++ b/packages/frontend/src/components/TransactionModal/index.tsx @@ -1,5 +1,4 @@ import { useContractWrite, useWaitForTransaction } from '@starknet-react/core' -import { STARKNET_POLLING } from 'core/constants' import { useEffect, useMemo, useState } from 'react' import { useCloseModal, useTransactionModal } from 'src/hooks/useModal' import { useTransaction } from 'src/hooks/useTransactions' diff --git a/packages/frontend/src/constants/misc.ts b/packages/frontend/src/constants/misc.ts index 36b31bb0..770cec9b 100644 --- a/packages/frontend/src/constants/misc.ts +++ b/packages/frontend/src/constants/misc.ts @@ -1,3 +1,6 @@ export const PERCENTAGE_INPUT_PRECISION = 2 export const FOREVER = 'Forever' + +export const STARKNET_POLLING = 3_000 // 3s +export const STARKNET_MAX_BLOCK_TIME = 3600 * 2 // 2h diff --git a/packages/frontend/src/pages/Token/LaunchForm/Confirm/StandardAmm.tsx b/packages/frontend/src/pages/Token/LaunchForm/Confirm/StandardAmm.tsx index 4f59a3db..d1c51f2a 100644 --- a/packages/frontend/src/pages/Token/LaunchForm/Confirm/StandardAmm.tsx +++ b/packages/frontend/src/pages/Token/LaunchForm/Confirm/StandardAmm.tsx @@ -1,14 +1,10 @@ import { Fraction } from '@uniswap/sdk-core' -import { - AMM, - LIQUIDITY_LOCK_FOREVER_TIMESTAMP, - MAX_LIQUIDITY_LOCK_PERIOD, - STARKNET_MAX_BLOCK_TIME, -} from 'core/constants' +import { AMM, LIQUIDITY_LOCK_FOREVER_TIMESTAMP, MAX_LIQUIDITY_LOCK_PERIOD } from 'core/constants' import { useFactory, useQuoteToken, useQuoteTokenPrice } from 'hooks' import moment from 'moment' import { useCallback, useMemo } from 'react' import { useParams } from 'react-router-dom' +import { STARKNET_MAX_BLOCK_TIME } from 'src/constants/misc' import { useHodlLimitForm, useLiquidityForm,