Skip to content

Missing Polkadot Dapp Docs #1699

Open
Open
@rossbulat

Description

@rossbulat

Context

Referring to the Polkadot Dapp Integration Guide, we can see how to set up a connection with a Wallet Connect supported wallet, but it is not obvious how to re-connect to an already established session.

For example if I refresh or revisit my web app, there does not appear to be an API documented that allows for a reconnect to an existing session. I assume that this is possible, but is currently unknown for the Dapp developer based on this doc. If I go through the modal -> scan QR process again, I establish another connection, rather than use the previously initiated one.

We can see that wallets like Nova Wallet maintain the session in their Wallet Connect UI - I assume then that it is possible to re-establish a connection to this session.

Activity

changed the title [-]Missing Polkadot Docs: Reconnecting to already-initiated session?[/-] [+]Missing Polkadot Dapp Docs: Reconnecting to already-initiated session?[/+] on Sep 3, 2024
rossbulat

rossbulat commented on Oct 4, 2024

@rossbulat
Author

I have now implemented Wallet Connect support in the Polkadot Developer Console. This implementation may be a good resource to refer to for improving the Polkadot Dapp Integration Guide as it:

  • Caters for dynamic chain connections and the ability to re-approve an updated session.
  • Reconnecting to an existing session without approving again.
  • Implements in a React environment, uses contexts, demonstrates component hierarchy.
  • Checking expiry timestamp & disconnecting (I am unsure if sessions automatically expire).

On the flip side I have implemented this support based on the available docs, so if there are better APIs that enable UX improvements I'd definitely be interested to amend Developer Console.

Developer Console's "Connect Accounts" module hosting Wallet Connect support:

Screenshot 2024-10-04 at 09 53 07
changed the title [-]Missing Polkadot Dapp Docs: Reconnecting to already-initiated session?[/-] [+]Missing Polkadot Dapp Docs[/+] on Oct 4, 2024
rtomas

rtomas commented on Oct 4, 2024

@rtomas
Member

@rossbulat would you like to make a PR to our docs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rtomas@rossbulat

        Issue actions

          Missing Polkadot Dapp Docs · Issue #1699 · WalletConnect/walletconnect-docs