diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 79a15ade2..36b1f7462 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -197,10 +197,9 @@ uint64_t LP_unspents_metric(struct iguana_info *coin,char *coinaddr) cJSON *LP_pubkeyjson(struct LP_pubkeyinfo *pubp) { - int32_t baseid,relid,i,j; uint64_t metric; char *base,coinaddr[64],hexstr[67],hexstr2[67]; double price; cJSON *item,*array,*obj,*unspents; struct iguana_info *coin; + int32_t baseid,relid,i,j; char *base,hexstr[67],hexstr2[67]; double price; cJSON *item,*array,*obj; obj = cJSON_CreateObject(); array = cJSON_CreateArray(); - unspents = cJSON_CreateArray(); for (baseid=0; baseidtaddr,coin->pubtype,pubp->rmd160,sizeof(pubp->rmd160)); - if ((metric= LP_unspents_metric(coin,coinaddr)) != 0 ) - jadd64bits(item,base,metric); - } - jaddi(unspents,item); } jaddbits256(obj,"pubkey",pubp->pubkey); for (i=0; irmd160); i++) @@ -239,13 +230,14 @@ cJSON *LP_pubkeyjson(struct LP_pubkeyinfo *pubp) init_hexbytes_noT(hexstr2,pubp->pubsecp,sizeof(pubp->pubsecp)); jaddstr(obj,"pubsecp",hexstr2); //printf("nonz rmd160 (%s %s)\n",hexstr,hexstr2); + break; } } + break; } } jaddnum(obj,"timestamp",pubp->timestamp); jadd(obj,"asks",array); - jadd(obj,"unspents",unspents); if ( pubp->istrusted != 0 ) jaddnum(obj,"istrusted",pubp->istrusted); return(obj);