Adds feePerKb

This commit is contained in:
Gustavo Cortez 2016-01-29 11:30:52 -03:00 committed by Gustavo Maximiliano Cortez
parent df834c50c3
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;
this.confirmTxPopup = null;
this.setOngoingProcess(gettextCatalog.getString('Sending transaction'));
txSignService.publishTx(txp.id, function(err) {
txSignService.publishTx(txp, function(err) {
self.setOngoingProcess();
if (err) {
$log.debug(err);

View File

@ -109,6 +109,8 @@ angular.module('copayApp.services').factory('txSignService', function($rootScope
getFee(function(err, feePerKb) {
if (err) $log.debug(err);
opts.feePerKb = feePerKb;
opts.excludeUnconfirmedUtxos = currentSpendUnconfirmed ? false : true;
fc.createTxProposal(opts, function(err, txp) {
if (err) return cb(err);
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;
fc.publishTxProposal(txId, function(err) {
fc.publishTxProposal({txp: txp}, function(err) {
if (err) return cb(err);
else return cb();
});