@@ -18,6 +18,7 @@ import log from '../../../lib/logger';
18
18
import { pure , testPriceKey } from '../../../lib/tools/export' ;
19
19
import filterAxiosError from '@tf2autobot/filter-axios-error' ;
20
20
import { AxiosError } from 'axios' ;
21
+ import { Entry } from '../../Pricelist' ;
21
22
22
23
// Bot manager commands
23
24
@@ -619,7 +620,13 @@ export default class ManagerCommands {
619
620
}
620
621
}
621
622
622
- const match = this . bot . pricelist . getPrice ( { priceKey : listingSKU } ) ;
623
+ let match : Entry | null ;
624
+ const assetIdPrice = this . bot . pricelist . getPrice ( { priceKey : listing . id . slice ( '440_' . length ) } ) ;
625
+ if ( null !== assetIdPrice ) {
626
+ match = assetIdPrice ;
627
+ } else {
628
+ match = this . bot . pricelist . getPrice ( { priceKey : listingSKU } ) ;
629
+ }
623
630
624
631
if ( isFilterCantAfford && listing . intent === 0 && match !== null ) {
625
632
const canAffordToBuy = inventoryManager . isCanAffordToBuy ( match . buy , inventory ) ;
@@ -708,8 +715,8 @@ export default class ManagerCommands {
708
715
}
709
716
}
710
717
711
- const skusToCheck = Object . keys ( pricelist ) ;
712
- const pricelistCount = skusToCheck . length ;
718
+ const priceKeysToCheck = Object . keys ( pricelist ) ;
719
+ const pricelistCount = priceKeysToCheck . length ;
713
720
714
721
if ( pricelistCount > 0 ) {
715
722
clearTimeout ( this . executeRefreshListTimeout ) ;
@@ -718,7 +725,7 @@ export default class ManagerCommands {
718
725
log . debug (
719
726
'Checking listings for ' +
720
727
pluralize ( 'item' , pricelistCount , true ) +
721
- ` [${ skusToCheck . join ( ', ' ) } ] ...`
728
+ ` [${ priceKeysToCheck . join ( ', ' ) } ] ...`
722
729
) ;
723
730
724
731
this . bot . sendMessage (
@@ -738,7 +745,7 @@ export default class ManagerCommands {
738
745
} , ( this . pricelistCount > 4000 ? 60 : 30 ) * 60 * 1000 ) ;
739
746
740
747
await this . bot . listings . recursiveCheckPricelist (
741
- skusToCheck ,
748
+ priceKeysToCheck ,
742
749
pricelist ,
743
750
true ,
744
751
this . pricelistCount > 4000 ? 400 : 200 ,
0 commit comments