From 9a54c1279d3fa247d163539b0af0dcc9824d626a Mon Sep 17 00:00:00 2001 From: Manuel <5877862+manuelsc@users.noreply.github.com> Date: Fri, 3 Nov 2023 10:48:26 +0100 Subject: [PATCH] fix dai chart conversion --- src/app/components/dashboard/dashboard.component.ts | 2 +- src/app/services/unitconv.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/dashboard/dashboard.component.ts b/src/app/components/dashboard/dashboard.component.ts index c1a94a10..5cca2208 100644 --- a/src/app/components/dashboard/dashboard.component.ts +++ b/src/app/components/dashboard/dashboard.component.ts @@ -679,7 +679,7 @@ export class DashboardComponent implements OnInit { // Gnosis: All values provided by the API are in the CL currency, including the el rewards text = `${this.unit.convertCLtoEL(value).toFixed(5)} ` + this.unit.getNetworkDefaultUnit(type).display if (!this.unit.isDefaultCurrency(this.unit.pref.Exec)) { - text += ` (${this.unit.convertToPref(this.unit.convertCLtoEL(value), this.unit.getNetworkDefaultCurrency(type), type)})` + text += ` (${this.unit.convertToPref(value, this.unit.getNetworkDefaultCurrency('cons'), 'cons')})` } } diff --git a/src/app/services/unitconv.service.ts b/src/app/services/unitconv.service.ts index f2ac0aa8..87f0e157 100644 --- a/src/app/services/unitconv.service.ts +++ b/src/app/services/unitconv.service.ts @@ -191,7 +191,7 @@ export class UnitconvService { if (this.hasSameCLAndELCurrency()) { return cl } - return cl.dividedBy(this.pref.Cons.unit.value).dividedBy(this.lastPrice.mGNOXDAI) + return cl.dividedBy(this.getNetworkDefaultUnit('cons').value).dividedBy(this.lastPrice.mGNOXDAI) } public getFiatCurrency(type: RewardType) {