Bugfix/fix initialization of fire calculator (#3470)

* Fix initialization

* Update changelog
This commit is contained in:
Thomas Kaul
2024-06-08 18:44:57 +02:00
committed by GitHub
parent 87501e094d
commit f5e6f7dcfe
3 changed files with 49 additions and 28 deletions

View File

@@ -50,7 +50,12 @@ export class FirePageComponent implements OnDestroy, OnInit {
.subscribe(({ summary }) => {
this.fireWealth = summary.fireWealth
? new Big(summary.fireWealth)
: new Big(10000);
: new Big(0);
if (this.user.subscription?.type === 'Basic') {
this.fireWealth = new Big(10000);
}
this.withdrawalRatePerYear = this.fireWealth.mul(4).div(100);
this.withdrawalRatePerMonth = this.withdrawalRatePerYear.div(12);