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
parent
commit
48f1c064bc
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      CHANGELOG.md
  2. 2
      apps/api/src/models/rule.ts

6
CHANGELOG.md

@ -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/),
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
### Changed

2
apps/api/src/models/rule.ts

@ -57,7 +57,7 @@ export abstract class Rule<T extends RuleSettings> implements RuleInterface<T> {
previousValue +
this.exchangeRateDataService.toCurrency(
new Big(currentValue.quantity)
.mul(currentValue.marketPrice)
.mul(currentValue.marketPrice ?? 0)
.toNumber(),
currentValue.currency,
baseCurrency

Loading…
Cancel
Save