Merge branch 'master' into feature/datepicker
@ -2,13 +2,11 @@ language: node_js
|
||||
node_js: node
|
||||
|
||||
script:
|
||||
- ./scripts/install.sh
|
||||
# - ./scripts/install.sh # runs automatically with npm ci
|
||||
- ./scripts/test.sh
|
||||
- ./scripts/build.sh
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
cache: npm
|
||||
|
373
client/package-lock.json
generated
@ -1026,9 +1026,9 @@
|
||||
"integrity": "sha512-p2n505t2K0zD1ZvGPhI6EsSviEVLCB7BYowhf/ONmVaWED138PaG4Z9nY6YuHU383uOoIWT+Lq3dLkFzDzstXw=="
|
||||
},
|
||||
"@oceanprotocol/keeper-contracts": {
|
||||
"version": "0.8.7",
|
||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.8.7.tgz",
|
||||
"integrity": "sha512-lrX7isgUYHspQ0/xUtQzugZyZYRncT/TWLom30RGBoHNgy9ZWXYupXULHQdCXq19Hjy7EMYV2sm4HVddB5hz3w=="
|
||||
"version": "0.8.9",
|
||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.8.9.tgz",
|
||||
"integrity": "sha512-qzeBOyaWs6GbTQgbUBVoRm4/eUy4Cp8XoJW7DfsV63ee6n/bF1KS9+0ZsuhfG3dNf+TqF5/G1FqVOGeU9yV59A=="
|
||||
},
|
||||
"@oceanprotocol/secret-store-client": {
|
||||
"version": "0.0.14",
|
||||
@ -1039,13 +1039,12 @@
|
||||
}
|
||||
},
|
||||
"@oceanprotocol/squid": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-0.4.0.tgz",
|
||||
"integrity": "sha512-9SMZawwcv9VQBOSKUMEgye2YLuuWytXThnyPNmN7Z1+1l06cFrgQXd6zYgOd4tVU5yMFcPcQOKX5SmUwPTpStw==",
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-0.4.1.tgz",
|
||||
"integrity": "sha512-9pbBgiQv3yJkZvRNEitcGOX/nB412webuF4GCN82Uh8rb4fN3bQhkBWBsO6qgpa8DzSNwWhsmt5ScH/HuxK8FA==",
|
||||
"requires": {
|
||||
"@oceanprotocol/keeper-contracts": "^0.8.5",
|
||||
"@oceanprotocol/secret-store-client": "~0.0.14",
|
||||
"@types/node-fetch": "^2.1.4",
|
||||
"bignumber.js": "^8.0.1",
|
||||
"deprecated-decorator": "^0.1.6",
|
||||
"ethereumjs-util": "^6.0.0",
|
||||
@ -1370,14 +1369,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz",
|
||||
"integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ=="
|
||||
},
|
||||
"@types/node-fetch": {
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.1.7.tgz",
|
||||
"integrity": "sha512-TZozHCDVrs0Aj1B9ZR5F4Q9MknDNcVd+hO5lxXOCzz07ELBey6s1gMUSZHUYHlPfRFKJFXiTnNuD7ePiI6S4/g==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/prop-types": {
|
||||
"version": "15.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.0.tgz",
|
||||
@ -1400,9 +1391,9 @@
|
||||
}
|
||||
},
|
||||
"@types/react": {
|
||||
"version": "16.8.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.8.8.tgz",
|
||||
"integrity": "sha512-xwEvyet96u7WnB96kqY0yY7qxx/pEpU51QeACkKFtrgjjXITQn0oO1iwPEraXVgh10ZFPix7gs1R4OJXF7P5sg==",
|
||||
"version": "16.8.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.8.10.tgz",
|
||||
"integrity": "sha512-7bUQeZKP4XZH/aB4i7k1i5yuwymDu/hnLMhD9NjVZvQQH7ZUgRN3d6iu8YXzx4sN/tNr0bj8jgguk8hhObzGvA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/prop-types": "*",
|
||||
@ -6422,6 +6413,36 @@
|
||||
"xhr-request-promise": "^0.1.2"
|
||||
}
|
||||
},
|
||||
"ethereum-common": {
|
||||
"version": "0.0.18",
|
||||
"resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz",
|
||||
"integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8="
|
||||
},
|
||||
"ethereumjs-tx": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz",
|
||||
"integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==",
|
||||
"requires": {
|
||||
"ethereum-common": "^0.0.18",
|
||||
"ethereumjs-util": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ethereumjs-util": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
|
||||
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.0",
|
||||
"create-hash": "^1.1.2",
|
||||
"ethjs-util": "^0.1.3",
|
||||
"keccak": "^1.0.2",
|
||||
"rlp": "^2.0.0",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"secp256k1": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ethereumjs-util": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
|
||||
@ -6454,9 +6475,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "10.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.3.tgz",
|
||||
"integrity": "sha512-2lhc7S28vo8FwR3Jv3Ifyd77AxEsx+Nl9ajWiac6/eWuvZ84zPK4RE05pfqcn3acIzlZDpQj5F1rIKQZX3ptLQ=="
|
||||
"version": "10.14.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.4.tgz",
|
||||
"integrity": "sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg=="
|
||||
},
|
||||
"elliptic": {
|
||||
"version": "6.3.3",
|
||||
@ -15741,11 +15762,12 @@
|
||||
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
|
||||
},
|
||||
"query-string": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.4.0.tgz",
|
||||
"integrity": "sha512-Werid2I41/tJTqOGPJ3cC3vwrIh/8ZupBQbp7BSsqXzr+pTin3aMJ/EZb8UEuk7ZO3VqQFvq2qck/ihc6wqIdw==",
|
||||
"version": "6.4.2",
|
||||
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.4.2.tgz",
|
||||
"integrity": "sha512-DfJqAen17LfLA3rQ+H5S4uXphrF+ANU1lT2ijds4V/Tj4gZxA3gx5/tg1bz7kYCmwna7LyJNCYqO7jNRzo3aLw==",
|
||||
"requires": {
|
||||
"decode-uri-component": "^0.2.0",
|
||||
"split-on-first": "^1.0.0",
|
||||
"strict-uri-encode": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -15846,14 +15868,14 @@
|
||||
}
|
||||
},
|
||||
"react": {
|
||||
"version": "16.8.5",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-16.8.5.tgz",
|
||||
"integrity": "sha512-daCb9TD6FZGvJ3sg8da1tRAtIuw29PbKZW++NN4wqkbEvxL+bZpaaYb4xuftW/SpXmgacf1skXl/ddX6CdOlDw==",
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-16.8.6.tgz",
|
||||
"integrity": "sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==",
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"scheduler": "^0.13.5"
|
||||
"scheduler": "^0.13.6"
|
||||
}
|
||||
},
|
||||
"react-app-polyfill": {
|
||||
@ -16076,14 +16098,14 @@
|
||||
}
|
||||
},
|
||||
"react-dom": {
|
||||
"version": "16.8.5",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.5.tgz",
|
||||
"integrity": "sha512-VIEIvZLpFafsfu4kgmftP5L8j7P1f0YThfVTrANMhZUFMDOsA6e0kfR6wxw/8xxKs4NB59TZYbxNdPCDW34x4w==",
|
||||
"version": "16.8.6",
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.8.6.tgz",
|
||||
"integrity": "sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==",
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"scheduler": "^0.13.5"
|
||||
"scheduler": "^0.13.6"
|
||||
}
|
||||
},
|
||||
"react-error-overlay": {
|
||||
@ -16332,9 +16354,9 @@
|
||||
}
|
||||
},
|
||||
"react-transition-group": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.7.0.tgz",
|
||||
"integrity": "sha512-CzF22K0x6arjQO4AxkasMaiYcFG/QH0MhPNs45FmNsfWsQmsO9jv52sIZJAalnlryD5RgrrbLtV5CMJSokrrMA==",
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.7.1.tgz",
|
||||
"integrity": "sha512-b0VJTzNRnXxRpCuxng6QJbAzmmrhBn1BZJfPPnHbH2PIo8msdkajqwtfdyGm/OypPXZNfAHKEqeN15wjMXrRJQ==",
|
||||
"requires": {
|
||||
"dom-helpers": "^3.3.1",
|
||||
"loose-envify": "^1.4.0",
|
||||
@ -17520,9 +17542,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"scheduler": {
|
||||
"version": "0.13.5",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.5.tgz",
|
||||
"integrity": "sha512-K98vjkQX9OIt/riLhp6F+XtDPtMQhqNcf045vsh+pcuvHq+PHy1xCrH3pq1P40m6yR46lpVvVhKdEOtnimuUJw==",
|
||||
"version": "0.13.6",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz",
|
||||
"integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==",
|
||||
"requires": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"object-assign": "^4.1.1"
|
||||
@ -18231,6 +18253,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"split-on-first": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.0.0.tgz",
|
||||
"integrity": "sha512-mjA57TQtdWztVZ9THAjGNpgbuIrNfsNrGa5IyK94NoPaT4N14M+GI4jD7t4arLjFkYRQWdETC5RxFzLWouoB3A=="
|
||||
},
|
||||
"split-string": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
|
||||
@ -19159,9 +19186,9 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.3.4000",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
|
||||
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA==",
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.1.tgz",
|
||||
"integrity": "sha512-3NSMb2VzDQm8oBTLH6Nj55VVtUEpe/rgkIzMir0qVoLyjDZlnMBva0U6vDiV3IH+sl/Yu6oP5QwsAQtHPmDd2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"ua-parser-js": {
|
||||
@ -19639,28 +19666,28 @@
|
||||
"dev": true
|
||||
},
|
||||
"web3": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-N4YqT1jl2tZYNWiLk5gA5BMchHJaG76d65z899DT9UTR4iI6mfqe1QIE+1YLII1x+uE8ohFzBq/aaZ8praLeoA==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-cSjJe8AwR9TKELLkGwk2HNL+37e+Y3x0nKkdBNpBZQNZR0SeoT3Jckkd7pBgrJKcyupItN+tKF48x5yNRvHzrQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"@types/node": "^10.12.18",
|
||||
"web3-bzz": "1.0.0-beta.50",
|
||||
"web3-core": "1.0.0-beta.50",
|
||||
"web3-core-helpers": "1.0.0-beta.50",
|
||||
"web3-core-method": "1.0.0-beta.50",
|
||||
"web3-eth": "1.0.0-beta.50",
|
||||
"web3-eth-personal": "1.0.0-beta.50",
|
||||
"web3-net": "1.0.0-beta.50",
|
||||
"web3-providers": "1.0.0-beta.50",
|
||||
"web3-shh": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-bzz": "1.0.0-beta.51",
|
||||
"web3-core": "1.0.0-beta.51",
|
||||
"web3-core-helpers": "1.0.0-beta.51",
|
||||
"web3-core-method": "1.0.0-beta.51",
|
||||
"web3-eth": "1.0.0-beta.51",
|
||||
"web3-eth-personal": "1.0.0-beta.51",
|
||||
"web3-net": "1.0.0-beta.51",
|
||||
"web3-providers": "1.0.0-beta.51",
|
||||
"web3-shh": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "10.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.3.tgz",
|
||||
"integrity": "sha512-2lhc7S28vo8FwR3Jv3Ifyd77AxEsx+Nl9ajWiac6/eWuvZ84zPK4RE05pfqcn3acIzlZDpQj5F1rIKQZX3ptLQ=="
|
||||
"version": "10.14.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.4.tgz",
|
||||
"integrity": "sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg=="
|
||||
},
|
||||
"ethers": {
|
||||
"version": "4.0.27",
|
||||
@ -19778,9 +19805,9 @@
|
||||
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w="
|
||||
},
|
||||
"web3-bzz": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-0jD4/g+apH7t87cA9gXoZpvvVW7OqQtbu+X+olFKPrS9pKbkwfaKPdRwc1BNbjqvrRYN0K7koT9xV+Lzvyah6w==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-9zDifUc3qPOF2WJ2H/81Ki4rTLa4elB0OG8h3IEYHjXOLDHKzswBQC3favhvm/ZQ2WmnkGd04vsU2iQzBmr1OQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"@types/node": "^10.12.18",
|
||||
@ -19789,31 +19816,32 @@
|
||||
}
|
||||
},
|
||||
"web3-core": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-edOHdSnkRREi0vUXXNUsrbkTvXftCDroiF2tEvbPVyiBv0U6/VDYClFdHuZKdrrTRUcn/rUbvBqw8qCt3xgcuQ==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-RZRAt0O+LsU1jV6BtuZBQYjE+YcNa9Bu6FzEAMZ92EdgiAkUB2kbTeipVGCMxOST26kWXUtwCwxkkx4g6iy41A==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"@types/bn.js": "^4.11.4",
|
||||
"@types/node": "^10.12.18",
|
||||
"lodash": "^4.17.11",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-core-helpers": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-B1LMrlC9c5HEJYmBWUhsxHdJ78w5YGop/ptF1cFL8cHLwTCQqCFFKLgYUg+dax/554TP1xgJ2w/ArLpnPJ8dBg==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-kA5JMJyrB5yxX3dQuziBP0Yo9i+MKwtYfA2E7DTbEoUueqjPcEwXMUxmpGROYmufCcfoe/B/FqpC8CzkqmHokw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"lodash": "^4.17.11",
|
||||
"web3-eth-iban": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-eth-iban": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-core-method": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-0+L37KDT90DD1fcTye/ZWMyGOLiw0ZxX2vaC8qDSFvAV3scTEuZyEQuR+tCM2aGyUVihy8LdmZwioRwnTXgLwg==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-Tl5jGWqx01W6OFPNZI1c4wtCt+HPKWldWrLORKfW0zHyXrYDH6V2BuitA7R7j+54+c/61W3C2E6a+g7sQ8+mWA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"eventemitter3": "3.1.0",
|
||||
@ -19821,9 +19849,9 @@
|
||||
}
|
||||
},
|
||||
"web3-core-subscriptions": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-q2Jmuy/BCwcKCFjR6kc03hPbdC6sR0n3IhPVg98Sk7ewgRLur/v3lLDz0fQpY4xE6U0XOqrjxwzlqISkOcP5Kw==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-bM4KlA37Or/XfrZKLtXlvUSISKWUkXOH/32s0DBnxRkKuey8QKK460H5KF9/HS8LfY7cO11NAepnFe4Tk1rSaQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"eventemitter3": "^3.1.0",
|
||||
@ -19831,55 +19859,43 @@
|
||||
}
|
||||
},
|
||||
"web3-eth": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-ojsddEclIdu+C3hfRrLVJK0rcxt2O+Yj7c3b4YEzZQ9+Kd/HaSZfeSpUgKojgmFhUUiCCRTEc2holWtQ+Lx4gQ==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-w+8YtfKAcEPmOtYf47cjQw3t6dm5YcGvkl4jVZF00WHuvkPMFsXBTbZdH4aVgjPhubl53rdLrJwAP2b7X83+kQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"eth-lib": "0.2.8",
|
||||
"ethereumjs-tx": "^1.3.7",
|
||||
"rxjs": "^6.4.0",
|
||||
"web3-core": "1.0.0-beta.50",
|
||||
"web3-core-helpers": "1.0.0-beta.50",
|
||||
"web3-core-method": "1.0.0-beta.50",
|
||||
"web3-core-subscriptions": "1.0.0-beta.50",
|
||||
"web3-eth-abi": "1.0.0-beta.50",
|
||||
"web3-eth-accounts": "1.0.0-beta.50",
|
||||
"web3-eth-contract": "1.0.0-beta.50",
|
||||
"web3-eth-ens": "1.0.0-beta.50",
|
||||
"web3-eth-iban": "1.0.0-beta.50",
|
||||
"web3-eth-personal": "1.0.0-beta.50",
|
||||
"web3-net": "1.0.0-beta.50",
|
||||
"web3-providers": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-lib": {
|
||||
"version": "0.2.8",
|
||||
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz",
|
||||
"integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.6",
|
||||
"elliptic": "^6.4.0",
|
||||
"xhr-request-promise": "^0.1.2"
|
||||
}
|
||||
}
|
||||
"web3-core": "1.0.0-beta.51",
|
||||
"web3-core-helpers": "1.0.0-beta.51",
|
||||
"web3-core-method": "1.0.0-beta.51",
|
||||
"web3-core-subscriptions": "1.0.0-beta.51",
|
||||
"web3-eth-abi": "1.0.0-beta.51",
|
||||
"web3-eth-accounts": "1.0.0-beta.51",
|
||||
"web3-eth-contract": "1.0.0-beta.51",
|
||||
"web3-eth-ens": "1.0.0-beta.51",
|
||||
"web3-eth-iban": "1.0.0-beta.51",
|
||||
"web3-eth-personal": "1.0.0-beta.51",
|
||||
"web3-net": "1.0.0-beta.51",
|
||||
"web3-providers": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-eth-abi": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-Nwm1HL3xBbrs43j/9V3gH1CJWWR7jyTDSE7PIkjYVjwgygAjlHPMHzuzGffoFMp2tSQ2DywCGmXAY5I5+vznZw==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-mTcMpIihZECzZ5oWUh9Jg7x5pVhPv6xPTPWxY9007QKbbBH01GwPogoxBz1X7RfWOwGqZABfxFgXow5NkL0T3A==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"ethers": "^4.0.27",
|
||||
"lodash": "^4.17.11",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-eth-accounts": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-cUuYxKhymob87zCUYgw7ieZY6aVStMhClocblI3FKNdI1I8dczhdhZ97qMj5iavOganN7/OxLzeji7ksAoNAhg==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-6HJu4Vrli7p1S52mV83juFjWn0w7rUE4q9cZdYwsGmqHGrOmV7E3zuBEyuA+kelPLpSmcJDOnEowvORmRdpAyw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"crypto-browserify": "3.12.0",
|
||||
@ -19887,11 +19903,11 @@
|
||||
"lodash": "^4.17.11",
|
||||
"scrypt.js": "0.2.0",
|
||||
"uuid": "3.3.2",
|
||||
"web3-core": "1.0.0-beta.50",
|
||||
"web3-core-helpers": "1.0.0-beta.50",
|
||||
"web3-core-method": "1.0.0-beta.50",
|
||||
"web3-providers": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-core": "1.0.0-beta.51",
|
||||
"web3-core-helpers": "1.0.0-beta.51",
|
||||
"web3-core-method": "1.0.0-beta.51",
|
||||
"web3-providers": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-lib": {
|
||||
@ -19912,97 +19928,98 @@
|
||||
}
|
||||
},
|
||||
"web3-eth-contract": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-X8R1+qIeD4Dbz1RmQa5m3K1suVFigNgd7EFMp6vVC3ULDjt4R6T0cRmFw/x51v3MQoT7s6Yd1KiEWIAt9IYG6w==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-iVMay6OXDjDPeiPoeGpa6PQGuwIPxL/8UAVIlWVB1CYG9+FY6kcOUO7vI7dnDVwN1zneAslf9h86px6hgR92OQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"@types/bn.js": "^4.11.4",
|
||||
"lodash": "^4.17.11",
|
||||
"web3-core": "1.0.0-beta.50",
|
||||
"web3-core-helpers": "1.0.0-beta.50",
|
||||
"web3-core-method": "1.0.0-beta.50",
|
||||
"web3-core-subscriptions": "1.0.0-beta.50",
|
||||
"web3-eth-abi": "1.0.0-beta.50",
|
||||
"web3-eth-accounts": "1.0.0-beta.50",
|
||||
"web3-providers": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-core": "1.0.0-beta.51",
|
||||
"web3-core-helpers": "1.0.0-beta.51",
|
||||
"web3-core-method": "1.0.0-beta.51",
|
||||
"web3-core-subscriptions": "1.0.0-beta.51",
|
||||
"web3-eth-abi": "1.0.0-beta.51",
|
||||
"web3-eth-accounts": "1.0.0-beta.51",
|
||||
"web3-providers": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-eth-ens": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-UnhYcNuSNRBOBcbD5y8cTyRh5ENn65/GfZkxCDXAKBY6sD4GzMZNkD7kq+37/34cnZEzzQPPGd9jLZNLXOklyg==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-JpHlAIUZGLGTTHWKBFciv5KGBi/+n0uqaO/dXoIfB/jI0Gcm5GYEwUt8TU/Y0/WVHvw/ttU1e0laJYPzTTEB8w==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"eth-ens-namehash": "2.0.8",
|
||||
"lodash": "^4.17.11",
|
||||
"web3-core": "1.0.0-beta.50",
|
||||
"web3-core-helpers": "1.0.0-beta.50",
|
||||
"web3-core-method": "1.0.0-beta.50",
|
||||
"web3-eth-abi": "1.0.0-beta.50",
|
||||
"web3-eth-contract": "1.0.0-beta.50",
|
||||
"web3-net": "1.0.0-beta.50",
|
||||
"web3-providers": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-core": "1.0.0-beta.51",
|
||||
"web3-core-helpers": "1.0.0-beta.51",
|
||||
"web3-core-method": "1.0.0-beta.51",
|
||||
"web3-eth-abi": "1.0.0-beta.51",
|
||||
"web3-eth-contract": "1.0.0-beta.51",
|
||||
"web3-net": "1.0.0-beta.51",
|
||||
"web3-providers": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-eth-iban": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-rW5fpUUW3WaToPxBXNnqTfj5dh2BJ+9uognYAfThh2WWR1+EwWZethsKS/PyU6Jn9uA5p/kQoUIP0JKaeBm80Q==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-GNLsEWpEkyJqmogsF+mQLlO06tPOudfhVBCPC68SIOw6wQTqAtoqzOot3EJdrEIDGet9eujOoBs6VWAjNbMGRA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"bn.js": "4.11.8",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-eth-personal": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-52dS24YfJxx/Uy21RKj2m5rjag1kktdy5rY/R9vDwWZRrJkxfDf058CvtRF+QsD7A6QVxkHCZ9YwEWnLCLW9Cw==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-Mq6uAvhfsKf7FSZVqJOfmb7i5zxQ6HkbTRcAyOOOfSmGnTvxSIjtKZCTAVv3UeBh3pxIXn5FSDlKngaj1MbYXg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"web3-core": "1.0.0-beta.50",
|
||||
"web3-core-helpers": "1.0.0-beta.50",
|
||||
"web3-core-method": "1.0.0-beta.50",
|
||||
"web3-net": "1.0.0-beta.50",
|
||||
"web3-providers": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-core": "1.0.0-beta.51",
|
||||
"web3-core-helpers": "1.0.0-beta.51",
|
||||
"web3-core-method": "1.0.0-beta.51",
|
||||
"web3-net": "1.0.0-beta.51",
|
||||
"web3-providers": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-net": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-T9aBrWYzCeqZTTJlljonTm8x1tEjHT1uBqcdvEYZoyCS1Xxc+zCNBqP4SBfdcfwCeGohhI7bRx9qX1JjYH3cRA==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-1xeBIb/Tvf6PVNZ0u+pPrULNkLefTf0uuo8Hyx82EfY+mvMz6jvNDyFsD8spDGJUuxlDabFnoZdiaEv7LNwwSg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"lodash": "^4.17.11",
|
||||
"web3-core": "1.0.0-beta.50",
|
||||
"web3-core-helpers": "1.0.0-beta.50",
|
||||
"web3-core-method": "1.0.0-beta.50",
|
||||
"web3-providers": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-core": "1.0.0-beta.51",
|
||||
"web3-core-helpers": "1.0.0-beta.51",
|
||||
"web3-core-method": "1.0.0-beta.51",
|
||||
"web3-providers": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-shh": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-a46Gz/YQdF3HJ4XK7rZh6bJiP3IEq+BDAvdxD1jW54yKM2k3RGarOY8hanC1crxKE7E9Q1UUkrp1Vjrj8XSQuQ==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-IA4oaNH+PaGWQtTe7BmENszNTeSTsZ15hBNnOrMIyeF0PeghPj7sCenTtU/q8Ie6jR0oXfTXJOQCS/Q/QC3Ksg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"web3-core": "1.0.0-beta.50",
|
||||
"web3-core-helpers": "1.0.0-beta.50",
|
||||
"web3-core-method": "1.0.0-beta.50",
|
||||
"web3-core-subscriptions": "1.0.0-beta.50",
|
||||
"web3-net": "1.0.0-beta.50",
|
||||
"web3-providers": "1.0.0-beta.50",
|
||||
"web3-utils": "1.0.0-beta.50"
|
||||
"web3-core": "1.0.0-beta.51",
|
||||
"web3-core-helpers": "1.0.0-beta.51",
|
||||
"web3-core-method": "1.0.0-beta.51",
|
||||
"web3-core-subscriptions": "1.0.0-beta.51",
|
||||
"web3-net": "1.0.0-beta.51",
|
||||
"web3-providers": "1.0.0-beta.51",
|
||||
"web3-utils": "1.0.0-beta.51"
|
||||
}
|
||||
},
|
||||
"web3-utils": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-xGhM/YkepK2x0iMYUl/sws58LzTbodjMGlhZxrCZLZxJ0DoaDyk3UdmZ6aCSCwVTFg4hlVj3doaIhWnwGfhhpQ==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-c9sRSscu0NIjD96X4ToDOgTxGyJevppuB+uHOgWkziaLGqlw/Li1l24nGkvr0Zqpt9SufvfPcWf8EEC92pnwKg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"@types/bn.js": "^4.11.4",
|
||||
@ -20237,9 +20254,9 @@
|
||||
}
|
||||
},
|
||||
"web3-providers": {
|
||||
"version": "1.0.0-beta.50",
|
||||
"resolved": "https://registry.npmjs.org/web3-providers/-/web3-providers-1.0.0-beta.50.tgz",
|
||||
"integrity": "sha512-p2xtr6N72pdXvND5dLdK1G9T/9qCQiKC2EYDPmimnqvoHWixmM3tlBl042swkHspHHVL60vXPKxB4UDaQE2hWQ==",
|
||||
"version": "1.0.0-beta.51",
|
||||
"resolved": "https://registry.npmjs.org/web3-providers/-/web3-providers-1.0.0-beta.51.tgz",
|
||||
"integrity": "sha512-aWUEZIou4+zEZbLaBf1GQwbNoERq66mLEB6ubcPz1WEq1T5jfUPfwO4b4W2bEbEZVsoxS1ZJvSFkj1yAtD0X+g==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.3.1",
|
||||
"@types/node": "^10.12.18",
|
||||
@ -20251,9 +20268,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "10.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.3.tgz",
|
||||
"integrity": "sha512-2lhc7S28vo8FwR3Jv3Ifyd77AxEsx+Nl9ajWiac6/eWuvZ84zPK4RE05pfqcn3acIzlZDpQj5F1rIKQZX3ptLQ=="
|
||||
"version": "10.14.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.4.tgz",
|
||||
"integrity": "sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg=="
|
||||
},
|
||||
"eventemitter3": {
|
||||
"version": "3.1.0",
|
||||
|
@ -11,23 +11,23 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@oceanprotocol/art": "^2.2.0",
|
||||
"@oceanprotocol/squid": "^0.4.0",
|
||||
"@oceanprotocol/squid": "^0.4.1",
|
||||
"@oceanprotocol/typographies": "^0.1.0",
|
||||
"classnames": "^2.2.6",
|
||||
"filesize": "^4.1.2",
|
||||
"is-url": "^1.2.4",
|
||||
"moment": "^2.24.0",
|
||||
"query-string": "^6.4.0",
|
||||
"react": "^16.8.5",
|
||||
"query-string": "^6.4.2",
|
||||
"react": "^16.8.6",
|
||||
"react-datepicker": "^2.3.0",
|
||||
"react-dom": "^16.8.5",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-helmet": "^5.2.0",
|
||||
"react-moment": "^0.8.4",
|
||||
"react-popper": "^1.3.3",
|
||||
"react-router-dom": "^5.0.0",
|
||||
"react-transition-group": "^2.7.0",
|
||||
"react-transition-group": "^2.7.1",
|
||||
"slugify": "^1.3.4",
|
||||
"web3": "^1.0.0-beta.50"
|
||||
"web3": "^1.0.0-beta.51"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/classnames": "^2.2.7",
|
||||
@ -35,7 +35,7 @@
|
||||
"@types/is-url": "^1.2.28",
|
||||
"@types/jest": "^24.0.11",
|
||||
"@types/query-string": "^6.3.0",
|
||||
"@types/react": "^16.8.8",
|
||||
"@types/react": "^16.8.10",
|
||||
"@types/react-datepicker": "^2.2.0",
|
||||
"@types/react-dom": "^16.8.3",
|
||||
"@types/react-helmet": "^5.0.8",
|
||||
@ -44,7 +44,7 @@
|
||||
"@types/web3": "^1.0.18",
|
||||
"node-sass": "^4.11.0",
|
||||
"react-scripts": "^2.1.8",
|
||||
"typescript": "^3.3.4000"
|
||||
"typescript": "^3.4.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -2,8 +2,8 @@ import React, { Component } from 'react'
|
||||
import Web3 from 'web3'
|
||||
import { BrowserRouter as Router } from 'react-router-dom'
|
||||
import { Logger } from '@oceanprotocol/squid'
|
||||
import Header from './components/Header'
|
||||
import Footer from './components/Footer'
|
||||
import Header from './components/organisms/Header'
|
||||
import Footer from './components/organisms/Footer'
|
||||
import Spinner from './components/atoms/Spinner'
|
||||
import { User } from './context/User'
|
||||
import { provideOcean } from './ocean'
|
||||
|
@ -8,7 +8,7 @@ import NotFound from './routes/NotFound'
|
||||
import Publish from './routes/Publish/'
|
||||
import Search from './routes/Search'
|
||||
import Faucet from './routes/Faucet'
|
||||
import Invoices from './routes/Invoices'
|
||||
import History from './routes/History'
|
||||
import Styleguide from './routes/Styleguide'
|
||||
|
||||
const Routes = () => (
|
||||
@ -20,7 +20,7 @@ const Routes = () => (
|
||||
<Route component={Search} path="/search" />
|
||||
<Route component={Details} path="/asset/:did" />
|
||||
<Route component={Faucet} path="/faucet" />
|
||||
<Route component={Invoices} path="/invoices" />
|
||||
<Route component={History} path="/history" />
|
||||
<Route component={NotFound} />
|
||||
</Switch>
|
||||
)
|
||||
|
9
client/src/components/atoms/CategoryImage.module.scss
Normal file
@ -0,0 +1,9 @@
|
||||
@import '../../styles/variables';
|
||||
|
||||
.categoryImage {
|
||||
height: 4rem;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
margin-bottom: $spacer / $line-height;
|
||||
background-color: $brand-grey-lighter;
|
||||
}
|
121
client/src/components/atoms/CategoryImage.tsx
Normal file
@ -0,0 +1,121 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import styles from './CategoryImage.module.scss'
|
||||
|
||||
import agriculture from '../../img/categories/agriculture.jpg'
|
||||
import anthroarche from '../../img/categories/anthroarche.jpg'
|
||||
import astronomy from '../../img/categories/astronomy.jpg'
|
||||
import biology from '../../img/categories/biology.jpg'
|
||||
import business from '../../img/categories/business.jpg'
|
||||
import chemistry from '../../img/categories/chemistry.jpg'
|
||||
import communication from '../../img/categories/communication.jpg'
|
||||
import computer from '../../img/categories/computer.jpg'
|
||||
import dataofdata from '../../img/categories/dataofdata.jpg'
|
||||
import deeplearning from '../../img/categories/deeplearning.jpg'
|
||||
import demographics from '../../img/categories/demographics.jpg'
|
||||
import earth from '../../img/categories/earth.jpg'
|
||||
import economics from '../../img/categories/economics.jpg'
|
||||
import engineering from '../../img/categories/engineering.jpg'
|
||||
import history from '../../img/categories/history.jpg'
|
||||
import imagesets from '../../img/categories/imagesets.jpg'
|
||||
import language from '../../img/categories/language.jpg'
|
||||
import law from '../../img/categories/law.jpg'
|
||||
import mathematics from '../../img/categories/mathematics.jpg'
|
||||
import medicine from '../../img/categories/medicine.jpg'
|
||||
import other from '../../img/categories/other.jpg'
|
||||
import performingarts from '../../img/categories/performingarts.jpg'
|
||||
import philosophy from '../../img/categories/philosophy.jpg'
|
||||
import physics from '../../img/categories/physics.jpg'
|
||||
import politics from '../../img/categories/politics.jpg'
|
||||
import psychology from '../../img/categories/psychology.jpg'
|
||||
import sociology from '../../img/categories/sociology.jpg'
|
||||
import sports from '../../img/categories/sports.jpg'
|
||||
import theology from '../../img/categories/theology.jpg'
|
||||
import transport from '../../img/categories/transport.jpg'
|
||||
import urbanplanning from '../../img/categories/urbanplanning.jpg'
|
||||
import visualart from '../../img/categories/visualart.jpg'
|
||||
|
||||
const categoryImageFile = (category: string) => {
|
||||
switch (category) {
|
||||
case 'agriculture':
|
||||
return agriculture
|
||||
case 'anthroarche':
|
||||
return anthroarche
|
||||
case 'astronomy':
|
||||
return astronomy
|
||||
case 'biology':
|
||||
return biology
|
||||
case 'business':
|
||||
return business
|
||||
case 'chemistry':
|
||||
return chemistry
|
||||
case 'communication':
|
||||
return communication
|
||||
case 'computer':
|
||||
return computer
|
||||
case 'dataofdata':
|
||||
return dataofdata
|
||||
case 'deeplearning':
|
||||
return deeplearning
|
||||
case 'demographics':
|
||||
return demographics
|
||||
case 'earth':
|
||||
return earth
|
||||
case 'economics-and-finance':
|
||||
return economics
|
||||
case 'engineering':
|
||||
return engineering
|
||||
case 'history':
|
||||
return history
|
||||
case 'imagesets':
|
||||
return imagesets
|
||||
case 'language':
|
||||
return language
|
||||
case 'law':
|
||||
return law
|
||||
case 'mathematics':
|
||||
return mathematics
|
||||
case 'medicine':
|
||||
return medicine
|
||||
case 'other':
|
||||
return other
|
||||
case 'performingarts':
|
||||
return performingarts
|
||||
case 'philosophy':
|
||||
return philosophy
|
||||
case 'physics':
|
||||
return physics
|
||||
case 'politics':
|
||||
return politics
|
||||
case 'psychology':
|
||||
return psychology
|
||||
case 'sociology':
|
||||
return sociology
|
||||
case 'sports':
|
||||
return sports
|
||||
case 'theology':
|
||||
return theology
|
||||
case 'transport':
|
||||
return transport
|
||||
case 'urbanplanning':
|
||||
return urbanplanning
|
||||
case 'visualart':
|
||||
return visualart
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
export default class CategoryImage extends PureComponent<{ category: string }> {
|
||||
public render() {
|
||||
const image = categoryImageFile(this.props.category)
|
||||
|
||||
return (
|
||||
<div
|
||||
className={styles.categoryImage}
|
||||
style={{
|
||||
backgroundImage: `url(${image})`
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@
|
||||
border-radius: $border-radius;
|
||||
background: $brand-white;
|
||||
color: inherit;
|
||||
position: relative;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
@ -29,9 +30,36 @@
|
||||
}
|
||||
}
|
||||
|
||||
.assetFooter {
|
||||
border-top: 1px solid $brand-grey-lighter;
|
||||
.assetList {
|
||||
> a {
|
||||
color: $brand-grey-dark;
|
||||
border-bottom: 1px solid $brand-grey-lighter;
|
||||
padding-top: $spacer / 2;
|
||||
padding-bottom: $spacer / 2;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $brand-pink;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: $font-size-base;
|
||||
color: inherit;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: $font-size-small;
|
||||
color: $brand-grey-light;
|
||||
}
|
||||
|
||||
.assetFooter {
|
||||
margin-top: $spacer / 2;
|
||||
font-size: $font-size-small;
|
||||
color: $brand-grey-light;
|
||||
|
@ -1,23 +1,31 @@
|
||||
import React from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import moment from 'moment'
|
||||
import styles from './Asset.module.scss'
|
||||
import CategoryImage from '../atoms/CategoryImage'
|
||||
|
||||
const AssetLink = ({ asset }: { asset: any }) => {
|
||||
const AssetLink = ({ asset, list }: { asset: any; list?: boolean }) => {
|
||||
const { metadata } = asset.findServiceByType('Metadata')
|
||||
const { base } = metadata
|
||||
|
||||
return (
|
||||
<article className={styles.asset}>
|
||||
return list ? (
|
||||
<article className={styles.assetList}>
|
||||
<Link to={`/asset/${asset.id}`}>
|
||||
<h1>{base.name}</h1>
|
||||
<p>{base.description.substring(0, 90)}</p>
|
||||
<div className={styles.date} title={base.dateCreated}>
|
||||
{moment(base.dateCreated, 'YYYYMMDD').fromNow()}
|
||||
</div>
|
||||
</Link>
|
||||
</article>
|
||||
) : (
|
||||
<article className={styles.asset}>
|
||||
<Link to={`/asset/${asset.id}`}>
|
||||
<CategoryImage category={base.categories[0][0]} />
|
||||
<h1>{base.name}</h1>
|
||||
<p>{base.description.substring(0, 90)}...</p>
|
||||
|
||||
<footer className={styles.assetFooter}>
|
||||
{base.categories ? (
|
||||
<div>{base.category}</div>
|
||||
) : (
|
||||
<div>Fake Category</div>
|
||||
)}
|
||||
{base.categories && <div>{base.categories[0][0]}</div>}
|
||||
</footer>
|
||||
</Link>
|
||||
</article>
|
||||
|
@ -1,34 +0,0 @@
|
||||
@import '../../styles/variables';
|
||||
|
||||
.assetsUser {
|
||||
margin-top: $spacer * 3;
|
||||
margin-bottom: $spacer;
|
||||
|
||||
> div {
|
||||
text-align: center;
|
||||
margin-top: $spacer;
|
||||
margin-bottom: $spacer;
|
||||
}
|
||||
}
|
||||
|
||||
.assets {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-gap: $spacer;
|
||||
max-width: 100%;
|
||||
|
||||
@media (min-width: $break-point--small) {
|
||||
grid-template-columns: 2fr 2fr;
|
||||
}
|
||||
|
||||
@media (min-width: $break-point--medium) {
|
||||
grid-template-columns: 2fr 2fr 2fr;
|
||||
}
|
||||
}
|
||||
|
||||
.subTitle {
|
||||
font-size: $font-size-h4;
|
||||
color: $brand-grey-light;
|
||||
border-bottom: 1px solid $brand-grey-lighter;
|
||||
padding-bottom: $spacer / 2;
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { User } from '../../context/User'
|
||||
import Spinner from '../atoms/Spinner'
|
||||
import Asset from '../molecules/Asset'
|
||||
import styles from './AssetsUser.module.scss'
|
||||
import { Logger } from '@oceanprotocol/squid'
|
||||
|
||||
export default class AssetsUser extends PureComponent {
|
||||
public state = { results: [], isLoading: true }
|
||||
|
||||
public componentDidMount() {
|
||||
this.searchOcean()
|
||||
}
|
||||
|
||||
private async searchOcean() {
|
||||
this.context.ocean.keeper.didRegistry.contract.getPastEvents(
|
||||
'DIDAttributeRegistered',
|
||||
{
|
||||
filter: { _owner: this.context.account },
|
||||
fromBlock: 0,
|
||||
toBlock: 'latest'
|
||||
},
|
||||
async (error: any, events: any) => {
|
||||
if (error) {
|
||||
Logger.log('error retrieving', error)
|
||||
this.setState({ isLoading: false })
|
||||
} else {
|
||||
const results = []
|
||||
for (const event of events) {
|
||||
const ddo = await this.context.ocean.assets.resolve(
|
||||
`did:op:${event.returnValues._did.substring(2)}`
|
||||
)
|
||||
results.push(ddo)
|
||||
}
|
||||
this.setState({ results, isLoading: false })
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
public render() {
|
||||
return (
|
||||
<div className={styles.assetsUser}>
|
||||
<h2 className={styles.subTitle}>Your Data Sets</h2>
|
||||
|
||||
{this.state.isLoading ? (
|
||||
<Spinner />
|
||||
) : this.state.results.length ? (
|
||||
<div className={styles.assets}>
|
||||
{this.state.results
|
||||
.filter(asset => !!asset)
|
||||
.map((asset: any) => (
|
||||
<Asset key={asset.id} asset={asset} />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
<p>None yet.</p>
|
||||
<Link to="/publish">+ Publish A Data Set</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
AssetsUser.contextType = User
|
25
client/src/components/organisms/AssetsUser.module.scss
Normal file
@ -0,0 +1,25 @@
|
||||
@import '../../styles/variables';
|
||||
|
||||
.assetsUser {
|
||||
margin-top: $spacer;
|
||||
margin-bottom: $spacer;
|
||||
}
|
||||
|
||||
.subTitle {
|
||||
font-size: $font-size-h4;
|
||||
color: $brand-grey-light;
|
||||
border-bottom: 1px solid $brand-grey-lighter;
|
||||
padding-bottom: $spacer / 2;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.link {
|
||||
display: block;
|
||||
margin-top: $spacer / 2;
|
||||
}
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
margin-top: $spacer;
|
||||
color: $brand-grey-light;
|
||||
}
|
96
client/src/components/organisms/AssetsUser.tsx
Normal file
@ -0,0 +1,96 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Logger } from '@oceanprotocol/squid'
|
||||
import { User } from '../../context/User'
|
||||
import Spinner from '../atoms/Spinner'
|
||||
import Asset from '../molecules/Asset'
|
||||
import styles from './AssetsUser.module.scss'
|
||||
|
||||
export default class AssetsUser extends PureComponent<
|
||||
{ list?: boolean; recent?: number },
|
||||
{ results: any[]; isLoading: boolean }
|
||||
> {
|
||||
public state = { results: [], isLoading: true }
|
||||
|
||||
public componentDidMount() {
|
||||
this.searchOcean()
|
||||
}
|
||||
|
||||
private async searchOcean() {
|
||||
if (this.context.account) {
|
||||
this.context.ocean.keeper.didRegistry.contract.getPastEvents(
|
||||
'DIDAttributeRegistered',
|
||||
{
|
||||
filter: { _owner: this.context.account },
|
||||
fromBlock: 0,
|
||||
toBlock: 'latest'
|
||||
},
|
||||
async (error: any, events: any) => {
|
||||
if (error) {
|
||||
Logger.log('error retrieving', error)
|
||||
this.setState({ isLoading: false })
|
||||
} else {
|
||||
const results = []
|
||||
for (const event of events) {
|
||||
const ddo = await this.context.ocean.assets.resolve(
|
||||
`did:op:${event.returnValues._did.substring(2)}`
|
||||
)
|
||||
results.push(ddo)
|
||||
}
|
||||
this.setState({ results, isLoading: false })
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
this.setState({ isLoading: false })
|
||||
}
|
||||
|
||||
public render() {
|
||||
return (
|
||||
this.context.account && (
|
||||
<div className={styles.assetsUser}>
|
||||
{this.props.recent && (
|
||||
<h2 className={styles.subTitle}>
|
||||
Your Latest Data Sets
|
||||
</h2>
|
||||
)}
|
||||
|
||||
{this.state.isLoading ? (
|
||||
<Spinner />
|
||||
) : this.state.results.length ? (
|
||||
<>
|
||||
{this.state.results
|
||||
.slice(
|
||||
0,
|
||||
this.props.recent
|
||||
? this.props.recent
|
||||
: undefined
|
||||
)
|
||||
.filter(asset => !!asset)
|
||||
.map((asset: any) => (
|
||||
<Asset
|
||||
list={this.props.list}
|
||||
key={asset.id}
|
||||
asset={asset}
|
||||
/>
|
||||
))}
|
||||
{this.props.recent && (
|
||||
<Link className={styles.link} to={'/history'}>
|
||||
All Data Sets
|
||||
</Link>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<div className={styles.empty}>
|
||||
<p>No Data Sets Yet.</p>
|
||||
<Link to="/publish">+ Publish A Data Set</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
AssetsUser.contextType = User
|
@ -1,4 +1,4 @@
|
||||
@import '../styles/variables';
|
||||
@import '../../styles/variables';
|
||||
|
||||
.footer {
|
||||
color: $brand-grey-light;
|
@ -1,8 +1,8 @@
|
||||
import React from 'react'
|
||||
import Content from '../components/atoms/Content'
|
||||
import Content from '../atoms/Content'
|
||||
import styles from './Footer.module.scss'
|
||||
|
||||
import meta from '../data/meta.json'
|
||||
import meta from '../../data/meta.json'
|
||||
|
||||
const Footer = () => (
|
||||
<footer className={styles.footer}>
|
@ -1,4 +1,4 @@
|
||||
@import '../styles/variables';
|
||||
@import '../../styles/variables';
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
@ -6,7 +6,7 @@
|
||||
}
|
||||
|
||||
.headerContent {
|
||||
composes: wide from './atoms/Content.module.scss';
|
||||
composes: wide from '../atoms/Content.module.scss';
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
import React from 'react'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
import { ReactComponent as Logo } from '@oceanprotocol/art/logo/logo.svg'
|
||||
import AccountStatus from './molecules/AccountStatus/'
|
||||
import AccountStatus from '../molecules/AccountStatus'
|
||||
import styles from './Header.module.scss'
|
||||
|
||||
import menu from '../data/menu.json'
|
||||
import meta from '../data/meta.json'
|
||||
import menu from '../../data/menu.json'
|
||||
import meta from '../../data/meta.json'
|
||||
|
||||
const Header = () => (
|
||||
<header className={styles.header}>
|
@ -1,6 +1,6 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import Button from '../atoms/Button'
|
||||
import AccountStatus from './AccountStatus/'
|
||||
import AccountStatus from '../molecules/AccountStatus'
|
||||
import styles from './Web3message.module.scss'
|
||||
import { User } from '../../context/User'
|
||||
|
@ -4,8 +4,8 @@
|
||||
"link": "/publish"
|
||||
},
|
||||
{
|
||||
"title": "Invoices",
|
||||
"link": "/invoices"
|
||||
"title": "History",
|
||||
"link": "/history"
|
||||
},
|
||||
{
|
||||
"title": "Faucet",
|
||||
|
BIN
client/src/img/categories/agriculture.jpg
Executable file
After Width: | Height: | Size: 20 KiB |
BIN
client/src/img/categories/anthroarche.jpg
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
client/src/img/categories/astronomy.jpg
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
client/src/img/categories/biology.jpg
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
client/src/img/categories/business.jpg
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
client/src/img/categories/chemistry.jpg
Executable file
After Width: | Height: | Size: 30 KiB |
BIN
client/src/img/categories/communication.jpg
Executable file
After Width: | Height: | Size: 29 KiB |
BIN
client/src/img/categories/computer.jpg
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
client/src/img/categories/dataofdata.jpg
Executable file
After Width: | Height: | Size: 31 KiB |
BIN
client/src/img/categories/deeplearning.jpg
Executable file
After Width: | Height: | Size: 33 KiB |
BIN
client/src/img/categories/demographics.jpg
Executable file
After Width: | Height: | Size: 21 KiB |
BIN
client/src/img/categories/earth.jpg
Executable file
After Width: | Height: | Size: 27 KiB |
BIN
client/src/img/categories/economics.jpg
Executable file
After Width: | Height: | Size: 23 KiB |
BIN
client/src/img/categories/engineering.jpg
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
client/src/img/categories/history.jpg
Executable file
After Width: | Height: | Size: 25 KiB |
BIN
client/src/img/categories/imagesets.jpg
Executable file
After Width: | Height: | Size: 24 KiB |
BIN
client/src/img/categories/language.jpg
Executable file
After Width: | Height: | Size: 30 KiB |
BIN
client/src/img/categories/law.jpg
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
client/src/img/categories/mathematics.jpg
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
client/src/img/categories/medicine.jpg
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
client/src/img/categories/other.jpg
Executable file
After Width: | Height: | Size: 49 KiB |
BIN
client/src/img/categories/performingarts.jpg
Executable file
After Width: | Height: | Size: 24 KiB |
BIN
client/src/img/categories/philosophy.jpg
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
client/src/img/categories/physics.jpg
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
client/src/img/categories/politics.jpg
Executable file
After Width: | Height: | Size: 19 KiB |
BIN
client/src/img/categories/psychology.jpg
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
client/src/img/categories/sociology.jpg
Executable file
After Width: | Height: | Size: 36 KiB |
BIN
client/src/img/categories/sports.jpg
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
client/src/img/categories/theology.jpg
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
client/src/img/categories/transport.jpg
Executable file
After Width: | Height: | Size: 32 KiB |
BIN
client/src/img/categories/urbanplanning.jpg
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
client/src/img/categories/visualart.jpg
Executable file
After Width: | Height: | Size: 22 KiB |
@ -8,14 +8,10 @@ const AssetModel = {
|
||||
name: null,
|
||||
description: null,
|
||||
dateCreated: null,
|
||||
size: null,
|
||||
author: null,
|
||||
type: '',
|
||||
license: null,
|
||||
copyrightHolder: null,
|
||||
encoding: null,
|
||||
compression: null,
|
||||
contentType: null,
|
||||
workExample: null,
|
||||
files: [],
|
||||
categories: [],
|
||||
|
@ -1,18 +1,18 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import Button from '../../components/atoms/Button'
|
||||
import Moment from 'react-moment'
|
||||
import styles from './AssetDetails.module.scss'
|
||||
import AssetFilesDetails from './AssetFilesDetails'
|
||||
|
||||
interface AssetDetailsProps {
|
||||
ocean: any
|
||||
metadata: any
|
||||
ddo: any
|
||||
purchaseAsset: any
|
||||
}
|
||||
|
||||
export default class AssetDetails extends PureComponent<AssetDetailsProps> {
|
||||
public render() {
|
||||
const { metadata, ddo, purchaseAsset } = this.props
|
||||
const { ocean, metadata, ddo } = this.props
|
||||
const { base } = metadata
|
||||
|
||||
return (
|
||||
@ -25,6 +25,7 @@ export default class AssetDetails extends PureComponent<AssetDetailsProps> {
|
||||
{base.copyrightHolder}
|
||||
</h2>
|
||||
<div className={styles.metaPrimaryData}>
|
||||
|
||||
<span title="Date created">
|
||||
<Moment
|
||||
date={base.dateCreated}
|
||||
@ -32,14 +33,19 @@ export default class AssetDetails extends PureComponent<AssetDetailsProps> {
|
||||
interval={0}
|
||||
/>
|
||||
</span>
|
||||
|
||||
{base.categories ? (
|
||||
// TODO: Make this link to search for respective category
|
||||
<Link to={'search?q='}>{base.categories[0]}</Link>
|
||||
<Link to={`/search?q=${base.categories[0]}`}>
|
||||
{base.categories[0]}
|
||||
</Link>
|
||||
) : (
|
||||
<Link to={'search?q='}>Fake Category</Link>
|
||||
<Link to={'/search?q='}>Fake Category</Link>
|
||||
)}
|
||||
|
||||
{base.files && (
|
||||
<span>{base.files.length} data files</span>
|
||||
)}
|
||||
<span>fake json contentType</span>
|
||||
<span>fake 18.5 MB</span>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
@ -58,18 +64,6 @@ export default class AssetDetails extends PureComponent<AssetDetailsProps> {
|
||||
</span>
|
||||
<span className={styles.metaValue}>{base.license}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className={styles.metaLabel}>
|
||||
<strong>File Encoding</strong>
|
||||
</span>
|
||||
<span className={styles.metaValue}>fake UTF-8</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className={styles.metaLabel}>
|
||||
<strong>Compression</strong>
|
||||
</span>
|
||||
<span className={styles.metaValue}>fake None</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className={styles.metaLabel}>
|
||||
<strong>DID</strong>
|
||||
@ -80,9 +74,11 @@ export default class AssetDetails extends PureComponent<AssetDetailsProps> {
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<Button onClick={() => purchaseAsset(ddo)}>
|
||||
Download asset
|
||||
</Button>
|
||||
<AssetFilesDetails
|
||||
files={base.files ? base.files : []}
|
||||
ddo={ddo}
|
||||
ocean={ocean}
|
||||
/>
|
||||
|
||||
<pre>
|
||||
<code>{JSON.stringify(metadata, null, 2)}</code>
|
||||
|
13
client/src/routes/Details/AssetFilesDetails.module.scss
Normal file
@ -0,0 +1,13 @@
|
||||
@import '../../styles/variables';
|
||||
|
||||
.buttonMain {
|
||||
margin: auto;
|
||||
margin-bottom: $spacer / 2;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.error {
|
||||
text-align: center;
|
||||
color: $red;
|
||||
font-size: $font-size-small;
|
||||
}
|
93
client/src/routes/Details/AssetFilesDetails.tsx
Normal file
@ -0,0 +1,93 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import { Logger } from '@oceanprotocol/squid'
|
||||
import Button from '../../components/atoms/Button'
|
||||
import Spinner from '../../components/atoms/Spinner'
|
||||
import styles from './AssetFilesDetails.module.scss'
|
||||
|
||||
interface AssetFilesDetailsProps {
|
||||
ocean: any
|
||||
files: any[]
|
||||
ddo: any
|
||||
}
|
||||
|
||||
export default class AssetFilesDetails extends PureComponent<
|
||||
AssetFilesDetailsProps
|
||||
> {
|
||||
public state = { decryptedFiles: [], isLoading: false, error: null }
|
||||
|
||||
private purchaseAsset = async (ddo: any) => {
|
||||
this.setState({ isLoading: true, error: null })
|
||||
try {
|
||||
const account = await this.props.ocean.getAccounts()
|
||||
const service = ddo.findServiceByType('Access')
|
||||
const serviceAgreementSignatureResult = await this.props.ocean.signServiceAgreement(
|
||||
ddo.id,
|
||||
service.serviceDefinitionId,
|
||||
account[0]
|
||||
)
|
||||
await this.props.ocean.initializeServiceAgreement(
|
||||
ddo.id,
|
||||
service.serviceDefinitionId,
|
||||
serviceAgreementSignatureResult.agreementId,
|
||||
serviceAgreementSignatureResult.signature,
|
||||
(files: any) => this.setState({ decryptedFiles: files }),
|
||||
account[0]
|
||||
)
|
||||
|
||||
this.setState({ isLoading: false })
|
||||
} catch (error) {
|
||||
Logger.log('error', error)
|
||||
this.setState({ isLoading: false, error: error.message })
|
||||
}
|
||||
}
|
||||
|
||||
public render() {
|
||||
const { files, ddo } = this.props
|
||||
const filesArray =
|
||||
this.state.decryptedFiles.length > 0
|
||||
? this.state.decryptedFiles
|
||||
: files
|
||||
|
||||
return (
|
||||
<>
|
||||
{this.state.decryptedFiles.length > 0 ? (
|
||||
filesArray.forEach(file => (
|
||||
<>
|
||||
<ul>
|
||||
{/*
|
||||
TODO: getting this metadata depends on a change to to OEP-8,
|
||||
see: https://github.com/oceanprotocol/OEPs/pull/154
|
||||
*/}
|
||||
{/* <li>{file.contentType}</li> */}
|
||||
<li>{file.contentLength}</li>
|
||||
{/* <li>{file.encoding}</li> */}
|
||||
{/* <li>{file.compression}</li> */}
|
||||
</ul>
|
||||
|
||||
{file.url && (
|
||||
<Button href={file.url}>Download asset</Button>
|
||||
)}
|
||||
</>
|
||||
))
|
||||
) : this.state.isLoading ? (
|
||||
<Spinner message="Decrypting files, please sign with your wallet..." />
|
||||
) : (
|
||||
<>
|
||||
<Button
|
||||
primary
|
||||
className={styles.buttonMain}
|
||||
onClick={() => this.purchaseAsset(ddo)}
|
||||
>
|
||||
Get asset files
|
||||
</Button>
|
||||
{this.state.error && (
|
||||
<div className={styles.error}>
|
||||
{this.state.error}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Logger } from '@oceanprotocol/squid'
|
||||
import queryString from 'query-string'
|
||||
import Route from '../../components/templates/Route'
|
||||
import Spinner from '../../components/atoms/Spinner'
|
||||
import { User } from '../../context/User'
|
||||
@ -28,23 +26,6 @@ export default class Details extends Component<DetailsProps, DetailsState> {
|
||||
this.setState({ ddo, metadata: { base: metadata.base } })
|
||||
}
|
||||
|
||||
private purchaseAsset = async (ddo: any) => {
|
||||
try {
|
||||
const account = await this.context.ocean.accounts.list()
|
||||
const accessService = ddo.findServiceByType('Access')
|
||||
const agreementId = await this.context.ocean.assets.order(
|
||||
ddo.id,
|
||||
accessService.serviceDefinitionId,
|
||||
account[0]
|
||||
)
|
||||
const folder = ""
|
||||
const path = await this.context.ocean.assets.consume(agreementId, ddo.id, accessService.serviceDefinitionId, account[0], folder)
|
||||
Logger.log('path', path)
|
||||
} catch (e) {
|
||||
Logger.log('error', e)
|
||||
}
|
||||
}
|
||||
|
||||
public render() {
|
||||
const { metadata, ddo } = this.state
|
||||
|
||||
@ -54,9 +35,9 @@ export default class Details extends Component<DetailsProps, DetailsState> {
|
||||
>
|
||||
{metadata && metadata.base.name ? (
|
||||
<AssetDetails
|
||||
ocean={this.context.ocean}
|
||||
metadata={metadata}
|
||||
ddo={ddo}
|
||||
purchaseAsset={this.purchaseAsset}
|
||||
/>
|
||||
) : (
|
||||
<div className={stylesApp.loader}>
|
||||
|
@ -3,7 +3,7 @@ import Route from '../components/templates/Route'
|
||||
import Button from '../components/atoms/Button'
|
||||
import Spinner from '../components/atoms/Spinner'
|
||||
import { User } from '../context/User'
|
||||
import Web3message from '../components/molecules/Web3message'
|
||||
import Web3message from '../components/organisms/Web3message'
|
||||
import styles from './Faucet.module.scss'
|
||||
|
||||
interface FaucetState {
|
||||
|
13
client/src/routes/History.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import React, { Component } from 'react'
|
||||
import Route from '../components/templates/Route'
|
||||
import AssetsUser from '../components/organisms/AssetsUser'
|
||||
|
||||
export default class History extends Component {
|
||||
public render() {
|
||||
return (
|
||||
<Route title="History">
|
||||
<AssetsUser list />
|
||||
</Route>
|
||||
)
|
||||
}
|
||||
}
|
@ -3,6 +3,10 @@
|
||||
.home {
|
||||
display: block;
|
||||
|
||||
form {
|
||||
margin-bottom: $spacer * 3;
|
||||
}
|
||||
|
||||
label {
|
||||
height: 0;
|
||||
margin: 0;
|
||||
|
@ -3,7 +3,7 @@ import Button from '../components/atoms/Button'
|
||||
import Form from '../components/atoms/Form/Form'
|
||||
import Input from '../components/atoms/Form/Input'
|
||||
import Route from '../components/templates/Route'
|
||||
import AssetsUser from '../components/molecules/AssetsUser'
|
||||
import AssetsUser from '../components/organisms/AssetsUser'
|
||||
import styles from './Home.module.scss'
|
||||
|
||||
import meta from '../data/meta.json'
|
||||
@ -41,7 +41,7 @@ class Home extends Component<HomeProps, HomeState> {
|
||||
}
|
||||
/>
|
||||
</Form>
|
||||
<AssetsUser />
|
||||
<AssetsUser recent={5} list />
|
||||
</Route>
|
||||
)
|
||||
}
|
||||
|
@ -1,63 +0,0 @@
|
||||
import React, { Component } from 'react'
|
||||
import Route from '../components/templates/Route'
|
||||
import { User } from '../context/User'
|
||||
import Asset from '../components/molecules/Asset'
|
||||
import { Logger } from '@oceanprotocol/squid'
|
||||
import styles from './Search.module.scss'
|
||||
|
||||
interface InvoicesState {
|
||||
results: any[]
|
||||
}
|
||||
|
||||
export default class Invoices extends Component<{}, InvoicesState> {
|
||||
public state = { results: [] }
|
||||
|
||||
public async componentDidMount() {
|
||||
// this is currently my published assets
|
||||
this.context.ocean.keeper.didRegistry.contract.getPastEvents(
|
||||
'DIDAttributeRegistered',
|
||||
{
|
||||
filter: { _owner: this.context.account },
|
||||
fromBlock: 0,
|
||||
toBlock: 'latest'
|
||||
},
|
||||
async (error: any, events: any) => {
|
||||
if (error) {
|
||||
Logger.log('error retrieving', error)
|
||||
} else {
|
||||
const results = []
|
||||
for (const event of events) {
|
||||
const ddo = await this.context.ocean.assets.resolve(
|
||||
`did:op:${event.returnValues._did.substring(2)}`
|
||||
)
|
||||
results.push(ddo)
|
||||
}
|
||||
this.setState({ results })
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
public renderResults = () =>
|
||||
this.state.results.length ? (
|
||||
<div className={styles.results}>
|
||||
{this.state.results
|
||||
.filter(asset => !!asset)
|
||||
.map((asset, index) => (
|
||||
<Asset key={index} asset={asset} />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div>No invoices yet</div>
|
||||
)
|
||||
|
||||
public render() {
|
||||
return (
|
||||
<Route title="Your invoices" wide>
|
||||
{this.renderResults()}
|
||||
</Route>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Invoices.contextType = User
|
@ -1,9 +1,9 @@
|
||||
@import '../../../styles/variables';
|
||||
|
||||
.linkUrl {
|
||||
font-size: $font-size-mini;
|
||||
font-size: $font-size-small;
|
||||
display: block;
|
||||
font-family: $font-family-base;
|
||||
margin-bottom: $spacer / 8;
|
||||
|
||||
// TODO: truncate long urls with ellipsis
|
||||
}
|
||||
@ -23,7 +23,7 @@
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
position: absolute;
|
||||
top: $spacer / 4;
|
||||
top: $spacer / 8;
|
||||
right: 0;
|
||||
transition: .2s ease-out;
|
||||
|
||||
@ -35,10 +35,9 @@
|
||||
|
||||
.details {
|
||||
font-size: $font-size-mini;
|
||||
font-size: .85rem;
|
||||
color: #6e7e93;
|
||||
color: $brand-grey-light;
|
||||
|
||||
span {
|
||||
padding-right: .5rem;
|
||||
padding-right: $spacer;
|
||||
}
|
||||
}
|
||||
|
@ -10,14 +10,19 @@ const Item = ({
|
||||
removeItem(): void
|
||||
}) => (
|
||||
<li>
|
||||
<a href={item.url}>{item.url}</a>
|
||||
<a href={item.url} className={styles.linkUrl}>
|
||||
{item.url}
|
||||
</a>
|
||||
<div className={styles.details}>
|
||||
<span>url: {item.found ? 'confirmed' : 'unconfirmed'}</span>
|
||||
<span>URL {item.found ? 'confirmed' : ' not confirmed'}</span>
|
||||
<span>
|
||||
size:
|
||||
{item.found && item.size ? filesize(item.size) : 'unknown'}
|
||||
{item.found && item.size ? filesize(item.size) : 'unknown size'}
|
||||
</span>
|
||||
<span>
|
||||
{item.found && item.type
|
||||
? item.type.split('/')[1]
|
||||
: 'unknown type'}
|
||||
</span>
|
||||
<span>type: {item.found && item.type ? item.type : 'unknown'}</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
|
@ -11,12 +11,17 @@ import { serviceHost, servicePort, serviceScheme } from '../../../config'
|
||||
interface File {
|
||||
url: string
|
||||
found: boolean
|
||||
size: number
|
||||
type: string
|
||||
checksum?: string
|
||||
checksumType?: string
|
||||
contentLength?: string
|
||||
contentType?: string
|
||||
resourceId?: string
|
||||
encoding?: string
|
||||
compression?: string
|
||||
}
|
||||
|
||||
interface FilesProps {
|
||||
files: [File]
|
||||
files: File[]
|
||||
placeholder: string
|
||||
help?: string
|
||||
name: string
|
||||
@ -33,6 +38,32 @@ interface FilesStates {
|
||||
isFormShown: boolean
|
||||
}
|
||||
|
||||
const getFileCompression = async (contentType: string) => {
|
||||
// TODO: add all the possible archive & compression MIME types
|
||||
if (
|
||||
contentType === 'application/zip' ||
|
||||
contentType === 'application/gzip' ||
|
||||
contentType === 'application/x-lzma' ||
|
||||
contentType === 'application/x-xz' ||
|
||||
contentType === 'application/x-tar' ||
|
||||
contentType === 'application/x-gtar' ||
|
||||
contentType === 'application/x-bzip2' ||
|
||||
contentType === 'application/x-7z-compressed' ||
|
||||
contentType === 'application/x-rar-compressed' ||
|
||||
contentType === 'application/x-apple-diskimage'
|
||||
) {
|
||||
const contentTypeSplit = contentType.split('/')
|
||||
|
||||
if (contentTypeSplit[1].includes('x-')) {
|
||||
return contentTypeSplit[1].replace('x-', '')
|
||||
}
|
||||
|
||||
return contentTypeSplit[1]
|
||||
} else {
|
||||
return 'none'
|
||||
}
|
||||
}
|
||||
|
||||
export default class Files extends PureComponent<FilesProps, FilesStates> {
|
||||
public state: FilesStates = {
|
||||
isFormShown: false
|
||||
@ -60,8 +91,9 @@ export default class Files extends PureComponent<FilesProps, FilesStates> {
|
||||
}
|
||||
)
|
||||
res = await response.json()
|
||||
file.size = res.result.contentLength
|
||||
file.type = res.result.contentType
|
||||
file.contentLength = res.result.contentLength
|
||||
file.contentType = res.result.contentType
|
||||
file.compression = await getFileCompression(file.contentType)
|
||||
file.found = res.result.found
|
||||
} catch (error) {
|
||||
// error
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import Web3message from '../../components/molecules/Web3message'
|
||||
import Web3message from '../../components/organisms/Web3message'
|
||||
import Spinner from '../../components/atoms/Spinner'
|
||||
import styles from './StepRegisterContent.module.scss'
|
||||
|
||||
|
@ -267,10 +267,6 @@ class Publish extends Component<{}, PublishState> {
|
||||
price: this.state.price,
|
||||
type: this.state.type,
|
||||
categories: [this.state.categories],
|
||||
size: '',
|
||||
encoding: '',
|
||||
compression: undefined,
|
||||
contentType: '',
|
||||
workExample: undefined,
|
||||
inLanguage: undefined,
|
||||
tags: ''
|
||||
|
18
package-lock.json
generated
@ -1267,9 +1267,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@ -3735,9 +3735,9 @@
|
||||
}
|
||||
},
|
||||
"parent-module": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz",
|
||||
"integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"callsites": "^3.0.0"
|
||||
@ -6498,9 +6498,9 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.3.4000",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
|
||||
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA==",
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.1.tgz",
|
||||
"integrity": "sha512-3NSMb2VzDQm8oBTLH6Nj55VVtUEpe/rgkIzMir0qVoLyjDZlnMBva0U6vDiV3IH+sl/Yu6oP5QwsAQtHPmDd2Q==",
|
||||
"dev": true
|
||||
},
|
||||
"unherit": {
|
||||
|
@ -32,7 +32,7 @@
|
||||
"stylelint-config-bigchaindb": "^1.2.1",
|
||||
"stylelint-config-css-modules": "^1.3.0",
|
||||
"stylelint-config-standard": "^18.2.0",
|
||||
"typescript": "^3.3.4000"
|
||||
"typescript": "^3.4.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
980
server/package-lock.json
generated
@ -15,7 +15,7 @@
|
||||
"dependencies": {
|
||||
"body-parser": "^1.18.3",
|
||||
"color-js": "^1.0.5",
|
||||
"compression": "^1.7.3",
|
||||
"compression": "^1.7.4",
|
||||
"debug": "^4.1.1",
|
||||
"express": "^4.16.4",
|
||||
"express-validator": "^5.3.1",
|
||||
@ -28,22 +28,22 @@
|
||||
"devDependencies": {
|
||||
"@types/body-parser": "^1.17.0",
|
||||
"@types/compression": "0.0.36",
|
||||
"@types/debug": "^4.1.1",
|
||||
"@types/dotenv": "^6.1.0",
|
||||
"@types/debug": "^4.1.3",
|
||||
"@types/dotenv": "^6.1.1",
|
||||
"@types/express": "^4.16.1",
|
||||
"@types/jasmine": "^3.3.9",
|
||||
"@types/jest": "^24.0.5",
|
||||
"@types/jasmine": "^3.3.12",
|
||||
"@types/jest": "^24.0.11",
|
||||
"@types/morgan": "^1.7.35",
|
||||
"@types/node": "^11.9.4",
|
||||
"@types/node": "^11.12.2",
|
||||
"@types/request": "^2.48.1",
|
||||
"chai": "^4.2.0",
|
||||
"jest": "^24.1.0",
|
||||
"jest": "^24.5.0",
|
||||
"mocha": "^6.0.2",
|
||||
"nodemon": "^1.18.10",
|
||||
"supertest": "^3.4.2",
|
||||
"ts-jest": "^24.0.0",
|
||||
"ts-node": "^8.0.2",
|
||||
"typescript": "^3.3.4000"
|
||||
"supertest": "^4.0.2",
|
||||
"ts-jest": "^24.0.1",
|
||||
"ts-node": "^8.0.3",
|
||||
"typescript": "^3.4.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|