From 68ba6242a1b0c0f83c05f02dabb10ec555dd9629 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 17 Oct 2017 14:36:06 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index b13d720b7..af9387558 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -268,17 +268,24 @@ dividends(coin, height, )\n\ if ( ptr->userpass[0] == 0 ) return(clonestr("{\"error\":\"no rpc credentials to enable\"}")); if ( LP_conflicts_find(ptr) == 0 ) + { ptr->inactive = 0; - else return(clonestr("{\"error\":\"coin port conflicts with existing coin\"}")); - } - return(jprint(LP_coinsjson(0),1)); + cJSON *array = cJSON_CreateArray(); + jaddi(array,LP_coinjson(ptr,0)); + return(jprint(array,1)); + } else return(clonestr("{\"error\":\"coin port conflicts with existing coin\"}")); + } else return(clonestr("{\"error\":\"couldnt find coin\"}")); } else if ( strcmp(method,"disable") == 0 ) { //* if ( (ptr= LP_coinsearch(coin)) != 0 ) + { ptr->inactive = (uint32_t)time(NULL); - return(jprint(LP_coinsjson(0),1)); + cJSON *array = cJSON_CreateArray(); + jaddi(array,LP_coinjson(ptr,0)); + return(jprint(array,1)); + } else return(clonestr("{\"error\":\"couldnt find coin\"}")); } else if ( strcmp(method,"electrum") == 0 ) {