From f77af81997bb6e96917df9628ab0326dcbe75b9e Mon Sep 17 00:00:00 2001 From: Nelson Taveras <4562733+nvtaveras@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:13:42 +0200 Subject: [PATCH] fix: remove hardcoded max trade size --- src/config/consts.ts | 2 -- src/features/swap/SwapConfirm.tsx | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/config/consts.ts b/src/config/consts.ts index e83bf74..332c9a6 100644 --- a/src/config/consts.ts +++ b/src/config/consts.ts @@ -12,8 +12,6 @@ export const SIGN_OPERATION_TIMEOUT = 90000 // 90 seconds export const STALE_TOKEN_PRICE_TIME = 900000 // 15 minutes export const MAX_TOKEN_PRICE_NUM_DAYS = 14 // 14 days -export const MAX_EXCHANGE_TOKEN_SIZE = '100000000000000000000000' // 100,000 Tokens - export const MAX_FEE_SIZE = '1000000000000000000' // 1 Token export const MAX_GAS_PRICE = '5000000000' // 5 Gwei export const MAX_GAS_LIMIT = '10000000' // 10 million diff --git a/src/features/swap/SwapConfirm.tsx b/src/features/swap/SwapConfirm.tsx index 7bb690d..b887456 100644 --- a/src/features/swap/SwapConfirm.tsx +++ b/src/features/swap/SwapConfirm.tsx @@ -6,7 +6,7 @@ import mentoLoaderBlue from 'src/animations/Mentoloader_blue.json' import mentoLoaderGreen from 'src/animations/Mentoloader_green.json' import { toastToYourSuccess } from 'src/components/TxSuccessToast' import { Button3D } from 'src/components/buttons/3DButton' -import { MAX_EXCHANGE_RATE, MAX_EXCHANGE_TOKEN_SIZE, MIN_EXCHANGE_RATE } from 'src/config/consts' +import { MAX_EXCHANGE_RATE, MIN_EXCHANGE_RATE } from 'src/config/consts' import { TokenId, Tokens } from 'src/config/tokens' import { useAppDispatch, useAppSelector } from 'src/features/store/hooks' import { setFormValues } from 'src/features/swap/swapSlice' @@ -106,10 +106,6 @@ export function SwapConfirmCard({ formValues }: Props) { const onSubmit = async () => { if (!rate || !amountWei || !address || !isConnected) return - if (new BigNumber(amountWei).gt(MAX_EXCHANGE_TOKEN_SIZE)) { - toast.error('Amount exceeds limit') - return - } const rateBN = new BigNumber(rate) // ignore eXOF for now until we have a better way to handle it