Bugfix/fix algebraic sign in twitter bot service (#4158)
* Fix -0.0 to 0.0 * Update changelog
This commit is contained in:
parent
8fc9d1c75c
commit
167abe4107
@ -28,6 +28,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Upgraded `Nx` from version `20.1.2` to `20.3.0`
|
- Upgraded `Nx` from version `20.1.2` to `20.3.0`
|
||||||
- Upgraded `zone.js` from version `0.14.10` to `0.15.0`
|
- Upgraded `zone.js` from version `0.14.10` to `0.15.0`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue with the algebraic sign in the twitter bot service
|
||||||
|
|
||||||
## 2.131.0 - 2024-12-25
|
## 2.131.0 - 2024-12-25
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -87,9 +87,15 @@ export class TwitterBotService {
|
|||||||
|
|
||||||
return benchmarks
|
return benchmarks
|
||||||
.map(({ marketCondition, name, performances }) => {
|
.map(({ marketCondition, name, performances }) => {
|
||||||
return `${name} ${(
|
let changeFormAllTimeHigh = (
|
||||||
performances.allTimeHigh.performancePercent * 100
|
performances.allTimeHigh.performancePercent * 100
|
||||||
).toFixed(1)}%${
|
).toFixed(1);
|
||||||
|
|
||||||
|
if (Math.abs(parseFloat(changeFormAllTimeHigh)) === 0) {
|
||||||
|
changeFormAllTimeHigh = '0.0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return `${name} ${changeFormAllTimeHigh}%${
|
||||||
marketCondition !== 'NEUTRAL_MARKET'
|
marketCondition !== 'NEUTRAL_MARKET'
|
||||||
? ' ' + resolveMarketCondition(marketCondition).emoji
|
? ' ' + resolveMarketCondition(marketCondition).emoji
|
||||||
: ''
|
: ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user