Fixed issues

This commit is contained in:
liangping 2021-12-16 10:40:44 +08:00
parent 173a4d8bd2
commit b4f93790fa
3 changed files with 4 additions and 3 deletions

View File

@ -31,6 +31,7 @@
"genesisL1": "Genesis L1", "genesisL1": "Genesis L1",
"microtick": "Microtick", "microtick": "Microtick",
"odin": "ODIN", "odin": "ODIN",
"chihuahua": "CHIHUAHUA",
"staking": "Staking", "staking": "Staking",
"governance": "Governance", "governance": "Governance",

View File

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

View File

@ -469,7 +469,7 @@ export default {
let stakingDenom = '' let stakingDenom = ''
if (this.delegations) { if (this.delegations && this.delegations.length > 0) {
let temp = 0 let temp = 0
this.delegations.forEach(x => { this.delegations.forEach(x => {
const xh = x.balance const xh = x.balance
@ -554,7 +554,7 @@ export default {
}, },
deleTable() { deleTable() {
const re = [] const re = []
if (this.reward.rewards && this.delegations) { if (this.reward.rewards && this.delegations && this.delegations.length > 0) {
this.delegations.forEach(e => { this.delegations.forEach(e => {
const reward = this.reward.rewards.find(r => r.validator_address === e.delegation.validator_address) const reward = this.reward.rewards.find(r => r.validator_address === e.delegation.validator_address)
re.push({ re.push({