hotfix: quickfix for Trade

This commit is contained in:
Linkie Link 2023-11-11 09:15:02 +01:00
parent 91b54f947b
commit f32c7dc915
No known key found for this signature in database
GPG Key ID: 5318B0F2564D38EA

View File

@ -271,8 +271,9 @@ export default function SwapForm(props: Props) {
() => () =>
sellAssetAmount.isZero() || sellAssetAmount.isZero() ||
depositCapReachedCoins.length > 0 || depositCapReachedCoins.length > 0 ||
borrowAmount.isGreaterThanOrEqualTo(availableLiquidity), borrowAmount.isGreaterThan(availableLiquidity) ||
[sellAssetAmount, depositCapReachedCoins, borrowAmount, availableLiquidity], route.length === 0,
[sellAssetAmount, depositCapReachedCoins, borrowAmount, availableLiquidity, route],
) )
return ( return (
@ -333,7 +334,7 @@ export default function SwapForm(props: Props) {
sellAsset={sellAsset} sellAsset={sellAsset}
borrowRate={borrowAsset?.borrowRate} borrowRate={borrowAsset?.borrowRate}
buyAction={handleBuyClick} buyAction={handleBuyClick}
buyButtonDisabled={isSwapDisabled || route.length === 0} buyButtonDisabled={isSwapDisabled}
showProgressIndicator={isConfirming || isRouteLoading} showProgressIndicator={isConfirming || isRouteLoading}
isMargin={isMarginChecked} isMargin={isMarginChecked}
borrowAmount={borrowAmount} borrowAmount={borrowAmount}