aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-08-07 14:41:29 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-08-07 17:01:21 +0200
commitec05c508c681b01ca990f091f346f5171538ce8d (patch)
tree38f77a320165eaddd0b5169969ca29f6108460ba /src
parent46347add438d49a69f34a3f2ab755feda7daff10 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/core_write.cpp3
1 files changed, 1 insertions, 2 deletions
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);