mirror of
https://github.com/oceanprotocol/react.git
synced 2024-12-23 01:29:49 +01:00
remove default Web3 providers
This commit is contained in:
parent
595803a155
commit
0a314f000b
@ -18,8 +18,7 @@ export function Wallet() {
|
||||
}
|
||||
}
|
||||
|
||||
// await connect({ cacheProvider: true, providerOptions })
|
||||
await connect()
|
||||
await connect({ cacheProvider: true, providerOptions })
|
||||
}
|
||||
const init = async () => {
|
||||
if (ocean === undefined || accountId === undefined) return
|
||||
|
1307
package-lock.json
generated
1307
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -27,19 +27,19 @@
|
||||
"dependencies": {
|
||||
"@oceanprotocol/contracts": "^0.2.3",
|
||||
"@oceanprotocol/lib": "^0.1.6",
|
||||
"@walletconnect/web3-provider": "^1.0.16",
|
||||
"axios": "^0.19.2",
|
||||
"react": "^16.9.41",
|
||||
"web3": "^1.2.10",
|
||||
"web3modal": "^1.7.0"
|
||||
"web3": "^1.2.11",
|
||||
"web3modal": "^1.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@release-it/bumper": "^1.4.0",
|
||||
"@types/react": "^16.9.41",
|
||||
"@typescript-eslint/eslint-plugin": "^3.6.0",
|
||||
"@typescript-eslint/parser": "^3.6.0",
|
||||
"@walletconnect/web3-provider": "^1.0.18",
|
||||
"auto-changelog": "^2.2.0",
|
||||
"eslint": "^7.4.0",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-config-oceanprotocol": "^1.5.0",
|
||||
"eslint-config-prettier": "^6.11.0",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
|
@ -10,6 +10,7 @@ import ProviderStatus from './ProviderStatus'
|
||||
import { Ocean, Logger, Account, Config } from '@oceanprotocol/lib'
|
||||
import Web3Modal, { ICoreOptions } from 'web3modal'
|
||||
import { getDefaultProviders } from './getDefaultProviders'
|
||||
|
||||
interface OceanProviderValue {
|
||||
web3: Web3 | undefined
|
||||
web3Provider: any
|
||||
|
@ -1,16 +1,5 @@
|
||||
export async function getDefaultProviders() {
|
||||
const { default: WalletConnectProvider } = await import(
|
||||
'@walletconnect/web3-provider'
|
||||
)
|
||||
import { ICoreOptions } from 'web3modal/dist/helpers/types'
|
||||
|
||||
const providerOptions = {
|
||||
walletconnect: {
|
||||
package: WalletConnectProvider,
|
||||
options: {
|
||||
infuraId: 'INFURA_ID' // required
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { cacheProvider: true, providerOptions }
|
||||
export async function getDefaultProviders(): Promise<Partial<ICoreOptions>> {
|
||||
return { cacheProvider: true }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user