Skip to content

Commit fdfcdea

Browse files
committed
just additional thing for starsAmount
1 parent 43741a3 commit fdfcdea

File tree

1 file changed

+6
-2
lines changed
  • submodules/TelegramCore/Sources/TelegramEngine/Payments

1 file changed

+6
-2
lines changed

submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,15 @@ public struct StarsAmount: Equatable, Comparable, Hashable, Codable, CustomStrin
281281
}
282282

283283
public var stringValue: String {
284+
return "\(totalValue)"
285+
}
286+
287+
public var totalValue: Double {
284288
if self.nanos == 0 {
285-
return "\(self.value)"
289+
return Double(self.value)
286290
} else {
287291
let totalValue = (Double(self.value) * 1e9 + Double(self.nanos)) / 1e9
288-
return "\(totalValue)"
292+
return totalValue
289293
}
290294
}
291295

0 commit comments

Comments
 (0)