1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

Merge branch 'main' into feature/1400-shared-components-stories

This commit is contained in:
EnzoVezzaro 2022-06-08 09:08:11 -04:00 committed by GitHub
commit d3ddc0e73e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 329 additions and 211 deletions

View File

@ -5,6 +5,7 @@ on:
branches:
- main
- v4
- v3
tags:
- '**'
pull_request:
@ -36,7 +37,7 @@ jobs:
key: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build
test:
@ -63,7 +64,7 @@ jobs:
key: ${{ runner.os }}-${{ matrix.node }}-test-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.node }}-test-${{ env.cache-name }}-
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm test
- name: Upload coverage artifact
@ -95,7 +96,7 @@ jobs:
with:
name: coverage-${{ runner.os }}
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run codegen:apollo
- uses: paambaati/codeclimate-action@v3.0.0
@ -126,6 +127,6 @@ jobs:
key: ${{ runner.os }}-${{ matrix.node }}-storybook-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.node }}-storybook-${{ env.cache-name }}-
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run pregenerate
- run: npm run storybook:build

View File

@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build
env:

View File

@ -9,12 +9,20 @@ module.exports = {
process.env.NEXT_PUBLIC_METADATACACHE_URI ||
'https://v4.aquarius.oceanprotocol.com',
v3MetadataCacheUri:
process.env.NEXT_PUBLIC_V3_METADATACACHE_URI ||
'https://aquarius.oceanprotocol.com',
v3MarketUri:
process.env.NEXT_PUBLIC_V3_MARKET_URI ||
'https://v3.market.oceanprotocol.com',
// List of chainIds which metadata cache queries will return by default.
// This preselects the Chains user preferences.
chainIds: [3, 4, 80001, 1287],
chainIds: [1, 137, 56, 246, 1285],
// List of all supported chainIds. Used to populate the Chains user preferences list.
chainIdsSupported: [3, 4, 80001, 1287],
chainIdsSupported: [1, 137, 56, 246, 1285, 3, 4, 80001, 1287],
infuraProjectId: process.env.NEXT_PUBLIC_INFURA_PROJECT_ID || 'xxx',

View File

@ -12,5 +12,8 @@
"name": "Discord",
"url": "https://discord.gg/TnXjkR5"
}
]
],
"stats": {
"note": "Counted on-chain from our NFT and pool factories. Includes assets in all Ocean Market forks and [purgatory](https://github.com/oceanprotocol/list-purgatory)."
}
}

View File

@ -1,7 +1,7 @@
{
"siteTitle": "Ocean Market",
"siteTagline": "A marketplace to find, publish and trade data sets in the Ocean Network.",
"siteUrl": "https://v4.market.oceanprotocol.com",
"siteUrl": "https://market.oceanprotocol.com",
"siteImage": "/share.png",
"copyright": "All Rights Reserved. Powered by ",
"menu": [
@ -14,12 +14,8 @@
"link": "/profile"
}
],
"announcement": "Data NFTs, One-Sided Staking and more. [Explore OceanONDA V4](https://blog.oceanprotocol.com/oceanonda-v4-production-has-arrived-cb4fe8faaf39).",
"warning": {
"main": "",
"polygonPublish": "Only republish data sets with a pool from ETH Mainnet into Polygon/Matic if the liquidity is **less than or equal to 1000 OCEAN in the original pool**. Doing otherwise will lead to [purgatory](https://github.com/oceanprotocol/list-purgatory) for the data set in Polygon/Matic."
},
"announcement": {
"main": "Ocean Market is [available on Polygon](https://blog.oceanprotocol.com/ocean-on-polygon-network-8abad19cbf47).",
"polygon": "Polygon/Matic EVM support is in early stages. [Use the Polygon Bridge](https://docs.oceanprotocol.com/tutorials/polygon-bridge/) to get mOCEAN."
"ctd": "Compute-to-Data is still in a testing phase, please use it only on test networks."
}
}

165
package-lock.json generated
View File

