mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user