tests: fix shadowed/unused variable warnings

This commit is contained in:
Daniel Cousens 2017-01-06 13:47:41 +11:00 committed by Daniel Cousens
parent cdb518686f
commit 4d6928a68b
5 changed files with 19 additions and 19 deletions

View file

@ -25,7 +25,7 @@ function fundAddress (unspents, outputs, callback) {
txb.addOutput(x.address || kpAddress, x.value)
})
result.inputs.forEach(function (x, i) {
result.inputs.forEach(function (_, i) {
txb.sign(i, keyPair)
})
@ -37,7 +37,7 @@ function fundAddress (unspents, outputs, callback) {
// FIXME: @blocktrail can be very slow, give it time
setTimeout(() => {
callback(null, outputs.map(function (x, i) {
callback(null, outputs.map(function (_, i) {
return { txId: txId, vout: i }
}))
}, 3000)

View file

@ -62,8 +62,8 @@ describe('bitcoinjs-lib (multisig)', function () {
// check that the above transaction included the intended address
blockchain.t.addresses.unspents(blockchain.t.RETURN, function (err, unspents) {
if (err) return callback(err)
if (!unspents.some(function (unspent) {
return unspent.txId === txId && unspent.value === 1e4
if (!unspents.some(function (x) {
return x.txId === txId && x.value === 1e4
})) return callback(new Error('Could not find unspent after broadcast'))
callback()