From 5fca4cc009cb162cae29824c186daa77a7d7876f Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 20 Sep 2016 17:05:04 -0300 Subject: [PATCH] test --- basilisk/basilisk_DEX.c | 15 ++++++++++++--- iguana/iguana_unspents.c | 2 -- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index 5bdfbc126..6570f1bc9 100755 --- a/basilisk/basilisk_DEX.c +++ b/basilisk/basilisk_DEX.c @@ -413,7 +413,7 @@ ZERO_ARGS(InstantDEX,allcoins) STRING_ARG(InstantDEX,available,source) { - char *retstr; cJSON *vals,*balancejson,*retjson = 0; + char *retstr; uint64_t total = 0; int32_t i,n; cJSON *item,*vals,*unspents,*balancejson,*retjson = 0; if ( source != 0 && source[0] != 0 && (coin= iguana_coinfind(source)) != 0 ) { if ( myinfo->expiration != 0 ) @@ -423,11 +423,20 @@ STRING_ARG(InstantDEX,available,source) { if ( (retstr= basilisk_balances(myinfo,coin,0,0,GENESIS_PUBKEY,vals,"")) != 0 ) { - printf("available.(%s)\n",retstr); + //printf("available.(%s)\n",retstr); if ( (balancejson= cJSON_Parse(retstr)) != 0 ) { + if ( (unspents= jarray(&n,balancejson,"unspents")) != 0 ) + { + for (i=0; i