mirror of
https://github.com/oceanprotocol/react.git
synced 2025-01-06 11:55:41 +01:00
update getConfigById
This commit is contained in:
parent
6311d59cbb
commit
14eb98e261
@ -8,20 +8,7 @@ export const NetworkMonitor = () => {
|
||||
|
||||
const handleNetworkChanged = useCallback(
|
||||
(chainId: number) => {
|
||||
// const config = getOceanConfig(chainId)
|
||||
// temp hack
|
||||
let network = ''
|
||||
switch (chainId) {
|
||||
case 1: {
|
||||
network = 'mainnet'
|
||||
break
|
||||
}
|
||||
case 4: {
|
||||
network = 'rinkeby'
|
||||
break
|
||||
}
|
||||
}
|
||||
const config = new ConfigHelper().getConfig(network)
|
||||
const config = new ConfigHelper().getConfigById(chainId)
|
||||
connect(config)
|
||||
},
|
||||
[connect]
|
||||
|
Loading…
Reference in New Issue
Block a user