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

MWA 2.0 Version Negotiation #558

Merged
merged 9 commits into from
Oct 10, 2023
Merged

MWA 2.0 Version Negotiation #558

merged 9 commits into from
Oct 10, 2023

Conversation

Funkatronics
Copy link
Contributor

No description provided.

@Funkatronics
Copy link
Contributor Author

question:

What should a dapp endpoint do if a wallet endpoint does not send the SESSION_PROPS message after the HELLO_RSP message?

scenario:

  • dapp is mwa 2.0 compliant, so it sends the &v= query parameter during association
  • wallet is out of date and using 1.0/legacy specification. it does not know about the v= parameter sent from the dapp and does not send the SESSION_PROPS message after HELLO_RSP
  • the dapp endpoint is now stuck waiting for the SESSION_PROPS message. it needs to know which protocol version to use for the session before it can allow the client to make requests.

right now im thinking the best way to handle this is either:

  1. add a timeout to the client side, if SESSION_PROPS is not received within that timeout it falls back on legacy behavior and moves on.
  2. Make the session properties a part of the HELLO_RSP message so that its not sent as a separate message. This way the dapp can immediately know if the wallet endpoint is legacy when it receives the HELLO_RSP message and does not need to wait for a timeout

@Funkatronics
Copy link
Contributor Author

question:

What should a dapp endpoint do if a wallet endpoint does not send the SESSION_PROPS message after the HELLO_RSP message?

offline discussion with @sdlaver, we decided to make the session properties part of the HELLO_RSP message instead of a separate message. With a separate message, the dapp endpoint would need to wait for the SESSION_PROPS message before it could move on and begin making requests.

@Funkatronics Funkatronics changed the title [WIP] MWA 2.0 Version Negotiation MWA 2.0 Version Negotiation Oct 5, 2023
# Conflicts:
#	android/walletlib/src/main/java/com/solana/mobilewalletadapter/walletlib/protocol/MobileWalletAdapterConfig.java
@Funkatronics
Copy link
Contributor Author

@creativedrewy my mistake, this is still WIP. I forgot to continue my work after updating the spec with the above discussion.

@Funkatronics Funkatronics merged commit ed698c0 into main Oct 10, 2023
6 checks passed
@Funkatronics Funkatronics deleted the mwa-2.0-version-negotiation branch October 10, 2023 01:11
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