bartervg / barter.vg

Track and hold discussion on Barter.vg bugs, enhancements, and other issues
https://barter.vg
MIT License
20 stars 4 forks source link

Multiple user offers tradables #68

Open bartervg opened 4 years ago

bartervg commented 4 years ago

Describe the bug After accepting a multiple user offer, the associated tradables are not correctly recorded. This leads to broken syncs and other negative outcomes.

Steps to reproduce the bug

  1. Accept multi-user offer
  2. Complete offer and click the update collections option
  3. Tradables will not update as expected

Expected behavior Tradables associated with the offer should decrement, or if 0 quantity, be removed from tradable collection.

Also, it would be useful to know that an offer began as a multiple-user offer.

Screenshots (if applicable)

Device (if relevant) N/A

Additional context jiumohoo initially reported this as a sync problem, but at the time, it wasn't connected to multiple user offers, and therefore, unable to reproduce. Dan reported a similar problem, but stated that it was a multiple user offer https://discordapp.com/channels/329829406153375755/329829406153375755/663840252909060130 and this lead to the detection of the problem.

bartervg commented 3 years ago

There was a critical bug related to this. Fortunately, the damage appeared limited to incomplete syncing of tradables. The fix to mitigate the bug broke the move function on the item pages.

bartervg commented 1 year ago

Currently, only the sender has tradables associated with multiple-user / no-specific-user offers. When a user joins an offer, the items requested aren't associated with specific tradables. Therefore, upon completion, the tradables don't move to the traded collection. This association could be automated upon joining except when there are multiple tradables.

This will complicate joining an offer if the joiner has multiple tradables of the same game. The joiner will need to select which tradable to associate with the offer. For example, an offer requests This War of Mine and the joiner has multiple tradables from Fanatical, Humble, Tiltify, and Green Man Gaming. The joiner plans to send the Humble tradable and would need to select that specific tradable prior to accepting. Doing so will ensure that upon offer completion, This War of Mine from Humble moves to Traded and the other tradables remain in Tradable.