diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 6b49ad323..2a45899ba 100644 --- a/iguana/exchanges/LP_commands.c +++ b/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 ) diff --git a/iguana/exchanges/LP_remember.c b/iguana/exchanges/LP_remember.c index 778da68f4..74aca2ba1 100644 --- a/iguana/exchanges/LP_remember.c +++ b/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); } }