Skip to content

Commit

Permalink
Prevents Sending Pings for Escrow Trades
Browse files Browse the repository at this point in the history
  • Loading branch information
Step7750 committed Apr 20, 2024
1 parent df0b80e commit b46acfe
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 b46acfe

Please sign in to comment.