diff --git a/iguana/exchanges/LP_remember.c b/iguana/exchanges/LP_remember.c index 0ab1a6929..8c20ae04d 100644 --- a/iguana/exchanges/LP_remember.c +++ b/iguana/exchanges/LP_remember.c @@ -370,12 +370,12 @@ int32_t basilisk_swap_isfinished(int32_t iambob,bits256 *txids,int32_t *sentflag return(1); else if ( bits256_nonz(txids[BASILISK_BOBPAYMENT]) == 0 || sentflags[BASILISK_BOBPAYMENT] == 0 ) { - if ( bits256_nonz(depositspent) != 0 ) + if ( bits256_nonz(depositspent) != 0 && ((bits256_nonz(txids[BASILISK_ALICEPAYMENT]) == 0 && sentflags[BASILISK_ALICEPAYMENT] == 0) || bits256_nonz(Apaymentspent) != 0) ) return(1); } - else if ( bits256_nonz(Apaymentspent) != 0 ) - return(1); - else if ( bits256_nonz(paymentspent) != 0 && bits256_nonz(depositspent) != 0 ) + //else if ( bits256_nonz(Apaymentspent) != 0 ) + // return(1); + else if ( bits256_nonz(Apaymentspent) != 0 && bits256_nonz(paymentspent) != 0 && bits256_nonz(depositspent) != 0 ) return(1); } else @@ -393,6 +393,8 @@ int32_t basilisk_swap_isfinished(int32_t iambob,bits256 *txids,int32_t *sentflag return(1); else if ( sentflags[BASILISK_BOBSPEND] != 0 ) // without ALICECLAIM this is loss due to inactivity return(1); + else if ( sentflags[BASILISK_ALICECLAIM] != 0 ) //got deposit! happy alice + return(1); } } return(0);