update button text

This commit is contained in:
saml33 2023-01-09 21:01:21 +11:00
parent 8b00e67159
commit 3a8a0d1df8
1 changed files with 6 additions and 7 deletions

View File

@ -259,8 +259,12 @@ const SwapForm = () => {
])
const loadingSwapDetails: boolean = useMemo(() => {
return !!amountInAsDecimal.toNumber() && connected && !selectedRoute
}, [amountInAsDecimal, connected, selectedRoute])
return (
!!(amountInAsDecimal.toNumber() || amountOutAsDecimal.toNumber()) &&
connected &&
!selectedRoute
)
}, [amountInAsDecimal, amountOutAsDecimal, connected, selectedRoute])
return (
<ContentBox
@ -527,11 +531,6 @@ const SwapFormSubmitButton = ({
</div>
) : loadingSwapDetails ? (
<Loading />
) : disabled ? (
<div className="flex items-center">
<ExclamationCircleIcon className="mr-2 h-5 w-5 flex-shrink-0" />
No routes found
</div>
) : (
<span>{t('swap:review-swap')}</span>
)