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

Improved providers filter (change for the issue https://github.com/getAlby/bitcoin-connect/issues/92) #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VictoriaVM
Copy link

In this change filters prop accepts the list of connectors, e.g. ['mutiny', 'alby'] - if configured this way the component will keep only these two connectors, and also keep the order they are mentioned in the list. The default ['nwc'] option works the same as before, as well as empty filters value - it shows full list of connectors.

@VictoriaVM VictoriaVM changed the title Improved providers filter Improved providers filter (change for the issue https://github.com/getAlby/bitcoin-connect/issues/92) Aug 30, 2024
@kafkasl
Copy link

kafkasl commented Aug 30, 2024

Merging this PR would be great for our use case:
closes ##92

@rolznz
Copy link
Collaborator

rolznz commented Aug 31, 2024

Hi, could you guys explain more about your usecase? this PR adds a lot of code, and ideally we allow all connectors for a certain protocol (WebLN or NWC).

@VictoriaVM
Copy link
Author

Hi! In our case, we need to keep only Nostr Wallet Connect connector and hide all the rest.

@rolznz
Copy link
Collaborator

rolznz commented Sep 2, 2024

Hi, @VictoriaVM in this case, do you even need to use Bitcoin Connect?

Maybe it is better to use the Alby JS SDK directly: https://github.com/getAlby/js-sdk

@VictoriaVM
Copy link
Author

@rolznz Yes, that's a good point, thank you, but I tried https://github.com/getAlby/js-sdk, and it didn't work for me. The thing is that we are using Wails in our project which has some restrictions on opening new windows, so it is what I try to avoid, and getAlby js-sdk opens connection in new window. That's why bitcoin-connect with Nostr Wallet Connect works perfect for my case.

@rolznz
Copy link
Collaborator

rolznz commented Sep 3, 2024

@rolznz Yes, that's a good point, thank you, but I tried https://github.com/getAlby/js-sdk, and it didn't work for me. The thing is that we are using Wails in our project which has some restrictions on opening new windows, so it is what I try to avoid, and getAlby js-sdk opens connection in new window. That's why bitcoin-connect with Nostr Wallet Connect works perfect for my case.

I don't think you need to open a new window if you only support the Nostr Wallet Connect connector (which is simply an input field where a user pastes their connection secret). All you need is to create your own password input field where the user can paste their connection secret, and then create a new NWCClient using that.

Note: The Alby JS SDK is what powers the Bitcoin Connect NWC connector internally.

@VictoriaVM
Copy link
Author

I don't think you need to open a new window if you only support the Nostr Wallet Connect connector (which is simply an input field where a user pastes their connection secret). All you need is to create your own password input field where the user can paste their connection secret, and then create a new NWCClient using that.

Thank you for the suggestion

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.

3 participants