Skip to content

Commit

Permalink
fix: eXOF max rate bypass (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
nvtaveras authored Oct 16, 2023
1 parent 7a12bb7 commit 2a08166
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/features/swap/SwapConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

1 comment on commit 2a08166

@vercel
Copy link

@vercel vercel bot commented on 2a08166 Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.