diff --git a/src/app/right-bar-creators/right-bar-creators.component.html b/src/app/right-bar-creators/right-bar-creators.component.html index 1682c8980..1ac420d6f 100644 --- a/src/app/right-bar-creators/right-bar-creators.component.html +++ b/src/app/right-bar-creators/right-bar-creators.component.html @@ -35,6 +35,20 @@ +
+
Total Hodled
+
+
+ + ≈ {{ globalVars.nanosToUSD(totalValue(), 2) }} +
+ +
+ +
USD
+
+
+
diff --git a/src/app/right-bar-creators/right-bar-creators.component.ts b/src/app/right-bar-creators/right-bar-creators.component.ts index d4df057d7..86f57d4d8 100644 --- a/src/app/right-bar-creators/right-bar-creators.component.ts +++ b/src/app/right-bar-creators/right-bar-creators.component.ts @@ -69,4 +69,18 @@ export class RightBarCreatorsComponent implements OnInit { this.backendApi.SetStorage(RightBarCreatorsComponent.RightBarTabKey, this.activeTab); } } + + totalValue() { + let result = 0; + + for (const holding of this.globalVars.loggedInUser.UsersYouHODL) { + result += + this.globalVars.bitcloutNanosYouWouldGetIfYouSold( + holding.BalanceNanos, + holding.ProfileEntryResponse.CoinEntry + ) || 0; + } + + return result; + } }