Page MenuHomePhabricator

[refactor] get ValueFromAmount via an implicit Amount::operator UniValue()
ClosedPublic

Authored by majcosta on Fri, May 28, 15:22.

Details

Summary

the number of decimals of precision that an Amount represents is currently all over the place on the codebase, this is one step to getting it all under one roof.

this seems more correct as well, representing as a UniValue is the Amount's job, not some free function. also less verbose code.

AmountFromValue probably should be an Amount constructor next.

Test Plan
ninja check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable