Browse Source
Bugfix/handle X-ray rule exception when market price is missing (#6397)
* Handle X-ray rule exception when market price is missing
* Update changelog
pull/6403/head
Abhishek Garg
4 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
7 additions and
1 deletions
-
CHANGELOG.md
-
apps/api/src/models/rule.ts
|
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. |
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|
|
|
|
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
|
|
- Fixed an exception by adding a fallback for missing market price values on the _X-ray_ page |
|
|
|
|
|
|
|
|
## 2.243.0 - 2026-02-23 |
|
|
## 2.243.0 - 2026-02-23 |
|
|
|
|
|
|
|
|
### Changed |
|
|
### Changed |
|
|
|
|
|
@ -57,7 +57,7 @@ export abstract class Rule<T extends RuleSettings> implements RuleInterface<T> { |
|
|
previousValue + |
|
|
previousValue + |
|
|
this.exchangeRateDataService.toCurrency( |
|
|
this.exchangeRateDataService.toCurrency( |
|
|
new Big(currentValue.quantity) |
|
|
new Big(currentValue.quantity) |
|
|
.mul(currentValue.marketPrice) |
|
|
.mul(currentValue.marketPrice ?? 0) |
|
|
.toNumber(), |
|
|
.toNumber(), |
|
|
currentValue.currency, |
|
|
currentValue.currency, |
|
|
baseCurrency |
|
|
baseCurrency |
|
|
|