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