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] Addressbook entries are not validated #50

Open
smk762 opened this issue Aug 4, 2023 · 3 comments
Open

[Bug] Addressbook entries are not validated #50

smk762 opened this issue Aug 4, 2023 · 3 comments
Assignees

Comments

@smk762
Copy link
Contributor

smk762 commented Aug 4, 2023

To replicate:

  • load app, and login
  • got to settings > addressbook
  • add an entry for DGB, using a KMD address
  • See no error.

image

Seen in #44

@CharlVS
Copy link
Member

CharlVS commented Aug 6, 2023

@naezith, Can you please have a look?

@naezith
Copy link
Collaborator

naezith commented Aug 7, 2023

There isn't any coin/address validation in this section (contact_edit.dart) so the field allows any kind of text.

I looked for address validation in other places, and one of them is in the: _isCoinActive() function.

So the MM.validateAddress( is being used to check if the coin is active. That's why I thought the coin has to be active to validate the address. That's probably why the address book does not have that MM2 check since the address book coin selection dropdown has hundreds of coins.

Note: I'm not 100% sure so please correct me if it doesn't work like that.

@CharlVS @smk762

@smk762
Copy link
Contributor Author

smk762 commented Aug 8, 2023

SDK validateaddress method: https://developers.komodoplatform.com/basic-docs/atomicdex-api-legacy/validateaddress.html

Related issues from legacy desktop:

Related SDK issue: KomodoPlatform/komodo-defi-framework#1654

Currently a coin must be active to be validated, which is sub-optimal. Given data in coins file (e.g. base 58 params), addresses should be able to be calculated from the pubkey, either at the SDK level or the GUI level (though that is another issue). I assume until it is, the flow would be something like:

  • user inputs address and clicks the button.
  • if coin active, use validateadress to confirm
  • if coin not active, app attempts to activate it and if successful, validates (there will be a delay here, bad UX)
  • if fails to active, user cant save address. Also bad UX.

UX would be much better if validation did not require the coin to be active, so perhaps its better to solve that first.

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

No branches or pull requests

3 participants