|
233 | 233 | return; |
234 | 234 | } |
235 | 235 |
|
236 | | - LoadQuickSellInformation( element, commodityID, description, abortController.signal ); |
| 236 | + LoadQuickSellInformation( element, commodityID, abortController.signal ); |
237 | 237 | } ); |
238 | 238 | } |
239 | 239 |
|
|
246 | 246 | /** |
247 | 247 | * @param {HTMLElement} element |
248 | 248 | * @param {string} commodityID |
249 | | - * @param {any} description |
250 | 249 | * @param {AbortSignal} signal |
251 | 250 | */ |
252 | | - function LoadQuickSellInformation( element, commodityID, description, signal ) |
| 251 | + function LoadQuickSellInformation( element, commodityID, signal ) |
253 | 252 | { |
254 | 253 | const histogramParams = new URLSearchParams(); |
255 | 254 | histogramParams.set( 'country', window.g_rgWalletInfo.wallet_country ); |
|
285 | 284 | return; |
286 | 285 | } |
287 | 286 |
|
288 | | - const publisherFee = ( typeof description.market_fee !== 'undefined' && description.market_fee !== null ) ? description.market_fee : window.g_rgWalletInfo.wallet_publisher_fee_percent_default; |
289 | | - |
290 | 287 | const hoverText = document.createElement( 'div' ); |
291 | 288 | hoverText.className = 'steamdb_orders_hover_text'; |
292 | 289 | hoverText.textContent = i18n.inventory_list_at.replace( '%price%', FormatCurrency( 0 ) ); |
|
306 | 303 | const str = isSellNow ? i18n.inventory_sell_at : i18n.inventory_list_at; |
307 | 304 |
|
308 | 305 | const price = Number.parseInt( button.dataset.price, 10 ); |
309 | | - const priceFees = window.CalculateFeeAmount( price, publisherFee ); |
310 | | - const priceAfterFees = price - priceFees.fees; |
| 306 | + const priceAfterFees = window.GetItemPriceFromTotal( price, window.g_rgWalletInfo ); |
311 | 307 |
|
312 | 308 | hoverText.textContent = str.replace( '%price%', FormatCurrency( price ) ); |
313 | 309 |
|
|
414 | 410 |
|
415 | 411 | if( data.lowest_sell_order ) |
416 | 412 | { |
417 | | - const undercutPrice = data.lowest_sell_order - 1; |
418 | | - const undercutPriceFees = window.CalculateFeeAmount( undercutPrice, publisherFee ); |
| 413 | + const nFloor = Number.parseInt( window.g_rgWalletInfo.wallet_market_minimum ?? 1, 10 ); |
| 414 | + const nIncrement = Number.parseInt( window.g_rgWalletInfo.wallet_currency_increment ?? 1, 10 ); |
| 415 | + const undercutPrice = data.lowest_sell_order - nIncrement; |
419 | 416 |
|
420 | | - if( undercutPrice - undercutPriceFees.fees > 0 && undercutPrice > data.highest_buy_order ) |
| 417 | + if( undercutPrice >= ( 3 * nFloor ) && undercutPrice > data.highest_buy_order ) |
421 | 418 | { |
422 | 419 | const row = document.createElement( 'tr' ); |
423 | 420 | row.classList.add( 'steamdb_order_row_clickable' ); |
|
0 commit comments