From 2a08166bca3482cadfb19202f78f6f4b13f934f2 Mon Sep 17 00:00:00 2001 From: Nelson Taveras <4562733+nvtaveras@users.noreply.github.com> Date: Mon, 16 Oct 2023 18:13:40 +0200 Subject: [PATCH] fix: eXOF max rate bypass (#112) --- src/features/swap/SwapConfirm.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/features/swap/SwapConfirm.tsx b/src/features/swap/SwapConfirm.tsx index b965af6..7bb690d 100644 --- a/src/features/swap/SwapConfirm.tsx +++ b/src/features/swap/SwapConfirm.tsx @@ -111,10 +111,10 @@ export function SwapConfirmCard({ formValues }: Props) { return } const rateBN = new BigNumber(rate) - if ( - ((toTokenId || fromTokenId) !== 'eXOF' && rateBN.lt(MIN_EXCHANGE_RATE)) || - rateBN.gt(MAX_EXCHANGE_RATE) - ) { + + // ignore eXOF for now until we have a better way to handle it + const tradeHasEXOF = toTokenId === 'eXOF' || fromTokenId === 'eXOF' + if (!tradeHasEXOF && (rateBN.lt(MIN_EXCHANGE_RATE) || rateBN.gt(MAX_EXCHANGE_RATE))) { toast.error('Rate seems incorrect') return }