fix: uniswapx review modal success display (#7097)
* fix: update swapConfirmed logic * fix: success icon display
This commit is contained in:
parent
684258dc17
commit
bd573724b9
@ -77,6 +77,7 @@ function Loader() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Success = styled(AnimatedEntranceConfirmationIcon)`
|
const Success = styled(AnimatedEntranceConfirmationIcon)`
|
||||||
|
position: relative;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
`
|
`
|
||||||
|
|
||||||
|
@ -265,13 +265,10 @@ export function PendingModalContent({
|
|||||||
const { chainId } = useWeb3React()
|
const { chainId } = useWeb3React()
|
||||||
|
|
||||||
const swapStatus = useSwapTransactionStatus(swapResult)
|
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)
|
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 swapPending = swapResult !== undefined && !swapConfirmed
|
||||||
const wrapPending = wrapTxHash != undefined && !wrapConfirmed
|
const wrapPending = wrapTxHash != undefined && !wrapConfirmed
|
||||||
@ -288,8 +285,6 @@ export function PendingModalContent({
|
|||||||
chainId,
|
chainId,
|
||||||
})
|
})
|
||||||
|
|
||||||
const order = useOrder(swapResult?.type === TradeFillType.UniswapX ? swapResult.response.orderHash : '')
|
|
||||||
|
|
||||||
const currentStepContainerRef = useRef<HTMLDivElement>(null)
|
const currentStepContainerRef = useRef<HTMLDivElement>(null)
|
||||||
useUnmountingAnimation(currentStepContainerRef, () => AnimationType.EXITING)
|
useUnmountingAnimation(currentStepContainerRef, () => AnimationType.EXITING)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user