Signal-iOS/Signal/test
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
..
Assets Improvements to PNG transcoding 2022-09-13 23:22:50 +00:00
attachments Change license to AGPL 2022-10-13 08:25:37 -05:00
contact Change license to AGPL 2022-10-13 08:25:37 -05:00
Groups Change license to AGPL 2022-10-13 08:25:37 -05:00
mocks Change license to AGPL 2022-10-13 08:25:37 -05:00
Models Change license to AGPL 2022-10-13 08:25:37 -05:00
Payments Change license to AGPL 2022-10-13 08:25:37 -05:00
PerformanceTests Change license to AGPL 2022-10-13 08:25:37 -05:00
profiles Change license to AGPL 2022-10-13 08:25:37 -05:00
SSKTests Change license to AGPL 2022-10-13 08:25:37 -05:00
subscriptions Handle decimals in one-time and gift donations 2022-10-17 09:18:05 -07:00
Supporting Files iOS 9 Support 2015-10-31 04:45:55 +01:00
util Change license to AGPL 2022-10-13 08:25:37 -05:00
ViewControllers Change license to AGPL 2022-10-13 08:25:37 -05:00
views/ImageEditor Change license to AGPL 2022-10-13 08:25:37 -05:00
AppDelegateTest.swift Change license to AGPL 2022-10-13 08:25:37 -05:00
OWSDeviceProvisioningURLParserTest.swift Change license to AGPL 2022-10-13 08:25:37 -05:00
PhoneNumberValidatorTest.swift Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalBaseTest.h Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalBaseTest.m Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalBaseTest+Swift.swift Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalTests-Bridging-Header.h Change license to AGPL 2022-10-13 08:25:37 -05:00