mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
341fecdf86
* Fix Numeric encoding and decoding in Scala bindings fixes #7474 There are a few issues here: 1. We used toString which produces an exponential notation in some cases which is not supported by the ledger API. 2. On the other hand, we used BigDecimal.exact for decoding which isn’t completely wrong but more lax than what the ledger API supports 1 and 2 are fixed by switching to the respective functions in daml-lf/data 3. The tests in ValueSpec were never executed! The tests are split into a scala_library and a scala_test_suite and ValueSpec ended up in the library. I’ve split out the utilities from the actual code. 4. The generator for Numeric produced things that are not valid numerics (e.g. 92233720368547758070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 showed up in one test) which now fails with the more strict requirements. changelog_begin changelog_end * Apply suggestions from code review Co-authored-by: Stephen Compall <stephen.compall@daml.com> * Address review feedback changelog_begin changelog_end Co-authored-by: Stephen Compall <stephen.compall@daml.com> |
||
---|---|---|
.. | ||
codegen-common | ||
codegen-main | ||
hs/bindings | ||
java | ||
scala | ||
ts |