Browse Source

Merge pull request #728 from jl777/jl777

Fix jaddnum -> jadd64bits for aliceid
patch-3
jl777 7 years ago
committed by GitHub
parent
commit
cbf275dd12
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      iguana/exchanges/LP_instantdex.c
  2. 2
      iguana/exchanges/LP_remember.c

6
iguana/exchanges/LP_instantdex.c

@ -678,13 +678,13 @@ cJSON *LP_swapstats_item(struct LP_swapstats *sp,int32_t iambob)
struct iguana_info *bob,*alice; int32_t flag = 0; char *retstr,*swapstr; bits256 zero; cJSON *item,*reqjson,*swapjson;
item = cJSON_CreateObject();
jaddnum(item,"iambob",iambob);
jaddnum(item,"aliceid",sp->aliceid);
jadd64bits(item,"aliceid",sp->aliceid);
jaddnum(item,"requestid",sp->Q.R.requestid);
jaddnum(item,"quoteid",sp->Q.R.quoteid);
jaddstr(item,"base",sp->Q.srccoin);
jaddnum(item,"satoshis",sp->Q.satoshis);
jadd64bits(item,"satoshis",sp->Q.satoshis);
jaddstr(item,"rel",sp->Q.destcoin);
jaddnum(item,"destsatoshis",sp->Q.destsatoshis);
jadd64bits(item,"destsatoshis",sp->Q.destsatoshis);
jaddnum(item,"price",sp->Q.destsatoshis/((double)sp->Q.satoshis+1));
if ( LP_swap_finished(sp,1) == 0 )
{

2
iguana/exchanges/LP_remember.c

@ -1772,7 +1772,7 @@ char *LP_recent_swaps(int32_t limit)
jaddstr(item,"alice",LP_Alicequery.destcoin);
jaddstr(item,"rel",LP_Alicequery.destcoin);
jaddnum(item,"relvalue",dstr(LP_Alicequery.destsatoshis));
jaddnum(item,"aliceid",LP_aliceid_calc(LP_Alicequery.desttxid,LP_Alicequery.destvout,LP_Alicequery.feetxid,LP_Alicequery.feevout));
jadd64bits(item,"aliceid",LP_aliceid_calc(LP_Alicequery.desttxid,LP_Alicequery.destvout,LP_Alicequery.feetxid,LP_Alicequery.feevout));
jadd(retjson,"pending",item);
} else Alice_expiration = 0;
return(jprint(retjson,1));

Loading…
Cancel
Save