Skip to content

Commit 28730d6

Browse files
committed
fix: small fix when balance is zero
1 parent 6fdb931 commit 28730d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BDKSwiftExampleWallet/Extensions/Int+Extensions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ extension UInt64 {
7070
}
7171

7272
func formattedBip177() -> String {
73-
if self >= 1_000_000 && self % 1_000_000 == .zero {
73+
if self != .zero && self >= 1_000_000 && self % 1_000_000 == .zero {
7474
return "\(self / 1_000_000)M"
7575

76-
} else if self % 1_000 == 0 {
76+
} else if self != .zero && self % 1_000 == 0 {
7777
return "\(self / 1_000)K"
7878
}
7979

0 commit comments

Comments
 (0)