Adds Reporting for Steam Failed Trades - #411
Conversation
It's possible for a Steam trade to hit status 4 (failed) upon offer acceptance. This PR will push notary proofs if the related trade is for a CSFloat sale, allowing the platform to gracefully handle it. Ref CSF-1701
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9a9cf8c. Configure here.
| const csfloatTrade = pendingTrades.find( | ||
| (pendingTrade) => | ||
| pendingTrade.state === TradeState.PENDING && | ||
| pendingTrade.steam_offer?.state === TradeOfferState.Active && |
There was a problem hiding this comment.
Active offer blocks failed matching
Medium Severity
findFailedTrades only matches when steam_offer.state is Active, but status-4 failures happen after the offer is accepted. Steam then reports Accepted, and pingSentTradeOffers can update CSFloat before a notary retry. Unlike rollback matching, this drops the trade permanently after one failed prove or if another party already pinged Accepted.
Reviewed by Cursor Bugbot for commit 9a9cf8c. Configure here.
| function tradeHistory(): TradeHistoryStatus { | ||
| return { | ||
| trade_id: 'steam-trade-id', | ||
| status: TradeStatus.Failed, | ||
| other_party_url: `https://steamcommunity.com/profiles/${otherPartyID}`, | ||
| other_party_id: otherPartyID, | ||
| received_assets: [{asset_id: steamAssetID}], | ||
| given_assets: [], | ||
| time_init: 123, | ||
| }; | ||
| } |
There was a problem hiding this comment.
do these need to be functions? Feels like pendingTrade and tradeHistory might be better suited as static variables


It's possible for a Steam trade to hit status 4 (failed) upon offer acceptance.
This PR will push notary proofs if the related trade is for a CSFloat sale, allowing the platform to gracefully handle it.
Ref CSF-1701
Note
Medium Risk
Changes trade verification and notary submission for pending marketplace trades; mistakes could mis-report failures or skip proofs, but logic mirrors rollback and is gated by feature flags and deduplication.
Overview
Steam trades that fail on acceptance (status 4) can now be detected and reported to CSFloat so pending sales can be handled without manual intervention.
The extension pulls failed entries from Steam trade history (API
include_failedand filtering forTradeStatus.Failed) and matches them to pending CSFloat trades by asset id and counterparty, skipping trades already linked viasteam_trade_failed_idor with an accepted offer. Matched cases trigger background notary proofs (same rollback gate and 60-minute failure backoff), withbuildProveRequestnow settinginclude_failed: true.The periodic CSFloat trade ping runs
pingFailedTradesalongside rollback handling and surfacesfailed_trades_erroron failure.SlimTradegains optionalsteam_trade_failed_idfor deduplication; unit tests cover matching rules.Reviewed by Cursor Bugbot for commit 9a9cf8c. Bugbot is set up for automated code reviews on this repo. Configure here.