Jump to content
McKay Development

acceptConfirmationForObject


neverhood

Recommended Posts

Hello, I'm using card bot (lvl up bot) with public source code

everything is working fine, but I want to do this bot more effective

 

this bot using:

community.startConfirmationChecker(10000, CONFIG.IDENTITYSECRET);

and I don't like this method, I trying to use acceptConfirmationForObject, but I think I'm doing something wrong

 

community.on("newConfirmation", (CONF) => {
     console.log("## New confirmation.");
    community.acceptConfirmationForObject(CONFIG.IDENTITYSECRET, CONF.id); 
});

because if I remove "community.startConfirmationChecker" my trades are not accepted

when I use: "community.on("newConfirmation", (CONF) => {" I don't even see console logs with "console.log("## New confirmation.");"

 

 

did I do something wrong?
I want to remove startConfirmationChecker and using only acceptConfirmationForObject

Link to comment
Share on other sites

oh I get it now, thank you

					if (status == 'pending') {
						// We need to confirm it
						console.log(`Offer #${offer.id} sent, but requires confirmation`);
						community.acceptConfirmationForObject(config.identitySecret, offer.id, function(err) {
							if (err) {
								console.log(err);
							} else {
								console.log("Offer confirmed");
							}
						});
					} else {
						console.log(`Offer #${offer.id} sent successfully`);
					}

used this and works good! 

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