From 2883f1bfe7dad7bc67ab857b7497a7612d8639ad Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Mon, 16 Aug 2021 17:38:11 +0800 Subject: [PATCH] fix price fetch issue --- src/views/UserAccountDetail.vue | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/views/UserAccountDetail.vue b/src/views/UserAccountDetail.vue index b5605d45..72463d7a 100644 --- a/src/views/UserAccountDetail.vue +++ b/src/views/UserAccountDetail.vue @@ -432,13 +432,20 @@ export default { if (x.denom.startsWith('ibc/')) { chainAPI.getIBCDenomTraceText(this.$http.config.api, x.denom).then(denom => { this.$set(this.denoms, x.denom, denom) + const symbol = formatTokenDenom(denom) + if (!this.quotes[symbol] && symbol.indexOf('/') === -1) { + chainAPI.fetchTokenQuote(symbol).then(quote => { + this.$set(this.quotes, symbol, quote) + }) + } }) - } - const symbol = formatTokenDenom(x.denom) - if (!this.quotes[symbol]) { - chainAPI.fetchTokenQuote(symbol).then(quote => { - this.$set(this.quotes, symbol, quote) - }) + } else { + const symbol = formatTokenDenom(x.denom) + if (!this.quotes[symbol] && symbol.indexOf('/') === -1) { + chainAPI.fetchTokenQuote(symbol).then(quote => { + this.$set(this.quotes, symbol, quote) + }) + } } }) })