diff --git a/package-lock.json b/package-lock.json index f13d3e5e4..627899738 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,6 @@ "gray-matter": "^4.0.3", "is-url-superb": "^6.1.0", "js-cookie": "^3.0.1", - "js-sha256": "^0.9.0", "jwt-decode": "^3.1.2", "lodash.debounce": "^4.0.8", "lodash.omit": "^4.5.0", @@ -17040,11 +17039,6 @@ "node": ">=12" } }, - "node_modules/js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" - }, "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", @@ -43508,11 +43502,6 @@ "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==" }, - "js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" - }, "js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", diff --git a/package.json b/package.json index 67f630c06..5a80a45cc 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "gray-matter": "^4.0.3", "is-url-superb": "^6.1.0", "js-cookie": "^3.0.1", - "js-sha256": "^0.9.0", "jwt-decode": "^3.1.2", "lodash.debounce": "^4.0.8", "lodash.omit": "^4.5.0", diff --git a/src/@hooks/useConsume.ts b/src/@hooks/useConsume.ts index 6faf86ac5..2ee3466bd 100644 --- a/src/@hooks/useConsume.ts +++ b/src/@hooks/useConsume.ts @@ -44,36 +44,36 @@ function useConsume(): UseConsume { try { setStep(0) - if (!orderId) { - // if we don't have a previous valid order, get one - // const userOwnedTokens = await ocean.accounts.getTokenBalance( - // dataTokenAddress, - // account - // ) - // if (parseFloat(userOwnedTokens) < 1) { - // setConsumeError('Not enough datatokens') - // return 'Not enough datatokens' - // } else { - // setStep(1) - // try { - // orderId = await ocean.assets.order( - // did as string, - // serviceType, - // accountId, - // undefined, - // marketFeeAddress, - // undefined, - // null, - // false - // ) - // LoggerInstance.log('order created', orderId) - // setStep(2) - // } catch (error) { - // setConsumeError(error.message) - // return error.message - // } - // } - } + // if (!orderId) { + // if we don't have a previous valid order, get one + // const userOwnedTokens = await ocean.accounts.getTokenBalance( + // dataTokenAddress, + // account + // ) + // if (parseFloat(userOwnedTokens) < 1) { + // setConsumeError('Not enough datatokens') + // return 'Not enough datatokens' + // } else { + // setStep(1) + // try { + // orderId = await ocean.assets.order( + // did as string, + // serviceType, + // accountId, + // undefined, + // marketFeeAddress, + // undefined, + // null, + // false + // ) + // LoggerInstance.log('order created', orderId) + // setStep(2) + // } catch (error) { + // setConsumeError(error.message) + // return error.message + // } + // } + // } setStep(3) // if (orderId) // await ocean.assets.download( diff --git a/src/components/Publish/Navigation/index.module.css b/src/components/Publish/Navigation/index.module.css index c7eb3250d..10ba16333 100644 --- a/src/components/Publish/Navigation/index.module.css +++ b/src/components/Publish/Navigation/index.module.css @@ -90,5 +90,6 @@ .success.current:before { background: var(--font-color-heading); + color: var(--brand-alert-green); border-color: var(--brand-alert-green); } diff --git a/src/components/Publish/index.tsx b/src/components/Publish/index.tsx index 726b9e64c..efdad1da2 100644 --- a/src/components/Publish/index.tsx +++ b/src/components/Publish/index.tsx @@ -28,10 +28,10 @@ import { LoggerInstance } from '@oceanprotocol/lib' import { useSiteMetadata } from '@hooks/useSiteMetadata' -import Web3 from 'web3' import axios, { Method } from 'axios' import { useCancelToken } from '@hooks/useCancelToken' import { getOceanConfig } from '@utils/ocean' +import { validationSchema } from './_validation' // TODO: restore FormikPersist, add back clear form action const formName = 'ocean-publish-form' @@ -284,7 +284,7 @@ export default function PublishPage({ return isInPurgatory && purgatoryData ? null : ( { // kick off publishing await handleSubmit(values)