diff --git a/iguana/exchanges/LP_instantdex.c b/iguana/exchanges/LP_instantdex.c index 34560238a..404b04398 100644 --- a/iguana/exchanges/LP_instantdex.c +++ b/iguana/exchanges/LP_instantdex.c @@ -288,10 +288,13 @@ int64_t LP_claimtx(void *ctx,struct iguana_info *coin,bits256 *claimtxidp,bits25 uint32_t LP_claimtime(struct iguana_info *coin,uint32_t expiration) { uint32_t heighttime,now = (uint32_t)time(NULL); - heighttime = LP_heighttime(coin->symbol,coin->height); - printf("claimtime: now %u height.%d heighttime.%u expiration.%u\n",now,coin->height,heighttime,expiration); - if ( heighttime >= expiration ) - return(heighttime + 1); + if ( coin->height > 0 ) + { + heighttime = LP_heighttime(coin->symbol,coin->height-1); + printf("claimtime: now %u height.%d heighttime.%u expiration.%u\n",now,coin->height,heighttime,expiration); + if ( heighttime >= expiration ) + return(heighttime + 1); + } return(0); }