[rpcwallet] Don't use floating point
Github-Pull: #8317
Rebased-From: 477777f250
This commit is contained in:
parent
ec0afbd52b
commit
ad99a79869
|
@ -596,7 +596,7 @@ UniValue getreceivedbyaddress(const UniValue& params, bool fHelp)
|
|||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
|
||||
CScript scriptPubKey = GetScriptForDestination(address.Get());
|
||||
if (!IsMine(*pwalletMain, scriptPubKey))
|
||||
return (double)0.0;
|
||||
return ValueFromAmount(0);
|
||||
|
||||
// Minimum confirmations
|
||||
int nMinDepth = 1;
|
||||
|
@ -674,7 +674,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp)
|
|||
}
|
||||
}
|
||||
|
||||
return (double)nAmount / (double)COIN;
|
||||
return ValueFromAmount(nAmount);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue