fix: total wallet balance not displaying

Fixes: #929.

Calculates total wallet balance when it is requested.
This commit is contained in:
emizzle 2020-09-28 13:25:03 +10:00 committed by Iuri Matias
parent 078e9758f0
commit 7f0720608e

View File

@ -205,6 +205,8 @@ proc updateAccount*(self: WalletModel, address: string) =
self.events.emit("accountsUpdated", Args())
proc getTotalFiatBalance*(self: WalletModel): string =
if self.totalBalance == 0.0:
self.calculateTotalFiatBalance()
fmt"{self.totalBalance:.2f}"
proc convertValue*(self: WalletModel, balance: string, fromCurrency: string, toCurrency: string): float =