mlabs-haskell / hydra-auction

An auction system running on Hydra L2 solution
Apache License 2.0
6 stars 6 forks source link

Refactor all Lovelace values from Integer type to Lovelace #47

Open uhbif19 opened 1 year ago

nazrhom commented 1 year ago

I have looked a bit into this issues, and I don't think this change gets us anything.

The Lovelace type exported from Hydra.Cardano.Api (and Cardano.Api) don't have toData instances, so we would have to end up defining them ourselves. We would end up with more or less the same amount of code we have now, and we would be introducing orphan instances.

uhbif19 commented 1 year ago

@nazrhom The point was not to make less code, but to make it more type-safe, to not mix up different scales by accident.

uhbif19 commented 1 year ago

Issue is covering various 1_000_000 magic number usages in #153 as well.