From a1fdc281360ddf4eced091e851f4595b62da761e Mon Sep 17 00:00:00 2001 From: Enzo Vezzaro Date: Mon, 6 Jun 2022 10:46:20 -0400 Subject: [PATCH] block users from selection when on unsupported asset --- .../Asset/AssetActions/Compute/FormComputeDataset.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx b/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx index 8f8c16dfb..78f220066 100644 --- a/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx +++ b/src/components/Asset/AssetActions/Compute/FormComputeDataset.tsx @@ -83,7 +83,7 @@ export default function FormStartCompute({ selectedAlgorithmAsset?.accessDetails?.price ) const [isBalanceSufficient, setIsBalanceSufficient] = useState(false) - const { accountId, balance } = useWeb3() + const { accountId, balance, isSupportedOceanNetwork } = useWeb3() function getAlgorithmAsset(algorithmId: string): Asset { let assetDdo = null @@ -105,7 +105,7 @@ export default function FormStartCompute({ ) const extendedAlgoAsset: AssetExtended = { ...algorithmAsset, - accessDetails: accessDetails + accessDetails } setSelectedAlgorithm(extendedAlgoAsset) } @@ -169,6 +169,7 @@ export default function FormStartCompute({ {...field} options={algorithms} component={Input} + disabled={isLoading || !isSupportedOceanNetwork} /> ))}