getUnspentOutputs excludes spent outputs
This commit is contained in:
parent
77b5d1ee21
commit
9fc5505730
2 changed files with 10 additions and 2 deletions
src
|
@ -64,7 +64,8 @@ var Wallet = function (seed, options) {
|
|||
var utxo = []
|
||||
|
||||
for(var key in this.outputs){
|
||||
utxo.push(outputToUnspentOutput(this.outputs[key]))
|
||||
var output = this.outputs[key]
|
||||
if(!output.spend) utxo.push(outputToUnspentOutput(output))
|
||||
}
|
||||
|
||||
return utxo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue