Open asdasdasdasdasdasdasdad opened 2 years ago
Hi. I need to trigger the bot for NEW sales. I modified code:
const runSalesBot = async () => { console.log("starting sales bot..."); const mostRecentSignature = await solanaConnection.getSignaturesForAddress(projectPubKey, { limit: 1 }); const options = { until: mostRecentSignature[0].signature } let signatures; let lastKnownSignature; //const options = {}; while (true) { try { const signatures = await solanaConnection.getSignaturesForAddress(projectPubKey, options); if (!signatures.length) { console.log("polling...") await timer(pollingInterval); continue; } } catch (err) { console.log("error fetching signatures: ", err); continue; }
Output:
starting sales bot... polling... polling... polling... polling... polling... polling... polling... polling... polling... polling... polling... /home/opc/nft-sales-bot/sales_bot.js:46 for (let i = signatures.length - 1; i >= 0; i--) { ^ TypeError: Cannot read properties of undefined (reading 'length') at runSalesBot (/home/opc/nft-sales-bot/sales_bot.js:46:33)
What i need to do? Thanks in advance
Same issue
same.. any news?
Hi. I need to trigger the bot for NEW sales. I modified code:
Output:
What i need to do? Thanks in advance