[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 48/69: fix fractions
From: |
gnunet |
Subject: |
[taler-taler-ios] 48/69: fix fractions |
Date: |
Fri, 19 Jan 2024 09:02:21 +0100 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a commit to branch master
in repository taler-ios.
commit 5e8eda4c96cddc316a4903a8017dcaa334d11c22
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Jan 18 00:01:49 2024 +0100
fix fractions
---
taler-swift/Sources/taler-swift/Amount.swift | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/taler-swift/Sources/taler-swift/Amount.swift
b/taler-swift/Sources/taler-swift/Amount.swift
index 024201c..9866301 100644
--- a/taler-swift/Sources/taler-swift/Amount.swift
+++ b/taler-swift/Sources/taler-swift/Amount.swift
@@ -251,7 +251,7 @@ public final class Amount: Codable, Hashable, @unchecked
Sendable, CustomStringC
public init(currency: String, cent: UInt64) {
self.currency = currency
self.integer = cent / 100 // For existing currencies, fractional
digits could be 0, 2 or 3
- self.fraction = UInt32(cent - (self.integer * 100))
+ self.fraction = UInt32(cent - (self.integer * 100)) *
(Self.fractionalBase() / 100)
}
/// Initializes an amount from a decoder.
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 63/69: Locale.preferredLanguageCode, (continued)
- [taler-taler-ios] 63/69: Locale.preferredLanguageCode, gnunet, 2024/01/19
- [taler-taler-ios] 40/69: Exchange -> Banking, gnunet, 2024/01/19
- [taler-taler-ios] 65/69: Restrictions, gnunet, 2024/01/19
- [taler-taler-ios] 62/69: cleanup, preview, gnunet, 2024/01/19
- [taler-taler-ios] 36/69: b-i-withdrawal hint, gnunet, 2024/01/19
- [taler-taler-ios] 45/69: remove SideBarView, gnunet, 2024/01/19
- [taler-taler-ios] 69/69: Bump version to 0.9.4 (1), gnunet, 2024/01/19
- [taler-taler-ios] 61/69: InfiniteTransactionLoop, gnunet, 2024/01/19
- [taler-taler-ios] 55/69: logging, gnunet, 2024/01/19
- [taler-taler-ios] 42/69: remove payto scheme, gnunet, 2024/01/19
- [taler-taler-ios] 48/69: fix fractions,
gnunet <=
- [taler-taler-ios] 66/69: InterfaceOrientation, gnunet, 2024/01/19
- [taler-taler-ios] 41/69: AppIcon blue, gnunet, 2024/01/19
- [taler-taler-ios] 38/69: remove, gnunet, 2024/01/19
- [taler-taler-ios] 39/69: Bump version to 0.9.3 (34), gnunet, 2024/01/19
- [taler-taler-ios] 35/69: Markdown for ToS, gnunet, 2024/01/19
- [taler-taler-ios] 37/69: dbg+cleanup, gnunet, 2024/01/19
- [taler-taler-ios] 53/69: Summary no longer twice, gnunet, 2024/01/19
- [taler-taler-ios] 34/69: tintcolor (blue) for links, gnunet, 2024/01/19
- [taler-taler-ios] 57/69: use cent initializer, gnunet, 2024/01/19
- [taler-taler-ios] 64/69: show minor in tx details, gnunet, 2024/01/19