Update ts_src/psbt.ts

Co-Authored-By: d-yokoi <d-yokoi@users.noreply.github.com>
This commit is contained in:
Jonathan Underwood 2019-12-09 10:40:05 +09:00 committed by GitHub
parent e10324f850
commit ad7577c4e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -765,7 +765,7 @@ function hasSigs(
.map(pkey => {
const pubkey = ecPairFromPublicKey(pkey, { compressed: true })
.publicKey;
return partialSig.filter(pSig => pSig.pubkey.equals(pubkey))[0];
return partialSig.find(pSig => pSig.pubkey.equals(pubkey));
})
.filter(v => !!v);
} else {