[#302] Fix integer conversion in `morley-client get-balance`
Description
Problem: morley-client get-balance
was reporting wrong results for large balances due to an accidental conversion from Int64
to Word32
, which truncated balances >= 4294 Tz.
Solution:
-
The
NodeAPI
type has been changed to return a newTezosMutez
type instead ofTezosInt64
. The conversion toMutez
is handled in the instanceFromJSON TezosMutez
. -
To avoid code duplication,
parseMutezJson
is replaced by relying onFromJSON TezosMutez
.
Related issue(s)
Resolves #302 (closed).
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Simon Jakobi