Bugfix/fix currency inconsistency with conversion of ZAR to ZAc (#2869)
* Fix conversion from ZAR to ZAc * Update changelog
This commit is contained in:
parent
165ca94f5b
commit
440dc470fa
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fixed the currency in the error log of the exchange rate data service
|
- Fixed the currency in the error log of the exchange rate data service
|
||||||
|
- Fixed an issue with the currency inconsistency in the _EOD Historical Data_ service (convert from `ZAR` to `ZAc`)
|
||||||
|
|
||||||
## 2.38.0 - 2024-01-13
|
## 2.38.0 - 2024-01-13
|
||||||
|
|
||||||
|
@ -235,6 +235,17 @@ export class EodHistoricalDataService implements DataProviderInterface {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (response[`${DEFAULT_CURRENCY}ZAR`]) {
|
||||||
|
response[`${DEFAULT_CURRENCY}ZAc`] = {
|
||||||
|
...response[`${DEFAULT_CURRENCY}ZAR`],
|
||||||
|
currency: 'ZAc',
|
||||||
|
marketPrice: this.getConvertedValue({
|
||||||
|
symbol: `${DEFAULT_CURRENCY}ZAc`,
|
||||||
|
value: response[`${DEFAULT_CURRENCY}ZAR`].marketPrice
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
let message = error;
|
let message = error;
|
||||||
@ -350,6 +361,9 @@ export class EodHistoricalDataService implements DataProviderInterface {
|
|||||||
} else if (symbol === `${DEFAULT_CURRENCY}ILA`) {
|
} else if (symbol === `${DEFAULT_CURRENCY}ILA`) {
|
||||||
// Convert ILS to ILA
|
// Convert ILS to ILA
|
||||||
return new Big(value).mul(100).toNumber();
|
return new Big(value).mul(100).toNumber();
|
||||||
|
} else if (symbol === `${DEFAULT_CURRENCY}ZAc`) {
|
||||||
|
// Convert ZAR to ZAc
|
||||||
|
return new Big(value).mul(100).toNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user