diff --git a/basilisk/basilisk_bitcoin.c b/basilisk/basilisk_bitcoin.c index 392a5d980..6adbec85d 100755 --- a/basilisk/basilisk_bitcoin.c +++ b/basilisk/basilisk_bitcoin.c @@ -905,7 +905,12 @@ cJSON *basilisk_history_item(struct iguana_info *coin,int64_t *totalp,char *coin jaddnum(item,"numseconds",time(NULL) - timestamp); details = cJSON_CreateObject(); if ( ismine > 0 ) + { jaddnum(details,"ismine",ismine); + if ( strcmp(vinvoutstr,"spentheight") == 0 ) + jaddstr(details,"category","sent"); + else jaddstr(details,"category","received"); + } jaddbits256(details,"txid",txid); jaddnum(details,vinvoutstr,vinvout); jaddnum(details,"height",height); diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index ed0450cc3..9579469a3 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -293,7 +293,7 @@ cJSON *iguana_RTunspentjson(struct supernet_info *myinfo,struct iguana_info *coi } else { - if ( iguana_scriptget(coin,scriptstr,asmstr,sizeof(scriptstr),outpt.hdrsi,outpt.unspentind,txid,up->vout,rmd160,up->type,pubkey33) != 0 ) + if ( iguana_scriptget(coin,scriptstr,asmstr,sizeof(scriptstr),outpt.hdrsi,outpt.unspentind,txid,vout,rmd160,up!=0?up->type:2,pubkey33) != 0 ) jaddstr(item,"scriptPubKey",scriptstr); } jaddnum(item,"amount",dstr(value)); diff --git a/iguana/iguana_wallet.c b/iguana/iguana_wallet.c index bed0129bf..303967741 100755 --- a/iguana/iguana_wallet.c +++ b/iguana/iguana_wallet.c @@ -1162,7 +1162,7 @@ TWOSTRINGS_AND_INT(bitcoinrpc,walletpassphrase,password,permanentfile,timeout) retstr = SuperNET_login(IGUANA_CALLARGS,myinfo->handle,myinfo->secret,myinfo->permanentfile,myinfo->password); myinfo->expiration = (uint32_t)time(NULL) + timeout; iguana_walletinitcheck(myinfo,coin); - basilisk_unspents_update(myinfo,coin); + //basilisk_unspents_update(myinfo,coin); return(retstr); } diff --git a/iguana/tests/listtransactions b/iguana/tests/listtransactions new file mode 100755 index 000000000..0b719dc7f --- /dev/null +++ b/iguana/tests/listtransactions @@ -0,0 +1 @@ +curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listtransactions\",\"params\":[1, 9999999, [\"RUXwXF37SMA63vL4bUPnytP3KUwp69PCVv\"]]}"