Skip to content

Commit

Permalink
fixed sticker names, price and wear on market
Browse files Browse the repository at this point in the history
  • Loading branch information
gergelyszabo94 committed Dec 4, 2024
1 parent ccf687a commit 4bb1b4e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion extension/src/utils/floatCaching.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ const extractUsefulFloatInfo = (floatInfo) => {
// eslint-disable-next-line camelcase
origin_name, min, max, stickers, low_rank, high_rank,
} = { ...floatInfo };

let stickersModified = null;

if (stickers !== undefined) {
stickersModified = stickers.map((sticker) => {
return {
...sticker,
name: sticker.market_hash_name.split('Sticker | ')[1],
stickerId: sticker.sticker_id,
};
});
}

return {
floatvalue,
paintindex,
Expand All @@ -73,7 +86,7 @@ const extractUsefulFloatInfo = (floatInfo) => {
origin_name,
min,
max,
stickers: stickers !== undefined ? stickers : null,
stickers: stickersModified,
// eslint-disable-next-line camelcase
low_rank: low_rank !== undefined ? low_rank : null,
// eslint-disable-next-line camelcase
Expand Down

0 comments on commit 4bb1b4e

Please sign in to comment.