From ec05c508c681b01ca990f091f346f5171538ce8d Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 7 Aug 2017 14:41:29 +0200 Subject: rpc: Use ValueFromAmount instead of FormatMoney in TxToUniv With this, the amounts returned in `decoderawtransaction` will be padded to 8 digits like anywhwere else in the API. --- src/core_write.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core_write.cpp') diff --git a/src/core_write.cpp b/src/core_write.cpp index 2bf28a1506..217b491a0d 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -194,8 +194,7 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry) UniValue out(UniValue::VOBJ); - UniValue outValue(UniValue::VNUM, FormatMoney(txout.nValue)); - out.pushKV("value", outValue); + out.pushKV("value", ValueFromAmount(txout.nValue)); out.pushKV("n", (int64_t)i); UniValue o(UniValue::VOBJ); -- cgit v1.2.3