1
0
mirror of https://github.com/oceanprotocol/react.git synced 2025-01-06 11:55:41 +01:00

update getConfigById

This commit is contained in:
mihaisc 2020-09-07 15:24:32 +03:00
parent 6311d59cbb
commit 14eb98e261

View File

@ -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]