From 76a601923df971d15c0ef265820aa47a17bcea97 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 25 Jul 2018 09:04:01 -1100 Subject: [PATCH] Fix order display --- src/cc/CCassetstx.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cc/CCassetstx.cpp b/src/cc/CCassetstx.cpp index fd57ba007..f09778376 100644 --- a/src/cc/CCassetstx.cpp +++ b/src/cc/CCassetstx.cpp @@ -80,16 +80,18 @@ UniValue AssetOrders(uint256 refassetid) item.push_back(Pair("funcid", funcidstr)); item.push_back(Pair("txid", uint256_str(assetidstr,txid))); item.push_back(Pair("vout", (int64_t)it->first.index)); - sprintf(numstr,"%.8f",(double)vintx.vout[it->first.index].nValue/COIN); - item.push_back(Pair("amount",numstr)); if ( funcid == 'b' || funcid == 'B' ) { + sprintf(numstr,"%.8f",(double)vintx.vout[it->first.index].nValue/COIN); + item.push_back(Pair("amount",numstr)); sprintf(numstr,"%.8f",(double)vintx.vout[0].nValue/COIN); item.push_back(Pair("bidamount",numstr)); } else { - sprintf(numstr,"%.8f",(double)vintx.vout[0].nValue); + sprintf(numstr,"%llu",(long long)vintx.vout[it->first.index].nValue); + item.push_back(Pair("amount",numstr)); + sprintf(numstr,"%llu",(long long)vintx.vout[0].nValue); item.push_back(Pair("askamount",numstr)); } if ( origpubkey.size() == 33 )