Skip to content

Commit

Permalink
Merge pull request #107 from bvbfan/fix/account_prc
Browse files Browse the repository at this point in the history
Fix account value representation
  • Loading branch information
monstrobishi authored Nov 22, 2020
2 parents 891bb4f + 7e7767f commit 952b6b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/masternodes/mn_rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 952b6b1

Please sign in to comment.