Browse Source

Test

etomic
jl777 7 years ago
parent
commit
37ae216909
  1. 11
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_utxo.c

11
iguana/exchanges/LP_commands.c

@ -372,8 +372,15 @@ dividends(coin, height, <args>)\n\
else if ( strcmp(method,"listunspent") == 0 )
{
if ( (ptr= LP_coinsearch(jstr(argjson,"coin"))) != 0 )
return(jprint(LP_address_utxos(ptr,jstr(argjson,"address"),1),1));
else return(clonestr("{\"error\":\"cant find coind\"}"));
{
char *coinaddr;
if ( (coinaddr= jstr(argjson,"address")) != 0 )
{
if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_mypriv25519) != 0 )
LP_privkey_init(-1,ptr,G.LP_mypriv25519,G.LP_mypub25519);
return(jprint(LP_address_utxos(ptr,coinaddr,1),1));
} else return(clonestr("{\"error\":\"no address specified\"}"));
} else return(clonestr("{\"error\":\"cant find coind\"}"));
}
else if ( strcmp(method,"balance") == 0 )
{

2
iguana/exchanges/LP_utxo.c

@ -433,8 +433,6 @@ int32_t LP_unspents_array(struct iguana_info *coin,char *coinaddr,cJSON *array)
v = jint(item,"tx_pos");
height = jint(item,"height");
val = j64bits(item,"value");
//if ( strcmp(coin->symbol,"LBC") == 0 )
// printf("(%s)\n",jprint(item,0));
if ( coin->electrum == 0 && (txobj= LP_gettxout(coin->symbol,coinaddr,txid,v)) != 0 )
{
value = LP_value_extract(txobj,0);

Loading…
Cancel
Save