bip70: minor.

This commit is contained in:
Christopher Jeffrey 2017-07-10 13:12:41 -07:00
parent cf795e1cd3
commit d7970882b3
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -207,8 +207,7 @@ PaymentRequest.prototype.setChain = function setChain(chain) {
assert(Array.isArray(chain), 'Chain must be an array.');
for (let i = 0; i < chain.length; i++) {
let cert = chain[i];
for (let cert of chain) {
if (typeof cert === 'string') {
let pem = PEM.decode(cert);
assert(pem.type === 'certificate', 'Bad certificate PEM.');