diff --git a/auto-bid-tool/models/allbids.com.au/allbids-product-bid.js b/auto-bid-tool/models/allbids.com.au/allbids-product-bid.js index 8c9f655..196c1e9 100644 --- a/auto-bid-tool/models/allbids.com.au/allbids-product-bid.js +++ b/auto-bid-tool/models/allbids.com.au/allbids-product-bid.js @@ -245,11 +245,13 @@ export class AllbidsProductBid extends ProductBid { const currentHigherBid = historiesData[0]; + const histories = _.orderBy(this.histories, ["price"], "desc"); + if ( !isTimeReached(new Date(result.aucCloseUtc).toUTCString()) && currentHigherBid?.userName !== this?.web_bid?.display_name && this?.web_bid?.display_name && - currentHigherBid?.amount === this.histories[0].price && + currentHigherBid?.amount === histories[0].price && currentHigherBid?.amount >= this.max_price ) { console.log( @@ -290,7 +292,7 @@ export class AllbidsProductBid extends ProductBid { console.log( `⚠️ [${this.id}] Outbid detected, calling outBid function.`, ); - await outBid(this.id); + // await outBid(this.id); return; }