Fix amounts formatting in decoderawtransaction
and getsuperblockbudget
This commit is contained in:
parent
a82f22e528
commit
c853c012ee
@ -186,8 +186,7 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
|
||||
auto it = ptxSpentInfo->mSpentInfo.find(spentKey);
|
||||
if (it != ptxSpentInfo->mSpentInfo.end()) {
|
||||
auto spentInfo = it->second;
|
||||
UniValue outValue(UniValue::VNUM, FormatMoney(spentInfo.satoshis));
|
||||
in.push_back(Pair("value", outValue));
|
||||
in.push_back(Pair("value", ValueFromAmount(spentInfo.satoshis)));
|
||||
in.push_back(Pair("valueSat", spentInfo.satoshis));
|
||||
if (spentInfo.addressType == 1) {
|
||||
in.push_back(Pair("address", CBitcoinAddress(CKeyID(spentInfo.addressHash)).ToString()));
|
||||
|
@ -1078,10 +1078,7 @@ UniValue getsuperblockbudget(const JSONRPCRequest& request)
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Block height out of range");
|
||||
}
|
||||
|
||||
CAmount nBudget = CSuperblock::GetPaymentsLimit(nBlockHeight);
|
||||
std::string strBudget = FormatMoney(nBudget);
|
||||
|
||||
return strBudget;
|
||||
return ValueFromAmount(CSuperblock::GetPaymentsLimit(nBlockHeight));
|
||||
}
|
||||
|
||||
static const CRPCCommand commands[] =
|
||||
|
Loading…
Reference in New Issue
Block a user