build tx using BWU
This commit is contained in:
parent
31035a533f
commit
e06a788e05
|
@ -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…
Reference in New Issue