Skip to content

Commit

Permalink
Merge pull request #216 from csfloat/fix/escrow-pings
Browse files Browse the repository at this point in the history
Prevents Sending Pings for Escrow Trades
  • Loading branch information
Step7750 authored Apr 28, 2024
2 parents 75b7532 + 6a193a7 commit 6aaf213
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/alarms/trade_history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ interface TradeHistoryAPIResponse {
status: number;
assets_given?: HistoryAsset[];
assets_received?: HistoryAsset[];
time_escrow_end?: string;
}[];
};
}
Expand All @@ -80,6 +81,7 @@ async function getTradeHistoryFromAPI(): Promise<TradeHistoryStatus[]> {

const data = (await resp.json()) as TradeHistoryAPIResponse;
return data.response.trades
.filter((e) => !e.time_escrow_end || new Date(parseInt(e.time_escrow_end) * 1000).getTime() < Date.now())
.map((e) => {
return {
other_party_url: `https://steamcommunity.com/profiles/${e.steamid_other}`,
Expand Down

0 comments on commit 6aaf213

Please sign in to comment.