Commit Graph

5 Commits

Author SHA1 Message Date
692904d462 Trade: Add tradehistories table
and create rows at the end of each trade.
Both users traded cards are logged.
2023-01-12 14:43:06 +01:00
2ef1dfe7a7 Trade: Persist trades in the database
using atomic transactions.
If a card happens to not be owned by the trading user, the entire
trade is being rolled back.
Rollback behaviour is a bit weird though, since we have to rollback
manually even in a managed transaction.
2023-01-02 22:49:46 +01:00
95c3f41fde Trade: Properly handle trade cancellation and timeouts
- Trade finishing states are now handled properly.
- Deferring cancel button press
- A user is on a 2 minute cooldown after a trade finishes or
  cancels if he is the one who initiated it.
- Updated emote IDs
2023-01-02 21:04:24 +01:00
c866bc08eb Trade: Add TradeStore and trade flow
Adding a TradeStore to keep track of active trades and their states.
Also implements the core trade flow and embed logic.
2022-11-23 17:35:29 +01:00
42797eb90e [WIP] Trading and TradingStore implementation 1 2022-11-22 17:15:48 +01:00