@ -13,7 +13,7 @@
"@coingecko/cryptoformat": "^0.4.4",
"@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0",
"@oceanprotocol/lib": "^1.0.0-next.44",
"@oceanprotocol/lib": "^1.0.0-next.45",
"@oceanprotocol/typographies": "^0.1.0",
"@portis/web3": "^4.0.7",
"@tippyjs/react": "^4.2.6",
@ -116,6 +116,7 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
"integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==",
"dev": true,
"dependencies": {
"@jridgewell/gen-mapping": "^0.1.0",
"@jridgewell/trace-mapping": "^0.3.9"
@ -223,6 +224,7 @@
"version": "7.17.10",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.10.tgz",
"integrity": "sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA==",
"dev": true,
"dependencies": {
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.16.7",
@ -430,6 +432,7 @@
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz",
"integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==",
"dev": true,
"dependencies": {
"@babel/helper-environment-visitor": "^7.16.7",
"@babel/helper-module-imports": "^7.16.7",
@ -498,6 +501,7 @@
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz",
"integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==",
"dev": true,
"dependencies": {
"@babel/types": "^7.17.0"
},
@ -563,6 +567,7 @@
"version": "7.17.9",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.9.tgz",
"integrity": "sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q==",
"dev": true,
"dependencies": {
"@babel/template": "^7.16.7",
"@babel/traverse": "^7.17.9",
@ -4075,6 +4080,7 @@
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz",
"integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==",
"dev": true,
"engines": {
"node": ">=6.0.0"
}
@ -4096,6 +4102,7 @@
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz",
"integrity": "sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==",
"dev": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
@ -4511,16 +4518,16 @@
"integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA=="
},
"node_modules/@oceanprotocol/contracts": {
"version": "1.0.0-alpha.34",
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.34.tgz",
"integrity": "sha512-ZhNCakYbUpXrffpS98Hj0r5K70IzzTXNoYKBX4Ks3Qqc2T7mhXIxtakzygkM0lEk038ImWuzS2PAZKTATz+X2w=="
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0.tgz",
"integrity": "sha512-rDCIooe1WHipLejuGhx2Wv/88SB7bWrN3+XHCWxXyPKTmmSQsgxKZPPzbIVBQ0ESChQZqGSBBJyqErqwwW4eBw=="
},
"node_modules/@oceanprotocol/lib": {
"version": "1.0.0-next.44",
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-1.0.0-next.44.tgz",
"integrity": "sha512-TXrHvY7+t7WSJXAVkSip0hp5byE8G4citJGirB5qJt34VGA+ujd+CoLU1bB/5gFSYH3eM56K4pcUPfCHZjeN3w==",
"version": "1.0.0-next.45",
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-1.0.0-next.45.tgz",
"integrity": "sha512-WsSMZubvS5kVu4p6jQzxeENWitXok7M6yKjuHW0uhYJIYNx8JrZsCgYp9yz0p73a+bEQazSnr1nmvc1jVLU8jQ==",
"dependencies": {
"@oceanprotocol/contracts": "^1.0.0-alpha.34",
"@oceanprotocol/contracts": "^1.0.0",
"bignumber.js": "^9.0.2",
"cross-fetch": "^3.1.5",
"crypto-js": "^4.1.1",
@ -19995,6 +20002,7 @@
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
"integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==",
"dev": true,
"dependencies": {
"safe-buffer": "~5.1.1"
}
@ -24557,6 +24565,7 @@
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
@ -24964,6 +24973,7 @@
"version": "15.8.0",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-15.8.0.tgz",
"integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==",
"dev": true,
"engines": {
"node": ">= 10.x"
}
@ -29812,6 +29822,7 @@
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"dev": true,
"bin": {
"json5": "lib/cli.js"
},
@ -41600,6 +41611,7 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
"integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==",
"dev": true,
"requires": {
"@jridgewell/gen-mapping": "^0.1.0",
"@jridgewell/trace-mapping": "^0.3.9"
@ -41619,8 +41631,7 @@
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.5.4.tgz",
"integrity": "sha512-shM3q7rUbNyXVVRkQJQseXv6bnYM3BUma/eZhwXR4xsuM+bqWnJKvW7SAfRjP7LuSCocrexa5AXhjjawNHrIlw==",
"dev": true,
"requires": {}
"dev": true
},
"@apollographql/graphql-language-service-interface": {
"version": "2.0.2",
@ -41646,8 +41657,7 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-types/-/graphql-language-service-types-2.0.2.tgz",
"integrity": "sha512-vE+Dz8pG+Xa1Z2nMl82LoO66lQ6JqBUjaXqLDvS3eMjvA3N4hf+YUDOWfPdNZ0zjhHhHXzUIIZCkax6bXfFbzQ==",
"dev": true,
"requires": {}
"dev": true
},
"@apollographql/graphql-language-service-utils": {
"version": "2.0.2",
@ -41675,6 +41685,7 @@
"version": "7.17.10",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.10.tgz",
"integrity": "sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA==",
"dev": true,
"requires": {
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.16.7",
@ -41827,6 +41838,7 @@
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz",
"integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==",
"dev": true,
"requires": {
"@babel/helper-environment-visitor": "^7.16.7",
"@babel/helper-module-imports": "^7.16.7",
@ -41880,6 +41892,7 @@
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz",
"integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==",
"dev": true,
"requires": {
"@babel/types": "^7.17.0"
}
@ -41927,6 +41940,7 @@
"version": "7.17.9",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.9.tgz",
"integrity": "sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q==",
"dev": true,
"requires": {
"@babel/template": "^7.16.7",
"@babel/traverse": "^7.17.9",
@ -43453,8 +43467,7 @@
"@graphql-typed-document-node/core": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.1.1.tgz",
"integrity": "sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg==",
"requires": {}
"integrity": "sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg=="
},
"@humanwhocodes/config-array": {
"version": "0.9.5",
@ -44471,7 +44484,8 @@
"@jridgewell/resolve-uri": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz",
"integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA=="
"integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==",
"dev": true
},
"@jridgewell/set-array": {
"version": "1.1.1",
@ -44487,6 +44501,7 @@
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz",
"integrity": "sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==",
"dev": true,
"requires": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
@ -44745,16 +44760,16 @@
"integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA=="
},
"@oceanprotocol/contracts": {
"version": "1.0.0-alpha.34",
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0-alpha.34.tgz",
"integrity": "sha512-ZhNCakYbUpXrffpS98Hj0r5K70IzzTXNoYKBX4Ks3Qqc2T7mhXIxtakzygkM0lEk038ImWuzS2PAZKTATz+X2w=="
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.0.0.tgz",
"integrity": "sha512-rDCIooe1WHipLejuGhx2Wv/88SB7bWrN3+XHCWxXyPKTmmSQsgxKZPPzbIVBQ0ESChQZqGSBBJyqErqwwW4eBw=="
},
"@oceanprotocol/lib": {
"version": "1.0.0-next.44",
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-1.0.0-next.44.tgz",
"integrity": "sha512-TXrHvY7+t7WSJXAVkSip0hp5byE8G4citJGirB5qJt34VGA+ujd+CoLU1bB/5gFSYH3eM56K4pcUPfCHZjeN3w==",
"version": "1.0.0-next.45",
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-1.0.0-next.45.tgz",
"integrity": "sha512-WsSMZubvS5kVu4p6jQzxeENWitXok7M6yKjuHW0uhYJIYNx8JrZsCgYp9yz0p73a+bEQazSnr1nmvc1jVLU8jQ==",
"requires": {
"@oceanprotocol/contracts": "^1.0.0-alpha.34",
"@oceanprotocol/contracts": "^1.0.0",
"bignumber.js": "^9.0.2",
"cross-fetch": "^3.1.5",
"crypto-js": "^4.1.1",
@ -45889,8 +45904,7 @@
"version": "1.6.22",
"resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
"integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
"dev": true,
"requires": {}
"dev": true
},
"@storybook/addons": {
"version": "6.5.4",
@ -47692,8 +47706,7 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/webpack-filter-warnings-plugin/-/webpack-filter-warnings-plugin-1.2.1.tgz",
"integrity": "sha512-Ez6ytc9IseDMLPo0qCuNNYzgtUl8NovOqjIq4uAU8LTD4uoa1w1KpZyyzFtLTEMZpkkOkLfL9eN+KGYdk1Qtwg==",
"dev": true,
"requires": {}
"dev": true
},
"y18n": {
"version": "4.0.3",
@ -47962,8 +47975,7 @@
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
"integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
"dev": true,
"requires": {}
"dev": true
},
"isobject": {
"version": "4.0.0",
@ -47998,8 +48010,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
"integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
"dev": true,
"requires": {}
"dev": true
},
"postcss-modules-local-by-default": {
"version": "4.0.0",
@ -51032,8 +51043,7 @@
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
"integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
"dev": true,
"requires": {}
"dev": true
},
"isobject": {
"version": "4.0.0",
@ -51062,8 +51072,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
"integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
"dev": true,
"requires": {}
"dev": true
},
"postcss-modules-local-by-default": {
"version": "4.0.0",
@ -52398,57 +52407,49 @@
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.0.0.tgz",
"integrity": "sha512-MdPdhdWLtQsjd29Wa4pABdhWbaRMACdM1h31BY+c6FghTZqNGT7pEYdBoaGeKtdTOBC/XNFQaKVj+r/Ei2ryWA==",
"dev": true,
"requires": {}
"dev": true
},
"@svgr/babel-plugin-remove-jsx-attribute": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.0.0.tgz",
"integrity": "sha512-aVdtfx9jlaaxc3unA6l+M9YRnKIZjOhQPthLKqmTXC8UVkBLDRGwPKo+r8n3VZN8B34+yVajzPTZ+ptTSuZZCw==",
"dev": true,
"requires": {}
"dev": true
},
"@svgr/babel-plugin-remove-jsx-empty-expression": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.0.0.tgz",
"integrity": "sha512-Ccj42ApsePD451AZJJf1QzTD1B/BOU392URJTeXFxSK709i0KUsGtbwyiqsKu7vsYxpTM0IA5clAKDyf9RCZyA==",
"dev": true,
"requires": {}
"dev": true
},
"@svgr/babel-plugin-replace-jsx-attribute-value": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.0.0.tgz",
"integrity": "sha512-88V26WGyt1Sfd1emBYmBJRWMmgarrExpKNVmI9vVozha4kqs6FzQJ/Kp5+EYli1apgX44518/0+t9+NU36lThQ==",
"dev": true,
"requires": {}
"dev": true
},
"@svgr/babel-plugin-svg-dynamic-title": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.0.0.tgz",
"integrity": "sha512-F7YXNLfGze+xv0KMQxrl2vkNbI9kzT9oDK55/kUuymh1ACyXkMV+VZWX1zEhSTfEKh7VkHVZGmVtHg8eTZ6PRg==",
"dev": true,
"requires": {}
"dev": true
},
"@svgr/babel-plugin-svg-em-dimensions": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.0.0.tgz",
"integrity": "sha512-+rghFXxdIqJNLQK08kwPBD3Z22/0b2tEZ9lKiL/yTfuyj1wW8HUXu4bo/XkogATIYuXSghVQOOCwURXzHGKyZA==",
"dev": true,
"requires": {}
"dev": true
},
"@svgr/babel-plugin-transform-react-native-svg": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.0.0.tgz",
"integrity": "sha512-VaphyHZ+xIKv5v0K0HCzyfAaLhPGJXSk2HkpYfXIOKb7DjLBv0soHDxNv6X0vr2titsxE7klb++u7iOf7TSrFQ==",
"dev": true,
"requires": {}
"dev": true
},
"@svgr/babel-plugin-transform-svg-component": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.2.0.tgz",
"integrity": "sha512-bhYIpsORb++wpsp91fymbFkf09Z/YEKR0DnFjxvN+8JHeCUD2unnh18jIMKnDJTWtvpTaGYPXELVe4OOzFI0xg==",
"dev": true,
"requires": {}
"dev": true
},
"@svgr/babel-preset": {
"version": "6.2.0",
@ -53321,8 +53322,7 @@
"@use-it/event-listener": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/@use-it/event-listener/-/event-listener-0.1.7.tgz",
"integrity": "sha512-hgfExDzUU9uTRTPDCpw2s9jWTxcxmpJya3fK5ADpf5VDpSy8WYwY/kh28XE0tUcbsljeP8wfan48QvAQTSSa3Q==",
"requires": {}
"integrity": "sha512-hgfExDzUU9uTRTPDCpw2s9jWTxcxmpJya3fK5ADpf5VDpSy8WYwY/kh28XE0tUcbsljeP8wfan48QvAQTSSa3Q=="
},
"@walletconnect/browser-utils": {
"version": "1.7.8",
@ -53474,8 +53474,7 @@
"ws": {
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz",
"integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==",
"requires": {}
"integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg=="
}
}
},
@ -53878,8 +53877,7 @@
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true,
"requires": {}
"dev": true
},
"acorn-walk": {
"version": "7.2.0",
@ -53965,15 +53963,13 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
"integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
"dev": true,
"requires": {}
"dev": true
},
"ajv-keywords": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true,
"requires": {}
"dev": true
},
"ansi-align": {
"version": "3.0.1",
@ -54406,8 +54402,7 @@
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-2.5.0.tgz",
"integrity": "sha512-lO5oTjgiC3vlVg2RKr3RiXIIQ5pGXBFxYGGUkKDhTud3jMIhs+gel8L8zsEjKaKxkjHhCQAA/bcEfYiKkGQIvA==",
"dev": true,
"requires": {}
"dev": true
},
"apollo-utilities": {
"version": "1.3.4",
@ -56685,6 +56680,7 @@
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
"integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.1"
}
@ -58308,22 +58304,19 @@
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz",
"integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==",
"dev": true,
"requires": {}
"dev": true
},
"eslint-config-standard": {
"version": "17.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz",
"integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==",
"dev": true,
"requires": {}
"dev": true
},
"eslint-config-standard-react": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/eslint-config-standard-react/-/eslint-config-standard-react-11.0.1.tgz",
"integrity": "sha512-4WlBynOqBZJRaX81CBcIGDHqUiqxvw4j/DbEIICz8QkMs3xEncoPgAoysiqCSsg71X92uhaBc8sgqB96smaMmg==",
"dev": true,
"requires": {}
"dev": true
},
"eslint-import-resolver-node": {
"version": "0.3.6",
@ -58630,8 +58623,7 @@
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz",
"integrity": "sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw==",
"dev": true,
"requires": {}
"dev": true
},
"eslint-plugin-react": {
"version": "7.30.0",
@ -58699,8 +58691,7 @@
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz",
"integrity": "sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw==",
"dev": true,
"requires": {}
"dev": true
},
"eslint-plugin-security": {
"version": "1.5.0",
@ -60345,7 +60336,8 @@
"gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
"dev": true
},
"get-caller-file": {
"version": "2.0.5",
@ -60669,7 +60661,8 @@
"graphql": {
"version": "15.8.0",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-15.8.0.tgz",
"integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw=="
"integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==",
"dev": true
},
"graphql-tag": {
"version": "2.12.6",
@ -63164,8 +63157,7 @@
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz",
"integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==",
"dev": true,
"requires": {}
"dev": true
},
"jest-regex-util": {
"version": "26.0.0",
@ -64384,7 +64376,8 @@
"json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"dev": true
},
"jsonfile": {
"version": "6.1.0",
@ -68053,8 +68046,7 @@
"react-chartjs-2": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-4.1.0.tgz",
"integrity": "sha512-AsUihxEp8Jm1oBhbEovE+w50m9PVNhz1sfwEIT4hZduRC0m14gHWHd0cUaxkFDb8HNkdMIGzsNlmVqKiOpU74g==",
"requires": {}
"integrity": "sha512-AsUihxEp8Jm1oBhbEovE+w50m9PVNhz1sfwEIT4hZduRC0m14gHWHd0cUaxkFDb8HNkdMIGzsNlmVqKiOpU74g=="
},
"react-clipboard.js": {
"version": "2.0.16",
@ -68106,8 +68098,7 @@
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/react-docgen-typescript/-/react-docgen-typescript-2.2.2.tgz",
"integrity": "sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==",
"dev": true,
"requires": {}
"dev": true
},
"react-dom": {
"version": "18.1.0",
@ -70704,8 +70695,7 @@
"styled-jsx": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz",
"integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==",
"requires": {}
"integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ=="
},
"supports-color": {
"version": "8.1.1",
@ -70947,8 +70937,7 @@
"swr": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz",
"integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==",
"requires": {}
"integrity": "sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw=="
},
"symbol-observable": {
"version": "1.2.0",
@ -73231,8 +73220,7 @@
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
"integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
"dev": true,
"requires": {}
"dev": true
},
"commander": {
"version": "2.20.3",
@ -73606,8 +73594,7 @@
"version": "8.6.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.6.0.tgz",
"integrity": "sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw==",
"dev": true,
"requires": {}
"dev": true
},
"x-default-browser": {
"version": "0.4.0",

View File

@ -25,7 +25,7 @@
"@coingecko/cryptoformat": "^0.4.4",
"@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0",
"@oceanprotocol/lib": "^1.0.0-next.44",
"@oceanprotocol/lib": "^1.0.0-next.45",
"@oceanprotocol/typographies": "^0.1.0",
"@portis/web3": "^4.0.7",
"@tippyjs/react": "^4.2.6",

View File

@ -9,7 +9,7 @@ import React, {
} from 'react'
import { Config, LoggerInstance, Purgatory } from '@oceanprotocol/lib'
import { CancelToken } from 'axios'
import { retrieveAsset } from '@utils/aquarius'
import { checkV3Asset, retrieveAsset } from '@utils/aquarius'
import { useWeb3 } from './Web3'
import { useCancelToken } from '@hooks/useCancelToken'
import { getOceanConfig, getDevelopmentConfig } from '@utils/ocean'
@ -26,6 +26,7 @@ interface AssetProviderValue {
owner: string
error?: string
isAssetNetwork: boolean
isV3Asset: boolean
oceanConfig: Config
loading: boolean
fetchAsset: (token?: CancelToken) => Promise<void>
@ -51,6 +52,7 @@ function AssetProvider({
const [error, setError] = useState<string>()
const [loading, setLoading] = useState(false)
const [isAssetNetwork, setIsAssetNetwork] = useState<boolean>()
const [isV3Asset, setIsV3Asset] = useState<boolean>()
const [oceanConfig, setOceanConfig] = useState<Config>()
const newCancelToken = useCancelToken()
@ -68,6 +70,7 @@ function AssetProvider({
const asset = await retrieveAsset(did, token)
if (!asset) {
setIsV3Asset(await checkV3Asset(did, token))
setError(
`\`${did}\`` +
'\n\nWe could not find an asset for this DID in the cache. If you just published a new asset, wait some seconds and refresh this page.'
@ -168,6 +171,7 @@ function AssetProvider({
loading,
fetchAsset,
isAssetNetwork,
isV3Asset,
oceanConfig
} as AssetProviderValue
}

View File

@ -29,6 +29,8 @@ export interface AppConfig {
classNameLight: string
storageKey: string
}
v3MetadataCacheUri: string
v3MarketUri: string
}
export interface SiteContent {
siteTitle: string
@ -40,13 +42,9 @@ export interface SiteContent {
name: string
link: string
}[]
announcement: string
warning: {
main: string
polygonPublish: string
}
announcement: {
main: string
polygon: string
ctd: string
}
}

View File

@ -31,7 +31,7 @@ interface UserPreferencesValue {
const UserPreferencesContext = createContext(null)
const localStorageKey = 'ocean-user-preferences'
const localStorageKey = 'ocean-user-preferences-v4'
function getLocalStorage(): UserPreferencesValue {
const storageParsed =

View File

@ -2,7 +2,7 @@ import { Asset, LoggerInstance } from '@oceanprotocol/lib'
import { AssetSelectionAsset } from '@shared/FormFields/AssetSelection'
import axios, { CancelToken, AxiosResponse } from 'axios'
import { OrdersData_orders as OrdersData } from '../@types/subgraph/OrdersData'
import { metadataCacheUri } from '../../app.config'
import { metadataCacheUri, v3MetadataCacheUri } from '../../app.config'
import {
SortDirectionOptions,
SortTermOptions
@ -127,6 +127,28 @@ export async function retrieveAsset(
}
}
export async function checkV3Asset(
did: string,
cancelToken: CancelToken
): Promise<boolean> {
try {
const response: AxiosResponse<Asset> = await axios.get(
`${v3MetadataCacheUri}/api/v1/aquarius/assets/ddo/${did}`,
{ cancelToken }
)
if (!response || response.status !== 200 || !response.data) return false
return true
} catch (error) {
if (axios.isCancel(error)) {
LoggerInstance.log(error.message)
} else {
LoggerInstance.error(error.message)
}
return false
}
}
export async function getAssetsNames(
didList: string[],
cancelToken: CancelToken

View File

@ -66,6 +66,24 @@ export interface InputProps {
disclaimerValues?: string[]
}
function checkError(
form: any,
parsedFieldName: string[],
field: FieldInputProps<any>
) {
if (form?.errors === {}) {
return false
} else if (
(form?.touched?.[parsedFieldName[0]]?.[parsedFieldName[1]] &&
form?.errors?.[parsedFieldName[0]]?.[parsedFieldName[1]]) ||
(form?.touched[field.name] &&
form?.errors[field.name] &&
field.name !== 'links')
) {
return true
}
}
export default function Input(props: Partial<InputProps>): ReactElement {
const {
label,
@ -81,17 +99,12 @@ export default function Input(props: Partial<InputProps>): ReactElement {
const isFormikField = typeof field !== 'undefined'
const isNestedField = field?.name?.includes('.')
// TODO: this feels hacky as it assumes nested `values` store. But we can't use the
// `useField()` hook in here to get `meta.error` so we have to match against form?.errors?
// handling flat and nested data at same time.
const parsedFieldName =
isFormikField && (isNestedField ? field?.name.split('.') : [field?.name])
// const hasFormikError = !!meta?.touched && !!meta?.error
const hasFormikError =
form?.errors !== {} &&
form?.touched?.[parsedFieldName[0]]?.[parsedFieldName[1]] &&
form?.errors?.[parsedFieldName[0]]?.[parsedFieldName[1]]
const hasFormikError = checkError(form, parsedFieldName, field)
const styleClasses = cx({
field: true,

View File

@ -39,15 +39,10 @@ function getTitle(row: PoolTransaction, locale: string) {
case 'SETUP': {
const firstToken = row.baseToken
const firstTokenSymbol = firstToken?.symbol
const secondToken = row.datatoken
const secondTokenSymbol = secondToken?.symbol
title += `Create pool with ${formatPrice(
Math.abs(row.baseTokenValue).toString(),
locale
)}${firstTokenSymbol} and ${formatPrice(
Math.abs(row.datatokenValue).toString(),
locale
)}${secondTokenSymbol}`
)}${firstTokenSymbol}`
break
}
case 'JOIN':

View File

@ -187,7 +187,7 @@ export default function PoolTransactions({
poolTransactions.push({
...data[i],
networkId: !minimal
? getAsset(ddoList, data[i].pool.datatoken.id).chainId
? getAsset(ddoList, data[i].pool.datatoken.id)?.chainId
: poolChainId,
asset: !minimal ? getAsset(ddoList, data[i].pool.datatoken.id) : null
})

View File

@ -1,11 +1,11 @@
import React, { ReactElement } from 'react'
import React, { ReactElement, ReactNode } from 'react'
import styles from './index.module.css'
import classNames from 'classnames/bind'
const cx = classNames.bind(styles)
export interface BadgeProps {
label: string
label: string | ReactNode
className?: string
}

View File

@ -8,8 +8,7 @@ import AnnouncementBanner from '@shared/AnnouncementBanner'
import PrivacyPreferenceCenter from '../Privacy/PrivacyPreferenceCenter'
import styles from './index.module.css'
import { ToastContainer } from 'react-toastify'
import { useRouter } from 'next/router'
import content from '../../../content/purgatory.json'
import contentPurgatory from '../../../content/purgatory.json'
import { useMarketMetadata } from '@context/MarketMetadata'
export default function App({
@ -17,24 +16,22 @@ export default function App({
}: {
children: ReactElement
}): ReactElement {
const router = useRouter()
const { siteContent, appConfig } = useMarketMetadata()
const { accountId } = useWeb3()
const { isInPurgatory, purgatoryData } = useAccountPurgatory(accountId)
return (
<div className={styles.app}>
{router.pathname === '/' && siteContent?.warning.main !== '' && (
<AnnouncementBanner text={siteContent?.warning.main} />
{siteContent?.announcement !== '' && (
<AnnouncementBanner text={siteContent?.announcement} />
)}
<Header />
{isInPurgatory && (
<Alert
title={content.account.title}
title={contentPurgatory.account.title}
badge={`Reason: ${purgatoryData?.reason}`}
text={content.account.description}
text={contentPurgatory.account.description}
state="error"
/>
)}

View File

@ -22,3 +22,7 @@
border-right: 0;
padding: 0;
}
.warning {
margin-bottom: var(--spacer);
}

View File

@ -11,6 +11,8 @@ import { useWeb3 } from '@context/Web3'
import content from '../../../../../content/pages/startComputeDataset.json'
import { Asset } from '@oceanprotocol/lib'
import { AccessDetails } from 'src/@types/Price'
import { useMarketMetadata } from '@context/MarketMetadata'
import Alert from '@shared/atoms/Alert'
export default function FormStartCompute({
algorithms,
@ -61,6 +63,7 @@ export default function FormStartCompute({
isConsumable: boolean
consumableFeedback: string
}): ReactElement {
const { siteContent } = useMarketMetadata()
const { isValid, values }: FormikContextType<{ algorithm: string }> =
useFormikContext()
const { asset, isAssetNetwork } = useAsset()
@ -126,6 +129,11 @@ export default function FormStartCompute({
return (
<Form className={styles.form}>
<Alert
className={styles.warning}
state="info"
text={siteContent.warning.ctd}
/>
{content.form.data.map((field: FormFieldContent) => (
<Field
key={field.name}

View File

@ -149,7 +149,7 @@ export default function Add({
/>
</div>
<Output newPoolTokens={newPoolTokens} newPoolShare={newPoolShare} />
{/* TODO: will be fixed in #1481 <Output newPoolTokens={newPoolTokens} newPoolShare={newPoolShare} /> */}
<Actions
isDisabled={!isValid || !values.amount || values.amount === 0}

View File

@ -4,8 +4,8 @@
font-size: var(--font-size-mini);
color: var(--color-secondary);
text-align: center;
padding-top: calc(var(--spacer) / 4);
padding-bottom: calc(var(--spacer) / 3);
padding-top: calc(var(--spacer) / 2);
padding-bottom: calc(var(--spacer) / 2);
}
.update:before {

View File

@ -18,3 +18,18 @@
margin-left: calc(var(--spacer) / 3);
margin-right: calc(var(--spacer) / 3);
}
.fees {
border-top: none;
padding-top: 0;
margin-top: -0.5rem;
}
.fees > div {
grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
text-align: center;
}
.fees figure {
display: none;
}

View File

@ -124,17 +124,9 @@ export default function PoolSections() {
titlePostfixTitle={`Weight of ${poolInfo?.weightBaseToken}% ${poolInfo?.baseTokenSymbol} & ${poolInfo?.weightDt}% ${poolInfo?.datatokenSymbol}`}
>
<Graph />
<Token
symbol={poolInfo?.baseTokenSymbol}
balance={`${poolData?.baseTokenLiquidity}`}
size="mini"
/>
<Token
symbol={poolInfo?.datatokenSymbol}
balance={`${poolData?.datatokenLiquidity}`}
size="mini"
/>
</PoolSection>
<PoolSection className={styles.fees}>
<Token
symbol="% swap fee"
balance={poolInfo?.liquidityProviderSwapFee}

View File

@ -17,40 +17,6 @@ export function checkIfTimeoutInPredefinedValues(
return false
}
function handleTimeoutCustomOption(
data: FormFieldContent[],
values: Partial<FormPublishData>
) {
const timeoutFieldContent = data.filter(
(field) => field.name === 'timeout'
)[0]
const timeoutInputIndex = data.findIndex(
(element) => element.name === 'timeout'
)
if (
data[timeoutInputIndex].options.length < 6 &&
!checkIfTimeoutInPredefinedValues(
values?.services[0]?.timeout,
timeoutFieldContent.options
)
) {
data[timeoutInputIndex].options.push(values?.services[0]?.timeout)
} else if (
data[timeoutInputIndex].options.length === 6 &&
checkIfTimeoutInPredefinedValues(
values?.services[0]?.timeout,
timeoutFieldContent.options
)
) {
data[timeoutInputIndex].options.pop()
} else if (
data[timeoutInputIndex].options.length === 6 &&
data[timeoutInputIndex].options[5] !== values?.services[0]?.timeout
) {
data[timeoutInputIndex].options[5] = values?.services[0]?.timeout
}
}
export default function FormEditMetadata({
data,
showPrice,

View File

@ -1,5 +1,5 @@
import { Metadata, ServiceComputeOptions } from '@oceanprotocol/lib'
import { mapTimeoutStringToSeconds, secondsToString } from '@utils/ddo'
import { secondsToString } from '@utils/ddo'
import * as Yup from 'yup'
import { MetadataEditForm } from './_types'

View File

@ -1,27 +1,33 @@
import React, { useState, useEffect, ReactElement } from 'react'
import { useRouter } from 'next/router'
import Page from '@shared/Page'
import Alert from '@shared/atoms/Alert'
import Loader from '@shared/atoms/Loader'
import { useAsset } from '@context/Asset'
import AssetContent from './AssetContent'
import { v3MarketUri } from 'app.config'
export default function AssetDetails({ uri }: { uri: string }): ReactElement {
const { asset, title, error, isInPurgatory, loading } = useAsset()
const router = useRouter()
const { asset, title, error, isInPurgatory, loading, isV3Asset } = useAsset()
const [pageTitle, setPageTitle] = useState<string>()
useEffect(() => {
if (isV3Asset) {
router.push(`${v3MarketUri}${uri}`)
}
if (!asset || error) {
setPageTitle('Could not retrieve asset')
return
}
setPageTitle(isInPurgatory ? '' : title)
}, [asset, error, isInPurgatory, title])
}, [asset, error, isInPurgatory, isV3Asset, router, title, uri])
return asset && pageTitle !== undefined && !loading ? (
<Page title={pageTitle} uri={uri}>
<AssetContent asset={asset} />
</Page>
) : error ? (
) : error && isV3Asset === false ? (
<Page title={pageTitle} noPageHeader uri={uri}>
<Alert title={pageTitle} text={error} state="error" />
</Page>

View File

@ -6,6 +6,8 @@ import styles from './Tooltip.module.css'
import { StatsValue } from './_types'
import { useUserPreferences } from '@context/UserPreferences'
import { usePrices } from '@context/Prices'
import content from '../../../../content/footer.json'
import Markdown from '@shared/Markdown'
export default function MarketStatsTooltip({
totalValueLockedInOcean,
@ -49,13 +51,7 @@ export default function MarketStatsTooltip({
</li>
))}
</ul>
<p className={styles.note}>
Counted on-chain from our NFT and pool factories. Does not filter out
assets in{' '}
<a href="https://github.com/oceanprotocol/list-purgatory">
list-purgatory
</a>
</p>
<Markdown className={styles.note} text={content.stats.note} />
</>
)
}

View File

@ -7,13 +7,24 @@
flex-wrap: wrap;
}
.logo {
order: 1;
.logo,
.badge {
white-space: nowrap;
display: flex;
}
.logo {
order: 0;
align-items: center;
}
.badge {
cursor: pointer;
margin-top: -0.25rem;
position: relative;
padding: calc(var(--spacer) / 5) calc(var(--spacer) / 4);
}
.navigation {
order: 3;
margin-top: calc(var(--spacer) / 2);
@ -60,10 +71,10 @@
.title {
margin: 0;
margin-right: var(--spacer);
display: block;
color: var(--color-secondary);
font-size: var(--font-size-h4);
margin-right: calc(var(--spacer) / 6);
}
}
@ -115,6 +126,10 @@
padding-right: 0;
}
.link[aria-disabled] {
pointer-events: none;
}
.logo svg {
margin-right: calc(var(--spacer) / 3);
}
@ -122,3 +137,36 @@
.actions button {
text-transform: none;
}
.tooltip[aria-expanded='true'] svg {
transform: rotate(180deg);
}
.caret,
svg.caret {
width: var(--font-size-mini);
height: var(--font-size-mini);
fill: var(--brand-white);
opacity: 0.7;
transition: transform 0.2s ease-out;
vertical-align: middle;
margin-left: calc(var(--spacer) / 12);
}
@media screen and (min-width: 42rem) {
.caret,
svg.caret {
display: inline-block;
}
}
.versions {
padding: calc(var(--spacer) / 4);
}
.versions .link {
display: inline-block;
margin: 0 calc(var(--spacer) / 4);
padding: 0;
font-size: var(--font-size-small);
}

View File

@ -9,7 +9,8 @@ import SearchBar from './SearchBar'
import styles from './Menu.module.css'
import { useRouter } from 'next/router'
import { useMarketMetadata } from '@context/MarketMetadata'
import Tooltip from '@shared/atoms/Tooltip'
import Caret from '@images/caret.svg'
const Wallet = loadable(() => import('./Wallet'))
declare type MenuItem = {
@ -33,19 +34,41 @@ function MenuLink({ item }: { item: MenuItem }) {
}
export default function Menu(): ReactElement {
const { siteContent } = useMarketMetadata()
const { appConfig, siteContent } = useMarketMetadata()
return (
<nav className={styles.menu}>
<Link href="/">
<a className={styles.logo}>
<Logo noWordmark />
<h1 className={styles.title}>
{siteContent?.siteTitle} <Badge label="v4" />
</h1>
<h1 className={styles.title}>{siteContent?.siteTitle}</h1>
</a>
</Link>
<Tooltip
className={styles.tooltip}
content={
<div className={styles.versions}>
<a className={styles.link} href={appConfig.v3MarketUri}>
v3
</a>
<a className={styles.link} href="" aria-current aria-disabled>
v4
</a>
</div>
}
trigger="click focus"
placement="bottom"
>
<Badge
className={styles.badge}
label={
<>
v4 <Caret aria-hidden="true" className={styles.caret} />
</>
}
/>
</Tooltip>
<ul className={styles.navigation}>
{siteContent?.menu.map((item: MenuItem) => (
<li key={item.name}>

View File

@ -39,7 +39,7 @@ export async function getAssetsFromPoolShares(
assetList.push({
poolShare: data[i],
userLiquidity,
networkId: getAsset(ddoList, data[i].pool.datatoken.address).chainId,
networkId: getAsset(ddoList, data[i].pool.datatoken.address)?.chainId,
createTime: data[i].pool.createdTimestamp,
asset: getAsset(ddoList, data[i].pool.datatoken.address)
})

View File

@ -4,3 +4,7 @@
margin-left: 1.75rem;
top: -3.2rem;
}
.fieldWarning {
composes: fieldWarning from '../index.module.css';
}

View File

@ -9,6 +9,8 @@ import IconDataset from '@images/dataset.svg'
import IconAlgorithm from '@images/algorithm.svg'
import styles from './index.module.css'
import { algorithmContainerPresets } from '../_constants'
import Alert from '@shared/atoms/Alert'
import { useMarketMetadata } from '@context/MarketMetadata'
const assetTypeOptionsTitles = getFieldContent(
'type',
@ -16,6 +18,8 @@ const assetTypeOptionsTitles = getFieldContent(
).options
export default function MetadataFields(): ReactElement {
const { siteContent } = useMarketMetadata()
// connect with Form state, use for conditional field rendering
const { values, setFieldValue } = useFormikContext<FormPublishData>()
@ -71,6 +75,13 @@ export default function MetadataFields(): ReactElement {
name="metadata.type"
options={assetTypeOptions}
/>
{values.services[0].access === 'compute' && (
<Alert
className={styles.fieldWarning}
state="info"
text={siteContent.warning.ctd}
/>
)}
<Field
{...getFieldContent('name', content.metadata.fields)}
component={Input}

View File

@ -6,6 +6,9 @@ import IconCompute from '@images/compute.svg'
import content from '../../../../content/publish/form.json'
import { getFieldContent } from '../_utils'
import { FormPublishData } from '../_types'
import Alert from '@shared/atoms/Alert'
import { useMarketMetadata } from '@context/MarketMetadata'
import styles from '../index.module.css'
const accessTypeOptionsTitles = getFieldContent(
'access',
@ -13,6 +16,8 @@ const accessTypeOptionsTitles = getFieldContent(
).options
export default function ServicesFields(): ReactElement {
const { siteContent } = useMarketMetadata()
// connect with Form state, use for conditional field rendering
const { values, setFieldValue } = useFormikContext<FormPublishData>()
@ -67,12 +72,21 @@ export default function ServicesFields(): ReactElement {
name="services[0].algorithmPrivacy"
/>
) : (
<Field
{...getFieldContent('access', content.services.fields)}
component={Input}
name="services[0].access"
options={accessTypeOptions}
/>
<>
<Field
{...getFieldContent('access', content.services.fields)}
component={Input}
name="services[0].access"
options={accessTypeOptions}
/>
{values.services[0].access === 'compute' && (
<Alert
className={styles.fieldWarning}
state="info"
text={siteContent.warning.ctd}
/>
)}
</>
)}
<Field
{...getFieldContent('providerUrl', content.services.fields)}

View File

@ -21,7 +21,9 @@ export function Feedback(): ReactElement {
</div>
<p className={styles.description}>{value.description}</p>
{value.errorMessage && (
<span className={styles.errorMessage}>{value.errorMessage}</span>
<span title={value.errorMessage} className={styles.errorMessage}>
{value.errorMessage}
</span>
)}
</li>
))

View File

@ -16,3 +16,8 @@
padding-right: calc(var(--spacer) * 4);
}
}
.fieldWarning {
margin-top: -2rem;
margin-bottom: var(--spacer);
}