Added new willReconnect method to Client and Server delegates#125
Added new willReconnect method to Client and Server delegates#125DmitryBespalov merged 3 commits intoWalletConnect:masterfrom
willReconnect method to Client and Server delegates#125Conversation
…makes it possible for API users to track the actual connection status of each session.
|
sorry, this has merge conflicts now |
Solved! :) |
Sources/PublicInterface/Client.swift
Outdated
| func client(_ client: Client, didConnect session: Session) | ||
| func client(_ client: Client, didDisconnect session: Session) | ||
| func client(_ client: Client, didUpdate session: Session) | ||
| func client(_ client: Client, willReconnect session: Session) |
There was a problem hiding this comment.
do you want to move it to a separate Client2Delegate?
I don't remember the specifics (why I didn't go for the change to the ClientDelegate + default implementation), but the reason was to not break any source code that would update the library version.
I'll double check this anyway during review.
There was a problem hiding this comment.
It's a possibility too, I didn't have the latest changes when coding this new method. Although from a pure aesthetics point of view I kinda like it better in the original delegate protocol 😀 Up to you, really.
There was a problem hiding this comment.
Ok, I have checked out the branch in my main project, and the build fails because my existing class does not conform to protocol ServerDelegate now.
Please move this method to the Client2Delegate protocol, and the same for the ServerDelegate - to the ServerDelegateV2
c4eec9f to
08326c9
Compare
With this new delegate method it should be possible for API users to track the actual connection status of each session. This is helpful when you'd want your UI to reflect whenever a session has lost its connection and thus wallet connect events won't work until it's been reconnected.
It'd work like this: