From 286eb0bf76af112eba91fb778a0517c7812dc090 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 31 Mar 2018 20:26:49 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_rpc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index affa62038..47ac3305d 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -510,9 +510,21 @@ cJSON *LP_listtransactions(char *symbol,char *coinaddr,int32_t count,int32_t ski if ( count == 0 ) count = 10; sprintf(buf,"[\"\", %d, %d, true]",count,skip); + retjson = cJSON_CreateArray(); if ( (array= bitcoin_json(coin,"listtransactions",buf)) != 0 ) - return(array); - else return(cJSON_Parse("[]")); + { + if ( (n= cJSON_GetArraySize(array)) > 0 ) + { + for (i=0; ielectrum,&retjson,coinaddr,zero)); }