From 4e7587a6197db509ea9607b0466a7f9ed3a90645 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Tue, 17 May 2022 08:43:31 +0800 Subject: [PATCH] improve tolorent for missing field in price --- src/views/WalletAccounts.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/WalletAccounts.vue b/src/views/WalletAccounts.vue index a3d04cd5..338437c1 100644 --- a/src/views/WalletAccounts.vue +++ b/src/views/WalletAccounts.vue @@ -527,14 +527,14 @@ export default { getPrice(denom) { const d2 = this.formatDenom(denom) const quote = this.$store.state.chains.quotes[d2] - return quote ? quote[this.currency2] : 0 + return quote ? quote[this.currency2] || 0 : 0 }, getChanges(denom) { const d2 = this.formatDenom(denom) const quote = this.$store.state.chains.quotes[d2] if (quote) { const price = quote[`${this.currency2}_24h_change`] - return price + return price || 0 } return 0 }, @@ -543,7 +543,7 @@ export default { if (price > 0) { return `+${parseFloat(price.toFixed(2))}%` } - return '' + return '0' }, formatPrice(denom) { const d2 = this.formatDenom(denom)