Skip to content

Commit

Permalink
Requires Trade History to Be Complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Step7750 committed May 18, 2024
1 parent 0a8e2d4 commit 5fd5bbd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/alarms/trade_history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ async function getTradeHistoryFromAPI(): Promise<TradeHistoryStatus[]> {

const data = (await resp.json()) as TradeHistoryAPIResponse;
return data.response.trades
.filter((e) => e.status === 3) // Ensure we only count _complete_ trades (k_ETradeStatus_Complete)
.filter((e) => !e.time_escrow_end || new Date(parseInt(e.time_escrow_end) * 1000).getTime() < Date.now())
.map((e) => {
return {
Expand Down

0 comments on commit 5fd5bbd

Please sign in to comment.