From 247e7c95c418f9af7370dc2b4129827529e0d47d Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 3 Mar 2017 19:42:52 +0200 Subject: [PATCH] Test --- basilisk/jumblr.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/basilisk/jumblr.c b/basilisk/jumblr.c index 6e82caa2c..90636c492 100755 --- a/basilisk/jumblr.c +++ b/basilisk/jumblr.c @@ -132,8 +132,20 @@ int64_t jumblr_receivedby(struct supernet_info *myinfo,struct iguana_info *coin, int64_t jumblr_balance(struct supernet_info *myinfo,struct iguana_info *coin,char *addr) { - char *retstr; double val; int64_t balance = 0; - if ( (retstr= jumblr_zgetbalance(myinfo,coin,addr)) != 0 ) + char *retstr; double val; cJSON *retjson; int64_t balance = 0; + if ( strlen(addr) < 40 ) + { + if ( (retstr= _dex_getbalance(myinfo,coin->symbol,addr)) != 0 ) + { + if ( (retjson= cJSON_Parse(retstr)) != 0 ) + { + balance = jdouble(retjson,"balance") * SATOSHIDEN; + free_json(retjson); + } + free(retstr); + } + } + else if ( (retstr= jumblr_zgetbalance(myinfo,coin,addr)) != 0 ) { if ( (val= atof(retstr)) > SMALLVAL ) balance = val * SATOSHIDEN;