I use wss://rpc-mainnet.maticvigil.com/v1/MY-APP-ID
as my polygon dApp provider, however I cannot subscribe on newBlockHeaders
event with the following error:
Error: The current provider doesn't support subscriptions: HDWalletProvider
at Timeout._onTimeout (...\node_modules\web3-core-subscriptions\lib\subscription.js:174:24)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7) null
I've already seen this link, but it does not make sense for my case (since I already use websocket RPC provider).