mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Merge branch 'master' into feature/analytics
This commit is contained in:
commit
7e26d30fb2
293
client/package-lock.json
generated
293
client/package-lock.json
generated
|
@ -1026,14 +1026,14 @@
|
||||||
"integrity": "sha512-p2n505t2K0zD1ZvGPhI6EsSviEVLCB7BYowhf/ONmVaWED138PaG4Z9nY6YuHU383uOoIWT+Lq3dLkFzDzstXw=="
|
"integrity": "sha512-p2n505t2K0zD1ZvGPhI6EsSviEVLCB7BYowhf/ONmVaWED138PaG4Z9nY6YuHU383uOoIWT+Lq3dLkFzDzstXw=="
|
||||||
},
|
},
|
||||||
"@oceanprotocol/keeper-contracts": {
|
"@oceanprotocol/keeper-contracts": {
|
||||||
"version": "0.9.0",
|
"version": "0.9.1",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/keeper-contracts/-/keeper-contracts-0.9.1.tgz",
|
||||||
"integrity": "sha512-QrTCQNiQa9KszH6/dTAS0a8AoW/SIEkZazXTwA2aoePBS0X8fNpsKvT3N2OuR1YPAjCU3rGWzYdV4TNnMNbsSw=="
|
"integrity": "sha512-c1LvaH+e1tzow0gZLwSWe19ap+DrZuNmZfxBdwEVEPQXarI0jTXa5qVDoiBow8kBWaqSIUgFAzQOJW8rKdlS1A=="
|
||||||
},
|
},
|
||||||
"@oceanprotocol/squid": {
|
"@oceanprotocol/squid": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-0.5.1.tgz",
|
||||||
"integrity": "sha512-yGu121WJ9XEX1U4ql/p7ISV36fqNydxGBYgXHbOjeXS/kvNFx3hP2emBf4QA12PjPZcmuLz0wE+7GBL4H/v+eA==",
|
"integrity": "sha512-YJewmMIpHG5cjsOsgOynky7z+5YT7l5+niW9AqCMOoMGy76VEe1+6nmAhZ/PB9BtIpYCGWOl1Y68I32qhX9IWQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@oceanprotocol/keeper-contracts": "^0.9.0",
|
"@oceanprotocol/keeper-contracts": "^0.9.0",
|
||||||
"bignumber.js": "^8.0.1",
|
"bignumber.js": "^8.0.1",
|
||||||
|
@ -1382,9 +1382,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/react": {
|
"@types/react": {
|
||||||
"version": "16.8.10",
|
"version": "16.8.13",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.8.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.8.13.tgz",
|
||||||
"integrity": "sha512-7bUQeZKP4XZH/aB4i7k1i5yuwymDu/hnLMhD9NjVZvQQH7ZUgRN3d6iu8YXzx4sN/tNr0bj8jgguk8hhObzGvA==",
|
"integrity": "sha512-otJ4ntMuHGrvm67CdDJMAls4WqotmAmW0g3HmWi9LCjSWXrxoXY/nHXrtmMfvPEEmGFNm6NdgMsJmnfH820Qaw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/prop-types": "*",
|
"@types/prop-types": "*",
|
||||||
|
@ -1392,9 +1392,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/react-datepicker": {
|
"@types/react-datepicker": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-2.2.1.tgz",
|
||||||
"integrity": "sha512-zVAeDqkQgSdARElFXwXXpaaADyoRMo1SPsBzw6WV2iciJqS3ysSvYjqEKyTZfGbGkgw5sExEI2QKXam/KlCtyg==",
|
"integrity": "sha512-En5Ezrl+o/QvHhAFUxxQox2SDu4vDmo3/uhXj9SwX7ObZ5X4jwSS9CocTHsRCqpsr+F7JGhUJ9KK7FVeknDw4Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/react": "*",
|
"@types/react": "*",
|
||||||
|
@ -1441,9 +1441,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/react-transition-group": {
|
"@types/react-transition-group": {
|
||||||
"version": "2.0.16",
|
"version": "2.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-2.0.16.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-2.8.0.tgz",
|
||||||
"integrity": "sha512-FUJEx2BGJPU1qVQoWd9v7wpOwnCPTWhcE4iTaU5prry9SvwiI11lCXOci8Nz9cM/Fuf650l7Skg6nlVeCYjPFA==",
|
"integrity": "sha512-DHZrY4UBypeT/bD2WakC3MkdBHMOkhqWnRRCMqrtNknyhfkCfKmRlpKdxGlPkDKvNl2uDSHcdvmKy8JW0aNETA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/react": "*"
|
"@types/react": "*"
|
||||||
|
@ -16345,11 +16345,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-transition-group": {
|
"react-transition-group": {
|
||||||
"version": "2.7.1",
|
"version": "2.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz",
|
||||||
"integrity": "sha512-b0VJTzNRnXxRpCuxng6QJbAzmmrhBn1BZJfPPnHbH2PIo8msdkajqwtfdyGm/OypPXZNfAHKEqeN15wjMXrRJQ==",
|
"integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"dom-helpers": "^3.3.1",
|
"dom-helpers": "^3.4.0",
|
||||||
"loose-envify": "^1.4.0",
|
"loose-envify": "^1.4.0",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react-lifecycles-compat": "^3.0.4"
|
"react-lifecycles-compat": "^3.0.4"
|
||||||
|
@ -19177,9 +19177,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.4.1",
|
"version": "3.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
|
||||||
"integrity": "sha512-3NSMb2VzDQm8oBTLH6Nj55VVtUEpe/rgkIzMir0qVoLyjDZlnMBva0U6vDiV3IH+sl/Yu6oP5QwsAQtHPmDd2Q==",
|
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ua-parser-js": {
|
"ua-parser-js": {
|
||||||
|
@ -19657,22 +19657,22 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"web3": {
|
"web3": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3/-/web3-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-cSjJe8AwR9TKELLkGwk2HNL+37e+Y3x0nKkdBNpBZQNZR0SeoT3Jckkd7pBgrJKcyupItN+tKF48x5yNRvHzrQ==",
|
"integrity": "sha512-IWBV1gS7sElHqD2mkwjdyeEmY4YhWn7C+b+pdOWgDJ6j70ux2bqVMfsP0saZ9nWeF1TWMvUnrFsyZ7C4/VnhTA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"@types/node": "^10.12.18",
|
"@types/node": "^10.12.18",
|
||||||
"web3-bzz": "1.0.0-beta.51",
|
"web3-bzz": "1.0.0-beta.52",
|
||||||
"web3-core": "1.0.0-beta.51",
|
"web3-core": "1.0.0-beta.52",
|
||||||
"web3-core-helpers": "1.0.0-beta.51",
|
"web3-core-helpers": "1.0.0-beta.52",
|
||||||
"web3-core-method": "1.0.0-beta.51",
|
"web3-core-method": "1.0.0-beta.52",
|
||||||
"web3-eth": "1.0.0-beta.51",
|
"web3-eth": "1.0.0-beta.52",
|
||||||
"web3-eth-personal": "1.0.0-beta.51",
|
"web3-eth-personal": "1.0.0-beta.52",
|
||||||
"web3-net": "1.0.0-beta.51",
|
"web3-net": "1.0.0-beta.52",
|
||||||
"web3-providers": "1.0.0-beta.51",
|
"web3-providers": "1.0.0-beta.52",
|
||||||
"web3-shh": "1.0.0-beta.51",
|
"web3-shh": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
|
@ -19796,9 +19796,9 @@
|
||||||
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w="
|
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w="
|
||||||
},
|
},
|
||||||
"web3-bzz": {
|
"web3-bzz": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-9zDifUc3qPOF2WJ2H/81Ki4rTLa4elB0OG8h3IEYHjXOLDHKzswBQC3favhvm/ZQ2WmnkGd04vsU2iQzBmr1OQ==",
|
"integrity": "sha512-yva0KW0cIEdFyHaGMHuMGjl4jea/esNBVwfFsejNRJy2W2jSMjnji+AFXnkcq8MhOAyNtQD4WzNdad9F51PaZg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"@types/node": "^10.12.18",
|
"@types/node": "^10.12.18",
|
||||||
|
@ -19807,32 +19807,32 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-core": {
|
"web3-core": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-RZRAt0O+LsU1jV6BtuZBQYjE+YcNa9Bu6FzEAMZ92EdgiAkUB2kbTeipVGCMxOST26kWXUtwCwxkkx4g6iy41A==",
|
"integrity": "sha512-UKHNBIj5b4M40DrGJRQKgWTtbqZCCZck38oQgBbtLAUUQmvlZybLf8jGWUfMamyhJg/eBqT/t1l7OcAn5i9zrA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"@types/bn.js": "^4.11.4",
|
"@types/bn.js": "^4.11.4",
|
||||||
"@types/node": "^10.12.18",
|
"@types/node": "^10.12.18",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-core-helpers": {
|
"web3-core-helpers": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-kA5JMJyrB5yxX3dQuziBP0Yo9i+MKwtYfA2E7DTbEoUueqjPcEwXMUxmpGROYmufCcfoe/B/FqpC8CzkqmHokw==",
|
"integrity": "sha512-VJCJMEplvrU7jCgn0MCuLLa+XWkQVttQpShM5i0XkcKs2gmisMtoLO3lATx2b32ruu29EriBYkkAVzc0/nxppg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"web3-eth-iban": "1.0.0-beta.51",
|
"web3-eth-iban": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-core-method": {
|
"web3-core-method": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-Tl5jGWqx01W6OFPNZI1c4wtCt+HPKWldWrLORKfW0zHyXrYDH6V2BuitA7R7j+54+c/61W3C2E6a+g7sQ8+mWA==",
|
"integrity": "sha512-lLbDsV2pxxrUDIWvRI/u6MsvG8mKGfCYOifXqb+yqAruhoNs/Gahoa/1UTjsn0qhVQafsffFRXaEhi6BQDQOYA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"eventemitter3": "3.1.0",
|
"eventemitter3": "3.1.0",
|
||||||
|
@ -19840,9 +19840,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-core-subscriptions": {
|
"web3-core-subscriptions": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-bM4KlA37Or/XfrZKLtXlvUSISKWUkXOH/32s0DBnxRkKuey8QKK460H5KF9/HS8LfY7cO11NAepnFe4Tk1rSaQ==",
|
"integrity": "sha512-ZE6VsTVZ9PHV3FOJHnXOxUr4RuwXUpqC+RxCESb/UXvwHNnPbKNPpQjcoc5shaFrtOVtY14bIl35qTxVHSeGWg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"eventemitter3": "^3.1.0",
|
"eventemitter3": "^3.1.0",
|
||||||
|
@ -19850,43 +19850,43 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-eth": {
|
"web3-eth": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-w+8YtfKAcEPmOtYf47cjQw3t6dm5YcGvkl4jVZF00WHuvkPMFsXBTbZdH4aVgjPhubl53rdLrJwAP2b7X83+kQ==",
|
"integrity": "sha512-mpuIFSIke/ZVdWfEzq0QRJAxcDh50BJflsdUMbNaxf5prP7Sz8FZJz/fHiu4H4cEM6aW8Bi0Hsoqad4+caX6Uw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"ethereumjs-tx": "^1.3.7",
|
"ethereumjs-tx": "^1.3.7",
|
||||||
"rxjs": "^6.4.0",
|
"rxjs": "^6.4.0",
|
||||||
"web3-core": "1.0.0-beta.51",
|
"web3-core": "1.0.0-beta.52",
|
||||||
"web3-core-helpers": "1.0.0-beta.51",
|
"web3-core-helpers": "1.0.0-beta.52",
|
||||||
"web3-core-method": "1.0.0-beta.51",
|
"web3-core-method": "1.0.0-beta.52",
|
||||||
"web3-core-subscriptions": "1.0.0-beta.51",
|
"web3-core-subscriptions": "1.0.0-beta.52",
|
||||||
"web3-eth-abi": "1.0.0-beta.51",
|
"web3-eth-abi": "1.0.0-beta.52",
|
||||||
"web3-eth-accounts": "1.0.0-beta.51",
|
"web3-eth-accounts": "1.0.0-beta.52",
|
||||||
"web3-eth-contract": "1.0.0-beta.51",
|
"web3-eth-contract": "1.0.0-beta.52",
|
||||||
"web3-eth-ens": "1.0.0-beta.51",
|
"web3-eth-ens": "1.0.0-beta.52",
|
||||||
"web3-eth-iban": "1.0.0-beta.51",
|
"web3-eth-iban": "1.0.0-beta.52",
|
||||||
"web3-eth-personal": "1.0.0-beta.51",
|
"web3-eth-personal": "1.0.0-beta.52",
|
||||||
"web3-net": "1.0.0-beta.51",
|
"web3-net": "1.0.0-beta.52",
|
||||||
"web3-providers": "1.0.0-beta.51",
|
"web3-providers": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-eth-abi": {
|
"web3-eth-abi": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-mTcMpIihZECzZ5oWUh9Jg7x5pVhPv6xPTPWxY9007QKbbBH01GwPogoxBz1X7RfWOwGqZABfxFgXow5NkL0T3A==",
|
"integrity": "sha512-c03sH6y7ncp9tBPt0EZEcyFyou4kyYdr72VJMY8ip0JAfZgl4WI9XcGpD207z0lR4Ki1PSCfkh+ZigoXxggouw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"ethers": "^4.0.27",
|
"ethers": "^4.0.27",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-eth-accounts": {
|
"web3-eth-accounts": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-6HJu4Vrli7p1S52mV83juFjWn0w7rUE4q9cZdYwsGmqHGrOmV7E3zuBEyuA+kelPLpSmcJDOnEowvORmRdpAyw==",
|
"integrity": "sha512-B52yDVK2/3NKce1CESTZ/sD+6lU9pdNk4tPAtTkWTTPlejAbNlI04SdCX+hn2XJpDjsvU2HRSY3uNugVTrRQ6w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"crypto-browserify": "3.12.0",
|
"crypto-browserify": "3.12.0",
|
||||||
|
@ -19894,11 +19894,11 @@
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"scrypt.js": "0.2.0",
|
"scrypt.js": "0.2.0",
|
||||||
"uuid": "3.3.2",
|
"uuid": "3.3.2",
|
||||||
"web3-core": "1.0.0-beta.51",
|
"web3-core": "1.0.0-beta.52",
|
||||||
"web3-core-helpers": "1.0.0-beta.51",
|
"web3-core-helpers": "1.0.0-beta.52",
|
||||||
"web3-core-method": "1.0.0-beta.51",
|
"web3-core-method": "1.0.0-beta.52",
|
||||||
"web3-providers": "1.0.0-beta.51",
|
"web3-providers": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"eth-lib": {
|
"eth-lib": {
|
||||||
|
@ -19919,98 +19919,98 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-eth-contract": {
|
"web3-eth-contract": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-iVMay6OXDjDPeiPoeGpa6PQGuwIPxL/8UAVIlWVB1CYG9+FY6kcOUO7vI7dnDVwN1zneAslf9h86px6hgR92OQ==",
|
"integrity": "sha512-X5Eqi/onxaBw04urowcYXl4L7eS3NuAFdBxSYP14rdTtP03TbgZEJ1GZDftF3cgMorvfGKcTyxyK0VYj/l+lfg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"@types/bn.js": "^4.11.4",
|
"@types/bn.js": "^4.11.4",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"web3-core": "1.0.0-beta.51",
|
"web3-core": "1.0.0-beta.52",
|
||||||
"web3-core-helpers": "1.0.0-beta.51",
|
"web3-core-helpers": "1.0.0-beta.52",
|
||||||
"web3-core-method": "1.0.0-beta.51",
|
"web3-core-method": "1.0.0-beta.52",
|
||||||
"web3-core-subscriptions": "1.0.0-beta.51",
|
"web3-core-subscriptions": "1.0.0-beta.52",
|
||||||
"web3-eth-abi": "1.0.0-beta.51",
|
"web3-eth-abi": "1.0.0-beta.52",
|
||||||
"web3-eth-accounts": "1.0.0-beta.51",
|
"web3-eth-accounts": "1.0.0-beta.52",
|
||||||
"web3-providers": "1.0.0-beta.51",
|
"web3-providers": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-eth-ens": {
|
"web3-eth-ens": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-JpHlAIUZGLGTTHWKBFciv5KGBi/+n0uqaO/dXoIfB/jI0Gcm5GYEwUt8TU/Y0/WVHvw/ttU1e0laJYPzTTEB8w==",
|
"integrity": "sha512-8VTOF+v5pAjq1FmakXRceY6VrIoPB7DqfSc+K4aAOJ/tuIMIpe6pt0Bl9IYAbpgFrFqL7ow22d9xcd77ULIwiQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"eth-ens-namehash": "2.0.8",
|
"eth-ens-namehash": "2.0.8",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"web3-core": "1.0.0-beta.51",
|
"web3-core": "1.0.0-beta.52",
|
||||||
"web3-core-helpers": "1.0.0-beta.51",
|
"web3-core-helpers": "1.0.0-beta.52",
|
||||||
"web3-core-method": "1.0.0-beta.51",
|
"web3-core-method": "1.0.0-beta.52",
|
||||||
"web3-eth-abi": "1.0.0-beta.51",
|
"web3-eth-abi": "1.0.0-beta.52",
|
||||||
"web3-eth-contract": "1.0.0-beta.51",
|
"web3-eth-contract": "1.0.0-beta.52",
|
||||||
"web3-net": "1.0.0-beta.51",
|
"web3-net": "1.0.0-beta.52",
|
||||||
"web3-providers": "1.0.0-beta.51",
|
"web3-providers": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-eth-iban": {
|
"web3-eth-iban": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-GNLsEWpEkyJqmogsF+mQLlO06tPOudfhVBCPC68SIOw6wQTqAtoqzOot3EJdrEIDGet9eujOoBs6VWAjNbMGRA==",
|
"integrity": "sha512-LJZRZ+hZZPU9Fb7xR54mX1li5aKMp9xj9wgZZa4ikdL7iWi0rg1tOacEhbxWGQsjEYhGZYcvxhW9RIdHOwAySg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"bn.js": "4.11.8",
|
"bn.js": "4.11.8",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-eth-personal": {
|
"web3-eth-personal": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-Mq6uAvhfsKf7FSZVqJOfmb7i5zxQ6HkbTRcAyOOOfSmGnTvxSIjtKZCTAVv3UeBh3pxIXn5FSDlKngaj1MbYXg==",
|
"integrity": "sha512-tNjoB9KztpZL2ayjWYxaInwMrEGxBV7rGMt3hkhk9y4UxlK+8rZtrboz5hggzcgzHaVGnG73rdynhbuPU/cSAQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"web3-core": "1.0.0-beta.51",
|
"web3-core": "1.0.0-beta.52",
|
||||||
"web3-core-helpers": "1.0.0-beta.51",
|
"web3-core-helpers": "1.0.0-beta.52",
|
||||||
"web3-core-method": "1.0.0-beta.51",
|
"web3-core-method": "1.0.0-beta.52",
|
||||||
"web3-net": "1.0.0-beta.51",
|
"web3-net": "1.0.0-beta.52",
|
||||||
"web3-providers": "1.0.0-beta.51",
|
"web3-providers": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-net": {
|
"web3-net": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-1xeBIb/Tvf6PVNZ0u+pPrULNkLefTf0uuo8Hyx82EfY+mvMz6jvNDyFsD8spDGJUuxlDabFnoZdiaEv7LNwwSg==",
|
"integrity": "sha512-rw66c5A5VTF/m3Acnr9ebIAgbr28q5jhXs8A8/F4VjbsDmUhQuQr3deyTPfyOEyupcnn6QRLoQ1EFVzeaUP7Ng==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"web3-core": "1.0.0-beta.51",
|
"web3-core": "1.0.0-beta.52",
|
||||||
"web3-core-helpers": "1.0.0-beta.51",
|
"web3-core-helpers": "1.0.0-beta.52",
|
||||||
"web3-core-method": "1.0.0-beta.51",
|
"web3-core-method": "1.0.0-beta.52",
|
||||||
"web3-providers": "1.0.0-beta.51",
|
"web3-providers": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-shh": {
|
"web3-shh": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-IA4oaNH+PaGWQtTe7BmENszNTeSTsZ15hBNnOrMIyeF0PeghPj7sCenTtU/q8Ie6jR0oXfTXJOQCS/Q/QC3Ksg==",
|
"integrity": "sha512-Qu9cb9fifUFIDTGujnBnInO3D2OCXDAmCowqMWebEazoZxk9P4oYWmumym1ZErixqEWREb4lkoayyEDSpARzSg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"web3-core": "1.0.0-beta.51",
|
"web3-core": "1.0.0-beta.52",
|
||||||
"web3-core-helpers": "1.0.0-beta.51",
|
"web3-core-helpers": "1.0.0-beta.52",
|
||||||
"web3-core-method": "1.0.0-beta.51",
|
"web3-core-method": "1.0.0-beta.52",
|
||||||
"web3-core-subscriptions": "1.0.0-beta.51",
|
"web3-core-subscriptions": "1.0.0-beta.52",
|
||||||
"web3-net": "1.0.0-beta.51",
|
"web3-net": "1.0.0-beta.52",
|
||||||
"web3-providers": "1.0.0-beta.51",
|
"web3-providers": "1.0.0-beta.52",
|
||||||
"web3-utils": "1.0.0-beta.51"
|
"web3-utils": "1.0.0-beta.52"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-utils": {
|
"web3-utils": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-c9sRSscu0NIjD96X4ToDOgTxGyJevppuB+uHOgWkziaLGqlw/Li1l24nGkvr0Zqpt9SufvfPcWf8EEC92pnwKg==",
|
"integrity": "sha512-WdHyzPcZu/sOnNrkcOZT20QEX9FhwD9OJJXENojQNvMK2a1xo3n8JWBcC2gzAGwsa0Aah6z2B3Xwa1P//8FaoA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"@types/bn.js": "^4.11.4",
|
"@types/bn.js": "^4.11.4",
|
||||||
|
@ -20245,16 +20245,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"web3-providers": {
|
"web3-providers": {
|
||||||
"version": "1.0.0-beta.51",
|
"version": "1.0.0-beta.52",
|
||||||
"resolved": "https://registry.npmjs.org/web3-providers/-/web3-providers-1.0.0-beta.51.tgz",
|
"resolved": "https://registry.npmjs.org/web3-providers/-/web3-providers-1.0.0-beta.52.tgz",
|
||||||
"integrity": "sha512-aWUEZIou4+zEZbLaBf1GQwbNoERq66mLEB6ubcPz1WEq1T5jfUPfwO4b4W2bEbEZVsoxS1ZJvSFkj1yAtD0X+g==",
|
"integrity": "sha512-eRmWOn6BeYfAt8UQmCRnqXo1++IjSiIz7+EY9WJ+m7J5ncq/gQN3idWQxT3QZzGRiAvZlO8ZUuF7ff0vuufakg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.3.1",
|
"@babel/runtime": "^7.3.1",
|
||||||
"@types/node": "^10.12.18",
|
"@types/node": "^10.12.18",
|
||||||
"eventemitter3": "3.1.0",
|
"eventemitter3": "3.1.0",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"url-parse": "1.4.4",
|
"url-parse": "1.4.4",
|
||||||
"websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
|
"websocket": "^1.0.28",
|
||||||
"xhr2-cookies": "1.1.0"
|
"xhr2-cookies": "1.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -20267,6 +20267,17 @@
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz",
|
||||||
"integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA=="
|
"integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA=="
|
||||||
|
},
|
||||||
|
"websocket": {
|
||||||
|
"version": "1.0.28",
|
||||||
|
"resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.28.tgz",
|
||||||
|
"integrity": "sha512-00y/20/80P7H4bCYkzuuvvfDvh+dgtXi5kzDf3UcZwN6boTYaKvsrtZ5lIYm1Gsg48siMErd9M4zjSYfYFHTrA==",
|
||||||
|
"requires": {
|
||||||
|
"debug": "^2.2.0",
|
||||||
|
"nan": "^2.11.0",
|
||||||
|
"typedarray-to-buffer": "^3.1.5",
|
||||||
|
"yaeti": "^0.0.6"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@oceanprotocol/art": "^2.2.0",
|
"@oceanprotocol/art": "^2.2.0",
|
||||||
"@oceanprotocol/squid": "^0.5.1",
|
"@oceanprotocol/squid": "^0.5.2",
|
||||||
"@oceanprotocol/typographies": "^0.1.0",
|
"@oceanprotocol/typographies": "^0.1.0",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
"filesize": "^4.1.2",
|
"filesize": "^4.1.2",
|
||||||
|
@ -25,9 +25,9 @@
|
||||||
"react-moment": "^0.8.4",
|
"react-moment": "^0.8.4",
|
||||||
"react-popper": "^1.3.3",
|
"react-popper": "^1.3.3",
|
||||||
"react-router-dom": "^5.0.0",
|
"react-router-dom": "^5.0.0",
|
||||||
"react-transition-group": "^2.7.1",
|
"react-transition-group": "^2.9.0",
|
||||||
"slugify": "^1.3.4",
|
"slugify": "^1.3.4",
|
||||||
"web3": "^1.0.0-beta.51"
|
"web3": "^1.0.0-beta.52"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/classnames": "^2.2.7",
|
"@types/classnames": "^2.2.7",
|
||||||
|
@ -35,16 +35,16 @@
|
||||||
"@types/is-url": "^1.2.28",
|
"@types/is-url": "^1.2.28",
|
||||||
"@types/jest": "^24.0.11",
|
"@types/jest": "^24.0.11",
|
||||||
"@types/query-string": "^6.3.0",
|
"@types/query-string": "^6.3.0",
|
||||||
"@types/react": "^16.8.10",
|
"@types/react": "^16.8.13",
|
||||||
"@types/react-datepicker": "^2.2.0",
|
"@types/react-datepicker": "^2.2.1",
|
||||||
"@types/react-dom": "^16.8.3",
|
"@types/react-dom": "^16.8.3",
|
||||||
"@types/react-helmet": "^5.0.8",
|
"@types/react-helmet": "^5.0.8",
|
||||||
"@types/react-router-dom": "^4.3.1",
|
"@types/react-router-dom": "^4.3.1",
|
||||||
"@types/react-transition-group": "^2.0.16",
|
"@types/react-transition-group": "^2.8.0",
|
||||||
"@types/web3": "^1.0.18",
|
"@types/web3": "^1.0.18",
|
||||||
"node-sass": "^4.11.0",
|
"node-sass": "^4.11.0",
|
||||||
"react-scripts": "^2.1.8",
|
"react-scripts": "^2.1.8",
|
||||||
"typescript": "^3.4.1"
|
"typescript": "^3.4.2"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -39,7 +39,7 @@ interface AppState {
|
||||||
}
|
}
|
||||||
network: string
|
network: string
|
||||||
web3: Web3
|
web3: Web3
|
||||||
ocean: {}
|
ocean: any
|
||||||
startLogin: () => void
|
startLogin: () => void
|
||||||
message: string
|
message: string
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ class App extends Component<{}, AppState> {
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
account: '',
|
account: '',
|
||||||
ocean: {},
|
ocean: {} as any,
|
||||||
startLogin: this.startLogin,
|
startLogin: this.startLogin,
|
||||||
requestFromFaucet: this.requestFromFaucet,
|
requestFromFaucet: this.requestFromFaucet,
|
||||||
message: 'Connecting to Ocean...'
|
message: 'Connecting to Ocean...'
|
||||||
|
@ -106,73 +106,77 @@ class App extends Component<{}, AppState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private startLoginProcess = async () => {
|
private startLoginProcess = async () => {
|
||||||
if (window.web3) {
|
try {
|
||||||
const web3 = new Web3(window.web3.currentProvider)
|
if (this.state.isWeb3 && window.ethereum) {
|
||||||
try {
|
await window.ethereum.enable()
|
||||||
const accounts = await web3.eth.getAccounts()
|
const accounts = await this.state.ocean.accounts.list()
|
||||||
if (accounts.length > 0) {
|
if (accounts.length > 0) {
|
||||||
|
const balance = await accounts[0].getBalance()
|
||||||
this.setState({
|
this.setState({
|
||||||
isLogged: true,
|
isLogged: true,
|
||||||
isWeb3: true,
|
balance,
|
||||||
account: accounts[0],
|
account: accounts[0].getId()
|
||||||
web3
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (accounts.length === 0 && window.ethereum) {
|
// not unlocked
|
||||||
await window.ethereum.enable()
|
|
||||||
const newAccounts = await web3.eth.getAccounts()
|
|
||||||
if (newAccounts.length > 0) {
|
|
||||||
this.setState({
|
|
||||||
isLogged: true,
|
|
||||||
isWeb3: true,
|
|
||||||
account: newAccounts[0],
|
|
||||||
web3
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// failed to unlock
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// no unlock procedure
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} else {
|
||||||
// something went wrong, show error?
|
// no metamask/mist, show installation guide!
|
||||||
}
|
}
|
||||||
} else {
|
} catch (e) {
|
||||||
// no metamask/mist, show installation guide!
|
Logger.log('error logging', e)
|
||||||
|
// error in logging process
|
||||||
|
// show error
|
||||||
|
// rerun bootstrap process?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bootstrap = async () => {
|
private bootstrap = async () => {
|
||||||
if (window.web3) {
|
try {
|
||||||
this.setState({ isWeb3: true })
|
if (window.web3) {
|
||||||
const web3 = new Web3(window.web3.currentProvider)
|
const web3 = new Web3(window.web3.currentProvider)
|
||||||
try {
|
const { ocean } = await provideOcean(web3)
|
||||||
const accounts = await web3.eth.getAccounts()
|
const accounts = await ocean.accounts.list()
|
||||||
|
const network = await ocean.keeper.getNetworkName()
|
||||||
|
const isNile = network === 'Nile'
|
||||||
if (accounts.length > 0) {
|
if (accounts.length > 0) {
|
||||||
|
const balance = await accounts[0].getBalance()
|
||||||
this.setState({
|
this.setState({
|
||||||
|
isWeb3: true,
|
||||||
isLogged: true,
|
isLogged: true,
|
||||||
account: accounts[0],
|
isNile,
|
||||||
web3
|
ocean,
|
||||||
|
web3,
|
||||||
|
balance,
|
||||||
|
network,
|
||||||
|
account: accounts[0].getId(),
|
||||||
|
isLoading: false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.setState({
|
||||||
|
isWeb3: true,
|
||||||
|
isNile,
|
||||||
|
ocean,
|
||||||
|
web3,
|
||||||
|
network,
|
||||||
|
isLoading: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} else {
|
||||||
Logger.log('web3 error', e)
|
const { ocean } = await provideOcean(this.state.web3)
|
||||||
|
const network = await ocean.keeper.getNetworkName()
|
||||||
|
const isNile = network === 'Nile'
|
||||||
|
this.setState({
|
||||||
|
isNile,
|
||||||
|
ocean,
|
||||||
|
network,
|
||||||
|
isLoading: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
try {
|
|
||||||
const { ocean } = await provideOcean()
|
|
||||||
this.setState({
|
|
||||||
isLoading: false,
|
|
||||||
ocean
|
|
||||||
})
|
|
||||||
const accounts = await ocean.accounts.list()
|
|
||||||
const balance = await accounts[0].getBalance()
|
|
||||||
const network = await ocean.keeper.getNetworkName()
|
|
||||||
const isNile = network === 'Nile'
|
|
||||||
this.setState({ balance, network, isNile })
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Logger.log('ocean/balance error', e)
|
// error in bootstrap process
|
||||||
|
// show error connecting to ocean
|
||||||
|
Logger.log('web3 error', e)
|
||||||
this.setState({
|
this.setState({
|
||||||
isLoading: false
|
isLoading: false
|
||||||
})
|
})
|
||||||
|
|
35
client/src/components/molecules/Pagination.module.scss
Normal file
35
client/src/components/molecules/Pagination.module.scss
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
@import '../../styles/variables';
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
display: flex;
|
||||||
|
margin-top: $spacer * 2;
|
||||||
|
margin-bottom: $spacer;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
> div {
|
||||||
|
&:first-child {
|
||||||
|
padding: $spacer / 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
padding: $spacer / 4;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: $font-weight-bold;
|
||||||
|
padding: $spacer / 4;
|
||||||
|
margin-left: $spacer / 4;
|
||||||
|
margin-right: $spacer / 4;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.current {
|
||||||
|
composes: number;
|
||||||
|
cursor: default;
|
||||||
|
pointer-events: none;
|
||||||
|
color: $brand-grey-light;
|
||||||
|
}
|
82
client/src/components/molecules/Pagination.tsx
Normal file
82
client/src/components/molecules/Pagination.tsx
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
import React, { PureComponent } from 'react'
|
||||||
|
import Button from '../atoms/Button'
|
||||||
|
import styles from './Pagination.module.scss'
|
||||||
|
|
||||||
|
const PageNumber = ({
|
||||||
|
i,
|
||||||
|
current,
|
||||||
|
setPage
|
||||||
|
}: {
|
||||||
|
i: number
|
||||||
|
current: boolean
|
||||||
|
setPage(page: number): void
|
||||||
|
}) => (
|
||||||
|
<Button
|
||||||
|
link
|
||||||
|
className={current ? styles.current : styles.number}
|
||||||
|
onClick={() => setPage(i + 1)}
|
||||||
|
>
|
||||||
|
{`${i + 1}`}
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
|
||||||
|
const PrevNext = ({
|
||||||
|
currentPage,
|
||||||
|
prevPage,
|
||||||
|
setPage
|
||||||
|
}: {
|
||||||
|
currentPage: number
|
||||||
|
prevPage?: number
|
||||||
|
setPage(page: number): void
|
||||||
|
}) => (
|
||||||
|
<Button
|
||||||
|
link
|
||||||
|
onClick={
|
||||||
|
prevPage ? () => setPage(prevPage) : () => setPage(currentPage + 1)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{prevPage ? '←' : '→'}
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
|
||||||
|
export default class Pagination extends PureComponent<{
|
||||||
|
currentPage: number
|
||||||
|
totalPages: number
|
||||||
|
prevPage?: number
|
||||||
|
setPage(page: number): void
|
||||||
|
}> {
|
||||||
|
public render() {
|
||||||
|
const { currentPage, totalPages, prevPage, setPage } = this.props
|
||||||
|
const isFirst = currentPage === 1
|
||||||
|
const isLast = currentPage === totalPages
|
||||||
|
|
||||||
|
return totalPages > 1 ? (
|
||||||
|
<div className={styles.pagination}>
|
||||||
|
<div>
|
||||||
|
{!isFirst && (
|
||||||
|
<PrevNext
|
||||||
|
prevPage={prevPage}
|
||||||
|
currentPage={currentPage}
|
||||||
|
setPage={setPage}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{Array.from({ length: totalPages }, (_, i) => (
|
||||||
|
<PageNumber
|
||||||
|
key={`pagination-number${i + 1}`}
|
||||||
|
i={i}
|
||||||
|
current={currentPage === i + 1}
|
||||||
|
setPage={setPage}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{!isLast && (
|
||||||
|
<PrevNext currentPage={currentPage} setPage={setPage} />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import { Logger } from '@oceanprotocol/squid'
|
||||||
import { User } from '../../context/User'
|
import { User } from '../../context/User'
|
||||||
import Spinner from '../atoms/Spinner'
|
import Spinner from '../atoms/Spinner'
|
||||||
import Asset from '../molecules/Asset'
|
import Asset from '../molecules/Asset'
|
||||||
|
import Web3message from './Web3message'
|
||||||
import styles from './AssetsUser.module.scss'
|
import styles from './AssetsUser.module.scss'
|
||||||
|
|
||||||
export default class AssetsUser extends PureComponent<
|
export default class AssetsUser extends PureComponent<
|
||||||
|
@ -47,49 +48,48 @@ export default class AssetsUser extends PureComponent<
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
return (
|
return this.context.isNile && this.context.account ? (
|
||||||
this.context.isNile &&
|
<div className={styles.assetsUser}>
|
||||||
this.context.account && (
|
{this.props.recent && (
|
||||||
<div className={styles.assetsUser}>
|
<h2 className={styles.subTitle}>
|
||||||
{this.props.recent && (
|
Your Latest Published Data Sets
|
||||||
<h2 className={styles.subTitle}>
|
</h2>
|
||||||
Your Latest Published Data Sets
|
)}
|
||||||
</h2>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{this.state.isLoading ? (
|
{this.state.isLoading ? (
|
||||||
<Spinner />
|
<Spinner />
|
||||||
) : this.state.results.length ? (
|
) : this.state.results.length ? (
|
||||||
<>
|
<>
|
||||||
{this.state.results
|
{this.state.results
|
||||||
.slice(
|
.slice(
|
||||||
0,
|
0,
|
||||||
this.props.recent
|
this.props.recent
|
||||||
? this.props.recent
|
? this.props.recent
|
||||||
: undefined
|
: undefined
|
||||||
)
|
)
|
||||||
.filter(asset => !!asset)
|
.filter(asset => !!asset)
|
||||||
.map((asset: any) => (
|
.map((asset: any) => (
|
||||||
<Asset
|
<Asset
|
||||||
list={this.props.list}
|
list={this.props.list}
|
||||||
key={asset.id}
|
key={asset.id}
|
||||||
asset={asset}
|
asset={asset}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{this.props.recent && (
|
{this.props.recent && (
|
||||||
<Link className={styles.link} to={'/history'}>
|
<Link className={styles.link} to={'/history'}>
|
||||||
All Data Sets
|
All Data Sets
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div className={styles.empty}>
|
<div className={styles.empty}>
|
||||||
<p>No Data Sets Yet.</p>
|
<p>No Data Sets Yet.</p>
|
||||||
<Link to="/publish">+ Publish A Data Set</Link>
|
<Link to="/publish">+ Publish A Data Set</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
) : (
|
||||||
|
<Web3message />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,12 @@ export default class Web3message extends PureComponent {
|
||||||
public noWeb3() {
|
public noWeb3() {
|
||||||
return (
|
return (
|
||||||
<div className={styles.message}>
|
<div className={styles.message}>
|
||||||
<AccountStatus className={styles.status} /> No Web3 Browser. For
|
<AccountStatus className={styles.status} /> Not a Web3 Browser.
|
||||||
publishing an asset you need to{' '}
|
For publishing or consuming an asset you need to{' '}
|
||||||
<a href="https://docs.oceanprotocol.com/tutorials/metamask-setup/">
|
<a
|
||||||
|
href="https://docs.oceanprotocol.com/tutorials/metamask-setup/"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
setup MetaMask
|
setup MetaMask
|
||||||
</a>{' '}
|
</a>{' '}
|
||||||
or use any other Web3-capable plugin or browser.
|
or use any other Web3-capable plugin or browser.
|
||||||
|
@ -40,7 +43,7 @@ export default class Web3message extends PureComponent {
|
||||||
return (
|
return (
|
||||||
<div className={styles.message}>
|
<div className={styles.message}>
|
||||||
<AccountStatus className={styles.status} /> Account locked. For
|
<AccountStatus className={styles.status} /> Account locked. For
|
||||||
publishing an asset you need to unlock your Web3 account.
|
publishing an asset you need to unlock your Web3 account.{' '}
|
||||||
<Button link onClick={states.startLogin}>
|
<Button link onClick={states.startLogin}>
|
||||||
Unlock account
|
Unlock account
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -1,66 +1,75 @@
|
||||||
//
|
//
|
||||||
// commons-server connection
|
// commons-server connection
|
||||||
//
|
//
|
||||||
export const serviceScheme = 'http'
|
export const serviceScheme = process.env.REACT_APP_SERVICE_SCHEME || 'http'
|
||||||
export const serviceHost = 'localhost'
|
export const serviceHost = process.env.REACT_APP_SERVICE_HOST || 'localhost'
|
||||||
export const servicePort = 4000
|
export const servicePort = process.env.REACT_APP_SERVICE_PORT || 4000
|
||||||
|
|
||||||
//
|
//
|
||||||
// OCEAN REMOTE CONNECTIONS
|
// OCEAN REMOTE CONNECTIONS
|
||||||
//
|
//
|
||||||
/*
|
export const nodeScheme = process.env.REACT_APP_NODE_SCHEME || 'https'
|
||||||
export const nodeScheme = 'https'
|
export const nodeHost = process.env.REACT_APP_NODE_HOST || 'nile.dev-ocean.com'
|
||||||
export const nodeHost = 'nile.dev-ocean.com'
|
export const nodePort = process.env.REACT_APP_NODE_PORT || 443
|
||||||
export const nodePort = 443
|
|
||||||
|
|
||||||
export const aquariusScheme = 'https'
|
export const aquariusScheme = process.env.REACT_APP_AQUARIUS_SCHEME || 'https'
|
||||||
export const aquariusHost = 'nginx-aquarius.dev-ocean.com'
|
export const aquariusHost =
|
||||||
export const aquariusPort = 443
|
process.env.REACT_APP_AQUARIUS_HOST || 'nginx-aquarius.dev-ocean.com'
|
||||||
|
export const aquariusPort = process.env.REACT_APP_AQUARIUS_PORT || 443
|
||||||
|
|
||||||
export const brizoScheme = 'https'
|
export const brizoScheme = process.env.REACT_APP_BRIZO_SCHEME || 'https'
|
||||||
export const brizoHost = 'nginx-brizo.dev-ocean.com'
|
export const brizoHost =
|
||||||
export const brizoPort = 443
|
process.env.REACT_APP_BRIZO_HOST || 'nginx-brizo.dev-ocean.com'
|
||||||
export const brizoAddress = '0x376817c638d2a04f475a73af37f7b51a2862d567'
|
export const brizoPort = process.env.REACT_APP_BRIZO_PORT || 443
|
||||||
|
export const brizoAddress =
|
||||||
|
process.env.REACT_APP_BRIZO_ADDRESS ||
|
||||||
|
'0x376817c638d2a04f475a73af37f7b51a2862d567'
|
||||||
|
|
||||||
export const parityScheme = 'https'
|
export const parityScheme = process.env.REACT_APP_PARITY_SCHEME || 'https'
|
||||||
export const parityHost = 'nile.dev-ocean.com'
|
export const parityHost =
|
||||||
export const parityPort = 443
|
process.env.REACT_APP_PARITY_HOST || 'nile.dev-ocean.com'
|
||||||
|
export const parityPort = process.env.REACT_APP_PARITY_PORT || 443
|
||||||
|
|
||||||
export const secretStoreScheme = 'https'
|
export const secretStoreScheme =
|
||||||
export const secretStoreHost = 'secret-store.dev-ocean.com'
|
process.env.REACT_APP_SECRET_STORE_SCHEME || 'https'
|
||||||
export const secretStorePort = 443
|
export const secretStoreHost =
|
||||||
|
process.env.REACT_APP_SECRET_STORE_HOST || 'secret-store.dev-ocean.com'
|
||||||
|
export const secretStorePort = process.env.REACT_APP_SECRET_STORE_PORT || 443
|
||||||
|
|
||||||
|
export const faucetScheme = process.env.REACT_APP_FAUCET_SCHEME || 'https'
|
||||||
|
export const faucetHost =
|
||||||
|
process.env.REACT_APP_FAUCET_HOST || 'faucet.nile.dev-ocean.com'
|
||||||
|
export const faucetPort = process.env.REACT_APP_FAUCET_PORT || 443
|
||||||
|
|
||||||
export const faucetScheme = 'https'
|
|
||||||
export const faucetHost = 'faucet.nile.dev-ocean.com'
|
|
||||||
export const faucetPort = 443
|
|
||||||
*/
|
|
||||||
//
|
//
|
||||||
// OCEAN LOCAL CONNECTIONS
|
// OCEAN LOCAL CONNECTIONS
|
||||||
// e.g. when running with barge
|
// e.g. when running with barge
|
||||||
//
|
//
|
||||||
export const nodeScheme = 'http'
|
// export const nodeScheme = 'http'
|
||||||
export const nodeHost = 'localhost'
|
// export const nodeHost = 'localhost'
|
||||||
export const nodePort = 8545
|
// export const nodePort = 8545
|
||||||
|
|
||||||
export const aquariusScheme = 'http'
|
// export const aquariusScheme = 'http'
|
||||||
export const aquariusHost = 'aquarius'
|
// export const aquariusHost = 'aquarius'
|
||||||
export const aquariusPort = 5000
|
// export const aquariusPort = 5000
|
||||||
|
|
||||||
export const brizoScheme = 'http'
|
// export const brizoScheme = 'http'
|
||||||
export const brizoHost = 'localhost'
|
// export const brizoHost = 'localhost'
|
||||||
export const brizoPort = 8030
|
// export const brizoPort = 8030
|
||||||
export const brizoAddress = '0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e'
|
|
||||||
|
|
||||||
export const parityScheme = 'http'
|
// export const parityScheme = 'http'
|
||||||
export const parityHost = 'localhost'
|
// export const parityHost = 'localhost'
|
||||||
export const parityPort = 8545
|
// export const parityPort = 8545
|
||||||
|
// export const threshold = 0
|
||||||
|
// export const password = 'node0'
|
||||||
|
// export const address = '0x00bd138abd70e2f00903268f3db08f2d25677c9e'
|
||||||
|
|
||||||
export const secretStoreScheme = 'http'
|
// export const secretStoreScheme = 'http'
|
||||||
export const secretStoreHost = 'localhost'
|
// export const secretStoreHost = 'localhost'
|
||||||
export const secretStorePort = 12001
|
// export const secretStorePort = 12001
|
||||||
|
|
||||||
export const faucetScheme = 'http'
|
// export const faucetScheme = 'http'
|
||||||
export const faucetHost = 'localhost'
|
// export const faucetHost = 'localhost'
|
||||||
export const faucetPort = 3001
|
// export const faucetPort = 3001
|
||||||
|
|
||||||
export const verbose = true
|
export const verbose = true
|
|
@ -1,18 +1,15 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"title": "Publish",
|
"title": "Publish",
|
||||||
"link": "/publish",
|
"link": "/publish"
|
||||||
"web3": true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "History",
|
"title": "History",
|
||||||
"link": "/history",
|
"link": "/history"
|
||||||
"web3": true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Faucet",
|
"title": "Faucet",
|
||||||
"link": "/faucet",
|
"link": "/faucet"
|
||||||
"web3": true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "About",
|
"title": "About",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Ocean } from '@oceanprotocol/squid'
|
import { Ocean } from '@oceanprotocol/squid'
|
||||||
|
import Web3 from 'web3'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
aquariusHost,
|
aquariusHost,
|
||||||
|
@ -20,7 +21,7 @@ import {
|
||||||
verbose
|
verbose
|
||||||
} from './config/config'
|
} from './config/config'
|
||||||
|
|
||||||
export async function provideOcean() {
|
export async function provideOcean(web3provider: Web3) {
|
||||||
const nodeUri = `${nodeScheme}://${nodeHost}:${nodePort}`
|
const nodeUri = `${nodeScheme}://${nodeHost}:${nodePort}`
|
||||||
const aquariusUri = `${aquariusScheme}://${aquariusHost}:${aquariusPort}`
|
const aquariusUri = `${aquariusScheme}://${aquariusHost}:${aquariusPort}`
|
||||||
const brizoUri = `${brizoScheme}://${brizoHost}:${brizoPort}`
|
const brizoUri = `${brizoScheme}://${brizoHost}:${brizoPort}`
|
||||||
|
@ -28,6 +29,7 @@ export async function provideOcean() {
|
||||||
const secretStoreUri = `${secretStoreScheme}://${secretStoreHost}:${secretStorePort}`
|
const secretStoreUri = `${secretStoreScheme}://${secretStoreHost}:${secretStorePort}`
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
web3provider,
|
||||||
nodeUri,
|
nodeUri,
|
||||||
aquariusUri,
|
aquariusUri,
|
||||||
brizoUri,
|
brizoUri,
|
||||||
|
@ -37,7 +39,7 @@ export async function provideOcean() {
|
||||||
verbose
|
verbose
|
||||||
}
|
}
|
||||||
|
|
||||||
const ocean = await Ocean.getInstance(config)
|
const ocean: Ocean = await Ocean.getInstance(config)
|
||||||
|
|
||||||
return { ocean }
|
return { ocean }
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,35 @@ import Route from '../components/templates/Route'
|
||||||
|
|
||||||
class About extends Component {
|
class About extends Component {
|
||||||
public render() {
|
public render() {
|
||||||
return <Route title="About">Hello About</Route>
|
return (
|
||||||
|
<Route
|
||||||
|
title="About"
|
||||||
|
description="A marketplace to find and publish open data sets in the Ocean Network."
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
Commons is built on top of the Ocean{' '}
|
||||||
|
<a href="https://docs.oceanprotocol.com/concepts/testnets/#the-nile-testnet">
|
||||||
|
Nile test network
|
||||||
|
</a>{' '}
|
||||||
|
and is targeted at enthusiastic data scientists with some
|
||||||
|
crypto experience. It can be used with any Web3-capable
|
||||||
|
browser, like Firefox with MetaMask installed.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="https://blog.oceanprotocol.com/the-commons-marketplace-c57a44288314">
|
||||||
|
Read the blog post →
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://github.com/oceanprotocol/commons">
|
||||||
|
Check out oceanprotocol/commons on GitHub →
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</Route>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,11 @@ export default class AssetDetails extends PureComponent<AssetDetailsProps> {
|
||||||
{base.copyrightHolder}
|
{base.copyrightHolder}
|
||||||
</h2>
|
</h2>
|
||||||
<div className={styles.metaPrimaryData}>
|
<div className={styles.metaPrimaryData}>
|
||||||
<span title="Date created">
|
<span
|
||||||
|
title={`Date created, published on ${
|
||||||
|
base.datePublished
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<Moment
|
<Moment
|
||||||
date={base.dateCreated}
|
date={base.dateCreated}
|
||||||
format="L"
|
format="L"
|
||||||
|
@ -41,7 +45,7 @@ export default class AssetDetails extends PureComponent<AssetDetailsProps> {
|
||||||
|
|
||||||
{base.categories && (
|
{base.categories && (
|
||||||
// TODO: Make this link to search for respective category
|
// TODO: Make this link to search for respective category
|
||||||
<Link to={`/search?q=${base.categories[0]}`}>
|
<Link to={`/search?text=${base.categories[0]}`}>
|
||||||
{base.categories[0]}
|
{base.categories[0]}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React, { PureComponent } from 'react'
|
import React, { PureComponent } from 'react'
|
||||||
import { Logger } from '@oceanprotocol/squid'
|
import { Logger } from '@oceanprotocol/squid'
|
||||||
import filesize from 'filesize'
|
import filesize from 'filesize'
|
||||||
import { User } from '../../context/User'
|
|
||||||
import Button from '../../components/atoms/Button'
|
import Button from '../../components/atoms/Button'
|
||||||
import Spinner from '../../components/atoms/Spinner'
|
import Spinner from '../../components/atoms/Spinner'
|
||||||
|
import { User } from '../../context/User'
|
||||||
import styles from './AssetFile.module.scss'
|
import styles from './AssetFile.module.scss'
|
||||||
import ReactGA from 'react-ga'
|
import ReactGA from 'react-ga'
|
||||||
|
|
||||||
|
@ -92,13 +92,31 @@ export default class AssetFile extends PureComponent<
|
||||||
{this.state.isLoading ? (
|
{this.state.isLoading ? (
|
||||||
<Spinner message={this.state.message} />
|
<Spinner message={this.state.message} />
|
||||||
) : (
|
) : (
|
||||||
<Button
|
<User.Consumer>
|
||||||
primary
|
{states =>
|
||||||
className={styles.buttonMain}
|
states.isLogged ? (
|
||||||
onClick={() => this.purchaseAsset(ddo, file.index)}
|
<Button
|
||||||
>
|
primary
|
||||||
Get file
|
className={styles.buttonMain}
|
||||||
</Button>
|
onClick={() =>
|
||||||
|
this.purchaseAsset(ddo, file.index)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Get file
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
states.isWeb3 && (
|
||||||
|
<Button
|
||||||
|
primary
|
||||||
|
className={styles.buttonMain}
|
||||||
|
onClick={states.startLogin}
|
||||||
|
>
|
||||||
|
Get file
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</User.Consumer>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{this.state.error !== '' && (
|
{this.state.error !== '' && (
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import React, { PureComponent } from 'react'
|
import React, { PureComponent } from 'react'
|
||||||
import AssetFile from './AssetFile'
|
import AssetFile from './AssetFile'
|
||||||
|
import { User } from '../../context/User'
|
||||||
|
import Web3message from '../../components/organisms/Web3message'
|
||||||
import styles from './AssetFilesDetails.module.scss'
|
import styles from './AssetFilesDetails.module.scss'
|
||||||
|
|
||||||
export default class AssetFilesDetails extends PureComponent<{
|
export default class AssetFilesDetails extends PureComponent<{
|
||||||
|
@ -16,6 +18,11 @@ export default class AssetFilesDetails extends PureComponent<{
|
||||||
<AssetFile key={file.index} ddo={ddo} file={file} />
|
<AssetFile key={file.index} ddo={ddo} file={file} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
<User.Consumer>
|
||||||
|
{states =>
|
||||||
|
(!states.isNile || !states.isLogged) && <Web3message />
|
||||||
|
}
|
||||||
|
</User.Consumer>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div>No files attached.</div>
|
<div>No files attached.</div>
|
||||||
|
|
|
@ -5,16 +5,16 @@ import { User } from '../../context/User'
|
||||||
import AssetDetails from './AssetDetails'
|
import AssetDetails from './AssetDetails'
|
||||||
import stylesApp from '../../App.module.scss'
|
import stylesApp from '../../App.module.scss'
|
||||||
|
|
||||||
|
interface DetailsProps {
|
||||||
|
location: Location
|
||||||
|
match: any
|
||||||
|
}
|
||||||
|
|
||||||
interface DetailsState {
|
interface DetailsState {
|
||||||
ddo: any
|
ddo: any
|
||||||
metadata: { base: { name: string } }
|
metadata: { base: { name: string } }
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DetailsProps {
|
|
||||||
location: any
|
|
||||||
match: any
|
|
||||||
}
|
|
||||||
|
|
||||||
export default class Details extends Component<DetailsProps, DetailsState> {
|
export default class Details extends Component<DetailsProps, DetailsState> {
|
||||||
public state = { ddo: {}, metadata: { base: { name: '' } } }
|
public state = { ddo: {}, metadata: { base: { name: '' } } }
|
||||||
|
|
||||||
|
|
|
@ -10,15 +10,13 @@ interface FaucetState {
|
||||||
isLoading: boolean
|
isLoading: boolean
|
||||||
success?: string
|
success?: string
|
||||||
error?: string
|
error?: string
|
||||||
eth?: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Faucet extends PureComponent<{}, FaucetState> {
|
export default class Faucet extends PureComponent<{}, FaucetState> {
|
||||||
public state = {
|
public state = {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
success: undefined,
|
success: undefined,
|
||||||
error: undefined,
|
error: undefined
|
||||||
eth: 'xx'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private getTokens = async (requestFromFaucet: () => any) => {
|
private getTokens = async (requestFromFaucet: () => any) => {
|
||||||
|
@ -47,14 +45,20 @@ export default class Faucet extends PureComponent<{}, FaucetState> {
|
||||||
|
|
||||||
private RequestMarkup = () => (
|
private RequestMarkup = () => (
|
||||||
<User.Consumer>
|
<User.Consumer>
|
||||||
{states => (
|
{states =>
|
||||||
<Button
|
states.isLogged ? (
|
||||||
primary
|
<Button
|
||||||
onClick={() => this.getTokens(states.requestFromFaucet)}
|
primary
|
||||||
>
|
onClick={() => this.getTokens(states.requestFromFaucet)}
|
||||||
Request Ether
|
>
|
||||||
</Button>
|
Request Ether
|
||||||
)}
|
</Button>
|
||||||
|
) : states.isWeb3 ? (
|
||||||
|
<Web3message />
|
||||||
|
) : (
|
||||||
|
<Web3message />
|
||||||
|
)
|
||||||
|
}
|
||||||
</User.Consumer>
|
</User.Consumer>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -93,7 +97,9 @@ export default class Faucet extends PureComponent<{}, FaucetState> {
|
||||||
title="Faucet"
|
title="Faucet"
|
||||||
description="Shower yourself with some Ether for the Ocean POA network."
|
description="Shower yourself with some Ether for the Ocean POA network."
|
||||||
>
|
>
|
||||||
<Web3message />
|
<User.Consumer>
|
||||||
|
{states => !states.isNile && <Web3message />}
|
||||||
|
</User.Consumer>
|
||||||
|
|
||||||
<this.ActionMarkup />
|
<this.ActionMarkup />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
|
@ -8,14 +8,14 @@ import styles from './Home.module.scss'
|
||||||
|
|
||||||
import meta from '../data/meta.json'
|
import meta from '../data/meta.json'
|
||||||
|
|
||||||
interface HomeState {
|
|
||||||
search?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HomeProps {
|
interface HomeProps {
|
||||||
history: any
|
history: any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface HomeState {
|
||||||
|
search?: string
|
||||||
|
}
|
||||||
|
|
||||||
class Home extends Component<HomeProps, HomeState> {
|
class Home extends Component<HomeProps, HomeState> {
|
||||||
public state = { search: '' }
|
public state = { search: '' }
|
||||||
|
|
||||||
|
|
|
@ -158,9 +158,21 @@ export default class Step extends PureComponent<StepProps, {}> {
|
||||||
{states =>
|
{states =>
|
||||||
states.isLogged ? (
|
states.isLogged ? (
|
||||||
<Button primary>Register asset</Button>
|
<Button primary>Register asset</Button>
|
||||||
) : (
|
) : states.isWeb3 ? (
|
||||||
<Button onClick={states.startLogin}>
|
<Button onClick={states.startLogin}>
|
||||||
Register asset (login first)
|
Register asset (unlock Metamask)
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
<Button
|
||||||
|
onClick={(e: Event) => {
|
||||||
|
e.preventDefault()
|
||||||
|
window.open(
|
||||||
|
'https://docs.oceanprotocol.com/tutorials/metamask-setup/',
|
||||||
|
'_blank'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Register asset (install Metamask)
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,67 +1,107 @@
|
||||||
import React, { Component } from 'react'
|
import React, { PureComponent } from 'react'
|
||||||
import queryString from 'query-string'
|
import queryString from 'query-string'
|
||||||
import { Logger } from '@oceanprotocol/squid'
|
import { Logger } from '@oceanprotocol/squid'
|
||||||
import Spinner from '../components/atoms/Spinner'
|
import Spinner from '../components/atoms/Spinner'
|
||||||
import Route from '../components/templates/Route'
|
import Route from '../components/templates/Route'
|
||||||
import { User } from '../context/User'
|
import { User } from '../context/User'
|
||||||
import Asset from '../components/molecules/Asset'
|
import Asset from '../components/molecules/Asset'
|
||||||
|
import Pagination from '../components/molecules/Pagination'
|
||||||
import styles from './Search.module.scss'
|
import styles from './Search.module.scss'
|
||||||
|
|
||||||
|
interface SearchProps {
|
||||||
|
location: Location
|
||||||
|
history: History
|
||||||
|
}
|
||||||
|
|
||||||
interface SearchState {
|
interface SearchState {
|
||||||
results: any[]
|
results: any[]
|
||||||
|
totalResults: number
|
||||||
|
offset: number
|
||||||
|
totalPages: number
|
||||||
|
currentPage: number
|
||||||
isLoading: boolean
|
isLoading: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SearchProps {
|
export default class Search extends PureComponent<SearchProps, SearchState> {
|
||||||
location: any
|
public state = {
|
||||||
history: any
|
results: [],
|
||||||
}
|
totalResults: 0,
|
||||||
|
offset: 25,
|
||||||
|
totalPages: 1,
|
||||||
|
currentPage: 1,
|
||||||
|
isLoading: true
|
||||||
|
}
|
||||||
|
|
||||||
export default class Search extends Component<SearchProps, SearchState> {
|
private readonly searchTerm = queryString.parse(this.props.location.search)
|
||||||
public state = { results: [], isLoading: true }
|
.text
|
||||||
|
|
||||||
public async componentDidMount() {
|
public componentDidMount() {
|
||||||
const searchParams = queryString.parse(this.props.location.search)
|
this.searchAssets()
|
||||||
|
}
|
||||||
|
|
||||||
const queryRequest = {
|
private searchAssets = async () => {
|
||||||
offset: 500,
|
const searchQuery = {
|
||||||
page: 1,
|
offset: this.state.offset,
|
||||||
|
page: this.state.currentPage,
|
||||||
query: {
|
query: {
|
||||||
text: searchParams.text
|
text: [this.searchTerm],
|
||||||
|
price: [-1, 1]
|
||||||
},
|
},
|
||||||
sort: {
|
sort: {
|
||||||
text: 1
|
datePublished: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const assets = await this.context.ocean.assets.search(searchParams.text)
|
const search = await this.context.ocean.aquarius.queryMetadata(
|
||||||
this.setState({ results: assets, isLoading: false })
|
searchQuery
|
||||||
Logger.log(`Loaded ${assets.length} assets`)
|
)
|
||||||
|
this.setState({
|
||||||
|
results: search.results,
|
||||||
|
totalResults: search.totalResults,
|
||||||
|
totalPages: search.totalPages,
|
||||||
|
currentPage: search.page + 1, // first page is always 0 in response
|
||||||
|
isLoading: false
|
||||||
|
})
|
||||||
|
Logger.log(`Loaded ${this.state.results.length} assets`)
|
||||||
|
}
|
||||||
|
|
||||||
|
private setPage = (page: number) => {
|
||||||
|
this.setState({ currentPage: page })
|
||||||
|
this.searchAssets()
|
||||||
}
|
}
|
||||||
|
|
||||||
public renderResults = () =>
|
public renderResults = () =>
|
||||||
this.state.isLoading ? (
|
this.state.isLoading ? (
|
||||||
<Spinner message="Searching..." />
|
<Spinner message="Searching..." />
|
||||||
) : this.state.results.length ? (
|
) : this.state.results && this.state.results.length ? (
|
||||||
<div className={styles.results}>
|
<div className={styles.results}>
|
||||||
{this.state.results.map((asset: any) => (
|
{this.state.results.map((asset: any) => (
|
||||||
<Asset key={asset.id} asset={asset} />
|
<Asset key={asset.id} asset={asset} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div>No data sets yet</div>
|
<div>No data sets found.</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
const searchTerm = queryString.parse(this.props.location.search).text
|
const { totalResults, totalPages, currentPage } = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Route
|
<Route
|
||||||
title={`Search Results for <span>${searchTerm}</span>`}
|
title={`${totalResults > 0 && totalResults} Results for <span>${
|
||||||
|
this.searchTerm
|
||||||
|
}</span>`}
|
||||||
titleReverse
|
titleReverse
|
||||||
wide
|
wide
|
||||||
>
|
>
|
||||||
{this.renderResults()}
|
{this.renderResults()}
|
||||||
|
|
||||||
|
<Pagination
|
||||||
|
totalPages={totalPages}
|
||||||
|
currentPage={currentPage}
|
||||||
|
prevPage={currentPage - 1}
|
||||||
|
setPage={this.setPage}
|
||||||
|
/>
|
||||||
</Route>
|
</Route>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,19 +7,19 @@
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "keeper-contracts",
|
"name": "keeper-contracts",
|
||||||
"version": "~0.6.12"
|
"version": "~0.9.1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brizo",
|
"name": "brizo",
|
||||||
"version": "~0.2.0"
|
"version": "~0.3.3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aquarius",
|
"name": "aquarius",
|
||||||
"version": "~0.1.8"
|
"version": "~0.2.1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "squid-js",
|
"name": "squid-js",
|
||||||
"version": "~0.3.0"
|
"version": "~0.5.2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
827
server/package-lock.json
generated
827
server/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -34,16 +34,16 @@
|
||||||
"@types/jasmine": "^3.3.12",
|
"@types/jasmine": "^3.3.12",
|
||||||
"@types/jest": "^24.0.11",
|
"@types/jest": "^24.0.11",
|
||||||
"@types/morgan": "^1.7.35",
|
"@types/morgan": "^1.7.35",
|
||||||
"@types/node": "^11.12.2",
|
"@types/node": "^11.13.0",
|
||||||
"@types/request": "^2.48.1",
|
"@types/request": "^2.48.1",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"jest": "^24.5.0",
|
"jest": "^24.7.1",
|
||||||
"mocha": "^6.0.2",
|
"mocha": "^6.1.1",
|
||||||
"nodemon": "^1.18.10",
|
"nodemon": "^1.18.10",
|
||||||
"supertest": "^4.0.2",
|
"supertest": "^4.0.2",
|
||||||
"ts-jest": "^24.0.1",
|
"ts-jest": "^24.0.2",
|
||||||
"ts-node": "^8.0.3",
|
"ts-node": "^8.0.3",
|
||||||
"typescript": "^3.4.1"
|
"typescript": "^3.4.2"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -22,7 +22,10 @@ export class UrlCheckRouter {
|
||||||
headers: { Range: 'bytes=0-' }
|
headers: { Range: 'bytes=0-' }
|
||||||
},
|
},
|
||||||
(error, response) => {
|
(error, response) => {
|
||||||
if (response && response.statusCode.toString().startsWith('2')) {
|
if (
|
||||||
|
response &&
|
||||||
|
response.statusCode.toString().startsWith('2')
|
||||||
|
) {
|
||||||
const result: any = {}
|
const result: any = {}
|
||||||
result.found = true
|
result.found = true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user