Browse Source

Test

etomic
jl777 7 years ago
parent
commit
05c925a605
  1. 10
      iguana/exchanges/LP_signatures.c
  2. 2
      iguana/exchanges/LP_swap.c

10
iguana/exchanges/LP_signatures.c

@ -48,16 +48,12 @@ cJSON *LP_quotejson(struct LP_quoteinfo *qp)
jaddnum(retjson,"tradeid",qp->tradeid);
jaddstr(retjson,"base",qp->srccoin);
if ( LP_etomicsymbol(activesymbol,etomic,qp->srccoin) != 0 )
{
jaddstr(retjson,"bobetomic",etomic);
jaddstr(retjson,"etomicsrc",qp->etomicsrc);
}
jaddstr(retjson,"etomicsrc",qp->etomicsrc);
jaddstr(retjson,"rel",qp->destcoin);
if ( LP_etomicsymbol(activesymbol,etomic,qp->destcoin) != 0 )
{
jaddstr(retjson,"alicetomic",etomic);
jaddstr(retjson,"etomicdest",qp->etomicdest);
}
jaddstr(retjson,"etomicdest",qp->etomicdest);
if ( qp->coinaddr[0] != 0 )
jaddstr(retjson,"address",qp->coinaddr);
if ( qp->timestamp != 0 )
@ -699,7 +695,7 @@ void LP_query(void *ctx,char *myipaddr,int32_t mypubsock,char *method,struct LP_
jadd(reqjson,"proof",LP_instantdex_txids(0,coin->smartaddr));
}
msg = jprint(reqjson,1);
//printf("QUERY.(%s)\n",msg);
//printf("etomicdest.(%s) QUERY.(%s)\n",qp->etomicdest,msg);
//if ( bits256_nonz(qp->srchash) == 0 || strcmp(method,"request") != 0 )
{
memset(&zero,0,sizeof(zero));

2
iguana/exchanges/LP_swap.c

@ -1048,6 +1048,8 @@ struct basilisk_swap *bitcoin_swapinit(bits256 privkey,uint8_t *pubkey33,bits256
{
//FILE *fp; char fname[512];
uint8_t *alicepub33=0,*bobpub33=0; int32_t jumblrflag=-2,x = -1; struct iguana_info *bobcoin,*alicecoin; char bobstr[65],alicestr[65];
strcpy(swap->I.etomicsrc,qp->etomicsrc);
strcpy(swap->I.etomicdest,qp->etomicdest);
strcpy(swap->I.bobstr,swap->I.req.src);
strcpy(swap->I.alicestr,swap->I.req.dest);
LP_etomicsymbol(bobstr,swap->I.bobtomic,swap->I.bobstr);

Loading…
Cancel
Save