Nicklason / tf2-automatic

A free and open source, fully automated TF2 trading bot, advertising on backpack.tf using prices from prices.tf
https://tf2automatic.com
MIT License
82 stars 41 forks source link

Possible escrow check issue. Check occured and gave an ok despite acceptescrow == false. #434

Closed HunionKnight closed 4 years ago

HunionKnight commented 4 years ago

Describe the bug From ! Jerseyetr 's bot. The bot performed an escrow check on a trade and did not reject despite acceptescrow == false.

To Reproduce

Steps to reproduce the behavior: Unknown reproduction method.

Expected behavior Escrow checks on all trades. If err or escrow=true => reject. Code looks fine;

checkEscrow(offer: TradeOfferManager.TradeOffer): Promise { log.debug('Checking escrow');

    return new Promise((resolve, reject) => {
        const operation = retry.operation({
            retries: 5,
            factor: 2,
            minTimeout: 1000,
            randomize: true
        });

        operation.attempt(() => {
            log.debug('Attempting to check escrow...');
            offer.getUserDetails((err, me, them) => {
                log.debug('Escrow callback');
                if (!err || err.message !== 'Not Logged In') {
                    // No error / not because session expired
                    if (operation.retry(err)) {
                        return;
                    }

                    if (err) {
                        return reject(operation.mainError());
                    }

                    log.debug('Done checking escrow');

                    return resolve(them.escrowDays !== 0);
                }

Screenshots and logs

Text log: https://pastebin.com/YekBLRkC

Additional context

Please refer to @! jerseyetr for more information.

Version: 3.4.0

Jerseyetr commented 4 years ago

Happened again yesterday.

I'm at work and just now noticed.

I'll post logs here if I can.

Running latest version.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.