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

Import duplicate spending key says account name #5115

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

NullSoldier
Copy link
Contributor

@NullSoldier NullSoldier commented Jul 8, 2024

Summary

When importing an account twice, it would not print out the name of the account with the duplicate spending key. This will now include that in the message.

It also improves tests to check the error type instead of error message. We should avoid testing error messages in tests if there is a proper typed error to check.

Created in response to this, #5084

Testing Plan

  1. Create a spending key account
    • ironfish wallet:create foobar
  2. Export account
    • ironfish wallet:export foobar --mnemonic
  3. Import account
    • ironfish wallet:import --name bazmonkey <mnemonic>
  4. Check error includes the name foobar which already contains the mneomonic
    • Account (foobar) already exists with provided spending key
  5. Delete account ironfish wallet:delete foobar

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes

@NullSoldier NullSoldier requested a review from a team as a code owner July 8, 2024 20:13
When importing an account twice, it would not print out the name of the
account with the duplicate spending key. This will now include that in
the message.

It also improves tests to check the error type instead of error message.
We should avoid testing error messages in tests if there is a proper
typed error to check.
@NullSoldier NullSoldier merged commit 07810f7 into staging Jul 8, 2024
10 checks passed
@NullSoldier NullSoldier deleted the jason/import-error branch July 8, 2024 20:59
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.

2 participants