Good afternoon,
I hope someone can help me figure this stuff out:
I have been using the SDK for quite some time now and if I just rely on MetaMask to be present and active in the browser, everything works just fine. But when I add support for WalletConnect, for some reason, the SDK seems to start making connections via the Speedy Nodes to fetch blocks.
I have initialized the SDK with my Dapp server url, so I hoped it would use only my Moralis server for calls, but it does not (by default?).
This ONLY happens when the user has logged in via WalletConnect and I cannot seem to find a way to replace the speedy nodes URI with our own Moralis server as backend.
Because the SDK is making a lot of connections to the speedy nodes, I am hitting a rate limit very quickly which results in 500+ errors per minute (!) in the console. (Edit: it stops when I refresh the page)
Question 1: Any way I can change the speedy nodes requests to web3API requests since thats best practice?
Question 2: Any way to make the SDK stop calling eth_getBlockByNumber
every X seconds?
Versions used:
- Moralis @1.10.1
- WalletConnect @1.7.8
Access to XMLHttpRequest at 'https://speedy-nodes-nyc.moralis.io/WalletConnect/bsc/mainnet' from origin 'http://127.0.0.1:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Uncaught Error: PollingBlockTracker - encountered an error while attempting to update latest block:
undefined