Address: remove Address.Error
By removing Address.Error, we remove a code smell. This part of the code base was also not under any form of test. Test data and tests have therefore been added verifying its behaviour in both Wallet and Address tests.
This commit is contained in:
parent
4332c9e3d4
commit
8514bbfabd
5 changed files with 52 additions and 20 deletions
src
|
@ -155,7 +155,7 @@ function Wallet(seed, options) {
|
|||
try {
|
||||
address = Address.fromScriptPubKey(txOut.script, networks[network]).toString()
|
||||
} catch(e) {
|
||||
if (!(e instanceof Address.Error)) throw e
|
||||
if (!(e.message.match(/has no matching Address/))) throw e
|
||||
}
|
||||
|
||||
if (isMyAddress(address)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue