addfunding now in coins

try correct fraction of profits
This commit is contained in:
dimxy
2019-04-19 22:12:21 +05:00
parent 0684f7ab6e
commit 01dfdc6b67
2 changed files with 3 additions and 3 deletions

View File

@@ -1358,7 +1358,7 @@ UniValue pricesaddfunding(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 2)
throw runtime_error("pricesaddfunding bettxid amount\n"
"where amount is in satoshis\n");
"where amount is in coins\n");
LOCK(cs_main);
UniValue ret(UniValue::VOBJ);
@@ -1370,7 +1370,7 @@ UniValue pricesaddfunding(const UniValue& params, bool fHelp)
if (bettxid.IsNull())
throw runtime_error("invalid bettxid\n");
CAmount amount = atoll(params[1].get_str().c_str());
CAmount amount = atof(params[1].get_str().c_str()) * COIN;
if (amount <= 0)
throw runtime_error("invalid amount\n");