Create nonzero tokens

This commit is contained in:
jl777
2018-08-16 01:07:44 -11:00
parent f6160f58c1
commit 4d47fcb937

View File

@@ -5411,6 +5411,11 @@ UniValue tokencreate(const UniValue& params, bool fHelp)
LOCK2(cs_main, pwalletMain->cs_wallet);
name = params[0].get_str();
supply = atof(params[1].get_str().c_str()) * COIN;
if ( name.size() == 0 || supply <= 0 )
{
result.push_back(Pair("error", "invalid parameter"));
return(result);
}
if ( params.size() == 3 )
{
description = params[2].get_str();