bip70: minor.
This commit is contained in:
parent
cf795e1cd3
commit
d7970882b3
@ -207,8 +207,7 @@ PaymentRequest.prototype.setChain = function setChain(chain) {
|
|||||||
|
|
||||||
assert(Array.isArray(chain), 'Chain must be an array.');
|
assert(Array.isArray(chain), 'Chain must be an array.');
|
||||||
|
|
||||||
for (let i = 0; i < chain.length; i++) {
|
for (let cert of chain) {
|
||||||
let cert = chain[i];
|
|
||||||
if (typeof cert === 'string') {
|
if (typeof cert === 'string') {
|
||||||
let pem = PEM.decode(cert);
|
let pem = PEM.decode(cert);
|
||||||
assert(pem.type === 'certificate', 'Bad certificate PEM.');
|
assert(pem.type === 'certificate', 'Bad certificate PEM.');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user