Browse Source

Tradestatus

beta
jl777 7 years ago
parent
commit
f5f6acaf2c
  1. 6
      iguana/exchanges/LP_commands.c
  2. 3
      iguana/exchanges/LP_remember.c

6
iguana/exchanges/LP_commands.c

@ -453,6 +453,12 @@ stop()\n\
// end received response
// public access, even from http
else if ( strcmp(method,"tradestatus") == 0 )
{
LP_tradecommand_log(argjson);
printf("GOT TRADESTATUS! %s\n",jprint(argjson,0));
retstr = clonestr("{\"result\":\"success\"}");
}
else if ( strcmp(method,"balance") == 0 )
{
if ( (ptr= LP_coinsearch(jstr(argjson,"coin"))) != 0 )

3
iguana/exchanges/LP_remember.c

@ -1107,9 +1107,10 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti
sprintf(fname,"%s/SWAPS/%u-%u.finished",GLOBAL_DBDIR,rswap.requestid,rswap.quoteid), OS_compatible_path(fname);
if ( (fp= fopen(fname,"wb")) != 0 )
{
jaddstr(item,"method","tradestatus");
itemstr = jprint(item,0);
fprintf(fp,"%s\n",itemstr);
free(itemstr);
LP_reserved_msg(rswap.src,rswap.dest,zero,itemstr);
fclose(fp);
}
}

Loading…
Cancel
Save