From ef8733232f98c4bcf3028fc675aa9c0c93e6ddfe Mon Sep 17 00:00:00 2001 From: Manuel <5877862+manuelsc@users.noreply.github.com> Date: Mon, 23 Oct 2023 11:22:31 +0200 Subject: [PATCH] fix gno price convertion --- src/app/services/unitconv.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/services/unitconv.service.ts b/src/app/services/unitconv.service.ts index 6e96ba02..87b6b02c 100644 --- a/src/app/services/unitconv.service.ts +++ b/src/app/services/unitconv.service.ts @@ -322,7 +322,7 @@ export class UnitconvService { async updatePriceData() { const consPrice = await this.getPriceData(this.pref.Cons.unit) if (consPrice) { - this.lastPrice.Cons = consPrice + this.lastPrice.Cons = consPrice.multipliedBy(MAPPING.get(this.getNetworkDefaultCurrency(this.pref.Cons)).value) this.storage.setObject(this.getLastPriceKey(this.pref.Cons), { lastPrice: this.lastPrice.Cons } as LastPrice) } else { this.lastPrice.Cons = this.pref.Cons.unit.value @@ -333,7 +333,7 @@ export class UnitconvService { const execPrice = await this.getPriceData(this.pref.Exec.unit) if (execPrice) { - this.lastPrice.Exec = execPrice + this.lastPrice.Exec = execPrice.multipliedBy(MAPPING.get(this.getNetworkDefaultCurrency(this.pref.Exec)).value) this.storage.setObject(this.getLastPriceKey(this.pref.Exec), { lastPrice: this.lastPrice.Exec } as LastPrice) } else { this.lastPrice.Exec = this.pref.Exec.unit.value