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

Don't show "connected to" on connection error #174

Open
ekzyis opened this issue Dec 28, 2023 · 1 comment
Open

Don't show "connected to" on connection error #174

ekzyis opened this issue Dec 28, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@ekzyis
Copy link

ekzyis commented Dec 28, 2023

If there is a connection error, the balance correctly shows a warning sign.

However, it still shows "connected to" and shows the "disconnect" button. This is confusing since it contradicts that there was a connection error.

2023-12-28.21-35-26.mp4
@rolznz
Copy link
Collaborator

rolznz commented Dec 29, 2023

I think this can be fixed by adding validation in the init function of the connector as I mentioned here

Ideally with LNbits though we would add a connection check to see if the connection is valid (by doing an API call). This can be done in the LNbits connector init function, and if the call fails an error should be thrown which will stop Bitcoin Connect from connecting. https://github.com/getAlby/bitcoin-connect/blob/master/src/connectors/LnbitsConnector.ts#L22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants