Skip to content

feat: (ussd) add support for float amount values

Mohamed Sohail requested to merge sohail/ussd-float-values into master
  • removes all int castings
  • rounding down to a precision of 2 dp for higher precision values
  • for values with 2 dp, no changes except for str -> float casting

examples inputs and their respective conversions @willruddick :

  • 2 -> 2.0
  • 2.5 -> 2.5
  • 2.55 -> 2.55
  • 2.559 -> 2.55
  • 2.5599 -> 2.55
  • 3.9999999999999999999999999 -> rejected
Edited by Mohamed Sohail

Merge request reports