This tiny PR replaces all remaining occurences of manual conversion of Satoshi amounts (CAmount) to a currency unit string via division and modulo operation on COIN (100000000) by the utility function FormatMoney(...). The instances were found with the command
git grep "\%[ ]*COIN"
Only ToString()-functions are affected, but still I'd argue that the constants COIN should only be used:
- for money constants (like in benchmark/tests, chainparams,
GetBlockSubsidy(...)etc.) and - for utility functions that need it (like
{Parse,Format}Money,ValueFromAmountetc.)
Note that strictly speaking, this is not a pure refactor, as the function FormatMoney(...) drops excess zero after two decimal places.