Skip to content

Commit

Permalink
Don't normalize sign for zero currency values
Browse files Browse the repository at this point in the history
  • Loading branch information
It's me, CI committed Oct 27, 2023
1 parent 4af0c22 commit 06ee174
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib/currency/currency.ml
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,7 @@ module Make_str (A : Wire_types.Concrete) = struct

type magnitude = Unsigned.t [@@deriving sexp, compare]

let create ~magnitude ~sgn =
{ magnitude
; sgn = (if Unsigned.(equal magnitude zero) then Sgn.Pos else sgn)
}
let create ~magnitude ~sgn = { magnitude; sgn }

let sgn { sgn; _ } = sgn

Expand Down

0 comments on commit 06ee174

Please sign in to comment.