From f028dfffa93164851340f4d4c99c056d7a33ff2a Mon Sep 17 00:00:00 2001
From: Daniel Cousens <github@dcousens.com>
Date: Mon, 8 Sep 2014 23:14:57 +1000
Subject: [PATCH] Wallet: fix missing variable utxo

---
 src/wallet.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wallet.js b/src/wallet.js
index c61715f..593912e 100644
--- a/src/wallet.js
+++ b/src/wallet.js
@@ -297,7 +297,7 @@ Wallet.prototype.setUnspentOutputs = function(unspents) {
     // FIXME: remove in 2.0.0
     if (index === undefined) {
       console.warn('unspent.outputIndex is deprecated, use unspent.index instead')
-      index = utxo.outputIndex
+      index = unspent.outputIndex
     }
 
     assert.equal(typeof txId, 'string', 'Expected txId, got ' + txId)
@@ -313,7 +313,7 @@ Wallet.prototype.setUnspentOutputs = function(unspents) {
 
     var txHash = bufferutils.reverse(new Buffer(txId, 'hex'))
 
-    var unspent = {
+    unspent = {
       address: unspent.address,
       confirmations: unspent.confirmations || 0,
       index: index,