I am using Quicknode and ether.js to monitor pending transactions using the following code:
provider.on("pending", async (tx) => {
provider.getTransaction(tx).then(function (transaction) {
if (transaction != null && transaction['data'].includes(myAddress)) {
console.log(transaction['data']);
console.log(transaction['hash']);
console.log(transaction);
}
})})
I have also used transaction.from instead of checking the whole transaction data.
I can find plenty of pending transactions if I don't include myAddress. However, I seem to miss every single of my own pending transactions. I have read here that sometimes not all pending transactions are retrieved. In this case, I have tried retrieving my pending transaction half a dozen times and have never found it. Why can't I see my pending transactions??