Hello! I'm trying to send offers. I can create them and I works fine But, when I try to send the confirmation, 80~90% of the times I get this error: "[Error: Could not find confirmation for object XXXXXXXXXX]" The offer is sent, but then I need to confirm it on my mobile device. What can I do to send the confirmation correctly? This is the code I'm using for send it
var text_to_send = "Thanks for playing. Here is you reward :D";
var offer = manager.createOffer(trade_url);
offer.addMyItems(items_to_send);
offer.setMessage(text_to_send);
offer.send(function(err, status) {
if (err) {
console.log(err);
return;
}
if (status == 'pending') {
console.log(`Offer #${offer.id} sent, but requires confirmation`);
community.acceptConfirmationForObject(confirmation_key, offer.id, function(err) {
if (err) {
console.log(err);
} else {
console.log("Offer confirmed");
bbdd.save();//save to the ddbb
}
});
} else {
console.log(`Offer #${offer.id} sent successfully`);
bbdd.save();//save to the ddbb
}
What I'm doing wrong? Is there other way to confirm my offers sent? Thanks for reading this post and have a nice gaming!