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

NodeJs: sweet improvements 🍓 #2161

Merged
merged 12 commits into from
Mar 19, 2024
Merged

Conversation

Alex6323
Copy link
Contributor

@Alex6323 Alex6323 commented Mar 8, 2024

Description of change

This PR:

  • adds a new WalletError variant: AliasMismatch { provided: String, expected: String };
  • returns that error in case a provided alias conflicts with the one stored in the wallet db;

UPDATE: after a call we decided to remove this alias mismatch detection from this PR,
because we don't think there's a real problem with the builder overwriting the alias
stored in the db since this is non-critical data. I kept the other changes unrelated to
the wallet alias, which are:

  • NodeJs: consistency changes and improve wallet.spec.ts tests

Links to any relevant issues

Fixes #2016

How the change has been tested

Integration tests.

@Alex6323 Alex6323 linked an issue Mar 8, 2024 that may be closed by this pull request
3 tasks
@Alex6323 Alex6323 marked this pull request as ready for review March 11, 2024 07:07
Thoralf-M
Thoralf-M previously approved these changes Mar 11, 2024
@DaughterOfMars
Copy link

Shouldn't we just overwrite it? I mean it's just an alias.

@Alex6323
Copy link
Contributor Author

Alex6323 commented Mar 11, 2024

Shouldn't we just overwrite it? I mean it's just an alias.

could maybe be used to trick someone to enter the stronghold password ... I would be conservative here and not do that. I'ld rather have some explicit command that says change_alias or something (similar to change_stronghold_password).

Copy link

@DaughterOfMars DaughterOfMars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change the name of the PR now lol

@Alex6323 Alex6323 changed the title Handle alias mismatch in WalletBuilder NodeJs: sweet improvements 🍓 Mar 18, 2024
@Thoralf-M Thoralf-M merged commit 4fdf8ea into iotaledger:2.0 Mar 19, 2024
37 checks passed
@Alex6323 Alex6323 deleted the alias-mismatch branch March 19, 2024 08:37
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.

WalletBuilder: Handle conflicts between provided and restored values
3 participants