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.
Check error includes the name foobar which already contains the mneomonic
Account (foobar) already exists with provided spending key
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.
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, https://github.com/iron-fish/ironfish/issues/5084
Testing Plan
ironfish wallet:create foobar
ironfish wallet:export foobar --mnemonic
ironfish wallet:import --name bazmonkey <mnemonic>
foobar
which already contains the mneomonicAccount (foobar) already exists with provided spending key
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.
Breaking Change
Is this a breaking change? If yes, add notes below on why this is breaking and label it with
breaking-change-rpc
orbreaking-change-sdk
.