diff --git a/.env.example b/.env.example index 9c9a62cb3..5dbecc20e 100644 --- a/.env.example +++ b/.env.example @@ -2,5 +2,4 @@ GATSBY_NETWORK="rinkeby" #GATSBY_INFURA_PROJECT_ID="xxx" -#GATSBY_METADATA_CACHE_URI="xxx" #GATSBY_MARKET_FEE_ADDRESS="0xxx" diff --git a/README.md b/README.md index 8741cc4e4..a73bc9f1f 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,7 @@ - [🛳 Production](#-production) - [⬆️ Deployment](#️-deployment) - [Manual Deployment](#manual-deployment) -- [🏗 Ocean Protocol Infrastructure](#-ocean-protocol-infrastructure) -- [🏛 License](#-license) +- [� License](#-license) ## 🏄 Get Started @@ -154,34 +153,6 @@ vercel vercel alias ``` -## 🏗 Ocean Protocol Infrastructure - -The following Metadata Store & Provider instances specifically for marketplace are deployed in Ocean Protocol's AWS K8: - -**Rinkeby (Staging)** - -- K8 namespace: `xxx` -- `[aquarius.rinkeby.v3.dev-ocean.com](https://aquarius.rinkeby.v3.dev-ocean.com)` -- `[provider.rinkeby.v3.dev-ocean.com](https://provider.rinkeby.v3.dev-ocean.com)` - -Edit command with `kubectl`, e.g.: - -```bash -kubectl edit deployment -n xxx aquarius -``` - -**Main (Production)** - -- K8 namespace: `xxx` -- `xxx` -- `xxx` - -Edit command with `kubectl`, e.g.: - -```bash -kubectl edit deployment -n xxx aquarius -``` - ## 🏛 License ```text diff --git a/app.config.js b/app.config.js index f2340a49f..de7b87f30 100644 --- a/app.config.js +++ b/app.config.js @@ -1,7 +1,10 @@ module.exports = { + // The default network and its associated config the app should connect to + // on start. App will automatically switch network configs when user switches + // networks in their wallet. + // Ocean Protocol contracts are deployed for: 'mainnet', 'rinkeby', 'development' network: process.env.GATSBY_NETWORK || 'rinkeby', infuraProjectId: process.env.GATSBY_INFURA_PROJECT_ID || 'xxx', - metadataCacheUri: process.env.GATSBY_METADATA_CACHE_URI, // The ETH address the marketplace fee will be sent to. marketFeeAddress: process.env.GATSBY_MARKET_FEE_ADDRESS || diff --git a/content/pages/publish.json b/content/pages/publish.json index 41d85dc5c..973c0e94e 100644 --- a/content/pages/publish.json +++ b/content/pages/publish.json @@ -38,7 +38,7 @@ "label": "Access Type", "help": "Choose how you want your files to be accessible for the specified price.", "type": "select", - "options": ["Download", "Compute"], + "options": ["Download"], "required": true }, { diff --git a/package-lock.json b/package-lock.json index 139b09ddb..2f201a6d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3850,9 +3850,9 @@ "integrity": "sha512-p0oOHXr60hXZuLNsQ/PsOQtCfia79thm7MjPxTrnnBvD+csJoHzARYMB0IFj/KTw6U5vLXODgjJAn8x6QksLwg==" }, "@oceanprotocol/lib": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.7.5.tgz", - "integrity": "sha512-frqMwfsqhyQ7+wfY6ak7+vmrbMVXDd7DuYdXHL2gyzom9uqcLLWhmWFNWo/1hOh750GhZ5d8BT4iX0O9P1JPTw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.8.0.tgz", + "integrity": "sha512-FZALOw3LMAPo2US+YjJv5Fkz7IDS9m89PZzF7uKZKYT8V3xB/m0PV91vV1pEPC0eVWk3Sl1IXyT0L3ASFEUjvg==", "requires": { "@ethereum-navigator/navigator": "^0.5.0", "@oceanprotocol/contracts": "^0.5.7", @@ -3876,6 +3876,25 @@ "decimal.js": "^10.2.1", "web3": "^1.3.0", "web3modal": "^1.9.1" + }, + "dependencies": { + "@oceanprotocol/lib": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.7.5.tgz", + "integrity": "sha512-frqMwfsqhyQ7+wfY6ak7+vmrbMVXDd7DuYdXHL2gyzom9uqcLLWhmWFNWo/1hOh750GhZ5d8BT4iX0O9P1JPTw==", + "requires": { + "@ethereum-navigator/navigator": "^0.5.0", + "@oceanprotocol/contracts": "^0.5.7", + "decimal.js": "^10.2.0", + "fs": "0.0.1-security", + "lzma": "^2.3.2", + "node-fetch": "^2.6.1", + "save-file": "^2.3.1", + "uuid": "^8.3.0", + "web3": "^1.3.0", + "web3-eth-contract": "^1.3.0" + } + } } }, "@oceanprotocol/typographies": { diff --git a/package.json b/package.json index 57d9dd1b0..9aa20343e 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@coingecko/cryptoformat": "^0.4.2", "@loadable/component": "5.13.1", "@oceanprotocol/art": "^3.0.0", - "@oceanprotocol/lib": "^0.7.5", + "@oceanprotocol/lib": "^0.8.0", "@oceanprotocol/react": "^0.3.7", "@oceanprotocol/typographies": "^0.1.0", "@sindresorhus/slugify": "^1.0.0", diff --git a/src/components/atoms/EtherscanLink.tsx b/src/components/atoms/EtherscanLink.tsx index 01bb9c334..5634e1cfc 100644 --- a/src/components/atoms/EtherscanLink.tsx +++ b/src/components/atoms/EtherscanLink.tsx @@ -1,19 +1,21 @@ import React, { ReactElement, ReactNode } from 'react' +import { getNetworkName } from '../../utils/wallet' import { ReactComponent as External } from '../../images/external.svg' import styles from './EtherscanLink.module.css' export default function EtherscanLink({ - network, + networkId, path, children }: { - network?: 'rinkeby' | 'kovan' | 'ropsten' + networkId: number path: string children: ReactNode }): ReactElement { - const url = network - ? `https://${network}.etherscan.io` - : `https://etherscan.io` + const url = + networkId === 1 + ? `https://etherscan.io` + : `https://${getNetworkName(networkId).toLowerCase()}.etherscan.io` return ( { // eslint-disable-next-line const Account = React.forwardRef((props, ref: any) => { const { accountId, status, connect, networkId } = useOcean() - const hasSuccess = status === 1 && isCorrectNetwork(networkId) + const hasSuccess = status === 1 && networkId === 1 async function handleActivation(e: FormEvent) { // prevent accidentially submitting a form the button might be in diff --git a/src/components/molecules/Wallet/Details.module.css b/src/components/molecules/Wallet/Details.module.css index bd413da08..a80d30bfe 100644 --- a/src/components/molecules/Wallet/Details.module.css +++ b/src/components/molecules/Wallet/Details.module.css @@ -1,5 +1,6 @@ .details { padding: calc(var(--spacer) / 4); + min-width: 17rem; } .details > section[class*='feedback'] { diff --git a/src/components/molecules/Wallet/Details.tsx b/src/components/molecules/Wallet/Details.tsx index 3c42d01c2..a84a9dca9 100644 --- a/src/components/molecules/Wallet/Details.tsx +++ b/src/components/molecules/Wallet/Details.tsx @@ -3,14 +3,13 @@ import Button from '../../atoms/Button' import styles from './Details.module.css' import { useOcean } from '@oceanprotocol/react' import Web3Feedback from './Feedback' -import { getNetworkName } from '../../../utils/wallet' import { getInjectedProviderName } from 'web3modal' import Conversion from '../../atoms/Price/Conversion' import { formatCurrency } from '@coingecko/cryptoformat' import { useUserPreferences } from '../../../providers/UserPreferences' export default function Details(): ReactElement { - const { balance, connect, logout, networkId } = useOcean() + const { balance, connect, logout } = useOcean() const { locale } = useUserPreferences() return ( @@ -27,11 +26,7 @@ export default function Details(): ReactElement { ))}
  • - - {getInjectedProviderName()} -
    - {getNetworkName(networkId)} -
    + {getInjectedProviderName()}