diff --git a/.env.example b/.env.example index 488f0cbe6..f46d109b4 100644 --- a/.env.example +++ b/.env.example @@ -1,26 +1,15 @@ -#Spree config -NODE_URI='http://localhost:8545' -AQUARIUS_URI='http://aquarius:5000' -BRIZO_URI='http://localhost:8030' -BRIZO_ADDRESS='0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0' -SECRET_STORE_URI='http://localhost:12001' -FAUCET_URI='https://localhost:3001' -RATING_URI='http://localhost:8000' +GATSBY_INFURA_PROJECT_ID="xxx" -#Nile market -#NODE_URI='https://nile.dev-ocean.com' -#AQUARIUS_URI='https://aquarius.nile.market.dev-ocean.com' -#BRIZO_URI='https://brizo.nile.market.dev-ocean.com' -#BRIZO_ADDRESS='0xeD792C5FcC8bF3322a6ba89A6e51eF0B6fB3C530' -#SECRET_STORE_URI='https://secret-store.nile.dev-ocean.com' -#FAUCET_URI='https://faucet.nile.dev-ocean.com' -#RATING_URI='https://rating.nile.market.dev-ocean.com' +# Local config +GATSBY_NODE_URI='http://localhost:8545' +GATSBY_METADATA_STORE_URI='http://aquarius:5000' +GATSBY_PROVIDER_URI='http://localhost:8030' +GATSBY_FACTORY_ADDRESS='0xxxx' +#GATSBY_OCEAN_TOKEN_ADDRESS='0xxxx' -#Pacific market -#NODE_URI='https://pacific.oceanprotocol.com' -#AQUARIUS_URI='https://aquarius.pacific.market.dev-ocean.com' -#BRIZO_URI='https://brizo.pacific.market.dev-ocean.com' -#BRIZO_ADDRESS='0xeD792C5FcC8bF3322a6ba89A6e51eF0B6fB3C530' -#SECRET_STORE_URI='https://secret-store.oceanprotocol.com' -#FAUCET_URI='https://faucet.oceanprotocol.com' -#RATING_URI='https://rating.pacific.market.dev-ocean.com' +# Rinkeby +#GATSBY_NODE_URI='https://rinkeby.infura.io/v3/GATSBY_INFURA_PROJECT_ID' +#GATSBY_METADATA_STORE_URI='https://aquarius.rinkeby.v3.dev-ocean.com' +#GATSBY_PROVIDER_URI='https://provider.rinkeby.v3.dev-ocean.com' +#GATSBY_FACTORY_ADDRESS='0xB9d406D24B310A7D821D0b782a36909e8c925471' +#GATSBY_OCEAN_TOKEN_ADDRESS='0xf6AE724aD6e6Fa89B6aBc9710C5eb692b7F57139' diff --git a/README.md b/README.md index ff912d3d6..68f04e220 100644 --- a/README.md +++ b/README.md @@ -174,13 +174,12 @@ vercel alias ## 🏗 Ocean Protocol Infrastructure -The following Aquarius & Brizo instances specifically for marketplace are deployed in Ocean Protocol's AWS K8: +The following Metadata Store & Provider instances specifically for marketplace are deployed in Ocean Protocol's AWS K8: -**Nile (Staging)** +**Rinkeby (Staging)** -- K8 namespace: `market-nile` -- `aquarius.nile.market.dev-ocean.com` -- `brizo.nile.market.dev-ocean.com` +- `[aquarius.rinkeby.v3.dev-ocean.com](https://aquarius.rinkeby.v3.dev-ocean.com)` +- `[provider.rinkeby.v3.dev-ocean.com](https://provider.rinkeby.v3.dev-ocean.com)` Edit command with `kubectl`, e.g.: @@ -188,7 +187,7 @@ Edit command with `kubectl`, e.g.: kubectl edit deployment -n market-nile aquarius ``` -**Pacific (Production)** +**Main (Production)** - K8 namespace: `market-pacific` - `aquarius.pacific.market.dev-ocean.com` diff --git a/app.config.js b/app.config.js index a2fed28ac..b73f82b20 100644 --- a/app.config.js +++ b/app.config.js @@ -1,19 +1,24 @@ module.exports = { oceanConfig: { - nodeUri: process.env.NODE_URI || 'https://pacific.oceanprotocol.com', - aquariusUri: - process.env.AQUARIUS_URI || - 'https://aquarius.marketplace.oceanprotocol.com', - brizoUri: - process.env.BRIZO_URI || 'https://brizo.marketplace.oceanprotocol.com', - brizoAddress: - process.env.BRIZO_ADDRESS || '0x00c6A0BC5cD0078d6Cd0b659E8061B404cfa5704', - secretStoreUri: - process.env.SECRET_STORE_URI || 'https://secret-store.oceanprotocol.com', - faucetUri: process.env.FAUCET_URI || 'https://faucet.oceanprotocol.com', - ratingUri: - process.env.RATING_URI || - 'https://rating.pacific.marketplace.dev-ocean.com', + nodeUri: + process.env.GATSBY_NODE_URI || + `https://rinkeby.infura.io/${process.env.GATSBY_INFURA_PROJECT_ID}`, + metadataStoreUri: + process.env.GATSBY_METADATA_STORE_URI || + 'https://aquarius.rinkeby.v3.dev-ocean.com', + providerUri: + process.env.GATSBY_PROVIDER_URI || + 'https://provider.rinkeby.v3.dev-ocean.com', + factoryAddress: + process.env.GATSBY_FACTORY_ADDRESS || + '0xB9d406D24B310A7D821D0b782a36909e8c925471', + oceanTokenAddress: + process.env.GATSBY_OCEAN_TOKEN_ADDRESS || + '0xf6AE724aD6e6Fa89B6aBc9710C5eb692b7F57139', verbose: 3 - } + }, + // Main, Rinkeby, Kovan + // networks: [1, 4, 42], + networks: [4], + infuraProjectId: process.env.GATSBY_INFURA_PROJECT_ID || 'xxx' } diff --git a/content/site.json b/content/site.json index 0845ea8a5..55bd0c925 100644 --- a/content/site.json +++ b/content/site.json @@ -1,7 +1,7 @@ { "site": { "siteTitle": "Ocean Market", - "siteTagline": "A marketplace to find and publish open data sets in the Ocean Network.", + "siteTagline": "A marketplace to find, publish and trade data sets in the Ocean Network.", "siteUrl": "https://market.oceanprotocol.now.sh", "siteIcon": "node_modules/@oceanprotocol/art/logo/favicon-white.png", "siteImage": "../src/images/share.png", diff --git a/gatsby-config.js b/gatsby-config.js index bc8218293..9bd2e2b33 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -1,11 +1,14 @@ require('dotenv').config() const siteContent = require('./content/site.json') -const { oceanConfig } = require('./app.config') +const appConfig = require('./app.config') module.exports = { siteMetadata: { - ...siteContent.site + ...siteContent.site, + appConfig: { + ...appConfig + } }, plugins: [ { @@ -29,12 +32,6 @@ module.exports = { path: `${__dirname}/node_modules/@oceanprotocol/art/` } }, - { - resolve: 'gatsby-source-ocean', - options: { - aquariusUri: oceanConfig.aquariusUri - } - }, { resolve: 'gatsby-plugin-sharp', options: { diff --git a/gatsby-node.js b/gatsby-node.js index 7980cf5fb..ba31190f0 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -1,5 +1,3 @@ -const path = require('path') - exports.onCreateWebpackConfig = ({ actions }) => { actions.setWebpackConfig({ node: { @@ -9,60 +7,6 @@ exports.onCreateWebpackConfig = ({ actions }) => { }) } -exports.createPages = async ({ graphql, actions }) => { - const { createPage } = actions - - // Create pages for all assets - const assetDetailsTemplate = path.resolve( - 'src/components/templates/AssetDetails.tsx' - ) - - const result = await graphql(` - query { - allOceanAsset { - edges { - node { - did - main { - type - name - dateCreated - author - license - price - datePublished - files { - contentType - index - } - } - additionalInformation { - description - deliveryType - termsAndConditions - access - } - } - } - } - } - `) - - if (result.errors) { - throw result.errors - } - - await result.data.allOceanAsset.edges.forEach(({ node }) => { - const path = `/asset/${node.did}` - - createPage({ - path, - component: assetDetailsTemplate, - context: { did: node.did } - }) - }) -} - exports.onCreatePage = async ({ page, actions }) => { const { createPage } = actions // page.matchPath is a special key that's used for matching pages diff --git a/package-lock.json b/package-lock.json index a9b1889ea..8f56af143 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,28 +28,83 @@ } }, "@babel/core": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.4.tgz", - "integrity": "sha512-3A0tS0HWpy4XujGc7QtOIHTeNwUgWaZc/WuS5YQrfhU67jnVmsD6OGPc1AKHH0LJHQICGncy3+YUjIhVlfDdcA==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", + "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==", "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.4", - "@babel/helper-module-transforms": "^7.10.4", + "@babel/generator": "^7.10.5", + "@babel/helper-module-transforms": "^7.10.5", "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.10.4", + "@babel/parser": "^7.10.5", "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4", + "@babel/traverse": "^7.10.5", + "@babel/types": "^7.10.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { + "@babel/generator": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz", + "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==", + "requires": { + "@babel/types": "^7.10.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-module-transforms": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz", + "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==", + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" + } + }, + "@babel/parser": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz", + "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==" + }, + "@babel/traverse": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz", + "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==", + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/parser": "^7.10.5", + "@babel/types": "^7.10.5", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + } + }, + "@babel/types": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz", + "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==", + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -364,14 +419,50 @@ } }, "@babel/plugin-proposal-decorators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.10.4.tgz", - "integrity": "sha512-JHTWjQngOPv+ZQQqOGv2x6sCCr4IYWy7S1/VH6BE9ZfkoLrdQ2GpEP3tfb5M++G9PwvqjhY8VC/C3tXm+/eHvA==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.10.5.tgz", + "integrity": "sha512-Sc5TAQSZuLzgY0664mMDn24Vw2P8g/VhyLyGPaWiHahhgLqeZvcGeyBZOrJW0oSKIK2mvQ22a1ENXBIQLhrEiQ==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.4", + "@babel/helper-create-class-features-plugin": "^7.10.5", "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-decorators": "^7.10.4" + }, + "dependencies": { + "@babel/helper-create-class-features-plugin": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz", + "integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.10.5", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz", + "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.5" + } + }, + "@babel/types": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz", + "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/plugin-proposal-dynamic-import": { @@ -1120,18 +1211,18 @@ } }, "@babel/runtime-corejs3": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.10.4.tgz", - "integrity": "sha512-BFlgP2SoLO9HJX9WBwN67gHWMBhDX/eDz64Jajd6mR/UAUzqrNMm99d4qHnVaKscAElZoFiPv+JpR/Siud5lXw==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.10.5.tgz", + "integrity": "sha512-RMafpmrNB5E/bwdSphLr8a8++9TosnyJp98RZzI6VOx2R2CCMpsXXXRvmI700O9oEKpXdZat6oEK68/F0zjd4A==", "requires": { "core-js-pure": "^3.0.0", "regenerator-runtime": "^0.13.4" } }, "@babel/standalone": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.10.4.tgz", - "integrity": "sha512-Cgnx+Z7dYqQrz42GPGzDFTph8n15NogWuR9OpocOVlRZQoRw4q+OmudevYAd6CjOVjGu6PgvJwojxCE34cfXPg==" + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.10.5.tgz", + "integrity": "sha512-PERGHqhQ7H3TrdglvSW4pEHULywMJEdytnzaR0VPF1HN45aS+3FcE62efb90XPKS9TlgrEUkYDvYMt+0m6G0YA==" }, "@babel/template": { "version": "7.10.4", @@ -1375,8 +1466,7 @@ "@emotion/stylis": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz", - "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==", - "dev": true + "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==" }, "@emotion/unitless": { "version": "0.7.5", @@ -1638,11 +1728,11 @@ } }, "@graphql-tools/schema": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-6.0.12.tgz", - "integrity": "sha512-XUmKJ+ipENaxuXIX4GapsLAUl1dFQBUg+S4ZbgtKVlwrPhZJ9bkjIqnUHk3wg4S4VXqzLX97ol1e4g9N6XLkYg==", + "version": "6.0.13", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-6.0.13.tgz", + "integrity": "sha512-Uy2J7L3rr8QeIr+SwWltcAlvAu3q0EKuq41qMhL23dgqpoTAg1BIWlvYSoOdoGaRZP95bvLCEiyf/X5Q1VMEFw==", "requires": { - "@graphql-tools/utils": "6.0.12", + "@graphql-tools/utils": "6.0.13", "tslib": "~2.0.0" }, "dependencies": { @@ -1654,9 +1744,9 @@ } }, "@graphql-tools/utils": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-6.0.12.tgz", - "integrity": "sha512-MuFSkxXCe2QoD5QJPJ/1WIm0YnBzzXpkq9d/XznVAWptHFRwtwIbZ1xcREjYquFvoZ7ddsjZfyvUN/5ulmHhhg==", + "version": "6.0.13", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-6.0.13.tgz", + "integrity": "sha512-9jTI1HAM9HoXU2tV5CV8w7XXvJe7r37rythgo2FTe1Mws0+O6pQNjVVg7GDDr6FJ/eyMccyMx2SIf+5t7/XPrQ==", "requires": { "@ardatan/aggregate-error": "0.0.1", "camel-case": "4.1.1" @@ -3733,23 +3823,23 @@ } }, "@mdx-js/mdx": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.6.tgz", - "integrity": "sha512-Q1j/RtjNbRZRC/ciaOqQLplsJ9lb0jJhDSvkusmzCsCX+NZH7YTUvccWf7l6zKW1CAiofJfqZdZtXkeJUDZiMw==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.7.tgz", + "integrity": "sha512-LB+3gFSy5IyKmI4dqbo9g2dLwvxtHzNZN16PQe0D2cJkgVWNfZ4j1wjCO1qYlhpw3mHnsgqKmIP+knGa/El+Iw==", "requires": { - "@babel/core": "7.9.6", + "@babel/core": "7.10.4", "@babel/plugin-syntax-jsx": "7.8.3", "@babel/plugin-syntax-object-rest-spread": "7.8.3", - "@mdx-js/util": "^1.6.6", - "babel-plugin-apply-mdx-type-prop": "^1.6.6", - "babel-plugin-extract-import-names": "^1.6.6", + "@mdx-js/util": "^1.6.7", + "babel-plugin-apply-mdx-type-prop": "^1.6.7", + "babel-plugin-extract-import-names": "^1.6.7", "camelcase-css": "2.0.1", "detab": "2.0.3", "hast-util-raw": "5.0.2", "lodash.uniq": "4.5.0", "mdast-util-to-hast": "9.1.0", "remark-footnotes": "1.0.0", - "remark-mdx": "^1.6.6", + "remark-mdx": "^1.6.7", "remark-parse": "8.0.2", "remark-squeeze-paragraphs": "4.0.0", "style-to-object": "0.3.0", @@ -3759,18 +3849,18 @@ }, "dependencies": { "@babel/core": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz", - "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.4.tgz", + "integrity": "sha512-3A0tS0HWpy4XujGc7QtOIHTeNwUgWaZc/WuS5YQrfhU67jnVmsD6OGPc1AKHH0LJHQICGncy3+YUjIhVlfDdcA==", "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.6", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helpers": "^7.9.6", - "@babel/parser": "^7.9.6", - "@babel/template": "^7.8.6", - "@babel/traverse": "^7.9.6", - "@babel/types": "^7.9.6", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.4", + "@babel/helper-module-transforms": "^7.10.4", + "@babel/helpers": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -3872,24 +3962,24 @@ } }, "@mdx-js/react": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.6.tgz", - "integrity": "sha512-zOOdNreHUNSFQ0dg3wYYg9sOGg2csf7Sk8JGBigeBq+4Xk4LO0QdycGAmgKNfeme+SyBV5LBIPjt1NNsScyWEQ==" + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.7.tgz", + "integrity": "sha512-pBxCfBWOHk/i/AnHdpexKvRDbdSOx5s3ZLHvl6DQJkn2zqA5+KtRrwuW2MxEu8MqKOos3hIgVOKD6kbIz0r8Og==" }, "@mdx-js/runtime": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/@mdx-js/runtime/-/runtime-1.6.6.tgz", - "integrity": "sha512-JNt/dqIFMQ87Gp6oIZUn4oJZQOOk0rqc7JkIv/xYyTtUMaNCXWZ/ylRLoFbQCyfONxayOz4w4e8Bd4ruxScOGQ==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@mdx-js/runtime/-/runtime-1.6.7.tgz", + "integrity": "sha512-iChpx57SpCxaf6dD/X6GRBxXP7kkD7z8Fz6/NBWOhMqLM5mwOtX+rKz1IcDNxIHL/aX8kaKybRmoN7CY5IU7hw==", "requires": { - "@mdx-js/mdx": "^1.6.6", - "@mdx-js/react": "^1.6.6", + "@mdx-js/mdx": "^1.6.7", + "@mdx-js/react": "^1.6.7", "buble-jsx-only": "^0.19.8" } }, "@mdx-js/util": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.6.tgz", - "integrity": "sha512-PKTHVgMHnK5p+kcMWWNnZuoR7O19VmHiOujmVcyN50hya7qIdDb5vvsYC+dwLxApEXiABhLozq0dlIwFeS3yjg==" + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.7.tgz", + "integrity": "sha512-eiabhtRDYf+JAP5AGEDOdDx+TWZZVm2vzp3K08HhQmTgkk+8/G4eDAGCheTu2PRKvXPFf/hLzjfmdp7PQLCtsA==" }, "@mikaelkristiansson/domready": { "version": "1.0.10", @@ -3966,45 +4056,46 @@ "resolved": "https://registry.npmjs.org/@oceanprotocol/art/-/art-3.0.0.tgz", "integrity": "sha512-j4PEZSVtKSqxDYMVh/hd5vk088Bg6a6QkrUMTXN9Q6OIFAMfHM235f1AxaakNrEyK0FKMD908KuJEdfFLRn9Hw==" }, - "@oceanprotocol/keeper-contracts": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.13.2.tgz", - "integrity": "sha512-915dcnzCHEuvsmRKqVj0RxHT3T386lSJh8WREe4dsnrXHsi1ULNYxX0Ts/cvalv6bRL+aqyaZ6gN3l3nkfwEDg==" + "@oceanprotocol/contracts": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.2.2.tgz", + "integrity": "sha512-wu5Ub5F50vCAON0GKyv4anPPLm+oWfHViksiAewVS/xvbbnSCt4gHws2Uc1ct25tiO/2AHAyJkqEiC0ep8SHeQ==" }, - "@oceanprotocol/react": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/@oceanprotocol/react/-/react-0.0.11.tgz", - "integrity": "sha512-uve2rxkqD83lNo77COSzw3/38JtUkxwfTtZHmMjLfOcvn0UD98RDS6oP1+BDzqH9K2AuDvIeTwu/YGAISskL/w==", - "requires": { - "@oceanprotocol/squid": "^2.2.0", - "axios": "^0.19.2", - "react": "^16.13.1", - "web3connect": "^1.0.0-beta.33" - } - }, - "@oceanprotocol/secret-store-client": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/@oceanprotocol/secret-store-client/-/secret-store-client-0.0.15.tgz", - "integrity": "sha512-5yNNA+qdjut9/nMiFKJd4D4io+GhzdfvdqVd5YMkgT9RV1qDosGj6NVsKArYay6g+tQH7pCJ6Y1FiAbhaaFB9g==", - "requires": { - "node-fetch": "^2.6.0" - } - }, - "@oceanprotocol/squid": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-2.2.0.tgz", - "integrity": "sha512-ISI+8mGl5lCPqLw/YPS/e0PhaqgexuGiwxKcCGAMSo1p8sgunr6FOrMVoYhYr52QpfodxOY8Iiy3zv4HC8O2Mg==", + "@oceanprotocol/lib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.1.4.tgz", + "integrity": "sha512-H+soD+W+fOdKXgFxM8pkhAs9JoJDMWxudvTJxT696Ch+z1CvbcEh4bFNlUpjWhVgwjMTVCigYum3BG+V1mqN1Q==", "requires": { "@ethereum-navigator/navigator": "^0.5.0", - "@oceanprotocol/keeper-contracts": "^0.13.2", - "@oceanprotocol/secret-store-client": "^0.0.15", + "@oceanprotocol/contracts": "^0.2.3", "bignumber.js": "^9.0.0", - "deprecated-decorator": "^0.1.6", + "fs": "0.0.1-security", "node-fetch": "^2.6.0", "save-file": "^2.3.1", - "uuid": "^8.0.0", - "web3": "^1.2.6", + "uuid": "^8.2.0", + "web3": "^1.2.9", + "web3-eth-contract": "^1.2.9", "whatwg-url": "^8.0.0" + }, + "dependencies": { + "@oceanprotocol/contracts": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.2.3.tgz", + "integrity": "sha512-5Oohzno3tnISMYG1jhtHxKMMkcIypTZAPlIoFjE5vDlAW51tyuxwYxBXHYQ2/FLRVFkmUmy5yASKg9zbnKKwQw==" + } + } + }, + "@oceanprotocol/react": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@oceanprotocol/react/-/react-0.0.12.tgz", + "integrity": "sha512-AVatjgQV4/fV4oIjj8Lz/TnK5OJUBEDx+jdQGx0fUPAT0m3X10EWbRx33x7mvxseHLsYrl/WU2SjlCbEYfED2g==", + "requires": { + "@oceanprotocol/contracts": "^0.2.2", + "@oceanprotocol/lib": "^0.1.2", + "axios": "^0.19.2", + "react": "^16.9.41", + "web3": "^1.2.9", + "web3modal": "^1.7.0" } }, "@oceanprotocol/typographies": { @@ -4113,17 +4204,17 @@ } }, "@storybook/addon-actions": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.0.0-rc.3.tgz", - "integrity": "sha512-EGX1CzLARZGMbZmfN0CaNssJjrRSofuWVw9m5AMeww6u9OaxUbmGunn+4rP31cTu455MQtsysmJstSFt2t+mdg==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.0.0-rc.5.tgz", + "integrity": "sha512-lUXNzXMOv/ztNjVR1ORPicE6Xw6vfxSlfP8L9hCzgDCZ9ZKafd6PfPyiBdDZNvlrmWhfIhF3YFZ4n6oYMQPGFA==", "dev": true, "requires": { - "@storybook/addons": "6.0.0-rc.3", - "@storybook/api": "6.0.0-rc.3", - "@storybook/client-api": "6.0.0-rc.3", - "@storybook/components": "6.0.0-rc.3", - "@storybook/core-events": "6.0.0-rc.3", - "@storybook/theming": "6.0.0-rc.3", + "@storybook/addons": "6.0.0-rc.5", + "@storybook/api": "6.0.0-rc.5", + "@storybook/client-api": "6.0.0-rc.5", + "@storybook/components": "6.0.0-rc.5", + "@storybook/core-events": "6.0.0-rc.5", + "@storybook/theming": "6.0.0-rc.5", "core-js": "^3.0.1", "fast-deep-equal": "^3.1.1", "global": "^4.3.2", @@ -4139,15 +4230,15 @@ } }, "@storybook/addon-storyshots": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/addon-storyshots/-/addon-storyshots-6.0.0-rc.3.tgz", - "integrity": "sha512-WbYk8tkoX5cTbBartkd6jTAL7wBCcgFO4T6D5t4n3KqYBjZh8whWhvYCr60l33+t5xQUrQGmQQMDvTGEHBPQ1Q==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/addon-storyshots/-/addon-storyshots-6.0.0-rc.5.tgz", + "integrity": "sha512-ywVtVnHc4u2PZyuENqLC7eED5BIXW3Ejb0UxC1a7oB8IOh98s9K92SmDScpWZSoXN/23GVcAMctssf83SHfzWg==", "dev": true, "requires": { "@jest/transform": "^26.0.0", - "@storybook/addons": "6.0.0-rc.3", - "@storybook/client-api": "6.0.0-rc.3", - "@storybook/core": "6.0.0-rc.3", + "@storybook/addons": "6.0.0-rc.5", + "@storybook/client-api": "6.0.0-rc.5", + "@storybook/core": "6.0.0-rc.5", "@types/glob": "^7.1.1", "@types/jest": "^25.1.1", "@types/jest-specific-snapshot": "^0.5.3", @@ -4267,36 +4358,36 @@ } }, "@storybook/addons": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-6.0.0-rc.3.tgz", - "integrity": "sha512-oFGS1mNnNsfNPTvv3IAZSMTzztR4vfbn2CXcWnnA7yPEbo8WsNPql3A8PoumY2HZtZjZEEpCODJtW09Q1bP6Cw==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-6.0.0-rc.5.tgz", + "integrity": "sha512-gGJEBWAQNatG/PEJSso/DWbtAwvec3RsKq7Wd/SuomY43tPs/lXDr75Yz9OhVdsb72UOsrvamdfsBn+VkvCM4w==", "dev": true, "requires": { - "@storybook/api": "6.0.0-rc.3", - "@storybook/channels": "6.0.0-rc.3", - "@storybook/client-logger": "6.0.0-rc.3", - "@storybook/core-events": "6.0.0-rc.3", - "@storybook/router": "6.0.0-rc.3", - "@storybook/theming": "6.0.0-rc.3", + "@storybook/api": "6.0.0-rc.5", + "@storybook/channels": "6.0.0-rc.5", + "@storybook/client-logger": "6.0.0-rc.5", + "@storybook/core-events": "6.0.0-rc.5", + "@storybook/router": "6.0.0-rc.5", + "@storybook/theming": "6.0.0-rc.5", "core-js": "^3.0.1", "global": "^4.3.2", "regenerator-runtime": "^0.13.3" } }, "@storybook/api": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/api/-/api-6.0.0-rc.3.tgz", - "integrity": "sha512-N+DADwbaevSE7C4/bjxtsFzNZ7/jAgRZa0vfiq8Lxwbmj2cYpPn9p8SkPA75TZco6XM/LX6QXl5ghg2zs8f/UQ==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/api/-/api-6.0.0-rc.5.tgz", + "integrity": "sha512-Gm0ixN/Q8S6KGoIzvow0MWSZn83k+QNEz5WBd/NsxWgByjBv0Xk9kEKkF+sRmSVaKBipwA2zKCYowoFwo5WGXw==", "dev": true, "requires": { "@reach/router": "^1.3.3", - "@storybook/channels": "6.0.0-rc.3", - "@storybook/client-logger": "6.0.0-rc.3", - "@storybook/core-events": "6.0.0-rc.3", + "@storybook/channels": "6.0.0-rc.5", + "@storybook/client-logger": "6.0.0-rc.5", + "@storybook/core-events": "6.0.0-rc.5", "@storybook/csf": "0.0.1", - "@storybook/router": "6.0.0-rc.3", + "@storybook/router": "6.0.0-rc.5", "@storybook/semver": "^7.3.2", - "@storybook/theming": "6.0.0-rc.3", + "@storybook/theming": "6.0.0-rc.5", "@types/reach__router": "^1.3.5", "core-js": "^3.0.1", "fast-deep-equal": "^3.1.1", @@ -4373,14 +4464,14 @@ } }, "@storybook/channel-postmessage": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.0.0-rc.3.tgz", - "integrity": "sha512-y/FyknuOYh8f5UgFlVkzWko9JcTlOUTapFPMtV7w52rZMkv0TJVVzn2Az3aDMKNhbyXhMVHP+Cbflj2qxLSyVQ==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.0.0-rc.5.tgz", + "integrity": "sha512-pmoVI7uM2MAhwbKSXpSl3XdG+LDINOsdYX6Hi8A3WXZkpo/k2e16KzY3gIlOWpffSLKKZqwZu6n59xKJR1B5xQ==", "dev": true, "requires": { - "@storybook/channels": "6.0.0-rc.3", - "@storybook/client-logger": "6.0.0-rc.3", - "@storybook/core-events": "6.0.0-rc.3", + "@storybook/channels": "6.0.0-rc.5", + "@storybook/client-logger": "6.0.0-rc.5", + "@storybook/core-events": "6.0.0-rc.5", "core-js": "^3.0.1", "global": "^4.3.2", "qs": "^6.6.0", @@ -4388,9 +4479,9 @@ } }, "@storybook/channels": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-6.0.0-rc.3.tgz", - "integrity": "sha512-kJjdP/Wp1rEOr+Fn9eQyzHml2V7va3wnpgWXYqPZXn/xrUKJg5UeOqvImVQUDfuwSWINZfHsG/yV11pXpWhMKg==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-6.0.0-rc.5.tgz", + "integrity": "sha512-luWVnKtXezZv3jq/F/m8AmCu4jq83Fp+xiBCafCgzG9hVwIfPNnND3iBLU/lwfW5s2WqXcGY+g/pQu3jLBGhzQ==", "dev": true, "requires": { "core-js": "^3.0.1", @@ -4399,16 +4490,16 @@ } }, "@storybook/client-api": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.0.0-rc.3.tgz", - "integrity": "sha512-juf1IuE/8zAsF+GPidBvofE2mX9jq3mM+wtI9wEl+NmSS7Dj5Eb/Mu94n2UQLG2K/VpLUiFvHsW8GdR1+/HBzA==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.0.0-rc.5.tgz", + "integrity": "sha512-IsZAW0i1LlHpQq/5VZ/8kl4fXmaoFzjV8xNAPWZk/S3w0FsMSPir/0Zl/xoOJ9upBxFAYZE84GepT7QHj2NQoA==", "dev": true, "requires": { - "@storybook/addons": "6.0.0-rc.3", - "@storybook/channel-postmessage": "6.0.0-rc.3", - "@storybook/channels": "6.0.0-rc.3", - "@storybook/client-logger": "6.0.0-rc.3", - "@storybook/core-events": "6.0.0-rc.3", + "@storybook/addons": "6.0.0-rc.5", + "@storybook/channel-postmessage": "6.0.0-rc.5", + "@storybook/channels": "6.0.0-rc.5", + "@storybook/client-logger": "6.0.0-rc.5", + "@storybook/core-events": "6.0.0-rc.5", "@storybook/csf": "0.0.1", "@types/qs": "^6.9.0", "@types/webpack-env": "^1.15.2", @@ -4424,9 +4515,9 @@ } }, "@storybook/client-logger": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.0.0-rc.3.tgz", - "integrity": "sha512-wMXEoY6tc7Yx6s/E7jTR8y82Zcc3vgzfmIW/7/UgOvUlsIPTXoV5uChmwWExQ64VlVX36yE/Mctygxr7HwzPkw==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.0.0-rc.5.tgz", + "integrity": "sha512-MNDx1YkuaYpewhqdRd41TvHpkvrt9yfU7tC6rY9LzSYEZcZIS2TRLg+/qywVU00Qy8iw5PzdKUA1ZWVKZBB7Eg==", "dev": true, "requires": { "core-js": "^3.0.1", @@ -4434,14 +4525,14 @@ } }, "@storybook/components": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/components/-/components-6.0.0-rc.3.tgz", - "integrity": "sha512-gXslr3rt+xt08c3ncVBSgG4A4IursP7D9IYrCjiDgNP15//gEdDOq/ciJa3MHNiHQ0rYzS4q5ATcO+zRmuN8LA==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/components/-/components-6.0.0-rc.5.tgz", + "integrity": "sha512-SpKSHCpYbq/Q0sVXV3XPtqBzUMZ6T2P+3IB9jAynLXiT4bbDUoI6SZFWWg/rfmKvCG5REWwVSnvaPcY5qVU/Qw==", "dev": true, "requires": { - "@storybook/client-logger": "6.0.0-rc.3", + "@storybook/client-logger": "6.0.0-rc.5", "@storybook/csf": "0.0.1", - "@storybook/theming": "6.0.0-rc.3", + "@storybook/theming": "6.0.0-rc.5", "@types/overlayscrollbars": "^1.9.0", "@types/react-color": "^3.0.1", "@types/react-syntax-highlighter": "11.0.4", @@ -4464,9 +4555,9 @@ } }, "@storybook/core": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/core/-/core-6.0.0-rc.3.tgz", - "integrity": "sha512-sgjfL5umUP1duz71tv1GEk/2gKeZOQ5foKeZpjq4NEydWQu4VccHBqizc2KnGZXValERKiG+URbyDvFNz4MIhQ==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/core/-/core-6.0.0-rc.5.tgz", + "integrity": "sha512-N2zd3AHWXrwSYU6+SCkVIdQgmOeu5SSX9ByppEgTDtlMFiP7aPogVrv0Voi/eg7i9O2P7hOi5sX4NeEFnDy+ng==", "dev": true, "requires": { "@babel/plugin-proposal-class-properties": "^7.8.3", @@ -4489,20 +4580,20 @@ "@babel/preset-env": "^7.9.6", "@babel/preset-react": "^7.8.3", "@babel/preset-typescript": "^7.9.0", - "@storybook/addons": "6.0.0-rc.3", - "@storybook/api": "6.0.0-rc.3", - "@storybook/channel-postmessage": "6.0.0-rc.3", - "@storybook/channels": "6.0.0-rc.3", - "@storybook/client-api": "6.0.0-rc.3", - "@storybook/client-logger": "6.0.0-rc.3", - "@storybook/components": "6.0.0-rc.3", - "@storybook/core-events": "6.0.0-rc.3", + "@storybook/addons": "6.0.0-rc.5", + "@storybook/api": "6.0.0-rc.5", + "@storybook/channel-postmessage": "6.0.0-rc.5", + "@storybook/channels": "6.0.0-rc.5", + "@storybook/client-api": "6.0.0-rc.5", + "@storybook/client-logger": "6.0.0-rc.5", + "@storybook/components": "6.0.0-rc.5", + "@storybook/core-events": "6.0.0-rc.5", "@storybook/csf": "0.0.1", - "@storybook/node-logger": "6.0.0-rc.3", - "@storybook/router": "6.0.0-rc.3", + "@storybook/node-logger": "6.0.0-rc.5", + "@storybook/router": "6.0.0-rc.5", "@storybook/semver": "^7.3.2", - "@storybook/theming": "6.0.0-rc.3", - "@storybook/ui": "6.0.0-rc.3", + "@storybook/theming": "6.0.0-rc.5", + "@storybook/ui": "6.0.0-rc.5", "@types/glob-base": "^0.3.0", "@types/micromatch": "^4.0.1", "@types/node-fetch": "^2.5.4", @@ -4807,9 +4898,9 @@ } }, "@storybook/core-events": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.0.0-rc.3.tgz", - "integrity": "sha512-J9KUnV/p2zvt0Cg1z4x6dTvqTJKjydNarAgwcNBnh3caIAIPETzO6CV9ns4TidFXyV2400sk+u6ZyCwOUc/hsQ==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.0.0-rc.5.tgz", + "integrity": "sha512-SBaL67KW0Jun3A2EGCEaUvSYFRZq0pTUjBBiLel1g0rmWhlNJq7PI3JEjQDwwtv2ihS9vUsdHeLE6yOg2Goi1A==", "dev": true, "requires": { "core-js": "^3.0.1" @@ -4825,9 +4916,9 @@ } }, "@storybook/node-logger": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.0.0-rc.3.tgz", - "integrity": "sha512-E0ak1Gh33fudGd6Ew/mogjrrgxSRjRGDkzhG4draoDdwB0uu008RInLgpQjj+3i2OnlHNLQWAyqwidSf8l2msw==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.0.0-rc.5.tgz", + "integrity": "sha512-SGIqwvXdRQeSykNTE4+fUwxOaAQxO2CRVNLDGpfFuvF0cjiPSDIcPpBj3EY5NsYbdQI9+QzHdCOHOTi+B5vG6A==", "dev": true, "requires": { "@types/npmlog": "^4.1.2", @@ -4890,16 +4981,16 @@ } }, "@storybook/react": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/react/-/react-6.0.0-rc.3.tgz", - "integrity": "sha512-q5Jmq/QpUfVFE3G7FoBGJeBcIv2R5SO5xDJCg271piEKvFTcCmjwLi2IOCndnLn+gBuADcv2reCEk318yiFj2Q==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/react/-/react-6.0.0-rc.5.tgz", + "integrity": "sha512-XIxpz/TI8ZRG0ZYMtCm9TxPyaVE97jCvhEFesfVPbkeeLs+ElbBpnu5nykSyNFpUQnX6pKve1ujj0RS6FrPfNg==", "dev": true, "requires": { "@babel/preset-flow": "^7.0.0", "@babel/preset-react": "^7.0.0", - "@storybook/addons": "6.0.0-rc.3", - "@storybook/core": "6.0.0-rc.3", - "@storybook/node-logger": "6.0.0-rc.3", + "@storybook/addons": "6.0.0-rc.5", + "@storybook/core": "6.0.0-rc.5", + "@storybook/node-logger": "6.0.0-rc.5", "@storybook/semver": "^7.3.2", "@svgr/webpack": "^5.4.0", "@types/webpack-env": "^1.15.2", @@ -4979,9 +5070,9 @@ } }, "@storybook/router": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/router/-/router-6.0.0-rc.3.tgz", - "integrity": "sha512-FOpWJCPbiO5RDzjNqjUTZd+DoLslQj3GY+hHzk5Rarrqh9NfzDZ8x7AAs0CVEWbSY89wQeeeulTVA7mMkC/vRQ==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/router/-/router-6.0.0-rc.5.tgz", + "integrity": "sha512-nW9gdneC2LeHNtrXHeXsSDCA8jw9xrVeywBvWDQABnA7g7sOzPG0w+aMntCOpXEzss31I1U6PNWVuZ0QWpxMrA==", "dev": true, "requires": { "@reach/router": "^1.3.3", @@ -4993,15 +5084,15 @@ } }, "@storybook/theming": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.0.0-rc.3.tgz", - "integrity": "sha512-QBx50lLv5TtO0+CCSuFY5qjk0GzqhDm8DUukFVUpjfjsANtDVXog8DbAChsUZI+yAI7WtjaS6OA44Mf1/rWejQ==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.0.0-rc.5.tgz", + "integrity": "sha512-ClmqTeVEz/PE2x5Vel/Z5X+yqlTfZB1e1AO/6w1K0GxxOA32NHAX6rQroAK2WSEHCAf1qNwYCYBE2gEGcVdwBw==", "dev": true, "requires": { "@emotion/core": "^10.0.20", "@emotion/is-prop-valid": "^0.8.6", "@emotion/styled": "^10.0.17", - "@storybook/client-logger": "6.0.0-rc.3", + "@storybook/client-logger": "6.0.0-rc.5", "core-js": "^3.0.1", "deep-object-diff": "^1.1.0", "emotion-theming": "^10.0.19", @@ -5036,21 +5127,21 @@ } }, "@storybook/ui": { - "version": "6.0.0-rc.3", - "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-6.0.0-rc.3.tgz", - "integrity": "sha512-OSDn4WIPeA72X2m790bufrp1xsNBqhOCcwhn5+xIM9lsg0rkkVk7Vxk6lTkHUOSwVRjYrN6HCdL2gK59+cvxLQ==", + "version": "6.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-6.0.0-rc.5.tgz", + "integrity": "sha512-T7EYb/++pWWGwvmQjcKVaK40Bnp5jKUXThpjZEC71bA3DaRWvM8nWTcn+osY2hLejh8OKjtj8rNq30un8PSn2A==", "dev": true, "requires": { "@emotion/core": "^10.0.20", - "@storybook/addons": "6.0.0-rc.3", - "@storybook/api": "6.0.0-rc.3", - "@storybook/channels": "6.0.0-rc.3", - "@storybook/client-logger": "6.0.0-rc.3", - "@storybook/components": "6.0.0-rc.3", - "@storybook/core-events": "6.0.0-rc.3", - "@storybook/router": "6.0.0-rc.3", + "@storybook/addons": "6.0.0-rc.5", + "@storybook/api": "6.0.0-rc.5", + "@storybook/channels": "6.0.0-rc.5", + "@storybook/client-logger": "6.0.0-rc.5", + "@storybook/components": "6.0.0-rc.5", + "@storybook/core-events": "6.0.0-rc.5", + "@storybook/router": "6.0.0-rc.5", "@storybook/semver": "^7.3.2", - "@storybook/theming": "6.0.0-rc.3", + "@storybook/theming": "6.0.0-rc.5", "@types/markdown-to-jsx": "^6.11.0", "@types/rfdc": "^1.1.0", "copy-to-clipboard": "^3.0.8", @@ -5304,29 +5395,29 @@ } }, "@testing-library/dom": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.20.0.tgz", - "integrity": "sha512-TywaC+qDGm/Ro34kRYkFQPdT+pxSF4UjZGLIqcGfFQH5IGR43Y7sGLPnkieIW/GNsu337oxNsLUAgpI0JWhXHw==", + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.21.0.tgz", + "integrity": "sha512-S8TTMCd7qCkLs6bhdh2+fk7/pIrD16UKvnwa6gJICalZzV1xoAxDY9Isp6qmelizYH4P1Tz+O5Y4nMmjx3x0uQ==", "dev": true, "requires": { "@babel/runtime": "^7.10.3", "@types/aria-query": "^4.2.0", "aria-query": "^4.2.2", - "dom-accessibility-api": "^0.4.5", + "dom-accessibility-api": "^0.4.6", "pretty-format": "^25.5.0" } }, "@testing-library/jest-dom": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.11.0.tgz", - "integrity": "sha512-mhaCySy7dZlyfcxcYy+0jLllODHEiHkVdmwQ00wD0HrWiSx0fSVHz/0WmdlRkvhfSOuqsRsBUreXOtBvruWGQA==", + "version": "5.11.1", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.11.1.tgz", + "integrity": "sha512-NHOHjDwyBoqM7mXjNLieSp/6vJ17DILzhNTw7+RarluaBkyWRzWgFj+d6xnd1adMBlwfQSeR2FWGTxHXCxeMSA==", "dev": true, "requires": { "@babel/runtime": "^7.9.2", "@types/testing-library__jest-dom": "^5.9.1", "aria-query": "^4.2.2", "chalk": "^3.0.0", - "css": "^2.2.4", + "css": "^3.0.0", "css.escape": "^1.5.1", "jest-diff": "^25.1.0", "jest-matcher-utils": "^25.1.0", @@ -5412,22 +5503,13 @@ } }, "@testing-library/react": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-10.4.5.tgz", - "integrity": "sha512-M5A0W4VphBiEm4vgnq7vHC+/e4Bp/3iIOAWap1FtIiA+Zom6BtXpY3RSTOqc8bZsCcu9gFBZ/lxaiMW6uJddWg==", + "version": "10.4.7", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-10.4.7.tgz", + "integrity": "sha512-hUYbum3X2f1ZKusKfPaooKNYqE/GtPiQ+D2HJaJ4pkxeNJQFVUEvAvEh9+3QuLdBeTWkDMNY5NSijc5+pGdM4Q==", "dev": true, "requires": { "@babel/runtime": "^7.10.3", - "@testing-library/dom": "^7.17.1", - "semver": "^7.3.2" - }, - "dependencies": { - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true - } + "@testing-library/dom": "^7.17.1" } }, "@tippyjs/react": { @@ -5791,9 +5873,9 @@ } }, "@types/node": { - "version": "14.0.22", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.22.tgz", - "integrity": "sha512-emeGcJvdiZ4Z3ohbmw93E/64jRzUHAItSHt8nF7M4TGgQTiWqFVGB8KNpLGFmUHmHLvjvBgFwVlqNcq+VuGv9g==" + "version": "14.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.23.tgz", + "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==" }, "@types/node-fetch": { "version": "2.5.7", @@ -6102,12 +6184,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.6.0.tgz", - "integrity": "sha512-ubHlHVt1lsPQB/CZdEov9XuOFhNG9YRC//kuiS1cMQI6Bs1SsqKrEmZnpgRwthGR09/kEDtr9MywlqXyyYd8GA==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.6.1.tgz", + "integrity": "sha512-06lfjo76naNeOMDl+mWG9Fh/a0UHKLGhin+mGaIw72FUMbMGBkdi/FEJmgEDzh4eE73KIYzHWvOCYJ0ak7nrJQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "3.6.0", + "@typescript-eslint/experimental-utils": "3.6.1", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -6139,45 +6221,45 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.6.0.tgz", - "integrity": "sha512-4Vdf2hvYMUnTdkCNZu+yYlFtL2v+N2R7JOynIOkFbPjf9o9wQvRwRkzUdWlFd2YiiUwJLbuuLnl5civNg5ykOQ==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.6.1.tgz", + "integrity": "sha512-oS+hihzQE5M84ewXrTlVx7eTgc52eu+sVmG7ayLfOhyZmJ8Unvf3osyFQNADHP26yoThFfbxcibbO0d2FjnYhg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.6.0", - "@typescript-eslint/typescript-estree": "3.6.0", + "@typescript-eslint/types": "3.6.1", + "@typescript-eslint/typescript-estree": "3.6.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.6.0.tgz", - "integrity": "sha512-taghDxuLhbDAD1U5Fk8vF+MnR0yiFE9Z3v2/bYScFb0N1I9SK8eKHkdJl1DAD48OGFDMFTeOTX0z7g0W6SYUXw==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.6.1.tgz", + "integrity": "sha512-SLihQU8RMe77YJ/jGTqOt0lMq7k3hlPVfp7v/cxMnXA9T0bQYoMDfTsNgHXpwSJM1Iq2aAJ8WqekxUwGv5F67Q==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.6.0", - "@typescript-eslint/types": "3.6.0", - "@typescript-eslint/typescript-estree": "3.6.0", + "@typescript-eslint/experimental-utils": "3.6.1", + "@typescript-eslint/types": "3.6.1", + "@typescript-eslint/typescript-estree": "3.6.1", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/types": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.6.0.tgz", - "integrity": "sha512-JwVj74ohUSt0ZPG+LZ7hb95fW8DFOqBuR6gE7qzq55KDI3BepqsCtHfBIoa0+Xi1AI7fq5nCu2VQL8z4eYftqg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.6.1.tgz", + "integrity": "sha512-NPxd5yXG63gx57WDTW1rp0cF3XlNuuFFB5G+Kc48zZ+51ZnQn9yjDEsjTPQ+aWM+V+Z0I4kuTFKjKvgcT1F7xQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.6.0.tgz", - "integrity": "sha512-G57NDSABHjvob7zVV09ehWyD1K6/YUKjz5+AufObFyjNO4DVmKejj47MHjVHHlZZKgmpJD2yyH9lfCXHrPITFg==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.6.1.tgz", + "integrity": "sha512-G4XRe/ZbCZkL1fy09DPN3U0mR6SayIv1zSeBNquRFRk7CnVLgkC2ZPj8llEMJg5Y8dJ3T76SvTGtceytniaztQ==", "dev": true, "requires": { - "@typescript-eslint/types": "3.6.0", - "@typescript-eslint/visitor-keys": "3.6.0", + "@typescript-eslint/types": "3.6.1", + "@typescript-eslint/visitor-keys": "3.6.1", "debug": "^4.1.1", "glob": "^7.1.6", "is-glob": "^4.0.1", @@ -6210,9 +6292,9 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.6.0.tgz", - "integrity": "sha512-p1izllL2Ubwunite0ITjubuMQRBGgjdVYwyG7lXPX8GbrA6qF0uwSRz9MnXZaHMxID4948gX0Ez8v9tUDi/KfQ==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.6.1.tgz", + "integrity": "sha512-qC8Olwz5ZyMTZrh4Wl3K4U6tfms0R/mzU4/5W3XeUZptVraGVmbptJbn6h2Ey6Rb3hOs3zWoAUebZk8t47KGiQ==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" @@ -6226,6 +6308,116 @@ "wonka": "^4.0.14" } }, + "@walletconnect/client": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/client/-/client-1.0.15.tgz", + "integrity": "sha512-VC0wXnmQYvrIf7s7sgsra7Wsa7jcUukJxbFlW5mnQ58cFlpyUl8tdSHDZmfbkRmw0CazAkqjPb/DFgeeM2R7Og==", + "requires": { + "@walletconnect/core": "^1.0.15", + "@walletconnect/iso-crypto": "^1.0.15", + "@walletconnect/types": "^1.0.15", + "@walletconnect/utils": "^1.0.15" + } + }, + "@walletconnect/core": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-1.0.15.tgz", + "integrity": "sha512-sTRd+7vCqtskAsLnUmvHpkxB1JPA3b+/ZQNOs97Jd8gBMzNTtiT2d263yCEjOWkpC033olE9/zrqHq7G9fekBw==", + "requires": { + "@walletconnect/socket-transport": "^1.0.15", + "@walletconnect/types": "^1.0.15", + "@walletconnect/utils": "^1.0.15" + } + }, + "@walletconnect/http-connection": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/http-connection/-/http-connection-1.0.15.tgz", + "integrity": "sha512-eo0vx5/2stBIe8lI6JgIcNrwQC2lEMdqJOAA9eJceMkujm9XEVym0vGxdE74H9JKhqkm5RXoN8pS9oyk2YJsDw==", + "requires": { + "@walletconnect/types": "^1.0.15", + "@walletconnect/utils": "^1.0.15", + "xhr2-cookies": "1.1.0" + } + }, + "@walletconnect/iso-crypto": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/iso-crypto/-/iso-crypto-1.0.15.tgz", + "integrity": "sha512-6iNWdU5Y8X0XsXg6WMi9k2z2W/GHcamMBshcxr+mj0Jvp2d/dbciqU4K3TiUoG22jzz8rBGRkWumhWbaiiTbow==", + "requires": { + "@walletconnect/types": "^1.0.15", + "@walletconnect/utils": "^1.0.15", + "eccrypto-js": "5.2.0" + } + }, + "@walletconnect/mobile-registry": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/mobile-registry/-/mobile-registry-1.0.15.tgz", + "integrity": "sha512-VTJeq1AlvD+6Weq8ndcalXF2z8VoTez8pL/pxdulwzzqoWQIpo6Dypk67wz4oIfMMBFPQcWIZWCasD46ghqVQQ==" + }, + "@walletconnect/qrcode-modal": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/qrcode-modal/-/qrcode-modal-1.0.15.tgz", + "integrity": "sha512-QyVw26SKPSIj99JIDzxKg6rispMXgi3r/DyovhnadwpKpVAYBzHuEelXrdbms43qL4dgL/oQEZPj+RPLFUlqbw==", + "requires": { + "@walletconnect/mobile-registry": "^1.0.15", + "@walletconnect/types": "^1.0.15", + "@walletconnect/utils": "^1.0.15", + "preact": "10.4.1", + "qrcode": "1.4.4" + } + }, + "@walletconnect/socket-transport": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/socket-transport/-/socket-transport-1.0.15.tgz", + "integrity": "sha512-6XIFRIuLqYJfUNKbaTC9Vqv3PIvQhW1hRPhZ1xewlgP7CWoRmNZMmkyXPJRqwrofSYpspVicOj9dxM2QwAEL9A==", + "requires": { + "@walletconnect/types": "^1.0.15", + "ws": "7.3.0" + }, + "dependencies": { + "ws": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", + "integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w==" + } + } + }, + "@walletconnect/types": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-1.0.15.tgz", + "integrity": "sha512-6xrL4ZSqKnpYdi5nW3UlPHyVBmAI7C4MND5li7zT0Mfl+XKxLbcE+R5C3yNtmj10vOf2CVYwjgXfxwwTUVXl7g==" + }, + "@walletconnect/utils": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-1.0.15.tgz", + "integrity": "sha512-V/ak5PhowcLDYfcWXia8etSiPPvqKlukkEJiZe2CCyYosGXh9/PnGHSMk5Ym1+/txt9VetqmzPVaPRXaLNrslg==", + "requires": { + "@walletconnect/types": "^1.0.15", + "detect-browser": "5.1.0", + "enc-utils": "2.1.0", + "js-sha3": "0.8.0" + }, + "dependencies": { + "detect-browser": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.1.0.tgz", + "integrity": "sha512-WKa9p+/MNwmTiS+V2AS6eGxic+807qvnV3hC+4z2GTY+F42h1n8AynVTMMc4EJBC32qMs6yjOTpeDEQQt/AVqQ==" + } + } + }, + "@walletconnect/web3-provider": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@walletconnect/web3-provider/-/web3-provider-1.0.15.tgz", + "integrity": "sha512-1auGniI2kzeDokFuZsofnFaBhIMag8T8XwkVdujYi+mb+olI9a9pq4V4xsH+ZvB1LBtiCowN30CBD5+vJwTAnA==", + "requires": { + "@walletconnect/client": "^1.0.15", + "@walletconnect/http-connection": "^1.0.15", + "@walletconnect/qrcode-modal": "^1.0.15", + "@walletconnect/types": "^1.0.15", + "@walletconnect/utils": "^1.0.15", + "web3-provider-engine": "15.0.12" + } + }, "@webassemblyjs/ast": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", @@ -7165,9 +7357,9 @@ }, "dependencies": { "caniuse-lite": { - "version": "1.0.30001099", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001099.tgz", - "integrity": "sha512-sdS9A+sQTk7wKoeuZBN/YMAHVztUfVnjDi4/UV3sDE8xoh7YR12hKW+pIdB3oqKGwr9XaFL2ovfzt9w8eUI5CA==" + "version": "1.0.30001100", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001100.tgz", + "integrity": "sha512-0eYdp1+wFCnMlCj2oudciuQn2B9xAFq3WpgpcBIZTxk/1HNA/O2YA7rpeYhnOqsqAJq1AHUgx6i1jtafg7m2zA==" }, "postcss-value-parser": { "version": "4.1.0", @@ -7549,12 +7741,12 @@ "dev": true }, "babel-plugin-apply-mdx-type-prop": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.6.tgz", - "integrity": "sha512-rUzVvkQa8/9M63OZT6qQQ1bS8P0ozhXp9e5uJ3RwRJF5Me7s4nZK5SYhyNHYc0BkAflWnCOGMP3oPQUfuyB8tg==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.7.tgz", + "integrity": "sha512-2WztTzkUeeQ1SC4Dc5KmmVq/6tH+5aAGUiq7ioFpZ8eWBneIhF7DzkGirmcUpR8eHVOQRlvKyWfSTVAQxJsQUw==", "requires": { "@babel/helper-plugin-utils": "7.8.3", - "@mdx-js/util": "^1.6.6" + "@mdx-js/util": "^1.6.7" }, "dependencies": { "@babel/helper-plugin-utils": { @@ -7611,9 +7803,9 @@ } }, "babel-plugin-extract-import-names": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.6.tgz", - "integrity": "sha512-UtMuiQJnhVPAGE2+pDe7Nc9NVEmDdqGTN74BtRALgH+7oag88RpxFLOSiA+u5mFkFg741wW9Ut5KiyJpksEj/g==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.7.tgz", + "integrity": "sha512-UnqaoHYdzieAOjNupDb8PJQFOEpPIJcniIrCjg/DFPUp8YsYxeolM2sb74EdD6NYVE8/tFvd+0BOuJxQF0iong==", "requires": { "@babel/helper-plugin-utils": "7.8.3" }, @@ -7772,9 +7964,9 @@ } }, "babel-plugin-remove-graphql-queries": { - "version": "2.9.13", - "resolved": "https://registry.npmjs.org/babel-plugin-remove-graphql-queries/-/babel-plugin-remove-graphql-queries-2.9.13.tgz", - "integrity": "sha512-UpxqC9Wt2O+kYbCP4KnAyZrMO29bwEvilWzomOqB5bwAJpXeZ2NwvRoWBKGJSzSyOCOoyz7xPSZ/OJM3kO5Xyw==" + "version": "2.9.14", + "resolved": "https://registry.npmjs.org/babel-plugin-remove-graphql-queries/-/babel-plugin-remove-graphql-queries-2.9.14.tgz", + "integrity": "sha512-V4o7CvS5bud+Tk9ni4gSr2l980K2H0lQ0A7skfSMvHrPlek+Rcs+4tNVpHnKuAWoXTZ+63tW06B4ENn+wf35bg==" }, "babel-plugin-require-context-hook": { "version": "1.0.0", @@ -10543,15 +10735,26 @@ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==" }, "css": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", - "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", "dev": true, "requires": { - "inherits": "^2.0.3", + "inherits": "^2.0.4", "source-map": "^0.6.1", - "source-map-resolve": "^0.5.2", - "urix": "^0.1.0" + "source-map-resolve": "^0.6.0" + }, + "dependencies": { + "source-map-resolve": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0" + } + } } }, "css-color-keywords": { @@ -11404,11 +11607,6 @@ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, - "deprecated-decorator": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz", - "integrity": "sha1-AJZjF7ehL+kvPMgx91g68ym4bDc=" - }, "des.js": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", @@ -11431,6 +11629,11 @@ "repeat-string": "^1.5.4" } }, + "detect-browser": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.1.1.tgz", + "integrity": "sha512-5n2aWI57qC3kZaK4j2zYsG6L1LrxgLptGCNhMQgdKhVn6cSdcq43pp6xHPfTHG3TYM6myF4tIPWiZtfdVDgb9w==" + }, "detect-indent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.0.0.tgz", @@ -11635,6 +11838,11 @@ "randombytes": "^2.0.0" } }, + "dijkstrajs": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.1.tgz", + "integrity": "sha1-082BIh4+pAdCz83lVtTpnpjdxxs=" + }, "dir-glob": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", @@ -11675,9 +11883,9 @@ } }, "dom-accessibility-api": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.4.5.tgz", - "integrity": "sha512-HcPDilI95nKztbVikaN2vzwvmv0sE8Y2ZJFODy/m15n7mGXLeOKGiys9qWVbFbh+aq/KYj2lqMLybBOkYAEXqg==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.4.6.tgz", + "integrity": "sha512-qxFVFR/ymtfamEQT/AsYLe048sitxFCoCHiM+vuOdR3fE94i3so2SCFJxyz/RxV69PZ+9FgToYWOd7eqJqcbYw==", "dev": true }, "dom-converter": { @@ -11960,6 +12168,26 @@ "safer-buffer": "^2.1.0" } }, + "eccrypto-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eccrypto-js/-/eccrypto-js-5.2.0.tgz", + "integrity": "sha512-pPb6CMapJ1LIzjLWxMqlrnfaEFap7qkk9wcO/b4AVSdxBQYlpOqvlPpq5SpUI4FdmfdhVD34AjN47fM8fryC4A==", + "requires": { + "aes-js": "3.1.2", + "enc-utils": "2.1.0", + "hash.js": "1.1.7", + "js-sha3": "0.8.0", + "randombytes": "2.1.0", + "secp256k1": "3.8.0" + }, + "dependencies": { + "aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + } + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -12042,6 +12270,23 @@ "hoist-non-react-statics": "^3.3.0" } }, + "enc-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/enc-utils/-/enc-utils-2.1.0.tgz", + "integrity": "sha512-VD0eunGDyzhojePzkORWDnW88gi6tIeGb5Z6QVHugux6mMAPiXyw94fb/7WdDQEWhKMSoYRyzFFUebCqeH20PA==", + "requires": { + "bn.js": "4.11.8", + "is-typedarray": "1.0.0", + "typedarray-to-buffer": "3.1.5" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -12166,9 +12411,9 @@ } }, "enhanced-resolve": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.2.0.tgz", - "integrity": "sha512-S7eiFb/erugyd1rLb6mQ3Vuq+EXHv5cpCkNqqIkYkBgN2QdFnyCZzFBleqwGEx4lgNGYij81BWnCrFNK7vxvjQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz", + "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==", "requires": { "graceful-fs": "^4.1.2", "memory-fs": "^0.5.0", @@ -14834,9 +15079,9 @@ "dev": true }, "formik": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/formik/-/formik-2.1.4.tgz", - "integrity": "sha512-oKz8S+yQBzuQVSEoxkqqJrKQS5XJASWGVn6mrs+oTWrBoHgByVwwI1qHiVc9GKDpZBU9vAxXYAKz2BvujlwunA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/formik/-/formik-2.1.5.tgz", + "integrity": "sha512-bWpo3PiqVDYslvrRjTq0Isrm0mFXHiO33D8MS6t6dWcqSFGeYF52nlpCM2xwOJ6tRVRznDkL+zz/iHPL4LDuvQ==", "requires": { "deepmerge": "^2.1.1", "hoist-non-react-statics": "^3.3.0", @@ -14920,6 +15165,11 @@ } } }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, "fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -15028,9 +15278,9 @@ "dev": true }, "gatsby": { - "version": "2.24.2", - "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.24.2.tgz", - "integrity": "sha512-2zhCJZBPRJiUGbFRnCogMY3liBoFdb3+cCmIpp5b4BzGUEm+t+QZPSW34xkV5IE1WNywuIMtpZF6G8xTbuepbA==", + "version": "2.24.3", + "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.24.3.tgz", + "integrity": "sha512-WgT5HhkzdtuG1c9xjsTAuE+9GzEB+2M1DibWB1DNatL+sAc2uA71wwaNZYYmZHzFHDX3DJD1pD503Fc06ptJYA==", "requires": { "@babel/code-frame": "^7.10.3", "@babel/core": "^7.10.3", @@ -15053,7 +15303,7 @@ "babel-loader": "^8.1.0", "babel-plugin-add-module-exports": "^0.3.3", "babel-plugin-dynamic-import-node": "^2.3.3", - "babel-plugin-remove-graphql-queries": "^2.9.13", + "babel-plugin-remove-graphql-queries": "^2.9.14", "babel-preset-gatsby": "^0.5.2", "better-opn": "1.0.0", "better-queue": "^3.8.10", @@ -15092,14 +15342,14 @@ "file-loader": "^1.1.11", "fs-exists-cached": "1.0.0", "fs-extra": "^8.1.0", - "gatsby-cli": "^2.12.60", + "gatsby-cli": "^2.12.61", "gatsby-core-utils": "^1.3.12", "gatsby-graphiql-explorer": "^0.4.11", "gatsby-legacy-polyfills": "^0.0.2", - "gatsby-link": "^2.4.12", + "gatsby-link": "^2.4.13", "gatsby-plugin-page-creator": "^2.3.17", - "gatsby-plugin-typescript": "^2.4.14", - "gatsby-react-router-scroll": "^3.0.11", + "gatsby-plugin-typescript": "^2.4.15", + "gatsby-react-router-scroll": "^3.0.12", "gatsby-telemetry": "^1.3.19", "glob": "^7.1.6", "got": "8.3.2", @@ -15522,9 +15772,9 @@ } }, "gatsby-cli": { - "version": "2.12.60", - "resolved": "https://registry.npmjs.org/gatsby-cli/-/gatsby-cli-2.12.60.tgz", - "integrity": "sha512-hc1pGn6m4Itc+HwIi4+s/esCInZzZit61guatNKzIJez0BTSDFv2EKtTUMuK5O64H/ofX0xfoHeYukOMA0MeIw==", + "version": "2.12.61", + "resolved": "https://registry.npmjs.org/gatsby-cli/-/gatsby-cli-2.12.61.tgz", + "integrity": "sha512-Bdk640xw2fGtog6YUvlWqGVdghzOraEkRkLgdxAHJQWs7U8TiyxVv+urkp8MmIvWK4fe0vdO8VSzg3dmBQytCg==", "requires": { "@babel/code-frame": "^7.10.3", "@hapi/joi": "^15.1.1", @@ -15540,7 +15790,7 @@ "fs-exists-cached": "^1.0.0", "fs-extra": "^8.1.0", "gatsby-core-utils": "^1.3.12", - "gatsby-recipes": "^0.1.51", + "gatsby-recipes": "^0.1.52", "gatsby-telemetry": "^1.3.19", "hosted-git-info": "^3.0.4", "ink": "^2.7.1", @@ -16203,9 +16453,9 @@ } }, "gatsby-link": { - "version": "2.4.12", - "resolved": "https://registry.npmjs.org/gatsby-link/-/gatsby-link-2.4.12.tgz", - "integrity": "sha512-FUSkQLzIeP4NhJkImgUds728CvcskyR3pK+FwBDfojbEP4Q7p416a1TnSMcfVZ63vSTpHfQGaSKFT/SdURNdjw==", + "version": "2.4.13", + "resolved": "https://registry.npmjs.org/gatsby-link/-/gatsby-link-2.4.13.tgz", + "integrity": "sha512-0qTM9JJvYZCsqAF/FLkChHwECbjl2DxUl8M0cYNgCDcaw5BI6PhF4FhuGUcr17dZ6KlpEMrpApaF5MMQqV0WSQ==", "requires": { "@babel/runtime": "^7.10.3", "@types/reach__router": "^1.3.3", @@ -16422,9 +16672,9 @@ "integrity": "sha512-54REIMe79qFBAwpcnWHBkvEE9CKoEVkefF9rDXai0k642r91SZ4UeWFuAmsegPG+sPVub7tHfHu/2LVXK1I9kg==" }, "gatsby-plugin-typescript": { - "version": "2.4.14", - "resolved": "https://registry.npmjs.org/gatsby-plugin-typescript/-/gatsby-plugin-typescript-2.4.14.tgz", - "integrity": "sha512-8lMEK+F+xQZ+SGUuj4GMuWk2vy6x5PBVPRLO3eKNEGpX9o+vJcyQxTtu9Nd1GToLjr1K1r0ak0hERwGNzaJLow==", + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/gatsby-plugin-typescript/-/gatsby-plugin-typescript-2.4.15.tgz", + "integrity": "sha512-sh/BypdmqcpjGJBECPzRY1l7uDmVif8gqTPwcGb38WNENgRel619URc1bJEJRtfFpYEyBKTjVL0h2C5LQHQ1QQ==", "requires": { "@babel/core": "^7.10.3", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1", @@ -16432,7 +16682,7 @@ "@babel/plugin-proposal-optional-chaining": "^7.10.3", "@babel/preset-typescript": "^7.10.1", "@babel/runtime": "^7.10.3", - "babel-plugin-remove-graphql-queries": "^2.9.13" + "babel-plugin-remove-graphql-queries": "^2.9.14" } }, "gatsby-plugin-webpack-size": { @@ -16444,17 +16694,17 @@ } }, "gatsby-react-router-scroll": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/gatsby-react-router-scroll/-/gatsby-react-router-scroll-3.0.11.tgz", - "integrity": "sha512-5eok4FySl0YeegwThOxmlyEiS37SOUB7ekfVkdxnPcEFNhLF5oSx/BnmhmuivUTwKDBJwW6wFXWB9qPZ8OessA==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/gatsby-react-router-scroll/-/gatsby-react-router-scroll-3.0.12.tgz", + "integrity": "sha512-rA7qe/LjKAPnwI4KdKjvx94XIV9a4hCPT+BzKBiifTkm5sFpQyXsfEWmaFfzIaxpKxOwrWsJGpW0OA39yunL8g==", "requires": { "@babel/runtime": "^7.10.3" } }, "gatsby-recipes": { - "version": "0.1.51", - "resolved": "https://registry.npmjs.org/gatsby-recipes/-/gatsby-recipes-0.1.51.tgz", - "integrity": "sha512-SBbf5DEOEjJOKtJaXEokAuA1uR36MFbDixnbL8+npaAHQ70+9ExOziDW643yztb/X8JA0sq5y7SDxRwAE9acqA==", + "version": "0.1.52", + "resolved": "https://registry.npmjs.org/gatsby-recipes/-/gatsby-recipes-0.1.52.tgz", + "integrity": "sha512-dxba6tO/VpTA5tPXcPuYDyatqEcT5O71eeRvT3vrEQQZzC0mwQzGG6m0BT1Hh1Z61b0LqFUh5trVCxTlFbEQSw==", "requires": { "@babel/core": "^7.10.3", "@babel/generator": "^7.10.3", @@ -27194,6 +27444,11 @@ "jimp": "^0.10.2" } }, + "preact": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.4.1.tgz", + "integrity": "sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q==" + }, "prebuild-install": { "version": "5.3.5", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.5.tgz", @@ -27547,6 +27802,144 @@ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, + "qrcode": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.4.4.tgz", + "integrity": "sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==", + "requires": { + "buffer": "^5.4.3", + "buffer-alloc": "^1.2.0", + "buffer-from": "^1.1.1", + "dijkstrajs": "^1.0.1", + "isarray": "^2.0.1", + "pngjs": "^3.3.0", + "yargs": "^13.2.4" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -27713,9 +28106,9 @@ } }, "react-data-table-component": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/react-data-table-component/-/react-data-table-component-6.9.6.tgz", - "integrity": "sha512-4ypZsSOL6dBUijlHEgId/vBr+xpDAzxh/eiZEg9jlaL5TU2NktxDB9hk6x9Jfc+vsbOVAhKlmFDthGni2FMUAw==", + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/react-data-table-component/-/react-data-table-component-6.9.7.tgz", + "integrity": "sha512-HVRdDdpZPzfv7YoS6VNmOiON3WaA9hwzkbvIKkEoTyDR31ZPi3ZzivUDmpmVe5SO+EmxF50u741mE2D51OsM0Q==", "requires": { "deepmerge": "^4.2.2", "lodash.orderby": "^4.6.0", @@ -28164,9 +28557,9 @@ } }, "react-dropzone": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-11.0.1.tgz", - "integrity": "sha512-x/6wqRHaR8jsrNiu/boVMIPYuoxb83Vyfv77hO7/3ZRn8Pr+KH5onsCsB8MLBa3zdJl410C5FXPUINbu16XIzw==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-11.0.2.tgz", + "integrity": "sha512-/Wde9Il1aJ1FtWllg3N2taIeJh4aftx6UGUG8R1TmLnZit2RnDcEjcKwEEbKwgLXTTh8QQpiZWQJq45jTy1jCA==", "requires": { "attr-accept": "^2.0.0", "file-selector": "^0.1.12", @@ -28420,15 +28813,6 @@ "react-popper": "^1.3.7" } }, - "react-rating": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/react-rating/-/react-rating-2.0.5.tgz", - "integrity": "sha512-uldxgLCe5bzqGX7V+7/bPgQQj2Kok6eiMgTMxjKOhfhnQkFLDlc4TjMlp7gaJFAHWdbiOnqpiShI7z8as6oWtg==", - "requires": { - "@types/lodash": "^4.14.105", - "@types/react": "^16.0.40" - } - }, "react-reconciler": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.25.1.tgz", @@ -28921,33 +29305,33 @@ "integrity": "sha512-X9Ncj4cj3/CIvLI2Z9IobHtVi8FVdUrdJkCNaL9kdX8ohfsi18DXHsCVd/A7ssARBdccdDb5ODnt62WuEWaM/g==" }, "remark-mdx": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.6.tgz", - "integrity": "sha512-BkR7SjP+3OvrCsWGlYy1tWEsZ8aQ86x+i7XWbW79g73Ws/cCaeVsEn0ZxAzzoTRH+PJWVU7Mbe64GdejEyKr2g==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.7.tgz", + "integrity": "sha512-sq9y5g/UC2cuF7LGAmTfn8RfLWH7QAM8imexqOoCsxsOrVo8aU/iZ9HQpFj2eUJfoTljRGE/VLk6XYlUfDLGGg==", "requires": { - "@babel/core": "7.9.6", + "@babel/core": "7.10.4", "@babel/helper-plugin-utils": "7.8.3", "@babel/plugin-proposal-object-rest-spread": "7.9.6", "@babel/plugin-syntax-jsx": "7.8.3", - "@mdx-js/util": "^1.6.6", + "@mdx-js/util": "^1.6.7", "is-alphabetical": "1.0.4", "remark-parse": "8.0.2", "unified": "9.0.0" }, "dependencies": { "@babel/core": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz", - "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.4.tgz", + "integrity": "sha512-3A0tS0HWpy4XujGc7QtOIHTeNwUgWaZc/WuS5YQrfhU67jnVmsD6OGPc1AKHH0LJHQICGncy3+YUjIhVlfDdcA==", "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.6", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helpers": "^7.9.6", - "@babel/parser": "^7.9.6", - "@babel/template": "^7.8.6", - "@babel/traverse": "^7.9.6", - "@babel/types": "^7.9.6", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.4", + "@babel/helper-module-transforms": "^7.10.4", + "@babel/helpers": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -34219,6 +34603,66 @@ "url-loader": "^1.1.2" } }, + "web3modal": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/web3modal/-/web3modal-1.8.0.tgz", + "integrity": "sha512-FsLZ3xnSK+jT22LCZz1M7Jibz/4e4Lf2wScKcNWKNJ4BzLWCp16Mmv6Hq4bgn5zOOqd3ADclH3TzS0l5DoCIKQ==", + "requires": { + "detect-browser": "^5.1.0", + "prop-types": "^15.7.2", + "react": "^16.8.6", + "react-dom": "^16.8.6", + "styled-components": "^5.1.1", + "tslib": "^1.10.0" + }, + "dependencies": { + "@emotion/is-prop-valid": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", + "requires": { + "@emotion/memoize": "0.7.4" + } + }, + "@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==" + }, + "css-to-react-native": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", + "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", + "requires": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==" + }, + "styled-components": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.1.1.tgz", + "integrity": "sha512-1ps8ZAYu2Husx+Vz8D+MvXwEwvMwFv+hqqUwhNlDN5ybg6A+3xyW1ECrAgywhvXapNfXiz79jJyU0x22z0FFTg==", + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/traverse": "^7.4.5", + "@emotion/is-prop-valid": "^0.8.8", + "@emotion/stylis": "^0.8.4", + "@emotion/unitless": "^0.7.4", + "babel-plugin-styled-components": ">= 1", + "css-to-react-native": "^3.0.0", + "hoist-non-react-statics": "^3.0.0", + "shallowequal": "^1.1.0", + "supports-color": "^5.5.0" + } + } + } + }, "webidl-conversions": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", diff --git a/package.json b/package.json index cd589c1be..bc80653ec 100644 --- a/package.json +++ b/package.json @@ -22,20 +22,21 @@ "@loadable/component": "^5.13.1", "@now/node": "^1.7.2", "@oceanprotocol/art": "^3.0.0", - "@oceanprotocol/react": "0.0.11", - "@oceanprotocol/squid": "^2.2.0", + "@oceanprotocol/lib": "^0.1.4", + "@oceanprotocol/react": "^0.0.12", "@oceanprotocol/typographies": "^0.1.0", "@sindresorhus/slugify": "^1.0.0", "@tippyjs/react": "^4.1.0", "@types/classnames": "^2.2.10", + "@walletconnect/web3-provider": "^1.0.15", "axios": "^0.19.2", "classnames": "^2.2.6", "date-fns": "^2.14.0", "dotenv": "^8.2.0", "ethereum-blockies": "github:MyEtherWallet/blockies", "filesize": "^6.1.0", - "formik": "^2.1.4", - "gatsby": "^2.24.2", + "formik": "^2.1.5", + "gatsby": "^2.24.3", "gatsby-image": "^2.4.13", "gatsby-plugin-manifest": "^2.4.18", "gatsby-plugin-react-helmet": "^3.3.10", @@ -53,15 +54,14 @@ "numeral": "^2.0.6", "query-string": "^6.13.1", "react": "^16.13.1", - "react-data-table-component": "^6.9.6", + "react-data-table-component": "^6.9.7", "react-datepicker": "^3.1.3", "react-dom": "^16.13.1", "react-dotdotdot": "^1.3.1", - "react-dropzone": "^11.0.1", + "react-dropzone": "^11.0.2", "react-helmet": "^6.1.0", "react-markdown": "^4.3.1", "react-paginate": "^6.3.2", - "react-rating": "^2.0.5", "react-responsive-modal": "^5.0.2", "react-spring": "^8.0.27", "react-tabs": "^3.1.1", @@ -73,17 +73,17 @@ "yup": "^0.29.1" }, "devDependencies": { - "@babel/core": "^7.10.3", + "@babel/core": "^7.10.5", "@babel/preset-typescript": "^7.10.1", - "@storybook/addon-actions": "^6.0.0-rc.3", - "@storybook/addon-storyshots": "^6.0.0-rc.3", - "@storybook/react": "^6.0.0-rc.3", + "@storybook/addon-actions": "^6.0.0-rc.5", + "@storybook/addon-storyshots": "^6.0.0-rc.5", + "@storybook/react": "^6.0.0-rc.5", "@svgr/webpack": "^5.4.0", - "@testing-library/jest-dom": "^5.11.0", - "@testing-library/react": "^10.4.5", + "@testing-library/jest-dom": "^5.11.1", + "@testing-library/react": "^10.4.7", "@types/jest": "^26.0.4", "@types/loadable__component": "^5.13.0", - "@types/node": "^14.0.22", + "@types/node": "^14.0.23", "@types/numeral": "^0.0.28", "@types/react": "^16.9.43", "@types/react-datepicker": "^3.0.2", @@ -92,8 +92,8 @@ "@types/react-tabs": "^2.3.2", "@types/shortid": "0.0.29", "@types/yup": "^0.29.3", - "@typescript-eslint/eslint-plugin": "^3.6.0", - "@typescript-eslint/parser": "^3.6.0", + "@typescript-eslint/eslint-plugin": "^3.6.1", + "@typescript-eslint/parser": "^3.6.1", "babel-loader": "^8.1.0", "babel-preset-react-app": "^9.1.2", "electron": "^9.1.0", diff --git a/plugins/gatsby-source-ocean/gatsby-node.js b/plugins/gatsby-source-ocean/gatsby-node.js deleted file mode 100644 index 2ffd2a7b4..000000000 --- a/plugins/gatsby-source-ocean/gatsby-node.js +++ /dev/null @@ -1,42 +0,0 @@ -const axios = require('axios') - -exports.sourceNodes = async ( - { actions, createNodeId, createContentDigest }, - { aquariusUri } -) => { - const { createNode } = actions - - // Query for all assets to use in creating pages. - const result = await axios(`${aquariusUri}/api/v1/aquarius/assets`) - - for (let i = 0; i < result.data.ids.length; i++) { - const did = result.data.ids[i] - - const metadataResult = await axios( - `${aquariusUri}/api/v1/aquarius/assets/metadata/${did}` - ) - - const metadata = { - did, - ...metadataResult.data.attributes - } - - const nodeMeta = { - id: createNodeId(did), - parent: null, - children: [], - internal: { - type: 'OceanAsset', - contentDigest: createContentDigest(metadata), - description: `All data sets queried from ${aquariusUri}` - } - } - - const node = { - ...metadata, - ...nodeMeta - } - - await createNode(node) - } -} diff --git a/plugins/gatsby-source-ocean/package.json b/plugins/gatsby-source-ocean/package.json deleted file mode 100644 index 5201f5d65..000000000 --- a/plugins/gatsby-source-ocean/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "gatsby-source-ocean" -} diff --git a/src/@types/MetaData.d.ts b/src/@types/MetaData.d.ts index b3fdd91a8..7d1e713e9 100644 --- a/src/@types/MetaData.d.ts +++ b/src/@types/MetaData.d.ts @@ -1,5 +1,5 @@ -import { File, MetaData, AdditionalInformation } from '@oceanprotocol/squid' -import { ServiceMetadata } from '@oceanprotocol/squid/dist/node/ddo/Service' +import { File, MetaData, AdditionalInformation } from '@oceanprotocol/lib' +import { ServiceMetadata } from '@oceanprotocol/lib/dist/node/ddo/Service' export declare type AccessType = 'Download' | 'Compute' @@ -34,8 +34,3 @@ export interface MetaDataPublishForm { export interface ServiceMetaDataMarket extends ServiceMetadata { attributes: MetaDataMarket } - -// type for assets pulled into GraphQL -export interface OceanAsset extends MetaDataMarket { - did: DID -} diff --git a/src/components/Layout.module.css b/src/components/Layout.module.css index 609f8ad4d..8baa0a8ba 100644 --- a/src/components/Layout.module.css +++ b/src/components/Layout.module.css @@ -1,5 +1,7 @@ .app { height: 100%; + background: url('../../node_modules/@oceanprotocol/art/waves/waves.svg') + no-repeat center 10rem; /* sticky footer technique */ display: flex; diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 99871a894..6913169bb 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -12,6 +12,7 @@ export interface LayoutProps { uri: string description?: string noPageHeader?: boolean + headerCenter?: boolean } export default function Layout({ @@ -19,7 +20,8 @@ export default function Layout({ title, uri, description, - noPageHeader + noPageHeader, + headerCenter }: LayoutProps): ReactElement { return (
@@ -29,7 +31,11 @@ export default function Layout({
{title && !noPageHeader && ( - + )} {children} diff --git a/src/components/atoms/Container.tsx b/src/components/atoms/Container.tsx index 1d80a1167..706ace6ae 100644 --- a/src/components/atoms/Container.tsx +++ b/src/components/atoms/Container.tsx @@ -1,6 +1,9 @@ import React, { ReactElement, ReactNode } from 'react' +import classNames from 'classnames/bind' import styles from './Container.module.css' +const cx = classNames.bind(styles) + export default function Container({ children, narrow, @@ -10,13 +13,11 @@ export default function Container({ narrow?: boolean className?: string }): ReactElement { - return ( -
- {children} -
- ) + const styleClasses = cx({ + container: true, + narrow: narrow, + [className]: className + }) + + return
{children}
} diff --git a/src/components/atoms/File.tsx b/src/components/atoms/File.tsx index f4e3f1c72..4ba38fade 100644 --- a/src/components/atoms/File.tsx +++ b/src/components/atoms/File.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from 'react' -import { File as FileMetaData } from '@oceanprotocol/squid' +import { File as FileMetaData } from '@oceanprotocol/lib' import filesize from 'filesize' import cleanupContentType from '../../utils/cleanupContentType' import styles from './File.module.css' diff --git a/src/components/atoms/Rating.module.css b/src/components/atoms/Rating.module.css deleted file mode 100644 index eaa583f05..000000000 --- a/src/components/atoms/Rating.module.css +++ /dev/null @@ -1,57 +0,0 @@ -.ratings { - display: flex; - margin-left: calc(var(--spacer) / -8); - font-weight: var(--font-weight-base); -} - -/* Handle half stars our own way */ -.ratings [style*='width:'] { - width: 100% !important; - clip-path: polygon(0 0, 60% 0, 60% 100%, 0% 100%); -} - -.ratings [style*='width:100%'], -.ratings [style*='width: 100%'] { - width: 100% !important; - clip-path: none !important; -} - -.ratings [style*='width:0%'], -.ratings [style*='width: 0%'] { - width: 0 !important; - clip-path: none !important; -} - -.star { - margin-left: calc(var(--spacer) / 8); -} - -.star svg { - fill: none; - stroke: var(--brand-grey); -} - -.full { - composes: star; -} - -.full svg { - fill: var(--color-primary); - stroke: var(--color-primary); -} - -.ratingVotes { - display: inline-block; - font-size: var(--font-size-small); - padding-left: 5px; - color: var(--brand-grey); -} - -.readonly { - composes: ratings; -} - -.readonly .full svg { - fill: var(--color-secondary); - stroke: var(--color-secondary); -} diff --git a/src/components/atoms/Rating.stories.tsx b/src/components/atoms/Rating.stories.tsx deleted file mode 100644 index 63f5b7484..000000000 --- a/src/components/atoms/Rating.stories.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react' -import Rating from './Rating' - -export default { - title: 'Atoms/Rating' -} - -export const Normal = () => ( - -) - -export const WithFraction = () => ( - -) - -export const Interactive = () => ( - null} - curation={{ - rating: 3.3, - numVotes: 300 - }} - /> -) diff --git a/src/components/atoms/Rating.tsx b/src/components/atoms/Rating.tsx deleted file mode 100644 index 81c7d8a1d..000000000 --- a/src/components/atoms/Rating.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react' -import ReactRating from 'react-rating' -import Star from '../../images/star.svg' -import { Curation } from '@oceanprotocol/squid' -import styles from './Rating.module.css' - -export default function Rating({ - curation, - readonly, - isLoading, - onClick -}: { - curation: Curation | undefined - readonly?: boolean - isLoading?: boolean - onClick?: (value: any) => void -}) { - let numVotes = 0 - let rating = 0 - - if (!curation) return null - ;({ numVotes, rating } = curation) - - // if it's readonly then the fraction is 10 to show the average rating proper. When you select the rating you select from 1 to 5 - const fractions = readonly ? 2 : 1 - - return ( -
- - -
- } - fullSymbol={ -
- -
- } - initialRating={rating} - readonly={readonly || isLoading || false} - onClick={onClick} - fractions={fractions} - /> - - - {rating} {readonly ? `(${numVotes})` : ''} - -
- ) -} diff --git a/src/components/atoms/Tags.module.css b/src/components/atoms/Tags.module.css index d60b604d7..5ba88e004 100644 --- a/src/components/atoms/Tags.module.css +++ b/src/components/atoms/Tags.module.css @@ -7,14 +7,13 @@ .tag { color: var(--color-secondary); font-size: var(--font-size-small); - font-weight: var(--font-weight-bold); - padding: 0.2rem 1.2rem 0.2rem 1.2rem; - margin-left: calc(var(--spacer) / 16); - margin-right: calc(var(--spacer) / 16); - margin-bottom: calc(var(--spacer) / 8); + padding: 0.1rem 1.2rem 0.1rem 1.2rem; + margin-left: calc(var(--spacer) / 8); + margin-right: calc(var(--spacer) / 8); + margin-bottom: calc(var(--spacer) / 4); text-align: center; border-radius: var(--border-radius); - border: 1px solid var(--brand-grey-light); + border: 1px solid var(--brand-grey-lighter); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -25,10 +24,6 @@ color: var(--color-primary); } -.tag:first-of-type { - margin-left: 0; -} - .more { font-size: var(--font-size-mini); margin-left: calc(var(--spacer) / 8); diff --git a/src/components/molecules/AssetTeaser.module.css b/src/components/molecules/AssetTeaser.module.css index b473ff6d8..cfaff46ec 100644 --- a/src/components/molecules/AssetTeaser.module.css +++ b/src/components/molecules/AssetTeaser.module.css @@ -30,6 +30,7 @@ .foot { font-weight: var(--font-weight-bold); + margin-top: calc(var(--spacer) / 2); } .foot p { diff --git a/src/components/molecules/AssetTeaser.stories.tsx b/src/components/molecules/AssetTeaser.stories.tsx index 956f60059..83de8a9eb 100644 --- a/src/components/molecules/AssetTeaser.stories.tsx +++ b/src/components/molecules/AssetTeaser.stories.tsx @@ -1,6 +1,6 @@ import AssetTeaser from '../molecules/AssetTeaser' import * as React from 'react' -import { DDO } from '@oceanprotocol/squid' +import { DDO } from '@oceanprotocol/lib' import ddo from '../../../tests/unit/__fixtures__/ddo' export default { diff --git a/src/components/molecules/AssetTeaser.tsx b/src/components/molecules/AssetTeaser.tsx index 4c793119a..1354ec3e5 100644 --- a/src/components/molecules/AssetTeaser.tsx +++ b/src/components/molecules/AssetTeaser.tsx @@ -2,10 +2,8 @@ import React from 'react' import { Link } from 'gatsby' import Dotdotdot from 'react-dotdotdot' import { MetaDataMarket } from '../../@types/MetaData' -import Tags from '../atoms/Tags' import Price from '../atoms/Price' import styles from './AssetTeaser.module.css' -import Rating from '../atoms/Rating' declare type AssetTeaserProps = { did: string @@ -16,17 +14,10 @@ const AssetTeaser: React.FC = ({ did, metadata }: AssetTeaserProps) => { + if (!metadata.additionalInformation) return null + const { name, price } = metadata.main - - const { - description, - copyrightHolder, - tags, - categories, - access - } = metadata.additionalInformation - - const { curation } = metadata + const { description, access } = metadata.additionalInformation return (
@@ -35,20 +26,15 @@ const AssetTeaser: React.FC = ({ {access === 'Compute' && (
{access}
)} -
{description || ''} - - {tags && ( - - )}
- +
diff --git a/src/components/molecules/DeleteAsset.tsx b/src/components/molecules/DeleteAsset.tsx index 93e284216..271d701ec 100644 --- a/src/components/molecules/DeleteAsset.tsx +++ b/src/components/molecules/DeleteAsset.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react' import { useNavigate } from '@reach/router' -import { DDO } from '@oceanprotocol/squid' +import { DDO } from '@oceanprotocol/lib' import { redeploy } from '../../utils' import Button from '../atoms/Button' import BaseDialog from '../atoms/BaseDialog' diff --git a/src/components/molecules/FilesInput/Info.tsx b/src/components/molecules/FilesInput/Info.tsx index 53ee5c162..4bbd29692 100644 --- a/src/components/molecules/FilesInput/Info.tsx +++ b/src/components/molecules/FilesInput/Info.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from 'react' -import { File } from '@oceanprotocol/squid' +import { File } from '@oceanprotocol/lib' import { prettySize } from '../../../utils' import cleanupContentType from '../../../utils/cleanupContentType' import styles from './Info.module.css' diff --git a/src/components/molecules/PageHeader.module.css b/src/components/molecules/PageHeader.module.css index 2cd697c68..fd6bea38f 100644 --- a/src/components/molecules/PageHeader.module.css +++ b/src/components/molecules/PageHeader.module.css @@ -14,3 +14,9 @@ margin-top: calc(var(--spacer) / 4); margin-bottom: 0; } + +.center { + margin-left: auto; + margin-right: auto; + text-align: center; +} diff --git a/src/components/molecules/PageHeader.tsx b/src/components/molecules/PageHeader.tsx index b3f627a6e..fb11fb7f9 100644 --- a/src/components/molecules/PageHeader.tsx +++ b/src/components/molecules/PageHeader.tsx @@ -6,14 +6,16 @@ const cx = classNames.bind(styles) export default function PageHeader({ title, - description + description, + center }: { title: string description?: string center?: boolean }): ReactElement { const styleClasses = cx({ - header: true + header: true, + center: center }) return ( diff --git a/src/components/molecules/Pagination.module.css b/src/components/molecules/Pagination.module.css index 3d33fb773..47efdc81a 100644 --- a/src/components/molecules/Pagination.module.css +++ b/src/components/molecules/Pagination.module.css @@ -15,7 +15,7 @@ margin-top: -1px; display: inline-block; cursor: pointer; - border: 1px solid var(--brand-grey-light); + border: 1px solid var(--brand-grey-lighter); min-width: 3.5rem; } diff --git a/src/components/molecules/Pagination.tsx b/src/components/molecules/Pagination.tsx index 0d68a06a5..cc822a15e 100644 --- a/src/components/molecules/Pagination.tsx +++ b/src/components/molecules/Pagination.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import React, { useState, useEffect, ReactElement } from 'react' import ReactPaginate from 'react-paginate' import styles from './Pagination.module.css' @@ -14,7 +14,9 @@ export default function Pagination({ currentPage, hrefBuilder, onPageChange -}: PaginationProps) { +}: PaginationProps): ReactElement { + if (!totalPages || totalPages < 2) return null + const [smallViewport, setSmallViewport] = useState(true) function viewportChange(mq: { matches: boolean }) { @@ -31,7 +33,7 @@ export default function Pagination({ } }, []) - return totalPages > 1 ? ( + return ( - ) : null + ) } diff --git a/src/components/molecules/SearchBar.tsx b/src/components/molecules/SearchBar.tsx index e706e306b..1f2c60945 100644 --- a/src/components/molecules/SearchBar.tsx +++ b/src/components/molecules/SearchBar.tsx @@ -1,7 +1,6 @@ import React, { useState, ChangeEvent, FormEvent, ReactElement } from 'react' import { useNavigate } from '@reach/router' import styles from './SearchBar.module.css' -import Loader from '../atoms/Loader' import Button from '../atoms/Button' import Input from '../atoms/Input' import InputGroup from '../atoms/Input/InputGroup' @@ -19,7 +18,6 @@ export default function SearchBar({ }): ReactElement { const navigate = useNavigate() const [value, setValue] = useState(initialValue || '') - const [searchStarted, setSearchStarted] = useState(false) function handleChange(e: ChangeEvent) { setValue(e.target.value) @@ -27,10 +25,7 @@ export default function SearchBar({ function startSearch(e: FormEvent) { e.preventDefault() - if (value === '') return - - setSearchStarted(true) navigate(`/search?text=${value}`) } @@ -46,7 +41,7 @@ export default function SearchBar({ required /> diff --git a/src/components/molecules/Wallet/Account.tsx b/src/components/molecules/Wallet/Account.tsx index 38c9d1657..203953bd9 100644 --- a/src/components/molecules/Wallet/Account.tsx +++ b/src/components/molecules/Wallet/Account.tsx @@ -1,15 +1,14 @@ import React from 'react' import styles from './Account.module.css' -import { useWeb3, useOcean } from '@oceanprotocol/react' +import { useOcean } from '@oceanprotocol/react' import { toDataUrl } from 'ethereum-blockies' import { ReactComponent as Caret } from '../../../images/caret.svg' import Status from '../../atoms/Status' - -function accountTruncate(account: string) { - const middle = account.substring(6, 38) - const truncated = account.replace(middle, '…') - return truncated -} +import { + accountTruncate, + connectWallet, + isCorrectNetwork +} from '../../../utils/wallet' const Blockies = ({ account }: { account: string | undefined }) => { if (!account) return null @@ -28,15 +27,14 @@ const Blockies = ({ account }: { account: string | undefined }) => { // Forward ref for Tippy.js // eslint-disable-next-line const Account = React.forwardRef((props, ref: any) => { - const { account, web3Connect, ethProviderStatus } = useWeb3() - const { status } = useOcean() - const hasSuccess = ethProviderStatus === 1 && status === 1 + const { accountId, status, connect, chainId } = useOcean() + const hasSuccess = status === 1 && isCorrectNetwork(chainId) - return account ? ( + return accountId ? ( diff --git a/src/components/molecules/Wallet/Feedback.tsx b/src/components/molecules/Wallet/Feedback.tsx index 1169fc587..a2ff8fed8 100644 --- a/src/components/molecules/Wallet/Feedback.tsx +++ b/src/components/molecules/Wallet/Feedback.tsx @@ -1,7 +1,9 @@ import React, { ReactElement } from 'react' import Status from '../../atoms/Status' import styles from './Feedback.module.css' -import { useWeb3, useOcean } from '@oceanprotocol/react' +import { useOcean } from '@oceanprotocol/react' +import { isCorrectNetwork, getNetworkName } from '../../../utils/wallet' +import { useSiteMetadata } from '../../../hooks/useSiteMetadata' export declare type Web3Error = { status: 'error' | 'warning' | 'success' @@ -14,47 +16,46 @@ export default function Web3Feedback({ }: { isBalanceInsufficient?: boolean }): ReactElement { - const { ethProviderStatus } = useWeb3() - const { status } = useOcean() - const isEthProviderAbsent = ethProviderStatus === -1 - const isEthProviderDisconnected = ethProviderStatus === 0 - const isOceanDisconnected = status === 0 + const { appConfig } = useSiteMetadata() + const { account, status, chainId } = useOcean() const isOceanConnectionError = status === -1 - const hasSuccess = ethProviderStatus === 1 && status === 1 + const correctNetwork = isCorrectNetwork(chainId) + const showFeedback = !account || isOceanConnectionError || !correctNetwork + const allowedNetworkNames = appConfig.networks.map((network: number) => + getNetworkName(network) + ) - const state = isEthProviderAbsent + const state = !account ? 'error' - : hasSuccess && !isBalanceInsufficient + : !correctNetwork + ? 'warning' + : account && !isBalanceInsufficient ? 'success' : 'warning' - const title = isEthProviderAbsent - ? 'No Web3 Browser' - : isEthProviderDisconnected + const title = !account ? 'No account connected' - : isOceanDisconnected - ? 'Not connected to Pacific network' : isOceanConnectionError ? 'Error connecting to Ocean' - : hasSuccess + : !correctNetwork + ? 'Wrong Network' + : account ? isBalanceInsufficient === true ? 'Insufficient balance' : 'Connected to Ocean' : 'Something went wrong' - const message = isEthProviderAbsent - ? 'To download data sets you need a browser with Web3 capabilties, like Firefox with MetaMask installed.' - : isEthProviderDisconnected + const message = !account ? 'Please connect your Web3 wallet.' - : isOceanDisconnected - ? 'Please connect in MetaMask to custom RPC https://pacific.oceanprotocol.com.' : isOceanConnectionError - ? 'Try again.' + ? 'Please try again.' + : !correctNetwork + ? `Please connect to ${allowedNetworkNames}.` : isBalanceInsufficient === true ? 'You do not have enough OCEAN in your wallet to purchase this asset.' : 'Something went wrong.' - return !hasSuccess ? ( + return showFeedback ? (

{title}

diff --git a/src/components/molecules/Wallet/index.tsx b/src/components/molecules/Wallet/index.tsx index 90dd4adb8..11695e696 100644 --- a/src/components/molecules/Wallet/index.tsx +++ b/src/components/molecules/Wallet/index.tsx @@ -1,10 +1,10 @@ import React, { ReactElement } from 'react' import loadable from '@loadable/component' import { useSpring, animated } from 'react-spring' -import { useWeb3 } from '@oceanprotocol/react' import Account from './Account' import Details from './Details' import styles from './index.module.css' +import { useOcean } from '@oceanprotocol/react' const Tippy = loadable(() => import('@tippyjs/react/headless')) @@ -15,7 +15,7 @@ const animation = { } export default function Wallet(): ReactElement { - const { account, ethProviderStatus } = useWeb3() + const { accountId } = useOcean() const [props, setSpring] = useSpring(() => animation.from) function onMount() { @@ -34,14 +34,12 @@ export default function Wallet(): ReactElement { }) } - const isEthProviderAbsent = ethProviderStatus === -1 - if (isEthProviderAbsent) return null - return ( (
@@ -53,7 +51,7 @@ export default function Wallet(): ReactElement { animation onMount={onMount} onHide={onHide} - disabled={!account} + disabled={!accountId} fallback={} > diff --git a/src/components/organisms/AssetActions/Compute.stories.tsx b/src/components/organisms/AssetActions/Compute.stories.tsx index 68cb1878b..2c4b13dd5 100644 --- a/src/components/organisms/AssetActions/Compute.stories.tsx +++ b/src/components/organisms/AssetActions/Compute.stories.tsx @@ -2,7 +2,7 @@ import React, { ReactElement } from 'react' import Compute from './Compute' import ddo from '../../../../tests/unit/__fixtures__/ddo' import web3Mock from '../../../../tests/unit/__mocks__/web3' -import squidMock from '../../../../tests/unit/__mocks__/@oceanprotocol/squid' +import squidMock from '../../../../tests/unit/__mocks__/@oceanprotocol/lib' import { context } from '../../../../tests/unit/__mocks__/web3provider' export default { diff --git a/src/components/organisms/AssetActions/Compute.tsx b/src/components/organisms/AssetActions/Compute.tsx index 3d8ad8aeb..afffb5b0f 100644 --- a/src/components/organisms/AssetActions/Compute.tsx +++ b/src/components/organisms/AssetActions/Compute.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, ReactElement } from 'react' -import { Ocean } from '@oceanprotocol/squid' +import { Ocean } from '@oceanprotocol/lib' import { fromWei } from 'web3-utils' import compareAsBN, { Comparisson } from '../../../utils/compareAsBN' import Loader from '../../atoms/Loader' diff --git a/src/components/organisms/AssetActions/index.tsx b/src/components/organisms/AssetActions/index.tsx index 5ba5d9de8..543cabe93 100644 --- a/src/components/organisms/AssetActions/index.tsx +++ b/src/components/organisms/AssetActions/index.tsx @@ -13,7 +13,7 @@ export default function AssetActions({ metadata: MetaDataMarket did: string }): ReactElement { - const { ocean, balanceInOcean } = useOcean() + // const { ocean, balanceInOcean } = useOcean() const { access } = metadata.additionalInformation const isCompute = access && access === 'Compute' @@ -26,12 +26,13 @@ export default function AssetActions({
{isCompute ? ( - + // + 'Compute Me' ) : ( )} diff --git a/src/components/organisms/AssetContent/MetaFull.module.css b/src/components/organisms/AssetContent/MetaFull.module.css index f727edb3f..0f91d82dc 100644 --- a/src/components/organisms/AssetContent/MetaFull.module.css +++ b/src/components/organisms/AssetContent/MetaFull.module.css @@ -1,9 +1,6 @@ .metaFull { margin-top: calc(var(--spacer) * 2); font-size: var(--font-size-small); - padding: var(--spacer); - border-radius: var(--border-radius); - background: var(--brand-grey-dimmed); display: grid; gap: var(--spacer); grid-template-columns: 1fr 1fr; diff --git a/src/components/organisms/AssetContent/MetaFull.tsx b/src/components/organisms/AssetContent/MetaFull.tsx index 8ef196e6a..6a2af5e3b 100644 --- a/src/components/organisms/AssetContent/MetaFull.tsx +++ b/src/components/organisms/AssetContent/MetaFull.tsx @@ -12,35 +12,14 @@ export default function MetaFull({ metadata: MetaDataMarket }): ReactElement { const { dateCreated, datePublished, author, license } = metadata.main - let dateRange - if (metadata && metadata.additionalInformation) { - ;({ dateRange } = metadata.additionalInformation) - } - - // In practice dateRange will always be defined, but in the rare case it isn't - // we put something to prevent errors - if (!dateRange) { - dateRange = [dateCreated, dateCreated] - } + const { categories } = metadata.additionalInformation return (
- -
)} + + {tags && tags.length > 0 && } ) } diff --git a/src/components/organisms/AssetContent/RatingAction.module.css b/src/components/organisms/AssetContent/RatingAction.module.css deleted file mode 100644 index ad9918a1a..000000000 --- a/src/components/organisms/AssetContent/RatingAction.module.css +++ /dev/null @@ -1,25 +0,0 @@ -.rating { - composes: box from '../../atoms/Box.module.css'; - display: flex; - flex-wrap: wrap; - flex-direction: column; - margin-top: 5px; - padding: 20px !important; -} - -.rating svg { - width: var(--font-size-h3); - height: var(--font-size-h3); -} - -.title { - font-size: var(--font-size-large); -} - -.success { - background-color: var(--green); -} - -.error { - background-color: var(--red); -} diff --git a/src/components/organisms/AssetContent/RatingAction.tsx b/src/components/organisms/AssetContent/RatingAction.tsx deleted file mode 100644 index 47847f486..000000000 --- a/src/components/organisms/AssetContent/RatingAction.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import React, { useState, useEffect, ReactElement } from 'react' -import { toast } from 'react-toastify' -import Rating from '../../atoms/Rating' -import rateAsset from '../../../utils/rateAsset' -import { DID } from '@oceanprotocol/squid' -import styles from './RatingAction.module.css' -import getAssetRating from '../../../utils/getAssetRating' -import Loader from '../../atoms/Loader' -import { useWeb3 } from '@oceanprotocol/react' -export default function RatingAction({ - did, - onVote -}: { - did: DID | string - onVote: () => void -}): ReactElement { - const { web3, account } = useWeb3() - const [rating, setRating] = useState(0) - const [isloading, setIsLoading] = useState(false) - - useEffect(() => { - async function getOwnRating() { - if (!account) return - const currentRating = await getAssetRating(did, account) - currentRating && setRating(currentRating.vote) - } - getOwnRating() - }, [account]) - - async function handleRatingClick(value: number) { - if (!web3) return - setIsLoading(true) - try { - const response = await rateAsset(did, web3, value) - if (!response) return - - onVote() - setRating(value) - toast.success('Thank you for rating!', { - className: styles.success - }) - } catch (error) { - toast.error(`There was an error: ${error.message}`, { - className: styles.error - }) - } - setIsLoading(false) - } - - return account ? ( - - ) : null -} diff --git a/src/components/organisms/AssetContent/index.module.css b/src/components/organisms/AssetContent/index.module.css index b0bc282f2..53dc15e45 100644 --- a/src/components/organisms/AssetContent/index.module.css +++ b/src/components/organisms/AssetContent/index.module.css @@ -1,13 +1,17 @@ .grid { display: grid; - gap: calc(var(--spacer) * 1.5); + gap: calc(var(--spacer) * 2); position: relative; margin-top: -1.5rem; } +.content { + composes: box from '../../atoms/Box.module.css'; + margin-top: var(--spacer); +} + @media (min-width: 60rem) { .grid { - gap: calc(var(--spacer) * 3); /* lazy golden ratio */ grid-template-columns: 1.618fr minmax(0, 1fr); } @@ -15,7 +19,7 @@ .sticky { position: sticky; top: calc(var(--spacer) / 2); - margin-top: calc(var(--spacer) * 1.5); + margin-top: var(--spacer); } } diff --git a/src/components/organisms/AssetContent/index.tsx b/src/components/organisms/AssetContent/index.tsx index 903fde851..b51baabe9 100644 --- a/src/components/organisms/AssetContent/index.tsx +++ b/src/components/organisms/AssetContent/index.tsx @@ -1,10 +1,8 @@ import { MetaDataMarket } from '../../../@types/MetaData' import React, { ReactElement } from 'react' -import { useOcean } from '@oceanprotocol/react' import Time from '../../atoms/Time' import { Link } from 'gatsby' import Markdown from '../../atoms/Markdown' -import Tags from '../../atoms/Tags' import MetaFull from './MetaFull' import MetaSecondary from './MetaSecondary' import styles from './index.module.css' @@ -21,42 +19,24 @@ export default function AssetContent({ did }: AssetContentProps): ReactElement { const { datePublished } = metadata.main - const { description, categories, tags } = metadata.additionalInformation - - // const { curation } = metadata - - // const { getCuration } = useMetadata() - // const [rating, setRating] = useState(curation ? curation.rating : 0) - // const [numVotes, setNumVotes] = useState( - // curation ? curation.numVotes : 0 - // ) - - // const onVoteUpdate = async () => { - // const { rating, numVotes } = await getCuration(did) - - // setRating(rating) - // setNumVotes(numVotes) - // } + const { description, categories } = metadata.additionalInformation return (
-
+
- {tags && tags.length > 0 && } - @@ -74,8 +54,6 @@ export default function AssetContent({
- - {/* */}
diff --git a/src/components/organisms/AssetList.module.css b/src/components/organisms/AssetList.module.css index 9d860bfaf..b4b8331a9 100644 --- a/src/components/organisms/AssetList.module.css +++ b/src/components/organisms/AssetList.module.css @@ -10,3 +10,9 @@ gap: var(--spacer); } } + +.empty { + color: var(--color-secondary); + font-size: var(--font-size-small); + font-style: italic; +} diff --git a/src/components/organisms/AssetList.stories.tsx b/src/components/organisms/AssetList.stories.tsx index c6fb7bfb8..c67b6e64e 100644 --- a/src/components/organisms/AssetList.stories.tsx +++ b/src/components/organisms/AssetList.stories.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { DDO } from '@oceanprotocol/squid' +import { DDO } from '@oceanprotocol/lib' import AssetList from './AssetList' import asset from '../../../tests/unit/__fixtures__/ddo' diff --git a/src/components/organisms/AssetList.tsx b/src/components/organisms/AssetList.tsx index 53385b566..bd7eb3f82 100644 --- a/src/components/organisms/AssetList.tsx +++ b/src/components/organisms/AssetList.tsx @@ -1,64 +1,77 @@ import AssetTeaser from '../molecules/AssetTeaser' import React from 'react' -import { QueryResult } from '@oceanprotocol/squid/dist/node/aquarius/Aquarius' -import shortid from 'shortid' +import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore' +import { useLocation, useNavigate } from '@reach/router' import Pagination from '../molecules/Pagination' import { updateQueryStringParameter } from '../../utils' import styles from './AssetList.module.css' import { MetaDataMarket } from '../../@types/MetaData' -import { DDO } from '@oceanprotocol/squid' +import { DDO } from '@oceanprotocol/lib' +import { useSiteMetadata } from '../../hooks/useSiteMetadata' declare type AssetListProps = { queryResult: QueryResult } const AssetList: React.FC = ({ queryResult }) => { + const { appConfig } = useSiteMetadata() + const location = useLocation() + const navigate = useNavigate() + // Construct the urls on the pagination links. This is only for UX, // since the links are no they will not work by itself. - // function hrefBuilder(pageIndex: number) { - // const newUrl = updateQueryStringParameter( - // router.asPath, - // 'page', - // `${pageIndex}` - // ) - // return newUrl - // } + function hrefBuilder(pageIndex: number) { + const newUrl = updateQueryStringParameter( + location.pathname + location.search, + 'page', + `${pageIndex}` + ) + return newUrl + } // // This is what iniitates a new search with new `page` // // url parameter - // function onPageChange(selected: number) { - // const newUrl = updateQueryStringParameter( - // router.asPath, - // 'page', - // `${selected + 1}` - // ) - // return router.push(newUrl) - // } + function onPageChange(selected: number) { + const newUrl = updateQueryStringParameter( + location.pathname + location.search, + 'page', + `${selected + 1}` + ) + return navigate(newUrl) + } return ( <>
- {queryResult && + {queryResult && queryResult.totalResults > 0 ? ( queryResult.results.map((ddo: DDO) => { - const { attributes }: MetaDataMarket = new DDO( - ddo - ).findServiceByType('metadata') + const { attributes }: MetaDataMarket = ddo.findServiceByType( + 'metadata' + ) return ( - + ) - })} + }) + ) : ( +
+ No results found in {appConfig.oceanConfig.metadataStoreUri} +
+ )}
- {/* */} + + {/* + Little hack cause the pagination navigation only works + on the search page right now. + */} + {location.pathname === '/search' && queryResult && ( + + )} ) } diff --git a/src/components/organisms/ConsumedList.tsx b/src/components/organisms/ConsumedList.tsx index dd5690c2c..52f12a9df 100644 --- a/src/components/organisms/ConsumedList.tsx +++ b/src/components/organisms/ConsumedList.tsx @@ -10,7 +10,7 @@ import Price from '../atoms/Price' import { fromWei } from 'web3-utils' import DateCell from '../atoms/Table/DateCell' import DdoLinkCell from '../atoms/Table/DdoLinkCell' -import { MetaDataMain } from '@oceanprotocol/squid' +import { MetaDataMain } from '@oceanprotocol/lib' const consumedColumns = [ { diff --git a/src/components/organisms/Header.module.css b/src/components/organisms/Header.module.css index a31e4e918..75001c2c6 100644 --- a/src/components/organisms/Header.module.css +++ b/src/components/organisms/Header.module.css @@ -1,3 +1,2 @@ .header { - background-color: var(--brand-white); } diff --git a/src/components/organisms/JobsList.tsx b/src/components/organisms/JobsList.tsx index 89875e4d1..ca210aa6b 100644 --- a/src/components/organisms/JobsList.tsx +++ b/src/components/organisms/JobsList.tsx @@ -11,7 +11,7 @@ import Price from '../atoms/Price' import { fromWei } from 'web3-utils' import Table from '../atoms/Table' import Button from '../atoms/Button' -import { MetaDataMain, Logger } from '@oceanprotocol/squid' +import { MetaDataMain, Logger } from '@oceanprotocol/lib' import DateCell from '../atoms/Table/DateCell' import DdoLinkCell from '../atoms/Table/DdoLinkCell' import shortid from 'shortid' diff --git a/src/components/organisms/PublishedList.tsx b/src/components/organisms/PublishedList.tsx index e6084857b..9a2feff60 100644 --- a/src/components/organisms/PublishedList.tsx +++ b/src/components/organisms/PublishedList.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState, ReactElement } from 'react' import Loader from '../atoms/Loader' -import { MetaDataMain } from '@oceanprotocol/squid' +import { MetaDataMain } from '@oceanprotocol/lib' import { useOcean, OceanConnectionStatus, diff --git a/src/components/pages/History.module.css b/src/components/pages/History.module.css index cec302f54..0c947b6af 100644 --- a/src/components/pages/History.module.css +++ b/src/components/pages/History.module.css @@ -15,3 +15,8 @@ top: var(--spacer); } } + +.content { + composes: box from '../atoms/Box.module.css'; + margin-top: var(--spacer); +} diff --git a/src/components/pages/History.tsx b/src/components/pages/History.tsx index 8148c64b6..c86d92ef5 100644 --- a/src/components/pages/History.tsx +++ b/src/components/pages/History.tsx @@ -8,15 +8,15 @@ import JobsList from '../organisms/JobsList' const sections = [ { title: 'Published', - component: + component: 'Coming Soon...' }, { title: 'Downloaded', - component: + component: 'Coming Soon...' }, { title: 'Compute Jobs', - component: + component: 'Coming Soon...' } ] @@ -32,7 +32,7 @@ const Section = ({ title, component }: { title: string; component: any }) => { const HistoryPage: React.FC = () => { return (
-
+
{sections.map((section) => { const { title, component } = section return
diff --git a/src/components/pages/Home.module.css b/src/components/pages/Home.module.css index a20445c26..da9107e40 100644 --- a/src/components/pages/Home.module.css +++ b/src/components/pages/Home.module.css @@ -1,3 +1,14 @@ -.grid { - composes: assetList from '../organisms/AssetList.module.css'; +.searchWrap { + display: flex; + justify-content: center; + margin-top: calc(var(--spacer) * var(--line-height)); +} + +.latest { + margin-top: calc(var(--spacer) * 2); +} + +.latest h3 { + font-size: var(--font-size-large); + color: var(--color-secondary); } diff --git a/src/components/pages/Home.tsx b/src/components/pages/Home.tsx index 1afd2f1b9..bf8de2812 100644 --- a/src/components/pages/Home.tsx +++ b/src/components/pages/Home.tsx @@ -1,31 +1,60 @@ -import React, { ReactElement } from 'react' +import React, { ReactElement, useEffect, useState } from 'react' import SearchBar from '../molecules/SearchBar' -import shortid from 'shortid' -import { OceanAsset } from '../../@types/MetaData' -import AssetTeaser from '../molecules/AssetTeaser' import styles from './Home.module.css' +import { MetadataStore, Logger } from '@oceanprotocol/lib' +import AssetList from '../organisms/AssetList' +import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore' +import Container from '../atoms/Container' +import Loader from '../atoms/Loader' +import { useSiteMetadata } from '../../hooks/useSiteMetadata' + +async function getLatestAssets(metadataStoreUri: string) { + try { + const metadataStore = new MetadataStore(metadataStoreUri, Logger) + + const result = await metadataStore.queryMetadata({ + page: 1, + offset: 10, + query: {}, + sort: { created: -1 } + }) + + return result + } catch (error) { + console.error(error.message) + } +} + +export default function HomePage(): ReactElement { + const { appConfig } = useSiteMetadata() + const [queryResult, setQueryResult] = useState() + const [loading, setLoading] = useState(true) + + useEffect(() => { + async function init() { + const results = await getLatestAssets( + appConfig.oceanConfig.metadataStoreUri + ) + setQueryResult(results) + setLoading(false) + } + init() + }, []) -export default function HomePage({ - assets -}: { - assets: { - node: OceanAsset - }[] -}): ReactElement { return ( <> - - {assets && ( -
- {assets.map(({ node }: { node: OceanAsset }) => ( - - ))} -
- )} + + + + +
+

Latest Data Sets

+ {loading ? ( + + ) : ( + queryResult && + )} +
) } diff --git a/src/components/pages/Publish/PublishForm.tsx b/src/components/pages/Publish/PublishForm.tsx index 279020bf1..72e1a12fa 100644 --- a/src/components/pages/Publish/PublishForm.tsx +++ b/src/components/pages/Publish/PublishForm.tsx @@ -7,7 +7,7 @@ import { useOcean } from '@oceanprotocol/react' import { Service, ServiceCompute -} from '@oceanprotocol/squid/dist/node/ddo/Service' +} from '@oceanprotocol/lib/dist/node/ddo/Service' import { Formik, Form as FormFormik, Field } from 'formik' import Input from '../../atoms/Input' import Button from '../../atoms/Button' @@ -15,7 +15,7 @@ import { transformPublishFormToMetadata } from './utils' import { FormContent, FormFieldProps } from '../../../@types/Form' import { MetaDataPublishForm } from '../../../@types/MetaData' import AssetModel from '../../../models/Asset' -import { File } from '@oceanprotocol/squid' +import { File } from '@oceanprotocol/lib' const validationSchema = Yup.object().shape({ // ---- required fields ---- @@ -81,7 +81,7 @@ export default function PublishForm({ // account, // metadata.main.price, // // Note: a hack without consequences. - // // Will make metadata.main.datePublished (automatically created by Aquarius) + // // Will make metadata.main.datePublished (automatically created by MetadataStore) // // go out of sync with this service.main.datePublished. // toStringNoMS(new Date(Date.now())) // ) diff --git a/src/components/templates/AssetDetails.tsx b/src/components/templates/AssetDetails.tsx deleted file mode 100644 index 81708e2b8..000000000 --- a/src/components/templates/AssetDetails.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import React, { ReactElement } from 'react' -import { PageProps, graphql } from 'gatsby' -import Layout from '../Layout' -import AssetContent from '../organisms/AssetContent' - -export default function AssetDetailsTemplate(props: PageProps): ReactElement { - const { oceanAsset } = props.data as any - - return ( - - - - ) -} - -export const templateQuery = graphql` - query OceanAssetByDid($did: String!) { - oceanAsset(did: { eq: $did }) { - did - main { - type - name - dateCreated - author - license - price - datePublished - files { - index - contentType - } - } - additionalInformation { - description - deliveryType - termsAndConditions - access - } - } - } -` diff --git a/src/components/templates/Search/index.module.css b/src/components/templates/Search/index.module.css index 19fc42c30..4c97caa50 100644 --- a/src/components/templates/Search/index.module.css +++ b/src/components/templates/Search/index.module.css @@ -1,8 +1,3 @@ -.empty { - color: var(--color-secondary); - font-style: italic; -} - .grid { display: grid; } @@ -10,17 +5,21 @@ @media (min-width: 55rem) { .grid { grid-column-gap: calc(var(--spacer) * 3); - grid-template-columns: minmax(0, 1fr) 3fr; + grid-template-columns: minmax(0, 3fr) 1fr; grid-template-areas: - 'side search' - 'side results'; + 'search side' + 'results side'; } + .search { grid-area: search; } + .side { grid-area: side; + margin-top: calc(var(--spacer) * 2.5); } + .results { grid-area: results; } diff --git a/src/components/templates/Search/index.tsx b/src/components/templates/Search/index.tsx index aab9b8053..309b7bb2a 100644 --- a/src/components/templates/Search/index.tsx +++ b/src/components/templates/Search/index.tsx @@ -1,12 +1,12 @@ import React, { ReactElement, useState, useEffect } from 'react' -import { QueryResult } from '@oceanprotocol/squid/dist/node/aquarius/Aquarius' +import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore' import SearchBar from '../../molecules/SearchBar' import AssetList from '../../organisms/AssetList' import { SearchPriceFilter } from '../../molecules/SearchPriceFilter' - import styles from './index.module.css' import queryString from 'query-string' import { getResults } from './utils' +import Loader from '../../atoms/Loader' export declare type SearchPageProps = { text: string | string[] @@ -20,16 +20,19 @@ export default function SearchPage({ location: Location }): ReactElement { const parsed = queryString.parse(location.search) - const { text, tag } = parsed + const { text, tag, page } = parsed const [queryResult, setQueryResult] = useState() + const [loading, setLoading] = useState() useEffect(() => { async function initSearch() { + setLoading(true) const queryResult = await getResults(parsed) setQueryResult(queryResult) + setLoading(false) } initSearch() - }, [parsed]) + }, [text, tag, page]) return (
@@ -42,11 +45,7 @@ export default function SearchPage({
- {queryResult && queryResult.results.length > 0 ? ( - - ) : ( -
No results found.
- )} + {loading ? : }
) diff --git a/src/components/templates/Search/utils.ts b/src/components/templates/Search/utils.ts index b42ae8b83..28973e6af 100644 --- a/src/components/templates/Search/utils.ts +++ b/src/components/templates/Search/utils.ts @@ -1,9 +1,9 @@ import { SearchQuery, QueryResult -} from '@oceanprotocol/squid/dist/node/aquarius/Aquarius' +} from '@oceanprotocol/lib/dist/node/metadatastore/MetadataStore' import { priceQueryParamToWei } from '../../../utils' -import { Aquarius, Logger } from '@oceanprotocol/squid' +import { MetadataStore, Logger } from '@oceanprotocol/lib' import { oceanConfig } from '../../../../app.config' export function getSearchQuery( @@ -52,8 +52,8 @@ export async function getResults(params: any): Promise { ]) : undefined - const aquarius = new Aquarius(oceanConfig.aquariusUri, Logger) - const queryResult = await aquarius.queryMetadata( + const metadataStore = new MetadataStore(oceanConfig.metadataStoreUri, Logger) + const queryResult = await metadataStore.queryMetadata( getSearchQuery(page, offset, text, tag, priceQuery) ) diff --git a/src/global/Styles.tsx b/src/global/Styles.tsx index 4f96c7b48..23d6bd383 100644 --- a/src/global/Styles.tsx +++ b/src/global/Styles.tsx @@ -3,7 +3,6 @@ import { ToastContainer } from 'react-toastify' import '@oceanprotocol/typographies/css/ocean-typo.css' import '../global/styles.css' -import 'react-toastify/dist/ReactToastify.css' export default function Styles({ children diff --git a/src/global/_toast.css b/src/global/_toast.css index bb6a895b8..a484fbe15 100644 --- a/src/global/_toast.css +++ b/src/global/_toast.css @@ -1,3 +1,5 @@ +@import '../../node_modules/react-toastify/dist/ReactToastify.css'; + div.Toastify__toast { font-family: var(--font-family-base); font-size: var(--font-size-small); diff --git a/src/global/_web3modal.css b/src/global/_web3modal.css new file mode 100644 index 000000000..5cf4238cd --- /dev/null +++ b/src/global/_web3modal.css @@ -0,0 +1,68 @@ +div.web3modal-modal-lightbox { + background: rgba(255, 255, 255, 0.8); + backdrop-filter: blur(3px); + overflow-x: hidden; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + animation: fadeIn 0.2s ease-out backwards; +} + +div.web3modal-modal-card { + border-radius: var(--border-radius); + padding: var(--spacer); + margin: var(--spacer) auto; + max-width: var(--break-point--small); + border: 1px solid var(--brand-grey-lighter); + box-shadow: 0 6px 15px 0 rgba(0, 0, 0, 0.05); + animation: moveUp 0.2s ease-out backwards; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); +} + +div.web3modal-provider-wrapper { + border: none; + padding: 0; +} + +div.web3modal-provider-container { + padding: var(--spacer); +} + +div.web3modal-provider-icon { + filter: grayscale(1) contrast(150%); + transition: filter 0.2s ease-out; +} + +div.web3modal-provider-wrapper:hover div.web3modal-provider-icon { + filter: none; +} + +div.web3modal-provider-name { + font-size: var(--font-size-large); + font-weight: var(--font-weight-bold); + font-family: var(--font-family-title); +} + +div.web3modal-provider-description { + font-size: var(--font-size-base); + margin-top: 0; +} + +@keyframes fadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +@keyframes moveUp { + from { + transform: translate3d(0, 1rem, 0); + } + + to { + transform: translate3d(0, 0, 0); + } +} diff --git a/src/global/styles.css b/src/global/styles.css index ae2a8acfc..a63445413 100644 --- a/src/global/styles.css +++ b/src/global/styles.css @@ -134,3 +134,4 @@ fieldset { @import '_code.css'; @import '_toast.css'; +@import '_web3modal.css'; diff --git a/src/helpers/wrapRootElement.tsx b/src/helpers/wrapRootElement.tsx index 6dab2a77f..bda70a661 100644 --- a/src/helpers/wrapRootElement.tsx +++ b/src/helpers/wrapRootElement.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from 'react' -import { Web3Provider, OceanProvider, Config } from '@oceanprotocol/react' +import { OceanProvider } from '@oceanprotocol/react' import { oceanConfig } from '../../app.config' const wrapRootElement = ({ @@ -7,9 +7,7 @@ const wrapRootElement = ({ }: { element: ReactElement }): ReactElement => ( - - {element} - + {element} ) export default wrapRootElement diff --git a/src/hooks/useSiteMetadata.ts b/src/hooks/useSiteMetadata.ts index d808375ac..1e8b6d3b1 100644 --- a/src/hooks/useSiteMetadata.ts +++ b/src/hooks/useSiteMetadata.ts @@ -2,15 +2,36 @@ import { useStaticQuery, graphql } from 'gatsby' const query = graphql` query { - siteMetadata: allFile(filter: { relativePath: { eq: "site.json" } }) { + site { + siteMetadata { + siteTitle + siteTagline + siteUrl + siteIcon + copyright + menu { + name + link + } + appConfig { + infuraProjectId + networks + oceanConfig { + factoryAddress + metadataStoreUri + nodeUri + providerUri + verbose + } + } + } + } + + siteImage: allFile(filter: { relativePath: { eq: "site.json" } }) { edges { node { childContentJson { site { - siteTitle - siteTagline - siteUrl - siteIcon siteImage { childImageSharp { original { @@ -18,11 +39,6 @@ const query = graphql` } } } - copyright - menu { - name - link - } } } } @@ -33,5 +49,11 @@ const query = graphql` export function useSiteMetadata() { const data = useStaticQuery(query) - return data.siteMetadata.edges[0].node.childContentJson.site + + const siteMeta = { + ...data.siteImage.edges[0].node.childContentJson.site, + ...data.site.siteMetadata + } + + return siteMeta } diff --git a/src/pages/asset/index.tsx b/src/pages/asset/index.tsx index 93185386a..8fd0df130 100644 --- a/src/pages/asset/index.tsx +++ b/src/pages/asset/index.tsx @@ -4,11 +4,13 @@ import AssetContent from '../../components/organisms/AssetContent' import Layout from '../../components/Layout' import { PageProps } from 'gatsby' import { MetaDataMarket, ServiceMetaDataMarket } from '../../@types/MetaData' -import { Aquarius, Logger } from '@oceanprotocol/squid' -import { oceanConfig } from '../../../app.config' +import { MetadataStore, Logger } from '@oceanprotocol/lib' import Alert from '../../components/atoms/Alert' +import Loader from '../../components/atoms/Loader' +import { useSiteMetadata } from '../../hooks/useSiteMetadata' export default function AssetRoute(props: PageProps): ReactElement { + const { appConfig } = useSiteMetadata() const [metadata, setMetadata] = useState() const [title, setTitle] = useState() const [error, setError] = useState() @@ -18,12 +20,15 @@ export default function AssetRoute(props: PageProps): ReactElement { useEffect(() => { async function init() { try { - const aquarius = new Aquarius(oceanConfig.aquariusUri, Logger) - const ddo = await aquarius.retrieveDDO(did) + const metadataStore = new MetadataStore( + appConfig.oceanConfig.metadataStoreUri, + Logger + ) + const ddo = await metadataStore.retrieveDDO(did) if (!ddo) { setTitle('Could not retrieve asset') - setError('The DDO was not found in Aquarius.') + setError('The DDO was not found in MetadataStore.') return } @@ -39,21 +44,25 @@ export default function AssetRoute(props: PageProps): ReactElement { } } init() - }, []) + }, [did]) - return error ? ( + return did && metadata ? ( + + + + + + ) : error ? ( - ) : did && metadata ? ( - - - - - ) : ( - Loading... + ) } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 3fa17b19e..ac4490d5c 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,40 +1,20 @@ import React, { ReactElement } from 'react' -import { PageProps, graphql } from 'gatsby' +import { PageProps } from 'gatsby' import PageHome from '../components/pages/Home' import { useSiteMetadata } from '../hooks/useSiteMetadata' import Layout from '../components/Layout' export default function PageGatsbyHome(props: PageProps): ReactElement { const { siteTitle, siteTagline } = useSiteMetadata() - const assets = (props.data as any).allOceanAsset.edges return ( - - + + ) } - -export const pageQuery = graphql` - query PageHomeQuery { - allOceanAsset { - edges { - node { - did - main { - type - name - dateCreated - author - price - datePublished - } - additionalInformation { - description - access - } - } - } - } - } -` diff --git a/src/utils/getAssetRating.ts b/src/utils/getAssetRating.ts deleted file mode 100644 index e51a659ae..000000000 --- a/src/utils/getAssetRating.ts +++ /dev/null @@ -1,34 +0,0 @@ -import axios from 'axios' -import { DID } from '@oceanprotocol/squid' -import { oceanConfig } from '../../app.config' - -export declare type GetRatingResponse = { - comment: string - datePublished: string - vote: number -} - -const url = oceanConfig.ratingUri + '/api/v1/rating' - -export default async function getAssetRating( - did: DID | string, - account: string -): Promise { - try { - if (!account) return - - const response = await axios.get(url, { - params: { - did: did, - address: account - } - }) - const votesLength = response.data.length - - if (votesLength > 0) { - return response.data[votesLength - 1] - } - } catch (error) { - console.error(error.message) - } -} diff --git a/src/utils/index.ts b/src/utils/index.ts index f497653b8..67fc353d6 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,6 +1,6 @@ import axios, { AxiosResponse } from 'axios' import { toast } from 'react-toastify' -import { File } from '@oceanprotocol/squid' +import { File } from '@oceanprotocol/lib' import numeral from 'numeral' import web3Utils from 'web3-utils' diff --git a/src/utils/rateAsset.ts b/src/utils/rateAsset.ts deleted file mode 100644 index f4dc657ac..000000000 --- a/src/utils/rateAsset.ts +++ /dev/null @@ -1,49 +0,0 @@ -import axios, { AxiosResponse } from 'axios' -import Web3 from 'web3' -import { DID } from '@oceanprotocol/squid' -import { oceanConfig } from '../../app.config' - -export declare type RatingResponse = [string, number] - -const url = oceanConfig.ratingUri + '/api/v1/rating' - -export function gethash(message: string) { - let hex = '' - for (let i = 0; i < message.length; i++) { - hex += '' + message.charCodeAt(i).toString(16) - } - const hexMessage = '0x' + hex - return hexMessage -} - -export default async function rateAsset( - did: DID | string, - web3: Web3, - value: number -): Promise { - try { - const timestamp = Math.floor(+new Date() / 1000) - const accounts = await web3.eth.getAccounts() - const signature = await web3.eth.personal.sign( - gethash(`${timestamp}`), - accounts ? accounts[0] : '', - '' - ) - - const ratingBody = { - did, - vote: value, - comment: '', - address: accounts[0], - timestamp: timestamp, - signature: signature - } - - const response: AxiosResponse = await axios.post(url, ratingBody) - if (!response) return 'No Response' - return response.data - } catch (error) { - console.error(error.message) - return `Error: ${error.message}` - } -} diff --git a/src/utils/wallet.ts b/src/utils/wallet.ts new file mode 100644 index 000000000..1daab1fbf --- /dev/null +++ b/src/utils/wallet.ts @@ -0,0 +1,55 @@ +import { OceanProviderValue } from '@oceanprotocol/react' +import atlas from '@ethereum-navigator/atlas' +import { networks, infuraProjectId } from '../../app.config' + +const web3ModalTheme = { + background: 'var(--brand-white)', + main: 'var(--brand-black)', + secondary: 'var(--brand-grey-light)', + border: 'var(--brand-grey-lighter)', + hover: 'var(--brand-grey-dimmed)' +} + +export async function connectWallet( + connect: OceanProviderValue['connect'] +): Promise { + const { default: WalletConnectProvider } = await import( + '@walletconnect/web3-provider' + ) + + const providerOptions = { + /* See Provider Options Section */ + walletconnect: { + package: WalletConnectProvider, // required + options: { + infuraId: infuraProjectId // required + } + } + } + + await connect({ cacheProvider: true, providerOptions, theme: web3ModalTheme }) +} + +export function isCorrectNetwork(chainId: number): boolean { + const allowedIds = networks + return allowedIds.includes(chainId) +} + +export function accountTruncate(account: string): string { + const middle = account.substring(6, 38) + const truncated = account.replace(middle, '…') + return truncated +} + +export function getNetworkName(chainId: number): string { + switch (chainId) { + case 1: + return 'Main' + case 4: + return 'Rinkeby' + case 42: + return 'Kovan' + default: + return 'Unknown' + } +} diff --git a/tests/unit/__fixtures__/ddo.ts b/tests/unit/__fixtures__/ddo.ts index 2c3e324cd..0d72b491a 100644 --- a/tests/unit/__fixtures__/ddo.ts +++ b/tests/unit/__fixtures__/ddo.ts @@ -1,4 +1,4 @@ -import { DDO } from '@oceanprotocol/squid' +import { DDO } from '@oceanprotocol/lib' import { MetaDataMarket } from '../../../src/@types/MetaData' const ddo: Partial = { diff --git a/tests/unit/__fixtures__/job.ts b/tests/unit/__fixtures__/job.ts index 352dc6ac7..0cc2a453b 100644 --- a/tests/unit/__fixtures__/job.ts +++ b/tests/unit/__fixtures__/job.ts @@ -1,4 +1,4 @@ -import { ComputeJob } from '@oceanprotocol/squid' +import { ComputeJob } from '@oceanprotocol/lib' // ComputeJob need to be updated in squid const job: Partial = { diff --git a/tests/unit/__mocks__/@oceanprotocol/squid.ts b/tests/unit/__mocks__/@oceanprotocol/lib.ts similarity index 89% rename from tests/unit/__mocks__/@oceanprotocol/squid.ts rename to tests/unit/__mocks__/@oceanprotocol/lib.ts index 03c3772ea..6c7c5ef1b 100644 --- a/tests/unit/__mocks__/@oceanprotocol/squid.ts +++ b/tests/unit/__mocks__/@oceanprotocol/lib.ts @@ -1,7 +1,7 @@ import ddo from '../../__fixtures__/ddo' import job from '../../__fixtures__/job' -const aquarius = { +const metadataStore = { queryMetadata: () => { return { results: [] as any[], @@ -12,13 +12,13 @@ const aquarius = { } const squidMock = { - Aquarius: () => aquarius, + MetadataStore: () => metadataStore, DDO: () => ddo, ocean: { accounts: { list: () => ['xxx', 'xxx'] }, - aquarius, + metadataStore, compute: { status: (account: string) => { return [job] @@ -69,13 +69,13 @@ const squidMock = { name: 'Squid-js', status: 'Working' }, - aquarius: { - name: 'Aquarius', + metadataStore: { + name: 'MetadataStore', status: 'Working' }, - brizo: { - name: 'Brizo', - network: 'Nile', + provider: { + name: 'Provider', + network: 'Rinkeby', status: 'Working', contracts: { hello: 'hello', diff --git a/tests/unit/__mocks__/@oceanprotocol/react.tsx b/tests/unit/__mocks__/@oceanprotocol/react.tsx index 40055a681..6a676442c 100644 --- a/tests/unit/__mocks__/@oceanprotocol/react.tsx +++ b/tests/unit/__mocks__/@oceanprotocol/react.tsx @@ -1,5 +1,5 @@ import React, { ReactElement } from 'react' -import squidMock from './squid' +import libMock from './lib' import web3ProviderMock from '../web3provider' const reactMock = { @@ -19,7 +19,7 @@ const reactMock = { }, useOcean: () => { return { - ocean: squidMock.ocean + ocean: libMock.ocean } }, useWeb3: () => { diff --git a/tests/unit/context/Web3Provider.test.tsx b/tests/unit/context/Web3Provider.test.tsx deleted file mode 100644 index 3c5119ad7..000000000 --- a/tests/unit/context/Web3Provider.test.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react' -import { render } from '@testing-library/react' -import { Web3Provider } from '@oceanprotocol/react' - -describe('Web3Provider', () => { - it('renders without crashing', () => { - const { container } = render(Children) - expect(container).toHaveTextContent('Children') - }) -}) diff --git a/tests/unit/utils/getAssetRating.test.ts b/tests/unit/utils/getAssetRating.test.ts deleted file mode 100644 index 6d3a5fa2d..000000000 --- a/tests/unit/utils/getAssetRating.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -import axios, { AxiosResponse } from 'axios' -import getAssetRating, { - GetRatingResponse -} from '../../../src/utils/getAssetRating' - -jest.mock('axios') - -describe('getAssetRating()', () => { - it('success', async () => { - const ratingResponse: GetRatingResponse = { - comment: '', - datePublished: '', - vote: 5 - } - - ;(axios.get as any).mockResolvedValueOnce({ - data: [ratingResponse, ratingResponse] - } as AxiosResponse) - - const response = await getAssetRating('0x00', '0x00') - expect(response && response.vote).toBe(5) - }) -}) diff --git a/tests/unit/utils/rateAsset.test.ts b/tests/unit/utils/rateAsset.test.ts deleted file mode 100644 index a725131b0..000000000 --- a/tests/unit/utils/rateAsset.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import axios, { AxiosResponse } from 'axios' -import rateAsset, { RatingResponse } from '../../../src/utils/rateAsset' -import web3 from '../__mocks__/web3' - -jest.mock('axios') - -describe('rateAsset()', () => { - it('success', async () => { - ;(axios.post as any).mockResolvedValueOnce({ - data: ['4.0', 1] - } as AxiosResponse) - - const response: RatingResponse | string = await rateAsset('0x00', web3, 5) - expect(response && response[0]).toBe('4.0') - }) - - it('string return', async () => { - ;(axios.post as any).mockResolvedValueOnce({ - data: 'Missing signature' - } as AxiosResponse) - - const response: RatingResponse | string = await rateAsset('0x00', web3, 5) - expect(response && response).toBe('Missing signature') - }) - - it('error catch', async () => { - ;(axios.post as any).mockResolvedValueOnce({ - data: {} - } as AxiosResponse) - - const response: RatingResponse | string = await rateAsset( - '0x00', - {} as any, - 5 - ) - expect(response && response).toContain('Error: ') - }) -})