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

[BUG] When adding a new Alby account, shouldn't be able to add an account with same name of an existing account #2793

Closed
1 task done
bitcoinuser opened this issue Oct 3, 2023 · 5 comments · Fixed by #2866
Assignees

Comments

@bitcoinuser
Copy link
Contributor

bitcoinuser commented Oct 3, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hi,

When adding a new Alby account, shouldn't be able to add an account with same name of an existing account. Should ask to add a new name if already one with same name exists.

Screenshots [optional]

No response

Steps To Reproduce

1- Add a new Alby custodial wallet

Expected behavior

Ask to rename the new account if a existing one exist with the same name.
Why? It's very confusing have two accounts with the same name.

Alby information

Alby: 3.2.1

Device information

No response

Additional context

No response

Are you working on this?

No

@bitcoinuser bitcoinuser changed the title [BUG] When adding a new Alby account, shouldn't be able to add an account with same name with an existing account [BUG] When adding a new Alby account, shouldn't be able to add an account with same name of an existing account Oct 3, 2023
@lujakob
Copy link
Contributor

lujakob commented Oct 14, 2023

I like this issue request, because I usually test two LNBits and have to do the longway of editing the name after creating it.

But I would suggest adding a distinct "name" field at the beginning of each connector that is prefilled with the value we currently have. In case a connector with this name already exists I would add a suffix (like "(copy)" or "(new)".

@stackingsaunter @reneaaron what do you think of the proposal?

I could work on this.

@reneaaron
Copy link
Contributor

I agree this isn't optimal currently, however I don't think we can prefill this field at this stage as the name is only available after the connector was initialized. 🤔

I think we have 2 options here:

  1. Offer a link to edit after the account was connected

How about offering a link to edit the account after the connector has been setup?

https://github.com/getAlby/lightning-browser-extension/blob/master/src/app/screens/Options/TestConnection/index.tsx#L123

  1. Adding some logic to have distinguishable names automatically

Suppose we already have a LNBits account, the next account could be named LNBits (2)

I tend to lean towards 2). What do you think?

@bitcoinuser
Copy link
Contributor Author

I tend to lean towards 2). What do you think?

I agree.

@reneaaron
Copy link
Contributor

Great, let's do it! I assigned @lujakob, let me know if you have any questions regarding implementation.

@lujakob
Copy link
Contributor

lujakob commented Nov 14, 2023

@reneaaron I created a PR. Please have a look.

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 a pull request may close this issue.

3 participants