Browse Source
assert inputs & outputs are consistent
activeAddress
Ivan Socolsky
9 years ago
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with
1 additions and
0 deletions
-
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; |
|
|
|