-modified ChannelsExactAmount

-fixes
This commit is contained in:
Mihailo Milenkovic
2018-10-01 18:24:14 +02:00
parent bd632043f2
commit 7f0ed443f1
4 changed files with 109 additions and 74 deletions

View File

@@ -5124,11 +5124,15 @@ UniValue tokenaddress(const UniValue& params, bool fHelp)
UniValue channelsinfo(const UniValue& params, bool fHelp)
{
if ( fHelp || params.size() != 0 )
char addr[100];
if ( fHelp || params.size() > 1 )
throw runtime_error("channelsinfo\n");
if ( ensure_CCrequirements() < 0 )
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
return(ChannelsInfo());
strcpy(addr,"");
if (params.size() > 0 && !params[0].isNull() && !params[0].get_str().empty())
strcpy(addr,params[0].get_str().c_str());
return(ChannelsInfo(addr));
}
UniValue channelsopen(const UniValue& params, bool fHelp)