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) => {
|
router.beforeEach((to, from, next) => {
|
||||||
const c = to.params.chain
|
const c = to.params.chain
|
||||||
if (c) {
|
if (c) {
|
||||||
store.commit('select', { chain_name: c })
|
store.commit('select', { chain_name: String(c).toLowerCase() })
|
||||||
store.dispatch('chains/getAllIBCDenoms', Vue.prototype)
|
store.dispatch('chains/getAllIBCDenoms', Vue.prototype)
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = JSON.parse(localStorage.getItem('chains'))
|
const config = JSON.parse(localStorage.getItem('chains'))
|
||||||
// const has = Object.keys(config).findIndex(i => i === c)
|
// 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()
|
next()
|
||||||
} else if (c) {
|
} else if (c) {
|
||||||
if (c === 'index.php') {
|
if (c === 'index.php') {
|
||||||
|
@ -19,7 +19,7 @@ if (isTestnet()) {
|
|||||||
const update = {}
|
const update = {}
|
||||||
configs.keys().forEach(k => {
|
configs.keys().forEach(k => {
|
||||||
const c = configs(k)
|
const c = configs(k)
|
||||||
update[c.chain_name] = c
|
update[String(c.chain_name).toLowerCase()] = c
|
||||||
})
|
})
|
||||||
|
|
||||||
chains = update
|
chains = update
|
||||||
|
Loading…
Reference in New Issue
Block a user