1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

Merge pull request #39 from oceanprotocol/feature/web3ModalOpts

refactor web3modal options
This commit is contained in:
Matthias Kretschmann 2020-07-31 12:11:57 +02:00 committed by GitHub
commit b9838ddf6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 287 additions and 160 deletions

368
package-lock.json generated
View File

@ -28,18 +28,18 @@
} }
}, },
"@babel/core": { "@babel/core": {
"version": "7.10.5", "version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.0.tgz",
"integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==", "integrity": "sha512-mkLq8nwaXmDtFmRkQ8ED/eA2CnVw4zr7dCztKalZXBvdK5EeNUAesrrwUqjQEzFgomJssayzB0aqlOsP1vGLqg==",
"requires": { "requires": {
"@babel/code-frame": "^7.10.4", "@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.10.5", "@babel/generator": "^7.11.0",
"@babel/helper-module-transforms": "^7.10.5", "@babel/helper-module-transforms": "^7.11.0",
"@babel/helpers": "^7.10.4", "@babel/helpers": "^7.10.4",
"@babel/parser": "^7.10.5", "@babel/parser": "^7.11.0",
"@babel/template": "^7.10.4", "@babel/template": "^7.10.4",
"@babel/traverse": "^7.10.5", "@babel/traverse": "^7.11.0",
"@babel/types": "^7.10.5", "@babel/types": "^7.11.0",
"convert-source-map": "^1.7.0", "convert-source-map": "^1.7.0",
"debug": "^4.1.0", "debug": "^4.1.0",
"gensync": "^1.0.0-beta.1", "gensync": "^1.0.0-beta.1",
@ -50,6 +50,69 @@
"source-map": "^0.5.0" "source-map": "^0.5.0"
}, },
"dependencies": { "dependencies": {
"@babel/generator": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz",
"integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==",
"requires": {
"@babel/types": "^7.11.0",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
}
},
"@babel/helper-module-transforms": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz",
"integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==",
"requires": {
"@babel/helper-module-imports": "^7.10.4",
"@babel/helper-replace-supers": "^7.10.4",
"@babel/helper-simple-access": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0",
"@babel/template": "^7.10.4",
"@babel/types": "^7.11.0",
"lodash": "^4.17.19"
}
},
"@babel/helper-split-export-declaration": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
"integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
"requires": {
"@babel/types": "^7.11.0"
}
},
"@babel/parser": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.0.tgz",
"integrity": "sha512-qvRvi4oI8xii8NllyEc4MDJjuZiNaRzyb7Y7lup1NqJV8TZHF4O27CcP+72WPn/k1zkgJ6WJfnIbk4jTsVAZHw=="
},
"@babel/traverse": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz",
"integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==",
"requires": {
"@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.11.0",
"@babel/helper-function-name": "^7.10.4",
"@babel/helper-split-export-declaration": "^7.11.0",
"@babel/parser": "^7.11.0",
"@babel/types": "^7.11.0",
"debug": "^4.1.0",
"globals": "^11.1.0",
"lodash": "^4.17.19"
}
},
"@babel/types": {
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz",
"integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==",
"requires": {
"@babel/helper-validator-identifier": "^7.10.4",
"lodash": "^4.17.19",
"to-fast-properties": "^2.0.0"
}
},
"debug": { "debug": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
@ -3352,11 +3415,47 @@
"unist-util-visit": "2.0.3" "unist-util-visit": "2.0.3"
}, },
"dependencies": { "dependencies": {
"@babel/core": {
"version": "7.10.5",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz",
"integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==",
"requires": {
"@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.10.5",
"@babel/helper-module-transforms": "^7.10.5",
"@babel/helpers": "^7.10.4",
"@babel/parser": "^7.10.5",
"@babel/template": "^7.10.4",
"@babel/traverse": "^7.10.5",
"@babel/types": "^7.10.5",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.1",
"json5": "^2.1.2",
"lodash": "^4.17.19",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
}
},
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"is-plain-obj": { "is-plain-obj": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
"integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="
}, },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"parse-entities": { "parse-entities": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz",
@ -3509,13 +3608,12 @@
} }
}, },
"@oceanprotocol/react": { "@oceanprotocol/react": {
"version": "0.0.29", "version": "0.0.30",
"resolved": "https://registry.npmjs.org/@oceanprotocol/react/-/react-0.0.29.tgz", "resolved": "https://registry.npmjs.org/@oceanprotocol/react/-/react-0.0.30.tgz",
"integrity": "sha512-qTOW5j3oaSz/1F7FSmAZYB3CL0JL3gdXowr7Oa7Su65WaTV9Wdd+zNTu5DY89ehOxaAJ0D3yaghdJcLABQGtVQ==", "integrity": "sha512-qrkKZ8xQ44UDNy3rrtyRZL/Mu8zH57jMT21RL7s67jExy42sB0pF6NvyCJ5NXwCVT5uZgf7+g4E5309Rpdk6/A==",
"requires": { "requires": {
"@oceanprotocol/lib": "^0.1.10", "@oceanprotocol/lib": "^0.1.10",
"axios": "^0.19.2", "axios": "^0.19.2",
"react": "^16.13.1",
"web3": "^1.2.11", "web3": "^1.2.11",
"web3modal": "^1.9.0" "web3modal": "^1.9.0"
} }
@ -3662,17 +3760,17 @@
} }
}, },
"@storybook/addon-actions": { "@storybook/addon-actions": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.0.0-rc.20.tgz",
"integrity": "sha512-kj718sA62QukBLGnAwukZb876cgEMnU6YRFcZ/ce2XlCjJPzdb4VIxgo29h2uM+S/HUJdy04xJm8+LTaw3GP5w==", "integrity": "sha512-aggBT4b37pWDp/s/Bzv3oiAyADAQZQqM4XPs/Ojxgc8fJagzxCZds4wknH1cXAo+rVVOGy2DkGF/IyGa/GmWWw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@storybook/addons": "6.0.0-rc.19", "@storybook/addons": "6.0.0-rc.20",
"@storybook/api": "6.0.0-rc.19", "@storybook/api": "6.0.0-rc.20",
"@storybook/client-api": "6.0.0-rc.19", "@storybook/client-api": "6.0.0-rc.20",
"@storybook/components": "6.0.0-rc.19", "@storybook/components": "6.0.0-rc.20",
"@storybook/core-events": "6.0.0-rc.19", "@storybook/core-events": "6.0.0-rc.20",
"@storybook/theming": "6.0.0-rc.19", "@storybook/theming": "6.0.0-rc.20",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"fast-deep-equal": "^3.1.1", "fast-deep-equal": "^3.1.1",
"global": "^4.3.2", "global": "^4.3.2",
@ -3688,15 +3786,15 @@
} }
}, },
"@storybook/addon-storyshots": { "@storybook/addon-storyshots": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/addon-storyshots/-/addon-storyshots-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/addon-storyshots/-/addon-storyshots-6.0.0-rc.20.tgz",
"integrity": "sha512-4a8ZZ+g0dnfewDp2clJ4mRZl0E9tRk18MwP0vavucOwl5Nybkq65lEKOVY852ltvDwVe17cdhXeAKhUhYCi9ZQ==", "integrity": "sha512-/AkgkW+UZi1Jjj5crqNHLbfauAGcCcorxHPfvgAMKM9wdXZx475zZ5ORzgBleBvDsHFQfkk4n76HywnDgmz2wQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@jest/transform": "^26.0.0", "@jest/transform": "^26.0.0",
"@storybook/addons": "6.0.0-rc.19", "@storybook/addons": "6.0.0-rc.20",
"@storybook/client-api": "6.0.0-rc.19", "@storybook/client-api": "6.0.0-rc.20",
"@storybook/core": "6.0.0-rc.19", "@storybook/core": "6.0.0-rc.20",
"@types/glob": "^7.1.1", "@types/glob": "^7.1.1",
"@types/jest": "^25.1.1", "@types/jest": "^25.1.1",
"@types/jest-specific-snapshot": "^0.5.3", "@types/jest-specific-snapshot": "^0.5.3",
@ -3789,36 +3887,36 @@
} }
}, },
"@storybook/addons": { "@storybook/addons": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-6.0.0-rc.20.tgz",
"integrity": "sha512-fX7IrWmUmrC+6dUItt1u+ApM9b+2pgv/OH82qzjUtpmV6IH5ITN6eUb//rfS63pC7xZStKm/4+6MY3bBHnWBng==", "integrity": "sha512-tsdth2ozKFvzpcR47aBVBSeRTK298zHpjwHibBEYGdZPDdNJ/NzFDGBSBomq9YBI/TQ7k8a0J/x6l3l4dN5I+w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@storybook/api": "6.0.0-rc.19", "@storybook/api": "6.0.0-rc.20",
"@storybook/channels": "6.0.0-rc.19", "@storybook/channels": "6.0.0-rc.20",
"@storybook/client-logger": "6.0.0-rc.19", "@storybook/client-logger": "6.0.0-rc.20",
"@storybook/core-events": "6.0.0-rc.19", "@storybook/core-events": "6.0.0-rc.20",
"@storybook/router": "6.0.0-rc.19", "@storybook/router": "6.0.0-rc.20",
"@storybook/theming": "6.0.0-rc.19", "@storybook/theming": "6.0.0-rc.20",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"regenerator-runtime": "^0.13.3" "regenerator-runtime": "^0.13.3"
} }
}, },
"@storybook/api": { "@storybook/api": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/api/-/api-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/api/-/api-6.0.0-rc.20.tgz",
"integrity": "sha512-hcKy4RD0n+EabaUsl/nHLf1XiPk9bpIOw33lyRMpqqdowd+UrY2jNr6LBWa5IoB7a0XwKWZzH1ZAonxO2i2Xtg==", "integrity": "sha512-aOStahAfV7AYZC1duJERc05Rr4fEYDXirjb2pQiiW3aKWywjeMNoUFdRMpb0WscqGrZWh6QnUIHtwfZEMc45dg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@reach/router": "^1.3.3", "@reach/router": "^1.3.3",
"@storybook/channels": "6.0.0-rc.19", "@storybook/channels": "6.0.0-rc.20",
"@storybook/client-logger": "6.0.0-rc.19", "@storybook/client-logger": "6.0.0-rc.20",
"@storybook/core-events": "6.0.0-rc.19", "@storybook/core-events": "6.0.0-rc.20",
"@storybook/csf": "0.0.1", "@storybook/csf": "0.0.1",
"@storybook/router": "6.0.0-rc.19", "@storybook/router": "6.0.0-rc.20",
"@storybook/semver": "^7.3.2", "@storybook/semver": "^7.3.2",
"@storybook/theming": "6.0.0-rc.19", "@storybook/theming": "6.0.0-rc.20",
"@types/reach__router": "^1.3.5", "@types/reach__router": "^1.3.5",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"fast-deep-equal": "^3.1.1", "fast-deep-equal": "^3.1.1",
@ -3880,14 +3978,14 @@
} }
}, },
"@storybook/channel-postmessage": { "@storybook/channel-postmessage": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.0.0-rc.20.tgz",
"integrity": "sha512-cHJ0TU7ab6duhSqOU2daWHxkdW9gZonSa46L8Xr4YKkoCxNq1GNmjEVW/8vLi4HEMRJfv6ShWevucBDeaciQFQ==", "integrity": "sha512-gUY/uUEZyJMKz1yWGeMg+XB8xwYJMHMjTa+bva5Mk5qCWkK2pefctX+m5AUEd/f6b2fnTjP/AmU/jczs9oQKWg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@storybook/channels": "6.0.0-rc.19", "@storybook/channels": "6.0.0-rc.20",
"@storybook/client-logger": "6.0.0-rc.19", "@storybook/client-logger": "6.0.0-rc.20",
"@storybook/core-events": "6.0.0-rc.19", "@storybook/core-events": "6.0.0-rc.20",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"global": "^4.3.2", "global": "^4.3.2",
"qs": "^6.6.0", "qs": "^6.6.0",
@ -3895,9 +3993,9 @@
} }
}, },
"@storybook/channels": { "@storybook/channels": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-6.0.0-rc.20.tgz",
"integrity": "sha512-Xjm6W9MvzqditCK9YapKKyMc5A2bHQR/D/CDbcYDuuYUaStML8IapAd1CNElGfdh+z1SxOL2Mi2NN2B1y67Xyw==", "integrity": "sha512-kleUoyyIgbe0UMMUPBG+0RO1AIZeC4giLcX8uhHESKJk/qXO/w6/UtHkNF8/0kxDUmhgvyu9YKTqMDexFvxb4A==",
"dev": true, "dev": true,
"requires": { "requires": {
"core-js": "^3.0.1", "core-js": "^3.0.1",
@ -3906,16 +4004,16 @@
} }
}, },
"@storybook/client-api": { "@storybook/client-api": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.0.0-rc.20.tgz",
"integrity": "sha512-iUCRxKYH81I8n4agOseLGLo1tB1hfbY6/OnhazXDx9pLqov4/+bdb33QKWG6H1bvQ6DjENVTuP6TcWnjt56Cng==", "integrity": "sha512-KVWUZ2r6JiL3oTyll7LkWx1vQsE5Gc+NoyBEKKOVrJOfEoD9k6PGbVIOcpX5HZ5MMHPgS/lUZb+wgNKxqUhKfg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@storybook/addons": "6.0.0-rc.19", "@storybook/addons": "6.0.0-rc.20",
"@storybook/channel-postmessage": "6.0.0-rc.19", "@storybook/channel-postmessage": "6.0.0-rc.20",
"@storybook/channels": "6.0.0-rc.19", "@storybook/channels": "6.0.0-rc.20",
"@storybook/client-logger": "6.0.0-rc.19", "@storybook/client-logger": "6.0.0-rc.20",
"@storybook/core-events": "6.0.0-rc.19", "@storybook/core-events": "6.0.0-rc.20",
"@storybook/csf": "0.0.1", "@storybook/csf": "0.0.1",
"@types/qs": "^6.9.0", "@types/qs": "^6.9.0",
"@types/webpack-env": "^1.15.2", "@types/webpack-env": "^1.15.2",
@ -3931,9 +4029,9 @@
} }
}, },
"@storybook/client-logger": { "@storybook/client-logger": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.0.0-rc.20.tgz",
"integrity": "sha512-YYrmqVRWGq9fF9oYldg5g+K/HKY0+/7qPgd1Jl01Z3xmvwyC6BiY1k5U4gc30Zqq+nB7jlLU5GZSnDAiEoFouw==", "integrity": "sha512-VeAcjwXlcHfIuaxNXEAcitwDRzpVRKkXg3peUnCriZ9rB0yUYfk9o92rWqR8GycLZ9xIEUwzawgSHNDtdlvTZA==",
"dev": true, "dev": true,
"requires": { "requires": {
"core-js": "^3.0.1", "core-js": "^3.0.1",
@ -3941,14 +4039,14 @@
} }
}, },
"@storybook/components": { "@storybook/components": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/components/-/components-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/components/-/components-6.0.0-rc.20.tgz",
"integrity": "sha512-4e1Xav01LgPl04R21ayhDC87z4VuajfJDyrKUWG5wnsiAUpwloiEI9FPwFIlobgbgA29IDTRt/5it2pXYwHnaw==", "integrity": "sha512-EwnaXXLL3T46Yntr3FkaJYbnvVfCzj0YVN5uC4h20GNno9lgFWr2SUcJ713ViUxcDK6J8kTa6+k++QI6u3HV8A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@storybook/client-logger": "6.0.0-rc.19", "@storybook/client-logger": "6.0.0-rc.20",
"@storybook/csf": "0.0.1", "@storybook/csf": "0.0.1",
"@storybook/theming": "6.0.0-rc.19", "@storybook/theming": "6.0.0-rc.20",
"@types/overlayscrollbars": "^1.9.0", "@types/overlayscrollbars": "^1.9.0",
"@types/react-color": "^3.0.1", "@types/react-color": "^3.0.1",
"@types/react-syntax-highlighter": "11.0.4", "@types/react-syntax-highlighter": "11.0.4",
@ -3971,9 +4069,9 @@
} }
}, },
"@storybook/core": { "@storybook/core": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/core/-/core-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/core/-/core-6.0.0-rc.20.tgz",
"integrity": "sha512-LIXPIpETPmVpjTW5qPS3ni4syDPpquhZgRumpO5KSwhZinVhYphmYDJRKB3cwRBg35R5YERjqPcBo86UjrIdrw==", "integrity": "sha512-UCcvzBBb2eWonD1FbecjIXgSyd3QUwevs0CNNFe86ZaeUkbHCZDGR3JwIXb1oVqI819/8TaQIcmzTbp24fObLg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3",
@ -3996,20 +4094,20 @@
"@babel/preset-env": "^7.9.6", "@babel/preset-env": "^7.9.6",
"@babel/preset-react": "^7.8.3", "@babel/preset-react": "^7.8.3",
"@babel/preset-typescript": "^7.9.0", "@babel/preset-typescript": "^7.9.0",
"@storybook/addons": "6.0.0-rc.19", "@storybook/addons": "6.0.0-rc.20",
"@storybook/api": "6.0.0-rc.19", "@storybook/api": "6.0.0-rc.20",
"@storybook/channel-postmessage": "6.0.0-rc.19", "@storybook/channel-postmessage": "6.0.0-rc.20",
"@storybook/channels": "6.0.0-rc.19", "@storybook/channels": "6.0.0-rc.20",
"@storybook/client-api": "6.0.0-rc.19", "@storybook/client-api": "6.0.0-rc.20",
"@storybook/client-logger": "6.0.0-rc.19", "@storybook/client-logger": "6.0.0-rc.20",
"@storybook/components": "6.0.0-rc.19", "@storybook/components": "6.0.0-rc.20",
"@storybook/core-events": "6.0.0-rc.19", "@storybook/core-events": "6.0.0-rc.20",
"@storybook/csf": "0.0.1", "@storybook/csf": "0.0.1",
"@storybook/node-logger": "6.0.0-rc.19", "@storybook/node-logger": "6.0.0-rc.20",
"@storybook/router": "6.0.0-rc.19", "@storybook/router": "6.0.0-rc.20",
"@storybook/semver": "^7.3.2", "@storybook/semver": "^7.3.2",
"@storybook/theming": "6.0.0-rc.19", "@storybook/theming": "6.0.0-rc.20",
"@storybook/ui": "6.0.0-rc.19", "@storybook/ui": "6.0.0-rc.20",
"@types/glob-base": "^0.3.0", "@types/glob-base": "^0.3.0",
"@types/micromatch": "^4.0.1", "@types/micromatch": "^4.0.1",
"@types/node-fetch": "^2.5.4", "@types/node-fetch": "^2.5.4",
@ -4214,9 +4312,9 @@
} }
}, },
"@storybook/core-events": { "@storybook/core-events": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.0.0-rc.20.tgz",
"integrity": "sha512-oM8gQEtPONxRv3DbrvYKPUB9b3KBaozL+90k1mT6BTIeav5w3Jpkx5pmg0KqI9QMAdiwS+BH64pUaYhMi4lzkQ==", "integrity": "sha512-Q8ZA4CAyYW2cCHfvg2RgcK6cwmn32Wp5XWf45DJp809VYazVub0kvZc5YgJCtYYsKiol8wkuNNEEi3U+4gGV2g==",
"dev": true, "dev": true,
"requires": { "requires": {
"core-js": "^3.0.1" "core-js": "^3.0.1"
@ -4232,9 +4330,9 @@
} }
}, },
"@storybook/node-logger": { "@storybook/node-logger": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.0.0-rc.20.tgz",
"integrity": "sha512-U4zI6C+WY8OSwamkkKW29Tpt5lQG94o7oA7/HD09SWgNaZlEn1PMHWpfR2e1eNLZN67NA6mGMmnEM2bV7fXfpA==", "integrity": "sha512-8kGnx1LBH/lolFYXXWNtBtWwrJRhRn3XNh775JBX7QkB8+4zjPIt59PQeUS+Q+l8qyMqDIcMyhXVIRPebVMOnQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/npmlog": "^4.1.2", "@types/npmlog": "^4.1.2",
@ -4297,16 +4395,16 @@
} }
}, },
"@storybook/react": { "@storybook/react": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/react/-/react-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/react/-/react-6.0.0-rc.20.tgz",
"integrity": "sha512-KfEJplPof5d7Q9jc6Oxkd9VkDfKQw9I2hvcoQKAyNJKRmaySq2uyV4yMmAJfllNoFgs/1aEFJpaQjAapI70sAw==", "integrity": "sha512-Gf+EMIXzpZNBckEjqIY1j6R9O2JTtzItVwOzbzJZ0fjY76DmRBhw64p6ItPJUTn9GDZFKyd5hHkL/vmVG1COaw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/preset-flow": "^7.0.0", "@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0", "@babel/preset-react": "^7.0.0",
"@storybook/addons": "6.0.0-rc.19", "@storybook/addons": "6.0.0-rc.20",
"@storybook/core": "6.0.0-rc.19", "@storybook/core": "6.0.0-rc.20",
"@storybook/node-logger": "6.0.0-rc.19", "@storybook/node-logger": "6.0.0-rc.20",
"@storybook/semver": "^7.3.2", "@storybook/semver": "^7.3.2",
"@svgr/webpack": "^5.4.0", "@svgr/webpack": "^5.4.0",
"@types/webpack-env": "^1.15.2", "@types/webpack-env": "^1.15.2",
@ -4371,9 +4469,9 @@
} }
}, },
"@storybook/router": { "@storybook/router": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/router/-/router-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/router/-/router-6.0.0-rc.20.tgz",
"integrity": "sha512-/TsXGoEqhyVJu2/j1h1c84qlTXZ/AThccvaokoda6fkYufOPJssttDEFqJje8fkhfJ71i2v1eYEhuYq6CtN2ng==", "integrity": "sha512-mmeexXhnG+hKMlKXDaEIW4z6xSPMI2dpI31lO4+jFcqNY9EC45ucT4ym5Kz1nzL6IMLkT1przyzTyOkM6XSqfg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@reach/router": "^1.3.3", "@reach/router": "^1.3.3",
@ -4385,15 +4483,15 @@
} }
}, },
"@storybook/theming": { "@storybook/theming": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.0.0-rc.20.tgz",
"integrity": "sha512-tV02wcbErdHp4z7UvQv0ZI12SsuR+K6BW5LJ5lerFlUk7XjSqmtJE6EphFZa8lXTA+xOHV6LftufgEbnt4se1Q==", "integrity": "sha512-6GmsBeo0PRoH7W0aWGHhGaNN3nTer7jhfQh86F13brIazvLa7XhkL568DANC2lpx/ltJcJMUrHLuh+lqEuCVhA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@emotion/core": "^10.0.20", "@emotion/core": "^10.0.20",
"@emotion/is-prop-valid": "^0.8.6", "@emotion/is-prop-valid": "^0.8.6",
"@emotion/styled": "^10.0.17", "@emotion/styled": "^10.0.17",
"@storybook/client-logger": "6.0.0-rc.19", "@storybook/client-logger": "6.0.0-rc.20",
"core-js": "^3.0.1", "core-js": "^3.0.1",
"deep-object-diff": "^1.1.0", "deep-object-diff": "^1.1.0",
"emotion-theming": "^10.0.19", "emotion-theming": "^10.0.19",
@ -4413,21 +4511,21 @@
} }
}, },
"@storybook/ui": { "@storybook/ui": {
"version": "6.0.0-rc.19", "version": "6.0.0-rc.20",
"resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-6.0.0-rc.19.tgz", "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-6.0.0-rc.20.tgz",
"integrity": "sha512-vGRPmo/kKpO3eX6sBb5NgTqMO5US7pYvLQxZMLqTqyQGkXBblwhzLp+SS98tqNmxQh7HzudtCntzophCZQzNdg==", "integrity": "sha512-mTVb6pjKUd92/xC8QE/myBRRS1Qet+TdtA6EHBnmRe4bkJhVF0nNlgesoC3pyz26DdgYSkJoNSew1vtGcntVvA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@emotion/core": "^10.0.20", "@emotion/core": "^10.0.20",
"@storybook/addons": "6.0.0-rc.19", "@storybook/addons": "6.0.0-rc.20",
"@storybook/api": "6.0.0-rc.19", "@storybook/api": "6.0.0-rc.20",
"@storybook/channels": "6.0.0-rc.19", "@storybook/channels": "6.0.0-rc.20",
"@storybook/client-logger": "6.0.0-rc.19", "@storybook/client-logger": "6.0.0-rc.20",
"@storybook/components": "6.0.0-rc.19", "@storybook/components": "6.0.0-rc.20",
"@storybook/core-events": "6.0.0-rc.19", "@storybook/core-events": "6.0.0-rc.20",
"@storybook/router": "6.0.0-rc.19", "@storybook/router": "6.0.0-rc.20",
"@storybook/semver": "^7.3.2", "@storybook/semver": "^7.3.2",
"@storybook/theming": "6.0.0-rc.19", "@storybook/theming": "6.0.0-rc.20",
"@types/markdown-to-jsx": "^6.11.0", "@types/markdown-to-jsx": "^6.11.0",
"copy-to-clipboard": "^3.0.8", "copy-to-clipboard": "^3.0.8",
"core-js": "^3.0.1", "core-js": "^3.0.1",
@ -5090,9 +5188,9 @@
} }
}, },
"@types/jest": { "@types/jest": {
"version": "26.0.7", "version": "26.0.8",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.7.tgz", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.8.tgz",
"integrity": "sha512-+x0077/LoN6MjqBcVOe1y9dpryWnfDZ+Xfo3EqGeBcfPRJlQp3Lw62RvNlWxuGv7kOEwlHriAa54updi3Jvvwg==", "integrity": "sha512-eo3VX9jGASSuv680D4VQ89UmuLZneNxv2MCZjfwlInav05zXVJTzfc//lavdV0GPwSxsXJTy2jALscB7Acqg0g==",
"dev": true, "dev": true,
"requires": { "requires": {
"jest-diff": "^25.2.1", "jest-diff": "^25.2.1",
@ -29030,11 +29128,47 @@
"unified": "9.1.0" "unified": "9.1.0"
}, },
"dependencies": { "dependencies": {
"@babel/core": {
"version": "7.10.5",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz",
"integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==",
"requires": {
"@babel/code-frame": "^7.10.4",
"@babel/generator": "^7.10.5",
"@babel/helper-module-transforms": "^7.10.5",
"@babel/helpers": "^7.10.4",
"@babel/parser": "^7.10.5",
"@babel/template": "^7.10.4",
"@babel/traverse": "^7.10.5",
"@babel/types": "^7.10.5",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.1",
"json5": "^2.1.2",
"lodash": "^4.17.19",
"resolve": "^1.3.2",
"semver": "^5.4.1",
"source-map": "^0.5.0"
}
},
"debug": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"is-plain-obj": { "is-plain-obj": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
"integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="
}, },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"parse-entities": { "parse-entities": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz",

View File

@ -22,7 +22,7 @@
"@loadable/component": "^5.13.1", "@loadable/component": "^5.13.1",
"@oceanprotocol/art": "^3.0.0", "@oceanprotocol/art": "^3.0.0",
"@oceanprotocol/lib": "^0.1.10", "@oceanprotocol/lib": "^0.1.10",
"@oceanprotocol/react": "^0.0.29", "@oceanprotocol/react": "^0.0.30",
"@oceanprotocol/typographies": "^0.1.0", "@oceanprotocol/typographies": "^0.1.0",
"@sindresorhus/slugify": "^1.0.0", "@sindresorhus/slugify": "^1.0.0",
"@tippyjs/react": "^4.1.0", "@tippyjs/react": "^4.1.0",
@ -73,15 +73,15 @@
"yup": "^0.29.2" "yup": "^0.29.2"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.10.5", "@babel/core": "^7.11.0",
"@babel/preset-typescript": "^7.10.1", "@babel/preset-typescript": "^7.10.1",
"@storybook/addon-actions": "^6.0.0-rc.19", "@storybook/addon-actions": "^6.0.0-rc.20",
"@storybook/addon-storyshots": "^6.0.0-rc.19", "@storybook/addon-storyshots": "^6.0.0-rc.20",
"@storybook/react": "^6.0.0-rc.19", "@storybook/react": "^6.0.0-rc.20",
"@svgr/webpack": "^5.4.0", "@svgr/webpack": "^5.4.0",
"@testing-library/jest-dom": "^5.11.2", "@testing-library/jest-dom": "^5.11.2",
"@testing-library/react": "^10.4.7", "@testing-library/react": "^10.4.7",
"@types/jest": "^26.0.7", "@types/jest": "^26.0.8",
"@types/loadable__component": "^5.13.0", "@types/loadable__component": "^5.13.0",
"@types/node": "^14.0.27", "@types/node": "^14.0.27",
"@types/react": "^16.9.43", "@types/react": "^16.9.43",

View File

@ -4,11 +4,7 @@ import { useOcean } from '@oceanprotocol/react'
import { toDataUrl } from 'ethereum-blockies' import { toDataUrl } from 'ethereum-blockies'
import { ReactComponent as Caret } from '../../../images/caret.svg' import { ReactComponent as Caret } from '../../../images/caret.svg'
import Status from '../../atoms/Status' import Status from '../../atoms/Status'
import { import { accountTruncate, isCorrectNetwork } from '../../../utils/wallet'
accountTruncate,
connectWallet,
isCorrectNetwork
} from '../../../utils/wallet'
const Blockies = ({ account }: { account: string | undefined }) => { const Blockies = ({ account }: { account: string | undefined }) => {
if (!account) return null if (!account) return null
@ -44,7 +40,7 @@ const Account = React.forwardRef((props, ref: any) => {
) : ( ) : (
<button <button
className={styles.button} className={styles.button}
onClick={async () => await connectWallet(connect)} onClick={async () => await connect()}
// Need the `ref` here although we do not want // Need the `ref` here although we do not want
// the Tippy to show in this state. // the Tippy to show in this state.
ref={ref} ref={ref}

View File

@ -3,7 +3,7 @@ import Button from '../../atoms/Button'
import styles from './Details.module.css' import styles from './Details.module.css'
import { useOcean } from '@oceanprotocol/react' import { useOcean } from '@oceanprotocol/react'
import Web3Feedback from './Feedback' import Web3Feedback from './Feedback'
import { connectWallet, getNetworkName } from '../../../utils/wallet' import { getNetworkName } from '../../../utils/wallet'
import { getInjectedProviderName } from 'web3modal' import { getInjectedProviderName } from 'web3modal'
import Conversion from '../../atoms/Price/Conversion' import Conversion from '../../atoms/Price/Conversion'
@ -31,7 +31,7 @@ export default function Details({ attrs }: { attrs: any }): ReactElement {
size="small" size="small"
onClick={() => { onClick={() => {
logout() logout()
connectWallet(connect) connect()
}} }}
> >
Switch Wallet Switch Wallet

View File

@ -1,13 +1,16 @@
import React, { ReactElement } from 'react' import React, { ReactElement } from 'react'
import { OceanProvider } from '@oceanprotocol/react' import { OceanProvider } from '@oceanprotocol/react'
import { appConfig } from '../../app.config' import { appConfig } from '../../app.config'
import { web3ModalOpts } from '../utils/wallet'
const wrapRootElement = ({ const wrapRootElement = ({
element element
}: { }: {
element: ReactElement element: ReactElement
}): ReactElement => ( }): ReactElement => (
<OceanProvider config={appConfig.oceanConfig}>{element}</OceanProvider> <OceanProvider config={appConfig.oceanConfig} web3ModalOpts={web3ModalOpts}>
{element}
</OceanProvider>
) )
export default wrapRootElement export default wrapRootElement

View File

@ -1,4 +1,5 @@
import { OceanProviderValue } from '@oceanprotocol/react' import WalletConnectProvider from '@walletconnect/web3-provider'
import Torus from '@toruslabs/torus-embed'
import { appConfig } from '../../app.config' import { appConfig } from '../../app.config'
const { infuraProjectId, network, oceanConfig } = appConfig const { infuraProjectId, network, oceanConfig } = appConfig
@ -11,36 +12,29 @@ const web3ModalTheme = {
hover: 'var(--brand-grey-dimmed)' hover: 'var(--brand-grey-dimmed)'
} }
export async function connectWallet( const providerOptions = {
connect: OceanProviderValue['connect']
): Promise<void> {
const { default: WalletConnectProvider } = await import(
'@walletconnect/web3-provider'
)
const { default: Torus } = await import('@toruslabs/torus-embed')
// Provider Options
// https://github.com/Web3Modal/web3modal#provider-options
const providerOptions = {
walletconnect: { walletconnect: {
package: WalletConnectProvider, package: WalletConnectProvider,
options: { options: {
infuraId: infuraProjectId infuraId: infuraProjectId
} }
},
torus: {
package: Torus,
options: {
networkParams: {
host: oceanConfig.url // optional
// chainId: 1337, // optional
// networkId: 1337 // optional
}
}
}
} }
// torus: {
// package: Torus,
// options: {
// networkParams: {
// host: oceanConfig.url // optional
// // chainId: 1337, // optional
// // networkId: 1337 // optional
// }
// }
// }
}
await connect({ cacheProvider: true, providerOptions, theme: web3ModalTheme }) export const web3ModalOpts = {
cacheProvider: true,
providerOptions,
theme: web3ModalTheme
} }
export function isCorrectNetwork(chainId: number): boolean { export function isCorrectNetwork(chainId: number): boolean {