Skip to content

Commit

Permalink
Merge pull request #259 from gobitfly/BIDS-2633/fix_chart_dai_convertion
Browse files Browse the repository at this point in the history
Fix Gnosis Chart DAI conversion
  • Loading branch information
manuelsc authored Nov 3, 2023
2 parents a683915 + 9a54c12 commit 92ee372
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/components/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')})`
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/services/unitconv.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 92ee372

Please sign in to comment.