add update router

This commit is contained in:
liangping 2021-10-15 15:43:56 +08:00
parent aa2ceae79c
commit 145c9158c7
2 changed files with 4 additions and 2 deletions

View File

@ -255,7 +255,7 @@ export function isToken(value) {
export function formatTokenDenom(tokenDenom) {
if (tokenDenom) {
let denom = tokenDenom.denom_trace ? tokenDenom.denom_trace.base_denom.toUpperCase() : tokenDenom.toUpperCase()
if (denom.charAt(0) === 'U') {
if (denom.charAt(0) === 'U' && denom !== 'USDX') {
denom = denom.substring(1)
} else if (denom === 'BASECRO') {
denom = 'CRO'

View File

@ -315,7 +315,7 @@ const router = new VueRouter({
},
},
{
path: 'index.php',
path: '/index.php',
redirect: '/',
},
{
@ -333,6 +333,8 @@ router.beforeEach((to, from, next) => {
// const has = Object.keys(config).findIndex(i => i === c)
if (!config || Object.keys(config).findIndex(i => i === c) > -1) {
next()
} if (c === 'index.php') {
next({ name: 'home' })
} else if (c) {
next({ name: 'chain-404' })
} else {