Jump to content
McKay Development

botsbytim

Member
  • Posts

    6
  • Joined

  • Last visited

Posts posted by botsbytim

  1.  

    i use like this, but not work.

    cb4fd363950d4b3da98457b5e1e0965d.png

     

    // Create and send the offer
    offer.addMyItems(inventory);
    offer.setMessage("Here, have some items!");
    offer.send(function(err, status) {
    if (err) {
    console.log(err);
    return;
    }
     
    if (status == 'pending') {
    // We need to confirm it
    console.log('Offer ' + offer.id +' sent, but requires confirmation');
    community.acceptConfirmationForObject("my identify_secret", offer.id, function(err) {
    if (err) {
    console.log(err);
    } else {
    console.log("Offer confirmed");
    }
    });
    } else {
    console.log('Offer '+ offer.id +' sent successfully');
    }
    });

     

     

    The confirmation's ID isnt the same as the trade id. Make it check confirmations if the status is pending and use the newConfirmation listener which emits a confirmation object. Then use CConfimation.id as offer id and accept it using that.

×
×
  • Create New...