Skip to content

Commit

Permalink
Update displayed exchange rate
Browse files Browse the repository at this point in the history
  • Loading branch information
behrang committed Oct 18, 2023
1 parent ca1bb56 commit 363405f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,9 @@ export class Model {
}

get exchangeRateFormatted() {
const rate = this.exchangeRate
if (rate != null) {
if (this.isStakeTabActive) {
return '1 TON = ~ ' + rate.toFixed(4) + ' hTON'
} else {
return '1 hTON = ~ ' + rate.toFixed(4) + ' TON'
}
const state = this.treasuryState
if (state != null) {
return '1 hTON = ~ ' + (Number(state.totalCoins) / Number(state.totalTokens)).toFixed(4) + ' TON'
}
}

Expand Down

0 comments on commit 363405f

Please sign in to comment.