From 70723f8d5f9e8d35f6f8fad89547d4a40033d79e Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 11 Apr 2022 22:10:45 +0200 Subject: [PATCH] Bugfix/fix projected total amount in fire calculator (#825) * Fix calculation of projected total amount * Update changelog --- CHANGELOG.md | 6 ++++++ .../ui/src/lib/fire-calculator/fire-calculator.component.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4635739..fbc0cf20 100644 --- a/CHANGELOG.md +++ b/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 issue with the calculation of the projected total amount in the _FIRE_ calculator + ## 1.135.0 - 10.04.2022 ### Added diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts index 13fa76d2..50132f4f 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts @@ -234,7 +234,7 @@ export class FireCalculatorComponent datasetPrincipal.data.push(principal.toNumber()); datasetInterest.data.push(interest.toNumber()); - if (period === t - 1) { + if (period === t) { this.projectedTotalAmount = totalAmount.toNumber(); } }