Skip to content

Commit

Permalink
fix: compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewlilley committed Apr 14, 2022
1 parent 6b24eef commit 059c128
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/features/trident/swap/SwapButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ import Button from 'app/components/Button'
import Dots from 'app/components/Dots'
import Typography from 'app/components/Typography'
import { useDerivedTridentSwapContext } from 'app/features/trident/swap/DerivedTradeContext'
import { selectTridentSwap, setBentoPermit, setTridentSwapState } from 'app/features/trident/swap/swapSlice'
import { selectTridentSwap, setTridentSwapState } from 'app/features/trident/swap/swapSlice'
import { computeFiatValuePriceImpact, warningSeverity } from 'app/functions'
import { getTradeVersion } from 'app/functions/getTradeVersion'
import { useBentoBoxContract, useRouterContract, useTridentRouterContract } from 'app/hooks'
import { useUSDCValue } from 'app/hooks/useUSDCPrice'
import { useAppDispatch, useAppSelector } from 'app/state/hooks'
import { useExpertModeManager } from 'app/state/user/hooks'
import { TradeUnion } from 'app/types'
import React, { FC, useCallback, useMemo } from 'react'
import { Signature } from 'ethers'
import React, { FC, useCallback, useMemo, useState } from 'react'

import TridentApproveGate from '../TridentApproveGate'

Expand All @@ -36,6 +37,7 @@ const SwapButton: FC<SwapButton> = ({ onClick, spendFromWallet = true }) => {
const priceImpact = computeFiatValuePriceImpact(fiatValueInput, fiatValueOutput)
const [isExpertMode] = useExpertModeManager()
const [permitError, setPermitError] = useState<boolean>()
const [permit, setPermit] = useState<Signature>()
const priceImpactSeverity = useMemo(() => {
const executionPriceImpact = trade?.priceImpact
return warningSeverity(
Expand Down Expand Up @@ -70,8 +72,8 @@ const SwapButton: FC<SwapButton> = ({ onClick, spendFromWallet = true }) => {
{...(!isLegacy
? {
withPermit: true,
permit: bentoPermit,
onPermit: (permit) => dispatch(setBentoPermit(permit)),
permit,
onPermit: setPermit,
onPermitError: () => setPermitError(true),
}
: { withPermit: false })}
Expand Down

1 comment on commit 059c128

@vercel
Copy link

@vercel vercel bot commented on 059c128 Apr 14, 2022

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.