mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-26 08:55:56 +01:00
FIX: Widget fiat balance would always be 0 with some currencies
This commit is contained in:
parent
88c9bacc9f
commit
da443546ba
2 changed files with 0 additions and 5 deletions
|
@ -18,7 +18,6 @@ struct WalletInformationView: View {
|
|||
let numberFormatter = NumberFormatter()
|
||||
numberFormatter.locale = Locale(identifier: WidgetAPI.getUserPreferredCurrencyLocale())
|
||||
numberFormatter.numberStyle = .currency
|
||||
numberFormatter.numberStyle = .currency
|
||||
let amount = numberFormatter.string(from: NSNumber(value: ((allWalletsBalance.balance / 100000000) * marketData.rate))) ?? ""
|
||||
return amount
|
||||
}
|
||||
|
|
|
@ -15,10 +15,6 @@ struct WidgetDataStore {
|
|||
var rateDoubleValue: Double? {
|
||||
let numberFormatter = NumberFormatter()
|
||||
numberFormatter.numberStyle = .decimal
|
||||
numberFormatter.locale = Locale(identifier: WidgetAPI.getUserPreferredCurrencyLocale())
|
||||
numberFormatter.maximumFractionDigits = 2
|
||||
numberFormatter.minimumFractionDigits = 2
|
||||
|
||||
if let rateDoubleValue = numberFormatter.number(from: rate) {
|
||||
return rateDoubleValue.doubleValue
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue