Adds feePerKb

This commit is contained in:
Gustavo Cortez 2016-01-29 11:30:52 -03:00 committed by Gustavo Maximiliano Cortez
commit 473142b850
2 changed files with 5 additions and 3 deletions

View file

@ -853,7 +853,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
var self = this; var self = this;
this.confirmTxPopup = null; this.confirmTxPopup = null;
this.setOngoingProcess(gettextCatalog.getString('Sending transaction')); this.setOngoingProcess(gettextCatalog.getString('Sending transaction'));
txSignService.publishTx(txp.id, function(err) { txSignService.publishTx(txp, function(err) {
self.setOngoingProcess(); self.setOngoingProcess();
if (err) { if (err) {
$log.debug(err); $log.debug(err);

View file

@ -109,6 +109,8 @@ angular.module('copayApp.services').factory('txSignService', function($rootScope
getFee(function(err, feePerKb) { getFee(function(err, feePerKb) {
if (err) $log.debug(err); if (err) $log.debug(err);
opts.feePerKb = feePerKb;
opts.excludeUnconfirmedUtxos = currentSpendUnconfirmed ? false : true;
fc.createTxProposal(opts, function(err, txp) { fc.createTxProposal(opts, function(err, txp) {
if (err) return cb(err); if (err) return cb(err);
else return cb(null, txp); else return cb(null, txp);
@ -116,9 +118,9 @@ angular.module('copayApp.services').factory('txSignService', function($rootScope
}); });
}; };
root.publishTx = function(txId, cb) { root.publishTx = function(txp, cb) {
var fc = profileService.focusedClient; var fc = profileService.focusedClient;
fc.publishTxProposal(txId, function(err) { fc.publishTxProposal({txp: txp}, function(err) {
if (err) return cb(err); if (err) return cb(err);
else return cb(); else return cb();
}); });