CityOfZion / neo-sharp

Neo-sharp is a new core and node implementation of NEO focused on modular design, best coding practices and testability.
MIT License
35 stars 24 forks source link

CheckIfPasswordMatchesOpenWallet does not always throw correct exception #544

Closed jnlewis closed 5 years ago

jnlewis commented 5 years ago

The NEP6WalletManager.CheckIfPasswordMatchesOpenWallet does not throw AccountsPasswordMismatchException exception when wallet password is not in cache. This can be reproduced as such: Open an existing wallet.

wallet create testwallet.json wallet close (This is to re-open the wallet to clear the password cache) wallet open tetswallet.json account create (Enter wrong password exception; is thrown instead of showing "invalid password")

This is due to InvalidNEP2Exception is not of type FormatException: wallet-check-password-exception

osmirnov commented 5 years ago

Good catch!