Op1x3r Posted July 1, 2020 Report Share Posted July 1, 2020 After doing offer.send(), I use this function : setTimeout(confirm2FA, 5000, offer.id, 0); function confirm2FA(offerID,tries) { return new Promise((resolve, reject) => { community.acceptConfirmationForObject(config.coinflip.identitySecret, offerID, (err) => { if (err) { if(tries < 2) { tries++; setTimeout(confirm2FA, 25000, offerID, tries); reject('Offer confirmation 2FA: ' + err); } else { console.log("couldnt confirm"); } } else { console.log("confirmed"); resolve(true); // Offer is confirmed by 2FA } }); }); } and I get rate limited (error 429) pretty often, what am I doing wrong? (It usually confirms on the 3rd time) Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted July 2, 2020 Report Share Posted July 2, 2020 The rate-limiting is just really aggressive on the confirmation endpoints. If you're running multiple bots on the same IP, you'll need to use a different IP or a proxy. Quote Link to comment Share on other sites More sharing options...
Op1x3r Posted July 2, 2020 Author Report Share Posted July 2, 2020 18 hours ago, Dr. McKay said: The rate-limiting is just really aggressive on the confirmation endpoints. If you're running multiple bots on the same IP, you'll need to use a different IP or a proxy. Is there a setting for proxies? Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted July 2, 2020 Report Share Posted July 2, 2020 You can pass your own request instance to the constructor, with a proxy configured using request.defaults. Op1x3r 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.