Jump to content
McKay Development

on "sendOfferChanged" is emmiting when nothing is changed


sNIP

Recommended Posts

When I send a trade, it keeps telling me that the offer status is changed to 2 (Active), this happens every ~4-~7 seconds after I send the offer. Code related to the trade offer manager

EDIT: The code below is wrapped inside an async Start() function, so I can use async.

 var pollData = await offerService.getPollData();
  const manager = new TradeOfferManager({
    steam: client,
    community: community,
    language: "en",
    cancelOfferCount: 30,
    pollData: pollData
  });
  manager.on("sentOfferChanged", (offeroldState=> {   //<this emits every ~4-~7 seconds
    console.log(`Sent offer changed:` + offer.state);
 
    senderService.onSentOfferChanged(thisIdoffer.partner.getSteamID64(), offer);
  });
manager.on("pollData"data => {
    offerService.savePollData(thisIddata);
  });
Edited by sNIP
Link to comment
Share on other sites

On 12/14/2019 at 11:09 AM, Dr. McKay said:

What is the oldState when it emits when you believe it shouldn't?

I will check it, but I believe its the same, because if I keep the app running, it can emit 1000 times before I close it or the trade offer changes it states

Link to comment
Share on other sites

There's no reason why it should ever be 12, that isn't used internally or anything. Maybe Steam is just really really fussy for your account or something? Maybe 12 is a value used internally by Valve for something and something's buggy with your offer(s).

Could you set up a script to monitor the API directly and alert if it notices a value of 12?

Link to comment
Share on other sites

16 hours ago, Dr. McKay said:

There's no reason why it should ever be 12, that isn't used internally or anything. Maybe Steam is just really really fussy for your account or something? Maybe 12 is a value used internally by Valve for something and something's buggy with your offer(s).

Could you set up a script to monitor the API directly and alert if it notices a value of 12?

Iam using this, it works fine, when I have time, I will look it up, probably after my finals. 

 if(oldState == 12){
      return;
    }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...