mirror of
https://github.com/oceanprotocol/react.git
synced 2024-11-22 01:37:03 +01:00
upgrade fix
This commit is contained in:
parent
450d1e7bdd
commit
6283c0b15f
14
example/config-overrides.js
Normal file
14
example/config-overrides.js
Normal file
@ -0,0 +1,14 @@
|
||||
module.exports = function override(config, env) {
|
||||
const path = require('path')
|
||||
|
||||
return {
|
||||
...config,
|
||||
resolve: {
|
||||
...config.resolve,
|
||||
alias: {
|
||||
...config.resolve.alias,
|
||||
react: path.resolve('../node_modules/react')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
12835
example/package-lock.json
generated
12835
example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,34 +3,44 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@oceanprotocol/lib": "^0.1.17",
|
||||
"@oceanprotocol/react": "file:../",
|
||||
"@toruslabs/torus-embed": "^1.8.2",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.5.0",
|
||||
"@testing-library/user-event": "^7.2.1",
|
||||
"@types/jest": "^24.9.1",
|
||||
"@types/node": "^12.12.47",
|
||||
"@types/react": "^16.9.41",
|
||||
"@types/node": "^12.12.54",
|
||||
"@types/react": "^16.9.49",
|
||||
"@types/react-dom": "^16.9.8",
|
||||
"@types/shortid": "^0.0.29",
|
||||
"@walletconnect/web3-provider": "^1.1.0",
|
||||
"@types/shortid": "0.0.29",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-scripts": "3.4.1",
|
||||
"react-scripts": "3.4.3",
|
||||
"shortid": "^2.2.15",
|
||||
"typescript": "^3.9.7",
|
||||
"web3-eth-contract": "^1.2.11"
|
||||
"typescript": "^3.7.5"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
"start": "react-app-rewired start",
|
||||
"build": "react-app-rewired build",
|
||||
"test": "react-app-rewired test",
|
||||
"eject": "react-app-rewired eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"browserslist": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not ie <= 11",
|
||||
"not op_mini all"
|
||||
]
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"react-app-rewired": "^2.1.6"
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,6 @@ import { Publish } from './Publish'
|
||||
import { Config, ConfigHelper } from '@oceanprotocol/lib'
|
||||
import { AllDdos } from './AllDdos'
|
||||
import { ConsumeDdo } from './ConsumeDdo'
|
||||
|
||||
import WalletConnectProvider from '@walletconnect/web3-provider'
|
||||
import Torus from '@toruslabs/torus-embed'
|
||||
import { NetworkMonitor } from './NetworkMonitor'
|
||||
import { MetadataExample } from './MetadataExample'
|
||||
|
||||
@ -22,24 +19,7 @@ const config = {
|
||||
|
||||
const configRinkeby = new ConfigHelper().getConfig('rinkeby')
|
||||
|
||||
const providerOptions = {
|
||||
walletconnect: {
|
||||
package: WalletConnectProvider,
|
||||
options: {
|
||||
infuraId: ''
|
||||
}
|
||||
},
|
||||
torus: {
|
||||
package: Torus,
|
||||
options: {
|
||||
networkParams: {
|
||||
host: config.nodeUri // optional
|
||||
// chainId: 1337, // optional
|
||||
// networkId: 1337 // optional
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const providerOptions = {}
|
||||
|
||||
export const web3ModalOpts = {
|
||||
cacheProvider: true,
|
||||
|
@ -8,7 +8,7 @@ export function Publish() {
|
||||
const { accountId, ocean } = useOcean()
|
||||
const { publish, publishStepText, isLoading } = usePublish()
|
||||
const [ddo, setDdo] = useState<DDO | undefined>()
|
||||
|
||||
|
||||
const asset = {
|
||||
main: {
|
||||
type: 'dataset',
|
||||
@ -50,7 +50,9 @@ export function Publish() {
|
||||
<div>
|
||||
<button onClick={publishAsset}>Publish</button>
|
||||
</div>
|
||||
<div>IsLoading: {isLoading.toString()} || Status: {publishStepText}</div>
|
||||
<div>
|
||||
IsLoading: {isLoading.toString()} || Status: {publishStepText}
|
||||
</div>
|
||||
|
||||
<div>DID: {ddo && ddo.id} </div>
|
||||
</>
|
||||
|
@ -6,14 +6,14 @@
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react",
|
||||
"strict": true
|
||||
"jsx": "react"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
1870
package-lock.json
generated
1870
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@
|
||||
"dist/"
|
||||
],
|
||||
"dependencies": {
|
||||
"@oceanprotocol/lib": "^0.1.16",
|
||||
"@oceanprotocol/lib": "^0.1.17",
|
||||
"axios": "^0.20.0",
|
||||
"decimal.js": "^10.2.0",
|
||||
"web3": "^1.2.11",
|
||||
|
@ -58,9 +58,13 @@ function usePublish(): UsePublish {
|
||||
setPublishError(undefined)
|
||||
try {
|
||||
setStep(0)
|
||||
const data = { t: 1, url: config.metadataStoreUri }
|
||||
const blob = JSON.stringify(data)
|
||||
const dtAddress = await ocean.datatokens.create(blob, accountId)
|
||||
const dtAddress = await ocean.datatokens.create(
|
||||
config.metadataStoreUri,
|
||||
'Ocean Data Token',
|
||||
'Ocean-DT',
|
||||
'1000',
|
||||
accountId
|
||||
)
|
||||
Logger.log('datatoken created', dtAddress)
|
||||
|
||||
setStep(1)
|
||||
|
Loading…
Reference in New Issue
Block a user