Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BDKSwiftExampleWallet/Model/BalanceDisplayFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import Foundation

enum BalanceDisplayFormat: String, CaseIterable, Codable {
case sats = "sats"
case bitcoinSats = "bitcoinSats"
case bitcoin = "btc"
case sats = "sats"
case fiat = "usd"

var displayText: String {
Expand Down
2 changes: 1 addition & 1 deletion BDKSwiftExampleWallet/View/WalletView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ extension WalletView {
case .bitcoin:
return String(format: "%.8f", Double(viewModel.balanceTotal) / 100_000_000)
case .fiat:
return String(format: "%.2f", viewModel.satsPrice)
return viewModel.satsPrice.formatted(.number.precision(.fractionLength(2)))
}
}

Expand Down