Compare commits
	
		
			No commits in common. "da1c6726b3cc96f2da5c0d7febf7ed8fe74ce4af" and "45080ae65a0cdf55ddaf41bf044ee9f19bc0fc1b" have entirely different histories.
		
	
	
		
			da1c6726b3
			...
			45080ae65a
		
	
		| 
						 | 
				
			
			@ -440,17 +440,6 @@ export class GraysProductBid extends ProductBid {
 | 
			
		|||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      const bids = await this.getCurrentHistories();
 | 
			
		||||
 | 
			
		||||
      const bidedData = this.bidedData(bids);
 | 
			
		||||
 | 
			
		||||
      console.log({ bidedData });
 | 
			
		||||
 | 
			
		||||
      if (bidedData && bidedData.Price >= this.max_price + this.plus_price) {
 | 
			
		||||
        console.log(`[${this.id}] Bidded with ${bidedData.Price}`);
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      console.log(
 | 
			
		||||
        "-------------------------------------BIDING---------------------------------------"
 | 
			
		||||
      );
 | 
			
		||||
| 
						 | 
				
			
			@ -468,25 +457,6 @@ export class GraysProductBid extends ProductBid {
 | 
			
		|||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async getCurrentHistories() {
 | 
			
		||||
    const { data } = await axios({
 | 
			
		||||
      url: `https://www.grays.com/api/LotInfo/GetBiddingHistory?lotId=${this.lot_id}`,
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    const bids = data?.Bids || [];
 | 
			
		||||
 | 
			
		||||
    return bids;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  bidedData(bids) {
 | 
			
		||||
    // A.V - Lidcombe NSW
 | 
			
		||||
    const data = bids.find(
 | 
			
		||||
      (bid) =>
 | 
			
		||||
        `${bid?.UserInitials} - ${bid.UserShortAddress}` == "A.V - Lidcombe NSW"
 | 
			
		||||
    );
 | 
			
		||||
    return data;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  getBidedData() {
 | 
			
		||||
    return global[`BIDED_DATA_${this.web_bid?.origin_url}`];
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue