Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject session proposals on invalid namespace, unsupported methods or no accounts #3

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

orhoj
Copy link
Contributor

@orhoj orhoj commented Feb 28, 2024

Purpose

Reject WalletConnect session proposals that contain invalid namespaces, methods or if there are no accounts in the wallet to create a session for. This is in preparation to support the case where a dApp requests the method for identity proofs, but where the wallet is not a seed phrase wallet, and hence does not have the randomness required to generate proofs. In that scenario we want the wallet to reject the session proposal.

Changes

  • Reject session proposal if it does not contain the accepted namespace.
  • Reject session proposal if the wallet does not contain any accounts yet (this could be relaxed in the future, if verifiable credentials are added to the wallet).
  • Reject session proposal if it requests an unsupported method.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@orhoj orhoj requested a review from Radiokot February 28, 2024 14:23
Copy link
Member

@Radiokot Radiokot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌🏻

@Radiokot Radiokot merged commit c24d6c7 into main Feb 28, 2024
1 check passed
@Radiokot Radiokot deleted the walletconnect-reject-unknown-methods branch February 28, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants