add case insensitive on chain name
This commit is contained in:
parent
5c46da6bfe
commit
2d73a3c72e
@ -385,13 +385,13 @@ const router = new VueRouter({
|
||||
router.beforeEach((to, from, next) => {
|
||||
const c = to.params.chain
|
||||
if (c) {
|
||||
store.commit('select', { chain_name: c })
|
||||
store.commit('select', { chain_name: String(c).toLowerCase() })
|
||||
store.dispatch('chains/getAllIBCDenoms', Vue.prototype)
|
||||
}
|
||||
|
||||
const config = JSON.parse(localStorage.getItem('chains'))
|
||||
// const has = Object.keys(config).findIndex(i => i === c)
|
||||
if (!config || Object.keys(config).findIndex(i => i === c) > -1) {
|
||||
if (!config || Object.keys(config).findIndex(i => i === String(c).toLowerCase()) > -1) {
|
||||
next()
|
||||
} else if (c) {
|
||||
if (c === 'index.php') {
|
||||
|
@ -19,7 +19,7 @@ if (isTestnet()) {
|
||||
const update = {}
|
||||
configs.keys().forEach(k => {
|
||||
const c = configs(k)
|
||||
update[c.chain_name] = c
|
||||
update[String(c.chain_name).toLowerCase()] = c
|
||||
})
|
||||
|
||||
chains = update
|
||||
|
Loading…
Reference in New Issue
Block a user