diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 01b57a821..6a68e716e 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -113,6 +113,11 @@ double LP_pricecache(struct LP_quoteinfo *qp,char *base,char *rel,bits256 txid,i { if ( qp != 0 ) (*qp) = ptr->Q; + if ( ptr->price == 0. && ptr->Q.satoshis != 0 ) + { + printf("null ptr->price? "); + ptr->price = (double)ptr->Q.destsatoshis / ptr->Q.satoshis; + } printf("found %s/%s %.8f\n",base,rel,ptr->price); return(ptr->price); }