Signal-iOS/Signal/test/subscriptions
Evan Hahn e0ebfac315 Handle decimals in one-time and gift donations
We fetch the cost of gift badges and suggested one-time donation
amounts. For example, gift badges cost $5 and £4.

Previously, we parsed these as `UInt`s. This had two disadvantages:

1. There was no way to represent fractional amounts (like $1.23)
2. It was inconsistent with a lot of our code, which expects `Decimal`s
   or `NSDecimalNumber`s

This changes these to use `Decimal` instead.

Tested this by:

- Adding some automated tests
- Making a one-time donation (with a non-default currency)
- Sending a gift badge (with a non-default currency)
- Checking donation receipts

We also had some hard-coded presets for one-time donations, which were
unused. I removed these.
2022-10-17 09:18:05 -07:00
..
SubscriptionManagerTest.swift Handle decimals in one-time and gift donations 2022-10-17 09:18:05 -07:00