Browse Source

Merge pull request #4 from isocolsky/fix/build-tx

assert inputs & outputs are consistent
activeAddress
Kosta Korenkov 9 years ago
parent
commit
1dd7d1628b
  1. 1
      lib/model/txproposal.js

1
lib/model/txproposal.js

@ -185,6 +185,7 @@ TxProposal.prototype._buildTx = function() {
var totalInputs = _.sum(t.inputs, 'output.satoshis');
var totalOutputs = _.sum(t.outputs, 'satoshis');
$.checkState(totalInputs > 0 && totalOutputs > 0 && totalInputs >= totalOutputs);
$.checkState(totalInputs - totalOutputs <= Defaults.MAX_TX_FEE);
return t;

Loading…
Cancel
Save