Conversation
|
| subscriptions, | ||
| }); | ||
|
|
||
| this.finishedInitialLoad = true; |
There was a problem hiding this comment.
What about the error case here? If we hit the JsonRpcError case SDK consumers will never see finishedInitialLoad === true
There was a problem hiding this comment.
Annoying I know, but could we add a comment here please to highlight why this flag is needed.
There was a problem hiding this comment.
Making the boolean to true in error case as well for now, since it technically finished loading
In web3inbox, there is an outstanding PR to show loading state while subscriptions are loading in. The way we've been telling if subscriptions are loading in is the The problem is that we are attaching event listeners Alternatives considered was passing |
This was the piece I was missing, thank you 👍 |
Changes
0.16.2(patch)hasFinishedLoading: Checks ifwatchSubscriptionshas succeeded and finalizedWhy
The response for watch subscriptions is sometimes received before notify client's
initfunction has resolved.Consumers of this SDK should be able to tell when notify client has fetched all subscriptions to show appropriate loading states.