Browse Source

wallet.getUnspentOutputs includes the pending field

hk-custom-address
Wei Lu 11 years ago
parent
commit
7e98123ccd
  1. 3
      src/wallet.js
  2. 6
      test/wallet.js

3
src/wallet.js

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

6
test/wallet.js

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

Loading…
Cancel
Save