Skip to content

fix: parse whole-unit market search prices - #375

Open
tarikermis wants to merge 1 commit into
DoctorMcKay:masterfrom
tarikermis:fix-market-search-integer-prices
Open

fix: parse whole-unit market search prices#375
tarikermis wants to merge 1 commit into
DoctorMcKay:masterfrom
tarikermis:fix-market-search-integer-prices

Conversation

@tarikermis

Copy link
Copy Markdown

Fixes #346

Steam renders whole-unit market prices with -- in the cents position, for example 1,--€. The current parser strips non-digits, so that value becomes 1 cent instead of 100 cents.

This replaces the terminal -- placeholder with 00 before the existing digit-only normalization. Decimal prices and localized thousands separators keep their current behavior.

Verification

  • Parsed mocked market-search rows for 1,23€, $1.23, 1,--€, $1.--, and 1.234,--€; all produced the expected cent values.
  • node --check classes/CMarketSearchResult.js
  • git diff --check

The repository has no configured test script.

Best Regards, Tarik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

marketSearch() returnes the wrong price for the items fetched

1 participant