Skip to content

Commit

Permalink
app: Fix market page daily high/low rate (decred#3014)
Browse files Browse the repository at this point in the history
  • Loading branch information
martonp authored and buck54321 committed Oct 17, 2024
1 parent 83295b7 commit 0b305c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/webserver/site/src/js/markets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,12 @@ export default class MarketsPage extends BasePage {
}
}

const qconv = app().unitInfo(this.market.cfg.quoteid, this.market.dex).conventional.conversionFactor
const baseID = this.market.base.id
const quoteID = this.market.quote.id
const dex = this.market.dex
for (const s of this.stats) {
s.tmpl.high.textContent = high > 0 ? Doc.formatFourSigFigs(high / qconv) : '-'
s.tmpl.low.textContent = low > 0 ? Doc.formatFourSigFigs(low / qconv) : '-'
s.tmpl.high.textContent = high > 0 ? Doc.formatFourSigFigs(app().conventionalRate(baseID, quoteID, high, dex)) : '-'
s.tmpl.low.textContent = low > 0 ? Doc.formatFourSigFigs(app().conventionalRate(baseID, quoteID, low, dex)) : '-'
}
}

Expand Down

0 comments on commit 0b305c0

Please sign in to comment.