Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
don't think this is true (at least don't think it was). see https://discord.com/channels/1189257044264501288/1374083927936860190/1374772662311587940 |
| }; | ||
| }, [quotesByMint, excludedMints]); | ||
|
|
||
| useTrackMintQuotesWithPolling({ |
There was a problem hiding this comment.
don't think this is the right way to implement this. useTrackMintQuotesWithWebSocket shouldn't be falling back to polling. instead we should let the caller of this hook do the orchestration of what should be polled and what should be subscribed to
There was a problem hiding this comment.
alright I updated it
fa19715 to
db8d49f
Compare
can you please check this? we need to make sure your assumption is correct before going with this approach |
One piece of #577
If we are rate limited and do not already have a connection to the mint open, then the call to subscribe will simply fail with no useful error. If the call to subscribe fails 2x, then we will fallback to polling which seems to have a different rate limit bucket from sockets. This is also useful because sometimes we aren't rate limited, but just fail to connect to the socket (see discord)
If we are also rate limited on the check mint quote endpoint, then our retry function will wait 1 minute (already implemented).
If you like this approach @jbojcic1 , then I will implement polling fallbacks for proofs states and melt quotes