diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 2f1de8e18..2bbee302d 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -258,7 +258,7 @@ register(pubkey,pushaddr)\n\ lookup(pubkey)\n\ forward(pubkey,hexstr)\n\ \"}")); - printf("CMD.(%s)\n",jprint(argjson,0)); + //printf("CMD.(%s)\n",jprint(argjson,0)); if ( USERPASS[0] != 0 && strcmp(remoteaddr,"127.0.0.1") == 0 && port != 0 ) { if ( USERPASS_COUNTER == 0 ) @@ -404,9 +404,9 @@ forward(pubkey,hexstr)\n\ retstr = LP_peers(); else if ( IAMLP != 0 ) { - if ( strcmp(method,"getutxos") == 0 && (coin= jstr(argjson,"coin")) != 0 ) + if ( strcmp(method,"getutxos") == 0 ) { - retstr = LP_utxos(1,LP_mypeer,coin,jint(argjson,"lastn")); + retstr = LP_utxos(1,LP_mypeer,jstr(argjson,"coin"),jint(argjson,"lastn")); //printf("RETURN. %d utxos\n",cJSON_GetArraySize(cJSON_Parse(retstr))); } else if ( strcmp(method,"register") == 0 ) diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index 4eab2d5f6..81eca4751 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -249,7 +249,7 @@ cJSON *LP_utxojson(struct LP_utxoinfo *utxo) return(item); } -char *LP_utxos(int32_t iambob,struct LP_peerinfo *mypeer,char *coin,int32_t lastn) +char *LP_utxos(int32_t iambob,struct LP_peerinfo *mypeer,char *symbol,int32_t lastn) { int32_t i,firsti; struct LP_utxoinfo *utxo,*tmp; cJSON *utxosjson = cJSON_CreateArray(); i = 0; @@ -260,7 +260,7 @@ char *LP_utxos(int32_t iambob,struct LP_peerinfo *mypeer,char *coin,int32_t last { if ( i++ < firsti ) continue; - if ( (coin == 0 || coin[0] == 0 || strcmp(coin,utxo->coin) == 0) && utxo->T.spentflag == 0 )//&& LP_ismine(utxo) > 0 ) + if ( (symbol == 0 || symbol[0] == 0 || strcmp(symbol,utxo->coin) == 0) && utxo->T.spentflag == 0 )//&& LP_ismine(utxo) > 0 ) { jaddi(utxosjson,LP_utxojson(utxo)); }