From de1bc11efe3383ebe42f3b391d6b9fe789b6e702 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 11 Dec 2020 18:30:51 +0100 Subject: [PATCH] add ropsten to network detection utilities (#294) * add ropsten to network detection utilities * mention ropsten in publish warning * bump @oceanprotocol/lib --- content/pages/publish.json | 2 +- package-lock.json | 26 +++++++++++++------------- package.json | 2 +- src/utils/wallet.ts | 4 ++++ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/content/pages/publish.json b/content/pages/publish.json index 90ba7ebc1..27ef135eb 100644 --- a/content/pages/publish.json +++ b/content/pages/publish.json @@ -1,7 +1,7 @@ { "title": "Publish", "description": "Highlight the important features of your data set to make it more discoverable and catch the interest of data consumers.", - "warning": "Given the beta status, publishing on Rinkeby first is strongly recommended. Please familiarize yourself with [the market](https://oceanprotocol.com/technology/marketplaces), [the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13), and the [Terms of Use](/terms).", + "warning": "Given the beta status, publishing on Ropsten or Rinkeby first is strongly recommended. Please familiarize yourself with [the market](https://oceanprotocol.com/technology/marketplaces), [the risks](https://blog.oceanprotocol.com/on-staking-on-data-in-ocean-market-3d8e09eb0a13), and the [Terms of Use](/terms).", "form": { "title": "Publish", "data": [ diff --git a/package-lock.json b/package-lock.json index 717a20dd8..9e0942fcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3648,17 +3648,17 @@ "integrity": "sha512-j4PEZSVtKSqxDYMVh/hd5vk088Bg6a6QkrUMTXN9Q6OIFAMfHM235f1AxaakNrEyK0FKMD908KuJEdfFLRn9Hw==" }, "@oceanprotocol/contracts": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.5.7.tgz", - "integrity": "sha512-p0oOHXr60hXZuLNsQ/PsOQtCfia79thm7MjPxTrnnBvD+csJoHzARYMB0IFj/KTw6U5vLXODgjJAn8x6QksLwg==" + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.5.8.tgz", + "integrity": "sha512-yoGk4kpTy9E06OWusd3Fa/W3yjmFNKND/I92YtmrMnX0i3gm/kom/Z7XrRiAHVC8JVnM9Q79FojGLd2eOL4opg==" }, "@oceanprotocol/lib": { - "version": "0.9.18", - "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.9.18.tgz", - "integrity": "sha512-RsP4CjAnauI2kDH0923LOO3NhdKNB1y8WwpAviVwIwz9sYqsIIcac6MKXIm5oDeLNhmCIhJXbwvQehf17wRL5Q==", + "version": "0.9.19", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.9.19.tgz", + "integrity": "sha512-HH+82dSOYO3hC4KkKdjpUMxagrAiO80gyHJ1PSHXi1w7bOgF/gOZkKfcqmnYT9Uu/lzFbarPBZg6crtTsYpatQ==", "requires": { "@ethereum-navigator/navigator": "^0.5.0", - "@oceanprotocol/contracts": "^0.5.7", + "@oceanprotocol/contracts": "^0.5.8", "decimal.js": "^10.2.0", "fs": "0.0.1-security", "lzma": "^2.3.2", @@ -34577,9 +34577,9 @@ }, "dependencies": { "@types/node": { - "version": "12.19.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.5.tgz", - "integrity": "sha512-Wgdl27uw/jUYUFyajUGKSjDNGxmJrZi9sjeG6UJImgUtKbJoO9aldx+1XODN1EpNDX9DirvbvHHmTsNlb8GwMA==" + "version": "12.19.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.8.tgz", + "integrity": "sha512-D4k2kNi0URNBxIRCb1khTnkWNHv8KSL1owPmS/K5e5t8B2GzMReY7AsJIY1BnP5KdlgC4rj9jk2IkDMasIE7xg==" } } }, @@ -34777,9 +34777,9 @@ }, "dependencies": { "@types/node": { - "version": "12.19.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.5.tgz", - "integrity": "sha512-Wgdl27uw/jUYUFyajUGKSjDNGxmJrZi9sjeG6UJImgUtKbJoO9aldx+1XODN1EpNDX9DirvbvHHmTsNlb8GwMA==" + "version": "12.19.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.8.tgz", + "integrity": "sha512-D4k2kNi0URNBxIRCb1khTnkWNHv8KSL1owPmS/K5e5t8B2GzMReY7AsJIY1BnP5KdlgC4rj9jk2IkDMasIE7xg==" } } }, diff --git a/package.json b/package.json index aa78e7acd..5283fe6cf 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@coingecko/cryptoformat": "^0.4.2", "@loadable/component": "^5.14.1", "@oceanprotocol/art": "^3.0.0", - "@oceanprotocol/lib": "^0.9.18", + "@oceanprotocol/lib": "^0.9.19", "@oceanprotocol/react": "^0.4.0", "@oceanprotocol/typographies": "^0.1.0", "@sindresorhus/slugify": "^1.0.0", diff --git a/src/utils/wallet.ts b/src/utils/wallet.ts index fc8a2bff7..b2bc8d314 100644 --- a/src/utils/wallet.ts +++ b/src/utils/wallet.ts @@ -37,6 +37,8 @@ export function getNetworkId(network: string): number { switch (network) { case 'mainnet': return 1 + case 'ropsten': + return 3 case 'rinkeby': return 4 case 'kovan': @@ -64,6 +66,8 @@ export function getNetworkName(networkId: number): string { switch (networkId) { case 1: return 'Main' + case 3: + return 'Ropsten' case 4: return 'Rinkeby' case 42: