AlphaWallet / AlphaWallet/alpha-wallet-ios
Replace occurrences of String(format: "%.5f"... with appropriate NumberFormatter
- Dominant language
- Swift
- Stars
- 631
- Forks
- 384
- PR merge metrics
- No merged PRs in 30d
Description
Use an existing `NumberFormatter` or create a new `NumberFormatter` in `Formatters.swift` so that the rounding and precision is the same throughout the app. Rounding is implementation-defined as seen below (the fprintf [specification](https://pubs.opengroup.org/onlinepubs/009695399/functions/printf.html))
"The double argument shall be converted to decimal notation in the style "[-]ddd.ddd", where the number of digits after the radix character is equal to the precision specification. If the precision is missing, it shall be taken as 6; if the precision is explicitly zero and no '#' flag is present, no radix character shall appear. If a radix character appears, at least one digit appears before it. _The low-order digit shall be rounded in an implementation-defined manner._"
Contributor guide
Assessment
This issue has not been assessed yet.