From e3c7dc0f5d5aa1a5dfa666437f6457a53b56e248 Mon Sep 17 00:00:00 2001 From: Ruben Silva Date: Wed, 2 Feb 2022 19:31:58 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20hardcoded=20usd=20currency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Widgets/CryptoWatchList.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Widgets/CryptoWatchList.vue b/src/components/Widgets/CryptoWatchList.vue index 7b86ad25..4230fc71 100644 --- a/src/components/Widgets/CryptoWatchList.vue +++ b/src/components/Widgets/CryptoWatchList.vue @@ -9,7 +9,7 @@ >

{{ asset.name }}

-

{{ asset.price | formatPrice }}

+

{{ asset.price | formatPrice(currency) }}

{{ asset.percentChange | formatPercentage }}

@@ -70,8 +70,9 @@ export default { }, filters: { /* Append currency symbol to price */ - formatPrice(price) { - return `${findCurrencySymbol('usd')}${putCommasInBigNum(roundPrice(price))}`; + formatPrice(price, currency) { + if (currency === undefined) return ''; + return `${findCurrencySymbol(currency)}${putCommasInBigNum(roundPrice(price))}`; }, /* Append percentage symbol, and up/ down arrow */ formatPercentage(change) {