wallet.getUnspentOutputs includes the pending field

This commit is contained in:
Wei Lu 2014-06-18 14:29:02 +08:00
parent 77b68a52a6
commit 7e98123ccd
2 changed files with 6 additions and 3 deletions

View file

@ -90,7 +90,8 @@ function Wallet(seed, network) {
hash: hashAndIndex[0], hash: hashAndIndex[0],
outputIndex: parseInt(hashAndIndex[1]), outputIndex: parseInt(hashAndIndex[1]),
address: output.address, address: output.address,
value: output.value value: output.value,
pending: output.pending
} }
} }

View file

@ -175,7 +175,8 @@ describe('Wallet', function() {
"hash":"6a4062273ac4f9ea4ffca52d9fd102b08f6c32faa0a4d1318e3a7b2e437bb9c7", "hash":"6a4062273ac4f9ea4ffca52d9fd102b08f6c32faa0a4d1318e3a7b2e437bb9c7",
"outputIndex": 0, "outputIndex": 0,
"address" : "1AZpKpcfCzKDUeTFBQUL4MokQai3m3HMXv", "address" : "1AZpKpcfCzKDUeTFBQUL4MokQai3m3HMXv",
"value": 20000 "value": 20000,
"pending": true
} }
expectedOutputKey = expectedUtxo.hash + ":" + expectedUtxo.outputIndex expectedOutputKey = expectedUtxo.hash + ":" + expectedUtxo.outputIndex
}) })
@ -185,7 +186,8 @@ describe('Wallet', function() {
wallet.outputs[key] = { wallet.outputs[key] = {
receive: key, receive: key,
address: utxo.address, address: utxo.address,
value: utxo.value value: utxo.value,
pending: utxo.pending
} }
} }