mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
parent
f20a6a5a48
commit
d884a9529d
@ -1,4 +1,3 @@
|
||||
|
||||
#NEXT_PUBLIC_INFURA_PROJECT_ID="xxx"
|
||||
#NEXT_PUBLIC_MARKET_FEE_ADDRESS="0xxx"
|
||||
#NEXT_PUBLIC_PUBLISHER_MARKET_ORDER_FEE="1"
|
||||
@ -8,11 +7,6 @@
|
||||
#NEXT_PUBLIC_CONSUME_MARKET_POOL_SWAP_FEE="1"
|
||||
#NEXT_PUBLIC_CONSUME_MARKET_FIXED_SWAP_FEE="1"
|
||||
|
||||
|
||||
|
||||
#NEXT_PUBLIC_PORTIS_ID="xxx"
|
||||
|
||||
|
||||
#
|
||||
# ADVANCED SETTINGS
|
||||
#
|
||||
|
1
.github/workflows/deploy.yml
vendored
1
.github/workflows/deploy.yml
vendored
@ -17,7 +17,6 @@ jobs:
|
||||
- run: npm run build
|
||||
env:
|
||||
NEXT_PUBLIC_INFURA_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_INFURA_PROJECT_ID }}
|
||||
NEXT_PUBLIC_PORTIS_ID: ${{ secrets.NEXT_PUBLIC_PORTIS_ID }}
|
||||
|
||||
- run: npm run deploy:s3
|
||||
env:
|
||||
|
@ -75,9 +75,6 @@ module.exports = {
|
||||
storageKey: 'oceanDarkMode'
|
||||
},
|
||||
|
||||
// Wallets
|
||||
portisId: process.env.NEXT_PUBLIC_PORTIS_ID || 'xxx',
|
||||
|
||||
// Used to show or hide the fixed, dynamic or free price options
|
||||
// tab to publishers during the price creation.
|
||||
allowFixedPricing: process.env.NEXT_PUBLIC_ALLOW_FIXED_PRICING || 'true',
|
||||
|
115
package-lock.json
generated
115
package-lock.json
generated
@ -15,7 +15,6 @@
|
||||
"@oceanprotocol/art": "^3.2.0",
|
||||
"@oceanprotocol/lib": "^1.1.2",
|
||||
"@oceanprotocol/typographies": "^0.1.0",
|
||||
"@portis/web3": "^4.0.7",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"@urql/exchange-refocus": "^0.2.5",
|
||||
"@walletconnect/web3-provider": "^1.7.8",
|
||||
@ -5239,17 +5238,6 @@
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
}
|
||||
},
|
||||
"node_modules/@portis/web3": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@portis/web3/-/web3-4.1.0.tgz",
|
||||
"integrity": "sha512-efGssWqrwpYPzQyOupYPpWmjPU/WwcFGoPXzjLbjQ3Z4Z7Q4qqqwkMeE1mwMbxWudFKlHz/VxdpJrDA42Ufqrg==",
|
||||
"dependencies": {
|
||||
"ethereumjs-util": "5.2.0",
|
||||
"penpal": "3.0.7",
|
||||
"pocket-js-core": "0.0.3",
|
||||
"web3-provider-engine": "16.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-spring/animated": {
|
||||
"version": "9.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.4.5.tgz",
|
||||
@ -33516,11 +33504,6 @@
|
||||
"node": ">=0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/penpal": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/penpal/-/penpal-3.0.7.tgz",
|
||||
"integrity": "sha512-WSXiq5HnEvzvY05SHhaXcsviUmCvh4Ze8AiIZzvmdzaaYAAx4rx8c6Xq6+MaVDG/Nfve3VmGD8HyRP3CkPvPbQ=="
|
||||
},
|
||||
"node_modules/performance-now": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
||||
@ -33616,48 +33599,6 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/pocket-js-core": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/pocket-js-core/-/pocket-js-core-0.0.3.tgz",
|
||||
"integrity": "sha512-OUTEvEVutdjLT6YyldvAlSebpBueUUWg2XKxGNt5u3QqrmLpBOOBmdDnGMNJ+lEwXtko+JqgwFq+HTi4g1QDVg==",
|
||||
"dependencies": {
|
||||
"axios": "^0.18.0"
|
||||
}
|
||||
},
|
||||
"node_modules/pocket-js-core/node_modules/axios": {
|
||||
"version": "0.18.1",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz",
|
||||
"integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==",
|
||||
"deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410",
|
||||
"dependencies": {
|
||||
"follow-redirects": "1.5.10",
|
||||
"is-buffer": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/pocket-js-core/node_modules/debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/pocket-js-core/node_modules/follow-redirects": {
|
||||
"version": "1.5.10",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
|
||||
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
|
||||
"dependencies": {
|
||||
"debug": "=3.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/pocket-js-core/node_modules/ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||
},
|
||||
"node_modules/polished": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/polished/-/polished-4.2.2.tgz",
|
||||
@ -45465,17 +45406,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.5.tgz",
|
||||
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
|
||||
},
|
||||
"@portis/web3": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@portis/web3/-/web3-4.1.0.tgz",
|
||||
"integrity": "sha512-efGssWqrwpYPzQyOupYPpWmjPU/WwcFGoPXzjLbjQ3Z4Z7Q4qqqwkMeE1mwMbxWudFKlHz/VxdpJrDA42Ufqrg==",
|
||||
"requires": {
|
||||
"ethereumjs-util": "5.2.0",
|
||||
"penpal": "3.0.7",
|
||||
"pocket-js-core": "0.0.3",
|
||||
"web3-provider-engine": "16.0.1"
|
||||
}
|
||||
},
|
||||
"@react-spring/animated": {
|
||||
"version": "9.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@react-spring/animated/-/animated-9.4.5.tgz",
|
||||
@ -67519,11 +67449,6 @@
|
||||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"penpal": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/penpal/-/penpal-3.0.7.tgz",
|
||||
"integrity": "sha512-WSXiq5HnEvzvY05SHhaXcsviUmCvh4Ze8AiIZzvmdzaaYAAx4rx8c6Xq6+MaVDG/Nfve3VmGD8HyRP3CkPvPbQ=="
|
||||
},
|
||||
"performance-now": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
||||
@ -67592,46 +67517,6 @@
|
||||
"ts-pnp": "^1.1.6"
|
||||
}
|
||||
},
|
||||
"pocket-js-core": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/pocket-js-core/-/pocket-js-core-0.0.3.tgz",
|
||||
"integrity": "sha512-OUTEvEVutdjLT6YyldvAlSebpBueUUWg2XKxGNt5u3QqrmLpBOOBmdDnGMNJ+lEwXtko+JqgwFq+HTi4g1QDVg==",
|
||||
"requires": {
|
||||
"axios": "^0.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": {
|
||||
"version": "0.18.1",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz",
|
||||
"integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==",
|
||||
"requires": {
|
||||
"follow-redirects": "1.5.10",
|
||||
"is-buffer": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.5.10",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
|
||||
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
|
||||
"requires": {
|
||||
"debug": "=3.1.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||
}
|
||||
}
|
||||
},
|
||||
"polished": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/polished/-/polished-4.2.2.tgz",
|
||||
|
@ -27,7 +27,6 @@
|
||||
"@oceanprotocol/art": "^3.2.0",
|
||||
"@oceanprotocol/lib": "^1.1.2",
|
||||
"@oceanprotocol/typographies": "^0.1.0",
|
||||
"@portis/web3": "^4.0.7",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"@urql/exchange-refocus": "^0.2.5",
|
||||
"@walletconnect/web3-provider": "^1.7.8",
|
||||
|
@ -18,7 +18,6 @@ export interface AppConfig {
|
||||
consumeMarketPoolSwapFee: string
|
||||
consumeMarketFixedSwapFee: string
|
||||
currencies: string[]
|
||||
portisId: string
|
||||
allowFixedPricing: string
|
||||
allowDynamicPricing: string
|
||||
allowFreePricing: string
|
||||
|
@ -9,7 +9,7 @@ import React, {
|
||||
} from 'react'
|
||||
import Web3 from 'web3'
|
||||
import Web3Modal, { getProviderInfo, IProviderInfo } from 'web3modal'
|
||||
import { infuraProjectId as infuraId, portisId } from '../../app.config'
|
||||
import { infuraProjectId as infuraId } from '../../app.config'
|
||||
import WalletConnectProvider from '@walletconnect/web3-provider'
|
||||
import { LoggerInstance } from '@oceanprotocol/lib'
|
||||
import { isBrowser } from '@utils/index'
|
||||
@ -58,12 +58,6 @@ const providerOptions = isBrowser
|
||||
walletconnect: {
|
||||
package: WalletConnectProvider,
|
||||
options: { infuraId }
|
||||
},
|
||||
portis: {
|
||||
package: require('@portis/web3'),
|
||||
options: {
|
||||
id: portisId
|
||||
}
|
||||
}
|
||||
// torus: {
|
||||
// package: require('@toruslabs/torus-embed')
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { ChangeEvent, ReactElement, useEffect, useState } from 'react'
|
||||
import React, { ReactElement, useEffect, useState } from 'react'
|
||||
import { formatCurrency } from '@coingecko/cryptoformat'
|
||||
import { useUserPreferences } from '@context/UserPreferences'
|
||||
import Button from '@shared/atoms/Button'
|
||||
@ -7,11 +7,9 @@ import Conversion from '@shared/Price/Conversion'
|
||||
import { useWeb3 } from '@context/Web3'
|
||||
import { getOceanConfig } from '@utils/ocean'
|
||||
import styles from './Details.module.css'
|
||||
import InputElement from '@shared/FormInput/InputElement'
|
||||
|
||||
export default function Details(): ReactElement {
|
||||
const {
|
||||
web3Provider,
|
||||
web3ProviderInfo,
|
||||
web3Modal,
|
||||
connect,
|
||||
@ -27,7 +25,6 @@ export default function Details(): ReactElement {
|
||||
address: string
|
||||
symbol: string
|
||||
}>()
|
||||
const [portisNetwork, setPortisNetwork] = useState<string>()
|
||||
|
||||
useEffect(() => {
|
||||
if (!networkId) return
|
||||
@ -45,16 +42,6 @@ export default function Details(): ReactElement {
|
||||
})
|
||||
}, [networkData, networkId])
|
||||
|
||||
// Handle network change for Portis
|
||||
async function handlePortisNetworkChange(e: ChangeEvent<HTMLSelectElement>) {
|
||||
setPortisNetwork(e.target.value)
|
||||
const portisNetworkName = e.target.value.toLowerCase()
|
||||
await web3Provider._portis.changeNetwork(portisNetworkName)
|
||||
// TODO: using our connect initializes a new Portis instance,
|
||||
// which then defaults back to initial network (Mainnet).
|
||||
// await connect()
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.details}>
|
||||
<ul>
|
||||
@ -76,16 +63,6 @@ export default function Details(): ReactElement {
|
||||
<img className={styles.walletLogo} src={web3ProviderInfo?.logo} />
|
||||
{web3ProviderInfo?.name}
|
||||
</span>
|
||||
{web3ProviderInfo?.name === 'Portis' && (
|
||||
<InputElement
|
||||
name="network"
|
||||
type="select"
|
||||
options={['Mainnet', 'Ropsten', 'Rinkeby']}
|
||||
size="mini"
|
||||
value={portisNetwork}
|
||||
onChange={handlePortisNetworkChange}
|
||||
/>
|
||||
)}
|
||||
{web3ProviderInfo?.name === 'MetaMask' && (
|
||||
<AddToken
|
||||
address={oceanTokenMetadata?.address}
|
||||
@ -96,15 +73,6 @@ export default function Details(): ReactElement {
|
||||
)}
|
||||
</div>
|
||||
<p>
|
||||
{web3ProviderInfo?.name === 'Portis' && (
|
||||
<Button
|
||||
style="text"
|
||||
size="small"
|
||||
onClick={() => web3Provider._portis.showPortis()}
|
||||
>
|
||||
Show Portis
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
style="text"
|
||||
size="small"
|
||||
|
Loading…
Reference in New Issue
Block a user