mirror of
https://github.com/oceanprotocol/react.git
synced 2025-02-01 12:29:26 +01:00
format
This commit is contained in:
parent
4a7604b4f9
commit
9949ae999f
@ -5,7 +5,7 @@ import { useState } from 'react'
|
||||
import { useEffect } from 'react'
|
||||
import shortid from 'shortid'
|
||||
export function AllDdos() {
|
||||
const { accountId,chainId, account, ocean } = useOcean()
|
||||
const { accountId, chainId, account, ocean } = useOcean()
|
||||
|
||||
const [ddos, setDdos] = useState<DDO[] | undefined>()
|
||||
|
||||
@ -23,7 +23,7 @@ export function AllDdos() {
|
||||
setDdos(assets.results)
|
||||
}
|
||||
init()
|
||||
}, [ocean, account,chainId])
|
||||
}, [ocean, account, chainId])
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -8,17 +8,16 @@ export function NetworkMonitor() {
|
||||
|
||||
const handleNetworkChanged = (chainId: number) => {
|
||||
// const config = getOceanConfig(chainId)
|
||||
// temp hack
|
||||
let network = ''
|
||||
switch (chainId) {
|
||||
case 1:
|
||||
{
|
||||
network = 'mainnet'
|
||||
}
|
||||
case 4: {
|
||||
network = 'rinkeby'
|
||||
}
|
||||
// temp hack
|
||||
let network = ''
|
||||
switch (chainId) {
|
||||
case 1: {
|
||||
network = 'mainnet'
|
||||
}
|
||||
case 4: {
|
||||
network = 'rinkeby'
|
||||
}
|
||||
}
|
||||
const config = new ConfigHelper().getConfig(network)
|
||||
connect(config)
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ function OceanProvider({
|
||||
|
||||
async function connect(newConfig?: Config) {
|
||||
try {
|
||||
Logger.log('Connecting ...',newConfig)
|
||||
Logger.log('Connecting ...', newConfig)
|
||||
|
||||
newConfig && setConfig(newConfig)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user