mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
more typos
This commit is contained in:
parent
db23ed6ada
commit
b09dc6b953
@ -92,6 +92,7 @@ export async function isOrderable(
|
|||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const datasetService: Service = getServiceById(asset, serviceId)
|
const datasetService: Service = getServiceById(asset, serviceId)
|
||||||
if (!datasetService) return false
|
if (!datasetService) return false
|
||||||
|
|
||||||
if (datasetService.type === 'compute') {
|
if (datasetService.type === 'compute') {
|
||||||
if (algorithm.meta) {
|
if (algorithm.meta) {
|
||||||
// check if raw algo is allowed
|
// check if raw algo is allowed
|
||||||
|
@ -63,9 +63,11 @@ export default function Compute({
|
|||||||
consumableFeedback?: string
|
consumableFeedback?: string
|
||||||
}): ReactElement {
|
}): ReactElement {
|
||||||
const { accountId, web3 } = useWeb3()
|
const { accountId, web3 } = useWeb3()
|
||||||
|
const { getOpcFeeForToken } = useMarketMetadata()
|
||||||
|
const newAbortController = useAbortController()
|
||||||
|
|
||||||
const [isJobStarting, setIsJobStarting] = useState(false)
|
const [isJobStarting, setIsJobStarting] = useState(false)
|
||||||
const [error, setError] = useState<string>()
|
const [error, setError] = useState<string>()
|
||||||
const newAbortController = useAbortController()
|
|
||||||
|
|
||||||
const [algorithmList, setAlgorithmList] = useState<AssetSelectionAsset[]>()
|
const [algorithmList, setAlgorithmList] = useState<AssetSelectionAsset[]>()
|
||||||
const [ddoAlgorithmList, setDdoAlgorithmList] = useState<Asset[]>()
|
const [ddoAlgorithmList, setDdoAlgorithmList] = useState<Asset[]>()
|
||||||
@ -78,8 +80,6 @@ export default function Compute({
|
|||||||
const [validOrderTx, setValidOrderTx] = useState('')
|
const [validOrderTx, setValidOrderTx] = useState('')
|
||||||
const [validAlgorithmOrderTx, setValidAlgorithmOrderTx] = useState('')
|
const [validAlgorithmOrderTx, setValidAlgorithmOrderTx] = useState('')
|
||||||
|
|
||||||
const hasDatatoken = Number(dtBalance) >= 1
|
|
||||||
const { getOpcFeeForToken } = useMarketMetadata()
|
|
||||||
const { poolData } = usePool()
|
const { poolData } = usePool()
|
||||||
const newCancelToken = useCancelToken()
|
const newCancelToken = useCancelToken()
|
||||||
const [isConsumablePrice, setIsConsumablePrice] = useState(true)
|
const [isConsumablePrice, setIsConsumablePrice] = useState(true)
|
||||||
@ -95,7 +95,9 @@ export default function Compute({
|
|||||||
useState<OrderPriceAndFees>()
|
useState<OrderPriceAndFees>()
|
||||||
const [isRequestingAlgoOrderPrice, setIsRequestingAlgoOrderPrice] =
|
const [isRequestingAlgoOrderPrice, setIsRequestingAlgoOrderPrice] =
|
||||||
useState(false)
|
useState(false)
|
||||||
const [refetchJobs, setRefatchJobs] = useState(false)
|
const [refetchJobs, setRefetchJobs] = useState(false)
|
||||||
|
|
||||||
|
const hasDatatoken = Number(dtBalance) >= 1
|
||||||
const isComputeButtonDisabled =
|
const isComputeButtonDisabled =
|
||||||
isJobStarting === true ||
|
isJobStarting === true ||
|
||||||
file === null ||
|
file === null ||
|
||||||
@ -157,8 +159,8 @@ export default function Compute({
|
|||||||
) {
|
) {
|
||||||
setComputeStatusText(
|
setComputeStatusText(
|
||||||
getComputeFeedback(
|
getComputeFeedback(
|
||||||
asset.accessDetails.baseToken?.symbol,
|
asset.accessDetails?.baseToken?.symbol,
|
||||||
asset.accessDetails.datatoken?.symbol,
|
asset.accessDetails?.datatoken?.symbol,
|
||||||
asset.metadata.type
|
asset.metadata.type
|
||||||
)[0]
|
)[0]
|
||||||
)
|
)
|
||||||
@ -208,7 +210,7 @@ export default function Compute({
|
|||||||
if (selectedAlgorithmAsset?.accessDetails?.type === 'dynamic') {
|
if (selectedAlgorithmAsset?.accessDetails?.type === 'dynamic') {
|
||||||
const response = await getPoolData(
|
const response = await getPoolData(
|
||||||
selectedAlgorithmAsset.chainId,
|
selectedAlgorithmAsset.chainId,
|
||||||
selectedAlgorithmAsset.accessDetails.addressOrId,
|
selectedAlgorithmAsset.accessDetails?.addressOrId,
|
||||||
selectedAlgorithmAsset?.nft.owner,
|
selectedAlgorithmAsset?.nft.owner,
|
||||||
accountId || ''
|
accountId || ''
|
||||||
)
|
)
|
||||||
@ -401,7 +403,7 @@ export default function Compute({
|
|||||||
}
|
}
|
||||||
LoggerInstance.log('[compute] Starting compute job response: ', response)
|
LoggerInstance.log('[compute] Starting compute job response: ', response)
|
||||||
setIsPublished(true)
|
setIsPublished(true)
|
||||||
setRefatchJobs(!refetchJobs)
|
setRefetchJobs(!refetchJobs)
|
||||||
initPriceAndFees()
|
initPriceAndFees()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setError('Failed to start job!')
|
setError('Failed to start job!')
|
||||||
|
Loading…
Reference in New Issue
Block a user