Merge #8317: [rpcwallet] Don't use floating point
477777f
[rpcwallet] Don't use floating point (MarcoFalke)
This commit is contained in:
commit
304eff3c61
1 changed files with 3 additions and 3 deletions
|
@ -565,7 +565,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;
|
||||
|
@ -643,7 +643,7 @@ UniValue getreceivedbyaccount(const UniValue& params, bool fHelp)
|
|||
}
|
||||
}
|
||||
|
||||
return (double)nAmount / (double)COIN;
|
||||
return ValueFromAmount(nAmount);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue