Browse Source

build tx using BWU

activeAddress
Ivan Socolsky 10 years ago
parent
commit
e06a788e05
  1. 14
      lib/model/txproposal.js

14
lib/model/txproposal.js

@ -2,7 +2,8 @@
var _ = require('lodash');
var Uuid = require('uuid');
var Bitcore = require('bitcore-wallet-utils').Bitcore;
var WalletUtils = require('bitcore-wallet-utils');
var Bitcore = WalletUtils.Bitcore;
var Address = Bitcore.Address;
var TxProposalAction = require('./txproposalaction');
@ -89,16 +90,7 @@ TxProposal.prototype._getCurrentSignatures = function() {
TxProposal.prototype.getBitcoreTx = function() {
var self = this;
var t = new Bitcore.Transaction();
_.each(this.inputs, function(i) {
t.from(i, i.publicKeys, self.requiredSignatures)
});
t.to(this.toAddress, this.amount)
.change(this.changeAddress.address);
t._updateChangeOutput();
var t = WalletUtils.buildTx(this);
var sigs = this._getCurrentSignatures();
_.each(sigs, function(x) {

Loading…
Cancel
Save