Commit bd573724 authored by cartcrom's avatar cartcrom Committed by GitHub

fix: uniswapx review modal success display (#7097)

* fix: update swapConfirmed logic

* fix: success icon display
parent 684258dc
......@@ -77,6 +77,7 @@ function Loader() {
}
const Success = styled(AnimatedEntranceConfirmationIcon)`
position: relative;
margin-bottom: 10px;
`
......
......@@ -265,13 +265,10 @@ export function PendingModalContent({
const { chainId } = useWeb3React()
const swapStatus = useSwapTransactionStatus(swapResult)
const order = useOrder(swapResult?.type === TradeFillType.UniswapX ? swapResult.response.orderHash : '')
const classicSwapConfirmed = swapStatus === TransactionStatus.Confirmed
const swapConfirmed = swapStatus === TransactionStatus.Confirmed || order?.status === UniswapXOrderStatus.FILLED
const wrapConfirmed = useIsTransactionConfirmed(wrapTxHash)
// TODO(UniswapX): Support UniswapX status here too
const uniswapXSwapConfirmed = Boolean(swapResult)
const swapConfirmed = swapResult?.type === TradeFillType.Classic ? classicSwapConfirmed : uniswapXSwapConfirmed
const swapPending = swapResult !== undefined && !swapConfirmed
const wrapPending = wrapTxHash != undefined && !wrapConfirmed
......@@ -288,8 +285,6 @@ export function PendingModalContent({
chainId,
})
const order = useOrder(swapResult?.type === TradeFillType.UniswapX ? swapResult.response.orderHash : '')
const currentStepContainerRef = useRef<HTMLDivElement>(null)
useUnmountingAnimation(currentStepContainerRef, () => AnimationType.EXITING)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment