Fix router bug

This commit is contained in:
liangping
2021-08-07 23:22:41 +08:00
parent aaee720df8
commit d92ba1538c
7 changed files with 172 additions and 33 deletions
+7 -5
View File
@@ -1,10 +1,5 @@
let chains = {}
const localChains = localStorage.getItem('chains')
if (localChains) {
chains = JSON.parse(localChains)
}
const configs = require.context('.', false, /\.json$/)
const update = {}
@@ -13,6 +8,13 @@ configs.keys().forEach(k => {
update[c.chain_name] = c
})
const localChains = localStorage.getItem('chains')
if (localChains) {
chains = JSON.parse(localChains)
} else {
chains = update
}
Object.keys(update).forEach(key => {
const chain = update[key]
fetch(`${chain.api}/node_info`)