Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Market Problem #222

Closed
OliverTrust opened this issue Aug 12, 2024 · 8 comments
Closed

Market Problem #222

OliverTrust opened this issue Aug 12, 2024 · 8 comments
Labels

Comments

@OliverTrust
Copy link

OliverTrust commented Aug 12, 2024

Describe the bug

After this update c2a4d30 i have a problem with relist overpriced market listings. All my items on market marked as overpriced. My currency is RUB. Previous version work without any problems

version with problem
1
version without problem
2

Browser name and version

chrome 127.0.6533.100

@xPaw
Copy link
Contributor

xPaw commented Aug 12, 2024

wtf valve, their russian "currency symbol" has a latin "p" instead of cyrillic one.

So it's failing to strip it from the amount, causing the bug I think.

GetPriceValueAsInt('0,47 pуб.') // latin
47

GetPriceValueAsInt('0,47 руб.') // cyrillic
4700

GetCurrencySymbol( 'RUB' )
'pуб.'

image

EDIT: Seems like the steam store itself also has this, so I'm not sure why it wouldn't parse on market, can you copy "руб." from the market page and paste it into https://apps.timwhitlock.info/unicode/inspect to check.

@OliverTrust
Copy link
Author

Yes, i have the same result

@xPaw
Copy link
Contributor

xPaw commented Aug 12, 2024

Then I'm not sure why it would cause issues, 0,47rub should parse to 47, the bug is some multiplier to 100 somewhere.

@SeRi0uS007
Copy link
Contributor

SeRi0uS007 commented Aug 19, 2024

It seems that using unsafeWindow.GetPriceValueAsInt with raw jQuery text() can lead to wrong script behavior.

I have exactly the same problem (my currency is ₴).
But I have stacked items for sale.
img1

Because of the dot at the end, the GetPriceValueAsInt function doesn't work as it should.

In addition, priceSeller receives the price in parentheses (0.03₴) as an argument, which is why GetPriceValueAsInt simply returns 0...

img2

@xPaw
Copy link
Contributor

xPaw commented Aug 19, 2024

Because of the dot at the end, the GetPriceValueAsInt function doesn't work as it should.

That "/piece." is definitely problematic, didn't know this is even a thing. I don't know if just removing last dot will work for all languages here.

And for seller price, just stripping () should work. Wanna make a PR?

@SeRi0uS007
Copy link
Contributor

It's even funny :)
img1

@xPaw

Wanna make a PR?

I also want to fix the wrong math for the items in the stack. I want to return getPriceFromMarketListing (or create a new function with Regex) to clean the price strings.

@xPaw
Copy link
Contributor

xPaw commented Aug 19, 2024

There shouldn't be strings in market with that many dots, so that's fine.

SeRi0uS007 added a commit to SeRi0uS007/Steam-Economy-Enhancer that referenced this issue Aug 20, 2024
Update regex for more price formats
SeRi0uS007 added a commit to SeRi0uS007/Steam-Economy-Enhancer that referenced this issue Aug 20, 2024
Make it more elegant
@xPaw
Copy link
Contributor

xPaw commented Aug 21, 2024

their russian "currency symbol" has a latin "p" instead of cyrillic one.

well that was fixed after today's maintenance

Nuklon added a commit that referenced this issue Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants