Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

when user disconnect using dapp, app side can not receive disconnect event #42

Open
andybin-cdc opened this issue Mar 31, 2021 · 2 comments

Comments

@andybin-cdc
Copy link

andybin-cdc commented Mar 31, 2021

when user disconnect using dapp, app side can not receive disconnect event:

https://github.com/trustwallet/wallet-connect-swift/blob/master/WalletConnect/WCInteractor.swift#L205
in this line, I think it is necessary to add a callback to the App side.

can u help me to resolve this?

@hewigovens
Copy link
Contributor

DisconnectClosure should work for you

@andybin-cdc
Copy link
Author

andybin-cdc commented Mar 31, 2021

Thank @hewigovens for your reply.
I have already use the DisconnectClosure.
But the callback was not called!

  1. when user disconnect using dapp. I found that the socket is still connected, it is just update the session approve state.
    https://github.com/trustwallet/wallet-connect-swift/blob/master/WalletConnect/WCInteractor.swift#L205

  2. in the disconnect function:
    https://github.com/trustwallet/wallet-connect-swift/blob/master/WalletConnect/WCInteractor.swift#L100
    it is not call the DisconnectClosure

Is there something wrong with that?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants