Jump to content
McKay Development

Recommended Posts

Posted

Following Code which is I used.

 

var client = new SteamUser();
var manager = new TradeOfferManager({
    "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam
    "domain": "example.com", // Our domain is example.com
    "language": "en", // We want English item descriptions
    "cancelTime" : 120000 //Cancellation Time in miliseconds 1000 ms = 1 second, After 2 minute cancel trade
});
 
var offer = manager.createOffer(trade_url);
offer.data('cancelTime', null); //I written my code to remove cancellation time for this trade but do not work this code
offer.addMyItems(inv_to_trade);                                                
offer.setMessage("My Message here");
offer.send(function (err, status) {
    if (err) {
      logger.error("trade send Error",err);
     return true;
    }

});

 

 

Question : I written offer.data('cancelTime', null); but this do not work so How I cancel this offer ?

Posted (edited)

offer.data('cancelTime', null); should be right. Maybe try using 0 instead of null?

Maybe as a workaround use offer.data('cancelTime', 864000000);? (Equal to 10 days)

Edited by McMuffinDK
Posted (edited)

offer.data('cancelTime', null); should be right. Maybe try using 0 instead of null?

I tried this one also like offer.data("cancelTime",0); but not working. Trade cancel after 2 minute.

Edited by Hellcase031
Posted (edited)

Maybe as a workaround use offer.data('cancelTime', 864000000);? (Equal to 10 days)

I tried this one also like offer.data("cancelTime",864000000); but not working. Trade cancel after 2 minute.

Edited by Hellcase031
  • 1 month later...

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...