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

Resolve StacksProvider conflict across wallets #325

Closed
markmhendrickson opened this issue Jul 17, 2023 · 15 comments · Fixed by #326
Closed

Resolve StacksProvider conflict across wallets #325

markmhendrickson opened this issue Jul 17, 2023 · 15 comments · Fixed by #326
Assignees
Milestone

Comments

@markmhendrickson
Copy link
Contributor

Currently wallets that use StacksProvider such as Hiro and Xverse experience collisions whenever both are installed and using apps that have integrated Connect since the library doesn't have a way to distinguish between each wallet when the user wants to perform actions with them (e.g. connect, transact).

Developers and users alike would benefit from having the library distinguish them somehow so that only the wallet of choice is incurred for the particular app session, even if multiple remain installed and activated.

Hiro exposes HiroWalletProvider as well which may be helpful for supporting such an enhancement.

Screenshot 2023-07-17 at 15 55 48
@janniks
Copy link
Collaborator

janniks commented Jul 17, 2023

💯

I'd like to see Connect try to implement a .providers array, where wallets can register their named providers. (something similar has been discussed in a working group)

@Anatolie
Copy link

+1! Would like to be able to trigger a specific wallet extension (ie: Hiro) when performing actions such as PSBT + message signing!

@janniks
Copy link
Collaborator

janniks commented Jul 17, 2023

I think we could add a quick fix to allow web devs to target a specific wallet using connect. Basically let most functions take in the provider directly, rather than guessing/taking the main one

@janniks
Copy link
Collaborator

janniks commented Jul 18, 2023

1st pass to allow web apps to pass a known stacks provider (up to them to select the one they want etc.) #326

@RobertClarke
Copy link

Reproducible across all the major Ordinals Marketplaces!

@markmhendrickson
Copy link
Contributor Author

@RobertClarke Might your team want to try integrating the branch here to confirm it works on your end pre-release? #326

@smcclellan smcclellan added this to the Q3-2023 milestone Jul 25, 2023
@janniks janniks linked a pull request Jul 25, 2023 that will close this issue
5 tasks
@janniks
Copy link
Collaborator

janniks commented Jul 27, 2023

Reopening this for further improvements. The first pass fixed #320

@janniks janniks reopened this Jul 27, 2023
@markmhendrickson
Copy link
Contributor Author

Curious which improvements you have in mind, and whether we should hold off asking developers to upgrade their integrations or is that effort good to go with the first pass?

@janniks
Copy link
Collaborator

janniks commented Jul 28, 2023

Would like to test out a .provider interface where wallets register their presence and connect would use it to allow users to select their choice and route requests to the custom provider.
But for now I'd recommend going with what we have already, since it might take a while for wallets to adopt any new experiments.

@ThomAille
Copy link

I am implementing Stack/Connect to allow my users to connect either with Hiro or Xverse, to avoid the integration of several libraries, I only use this one.

For once Hiro it's easy I push HiroWalletProvider in showConnect on the other hand for xverse I have explored windows in vain I can't find a specific provider for it. For once, send you what as info for xverse?

@janniks
Copy link
Collaborator

janniks commented Aug 28, 2023

cc @m-aboelenein is Xverse thinking about adding a similar custom provider? Maybe we should discuss this in the wallet api standards group?

@dawasherpa-ui
Copy link

cc @m-aboelenein is Xverse thinking about adding a similar custom provider? Maybe we should discuss this in the wallet api standards group?
in the authOptions what the provider name of xverseWallet?

@janniks
Copy link
Collaborator

janniks commented Sep 25, 2023

@fess-v feel free to leave you ideas here as well. Curious to hear all sides 🙂

@m-aboelenein
Copy link
Contributor

I am implementing Stack/Connect to allow my users to connect either with Hiro or Xverse, to avoid the integration of several libraries, I only use this one.

For once Hiro it's easy I push HiroWalletProvider in showConnect on the other hand for xverse I have explored windows in vain I can't find a specific provider for it. For once, send you what as info for xverse?

Hello @ThomAille in the latest version of xverse we have added a custom provider you can find it under window.XverseProviders.StacksProvider

@janniks
Copy link
Collaborator

janniks commented Dec 4, 2023

Closed by #341

@janniks janniks closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants