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

package updates (#1355)

* package updates, ocean.js v1.0.0-next.37

* activate portis components again

* console error fix
This commit is contained in:
Matthias Kretschmann 2022-04-25 14:50:20 +02:00 committed by GitHub
parent e77dcaf60a
commit d6bc5a2b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 348 additions and 345 deletions

639
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,14 +21,13 @@
"@coingecko/cryptoformat": "^0.4.4", "@coingecko/cryptoformat": "^0.4.4",
"@loadable/component": "^5.15.2", "@loadable/component": "^5.15.2",
"@oceanprotocol/art": "^3.2.0", "@oceanprotocol/art": "^3.2.0",
"@oceanprotocol/lib": "^1.0.0-next.35", "@oceanprotocol/lib": "^1.0.0-next.37",
"@oceanprotocol/typographies": "^0.1.0", "@oceanprotocol/typographies": "^0.1.0",
"@portis/web3": "^4.0.7", "@portis/web3": "^4.0.7",
"@tippyjs/react": "^4.2.6", "@tippyjs/react": "^4.2.6",
"@urql/exchange-refocus": "^0.2.5", "@urql/exchange-refocus": "^0.2.5",
"@walletconnect/web3-provider": "^1.7.6", "@walletconnect/web3-provider": "^1.7.7",
"axios": "^0.26.1", "axios": "^0.26.1",
"bignumber.js": "^9.0.2",
"chart.js": "^3.7.1", "chart.js": "^3.7.1",
"classnames": "^2.3.1", "classnames": "^2.3.1",
"date-fns": "^2.28.0", "date-fns": "^2.28.0",
@ -44,34 +43,34 @@
"lodash.debounce": "^4.0.8", "lodash.debounce": "^4.0.8",
"lodash.omit": "^4.5.0", "lodash.omit": "^4.5.0",
"myetherwallet-blockies": "^0.1.1", "myetherwallet-blockies": "^0.1.1",
"next": "^12.1.0", "next": "^12.1.5",
"query-string": "^7.1.1", "query-string": "^7.1.1",
"react": "^17.0.2", "react": "^17.0.2",
"react-chartjs-2": "^4.0.1", "react-chartjs-2": "^4.1.0",
"react-clipboard.js": "^2.0.16", "react-clipboard.js": "^2.0.16",
"react-data-table-component": "^6.11.7", "react-data-table-component": "^6.11.7",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-dotdotdot": "^1.3.1", "react-dotdotdot": "^1.3.1",
"react-modal": "^3.14.4", "react-modal": "^3.14.4",
"react-paginate": "^8.1.2", "react-paginate": "^8.1.3",
"react-spring": "^9.4.4", "react-spring": "^9.4.4",
"react-tabs": "^3.2.3", "react-tabs": "^3.2.3",
"react-toastify": "^8.1.0", "react-toastify": "^8.2.0",
"remark": "^13.0.0", "remark": "^13.0.0",
"remark-gfm": "^1.0.0", "remark-gfm": "^1.0.0",
"remark-html": "^13.0.1", "remark-html": "^13.0.1",
"remove-markdown": "^0.3.0", "remove-markdown": "^0.3.0",
"slugify": "^1.6.5", "slugify": "^1.6.5",
"swr": "^1.2.2", "swr": "^1.3.0",
"urql": "^2.2.0", "urql": "^2.2.0",
"use-dark-mode": "^2.3.1", "use-dark-mode": "^2.3.1",
"web3": "^1.7.1", "web3": "^1.7.3",
"web3modal": "^1.9.5", "web3modal": "^1.9.7",
"yup": "^0.32.11" "yup": "^0.32.11"
}, },
"devDependencies": { "devDependencies": {
"@svgr/webpack": "^6.2.1", "@svgr/webpack": "^6.2.1",
"@types/chart.js": "^2.9.35", "@types/chart.js": "^2.9.37",
"@types/d3": "^7.1.0", "@types/d3": "^7.1.0",
"@types/js-cookie": "^3.0.1", "@types/js-cookie": "^3.0.1",
"@types/loadable__component": "^5.13.1", "@types/loadable__component": "^5.13.1",
@ -102,7 +101,7 @@
"process": "^0.11.10", "process": "^0.11.10",
"serve": "^13.0.2", "serve": "^13.0.2",
"stream-http": "^3.2.0", "stream-http": "^3.2.0",
"typescript": "^4.5.4" "typescript": "^4.6.3"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,4 +1,4 @@
import React, { ReactElement, useEffect, useState } from 'react' import React, { ChangeEvent, ReactElement, useEffect, useState } from 'react'
import { formatCurrency } from '@coingecko/cryptoformat' import { formatCurrency } from '@coingecko/cryptoformat'
import { useUserPreferences } from '@context/UserPreferences' import { useUserPreferences } from '@context/UserPreferences'
import Button from '@shared/atoms/Button' import Button from '@shared/atoms/Button'
@ -7,6 +7,7 @@ import Conversion from '@shared/Price/Conversion'
import { useWeb3 } from '@context/Web3' import { useWeb3 } from '@context/Web3'
import { getOceanConfig } from '@utils/ocean' import { getOceanConfig } from '@utils/ocean'
import styles from './Details.module.css' import styles from './Details.module.css'
import InputElement from '@shared/FormInput/InputElement'
export default function Details(): ReactElement { export default function Details(): ReactElement {
const { const {
@ -26,7 +27,7 @@ export default function Details(): ReactElement {
address: string address: string
symbol: string symbol: string
}>() }>()
// const [portisNetwork, setPortisNetwork] = useState<string>() const [portisNetwork, setPortisNetwork] = useState<string>()
useEffect(() => { useEffect(() => {
if (!networkId) return if (!networkId) return
@ -45,14 +46,14 @@ export default function Details(): ReactElement {
}, [networkData, networkId]) }, [networkData, networkId])
// Handle network change for Portis // Handle network change for Portis
// async function handlePortisNetworkChange(e: ChangeEvent<HTMLSelectElement>) { async function handlePortisNetworkChange(e: ChangeEvent<HTMLSelectElement>) {
// setPortisNetwork(e.target.value) setPortisNetwork(e.target.value)
// const portisNetworkName = e.target.value.toLowerCase() const portisNetworkName = e.target.value.toLowerCase()
// await web3Provider._portis.changeNetwork(portisNetworkName) await web3Provider._portis.changeNetwork(portisNetworkName)
// // TODO: using our connect initializes a new Portis instance, // TODO: using our connect initializes a new Portis instance,
// // which then defaults back to initial network (Mainnet). // which then defaults back to initial network (Mainnet).
// // await connect() // await connect()
// } }
return ( return (
<div className={styles.details}> <div className={styles.details}>
@ -75,7 +76,7 @@ export default function Details(): ReactElement {
<img className={styles.walletLogo} src={web3ProviderInfo?.logo} /> <img className={styles.walletLogo} src={web3ProviderInfo?.logo} />
{web3ProviderInfo?.name} {web3ProviderInfo?.name}
</span> </span>
{/* {web3ProviderInfo?.name === 'Portis' && ( {web3ProviderInfo?.name === 'Portis' && (
<InputElement <InputElement
name="network" name="network"
type="select" type="select"
@ -84,7 +85,7 @@ export default function Details(): ReactElement {
value={portisNetwork} value={portisNetwork}
onChange={handlePortisNetworkChange} onChange={handlePortisNetworkChange}
/> />
)} */} )}
{web3ProviderInfo?.name === 'MetaMask' && ( {web3ProviderInfo?.name === 'MetaMask' && (
<AddToken <AddToken
address={oceanTokenMetadata?.address} address={oceanTokenMetadata?.address}

View File

@ -1,4 +1,4 @@
import React, { ReactElement } from 'react' import React, { Fragment, ReactElement } from 'react'
import styles from './index.module.css' import styles from './index.module.css'
import Network from './Network' import Network from './Network'
import useNetworkMetadata, { import useNetworkMetadata, {
@ -40,12 +40,12 @@ export default function AvailableNetworks(): ReactElement {
{networkCategories.map( {networkCategories.map(
(networkCategory) => (networkCategory) =>
networkCategory.data.length > 0 && ( networkCategory.data.length > 0 && (
<> <Fragment key={networkCategory.title}>
<h4 className={styles.title}>{networkCategory.title}</h4> <h4 className={styles.title}>{networkCategory.title}</h4>
<ul className={styles.networks}> <ul className={styles.networks}>
{networkList(networkCategory.data)} {networkList(networkCategory.data)}
</ul> </ul>
</> </Fragment>
) )
)} )}
</div> </div>