Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Commit

Permalink
upgrade fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaisc committed Sep 2, 2020
1 parent 450d1e7 commit 6283c0b
Show file tree
Hide file tree
Showing 9 changed files with 20,923 additions and 19,286 deletions.
14 changes: 14 additions & 0 deletions example/config-overrides.js
Original file line number Diff line number Diff line change
@@ -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')
}
}
}
}
38,199 changes: 19,945 additions & 18,254 deletions example/package-lock.json

Large diffs are not rendered by default.

46 changes: 28 additions & 18 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
22 changes: 1 addition & 21 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions example/src/Publish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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>
</>
Expand Down
4 changes: 2 additions & 2 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
Loading

0 comments on commit 6283c0b

Please sign in to comment.