mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
block users from selection when on unsupported asset
This commit is contained in:
parent
2c726599b4
commit
a1fdc28136
@ -83,7 +83,7 @@ export default function FormStartCompute({
|
|||||||
selectedAlgorithmAsset?.accessDetails?.price
|
selectedAlgorithmAsset?.accessDetails?.price
|
||||||
)
|
)
|
||||||
const [isBalanceSufficient, setIsBalanceSufficient] = useState<boolean>(false)
|
const [isBalanceSufficient, setIsBalanceSufficient] = useState<boolean>(false)
|
||||||
const { accountId, balance } = useWeb3()
|
const { accountId, balance, isSupportedOceanNetwork } = useWeb3()
|
||||||
|
|
||||||
function getAlgorithmAsset(algorithmId: string): Asset {
|
function getAlgorithmAsset(algorithmId: string): Asset {
|
||||||
let assetDdo = null
|
let assetDdo = null
|
||||||
@ -105,7 +105,7 @@ export default function FormStartCompute({
|
|||||||
)
|
)
|
||||||
const extendedAlgoAsset: AssetExtended = {
|
const extendedAlgoAsset: AssetExtended = {
|
||||||
...algorithmAsset,
|
...algorithmAsset,
|
||||||
accessDetails: accessDetails
|
accessDetails
|
||||||
}
|
}
|
||||||
setSelectedAlgorithm(extendedAlgoAsset)
|
setSelectedAlgorithm(extendedAlgoAsset)
|
||||||
}
|
}
|
||||||
@ -169,6 +169,7 @@ export default function FormStartCompute({
|
|||||||
{...field}
|
{...field}
|
||||||
options={algorithms}
|
options={algorithms}
|
||||||
component={Input}
|
component={Input}
|
||||||
|
disabled={isLoading || !isSupportedOceanNetwork}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user