diff --git a/src/masternodes/mn_rpc.cpp b/src/masternodes/mn_rpc.cpp index 07b5324507..c9692f31a7 100644 --- a/src/masternodes/mn_rpc.cpp +++ b/src/masternodes/mn_rpc.cpp @@ -1193,8 +1193,8 @@ BalanceKey decodeBalanceKey(std::string const& str) { } std::string tokenAmountString(CTokenAmount const& amount) { - auto token = pcustomcsview->GetToken(amount.nTokenId); - std::string valueString = std::to_string(amount.nValue / COIN) + "." + std::to_string(amount.nValue % COIN); + const auto token = pcustomcsview->GetToken(amount.nTokenId); + const auto valueString = strprintf("%d.%08d", amount.nValue / COIN, amount.nValue % COIN); return valueString + "@" + token->symbol + (token->IsDAT() ? "" : "#" + amount.nTokenId.ToString()); }