|
@ -262,11 +262,10 @@ var Wallet = function (seed, options) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.sign = function(tx) { |
|
|
this.sign = function(tx) { |
|
|
tx.ins.map(function(inp,i) { |
|
|
tx.ins.forEach(function(inp,i) { |
|
|
var inp = inp.outpoint.hash+':'+inp.outpoint.index; |
|
|
var output = me.outputs[inp.outpoint.hash+':'+inp.outpoint.index] |
|
|
if (me.outputs[inp]) { |
|
|
if (output) { |
|
|
var address = me.outputs[inp].address |
|
|
tx.sign(i, me.getPrivateKeyForAddress(output.address)) |
|
|
tx.sign(i, me.getPrivateKeyForAddress(address)) |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
return tx; |
|
|
return tx; |
|
|