IsThereAnyDeal / AugmentedSteam

Augments your Steam Experience
https://augmentedsteam.com
GNU General Public License v3.0
1.37k stars 84 forks source link

[BUG] Market Transaction Stats does not account for multiple currencies #1774

Open Talha-Ak opened 1 year ago

Talha-Ak commented 1 year ago

Expected Behavior

The Market Transactions stats component should accumulate currencies separately with a total for each currency, or convert additional currencies to the account's main currency before showing total.

Actual Behavior

(I suspect) currencies are disregarded and are all treated the same, leading to very inaccurate totals. I also suspect the problem is exacerbated due to certain currencies using a period as a separator, while others use a comma. image Goes without saying, but I have not earned £35 000 off the market.

Steps to Reproduce the Problem

  1. Complete market transaction on existing currency
  2. Change Steam account to a different currency
  3. Complete market transaction on new currency

Specifications

candela97 commented 1 year ago

So when you change your wallet currency, past market transactions stay in the same currency they were processed? Can you show a screenshot that verifies this behaviour? You can view market transactions by clicking on the "My Market History" tab.

Talha-Ak commented 1 year ago

Yes, past transactions remain in the same currency they were purchased in. The currency change doesn't happen within the same "page" of results (for my account) but here are a few transactions back-to-back: image image

candela97 commented 5 months ago

This is a tricky one. We can detect the currency by matching currency symbols, but apparently RMB and JPY share the same symbol 😅

Talha-Ak commented 4 months ago

Is it possible to pull in info from purchase history? From what I can see, it seems to render the currency code and country as a separate entry in that table every time a conversion happens.

image image image

candela97 commented 4 months ago

Hmm, but don't existing listings stay in the same currency they were listed in prior to conversion?

Talha-Ak commented 4 months ago

Yes, they do. (see below comment)

What I'm thinking is (I have no idea if this is actually practical):

That (should?) work around currencies using the same symbol.

Talha-Ak commented 4 months ago

don't existing listings stay in the same currency they were listed in prior to conversion?

Sorry, maybe I misunderstood this, let me clarify.

When an account's currency is changed, all listings currently active at the time of conversion get cancelled by Steam, so it's not possible to sell an item in a different currency to what the account currency is.

image

This looks different to a user removing a listing:

image

Listings that have already sold prior to currency conversion will show what they sold at in the currency the account/listing was previously in.

candela97 commented 4 months ago

Oh, so they get canceled, that's good to hear. Anyway, we can probably workaround the symbol thing with some extra heuristics, since it's just 2 currencies that have this problem.

We should continue using the market history to calculate this though. Using the purchase history will make this feature cross-domain, which opens up a new can of worms.

Talha-Ak commented 3 months ago

Not sure if I'm stepping on anyone's toes if this is being worked on already, but I've put together a quick PoC:

image

This doesn't take into account the CNY/JPY issue. Could probably check if "Cancelled by Steam" shows up between currencies to identify a change, but won't be able to determine which currency is which like that. Unless another heuristic is accessible from here?