Skip to content

Commit

Permalink
fix gno price convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelsc committed Oct 23, 2023
1 parent 65438cf commit ef87332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/services/unitconv.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ef87332

Please sign in to comment.