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

Fix thrown exception in CheckIfPasswordMatchesOpenWallet #544 #545

Closed jnlewis closed 5 years ago

jnlewis commented 5 years ago

Changed InvalidNEP2Exception inherited type from Exception to FormatException. This will allow CheckIfPasswordMatchesOpenWallet to throw the proper exception when wallet password is invalid. Added test case for when password is not in cache.

codecov[bot] commented 5 years ago

Codecov Report

Merging #545 into development will increase coverage by 0.28%. The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #545      +/-   ##
===============================================
+ Coverage        49.25%   49.53%   +0.28%     
===============================================
  Files              315      315              
  Lines            13085    13085              
===============================================
+ Hits              6445     6482      +37     
+ Misses            6640     6603      -37
Impacted Files Coverage Δ
src/NeoSharp.Core/Wallet/NEP6/NEP6WalletManager.cs 74.04% <100%> (+3.24%) :arrow_up:
src/NeoSharp.Core/Wallet/NEP6/NEP6Account.cs 79.31% <0%> (+10.34%) :arrow_up:
....Core/Wallet/JsonConverter/NEP6AccountConverter.cs 66.66% <0%> (+33.33%) :arrow_up:
src/NeoSharp.Core/Helpers/FileWrapper.cs 100% <0%> (+39.13%) :arrow_up:
...c/NeoSharp.Core/Converters/JsonConverterWrapper.cs 100% <0%> (+66.66%) :arrow_up:
...c/NeoSharp.Core/Exceptions/InvalidNEP2Exception.cs 100% <0%> (+100%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d4616d0...3120e8f. Read the comment docs.