Does anyone have an example of using PollingSubscribeProvider for subscription in a web app? I've attempted to use it, but I haven't been successful in making it work. Here's the documentation I've been referencing: https://tezostaquito.io/docs/next/subscribe_event/
I used this code
import { TezosToolkit, PollingSubscribeProvider } from '@taquito/taquito'
const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com')
Tezos.setStreamProvider(
Tezos.getFactory(PollingSubscribeProvider)({
shouldObservableSubscriptionRetry: true,
pollingIntervalMilliseconds: 1500,
})
)
try {
const sub = Tezos.stream.subscribeEvent()
sub.on('data', console.log)
} catch (e) {
console.log(e)
}
and I get nothing when running that function on nodejs. I mean I get no errors but, I expected to get console.logs from all events. I also tried using the mainnet rpc and nothing happens.