use new fee level only for the current transaction created

This commit is contained in:
Gabriel Bazán 2017-05-19 10:59:36 -03:00
commit 6521bbdcb4
9 changed files with 147 additions and 96 deletions

View file

@ -16,9 +16,9 @@ angular.module('copayApp.services').factory('feeService', function($log, $stateP
return configService.getSync().wallet.settings.feeLevel || 'normal';
};
root.getCurrentFeeValue = function(network, cb) {
root.getCurrentFeeValue = function(network, customFeeLevel, cb) {
network = network || 'livenet';
var feeLevel = root.getCurrentFeeLevel();
var feeLevel = customFeeLevel || root.getCurrentFeeLevel();
root.getFeeLevels(function(err, levels) {
if (err) return cb(err);

View file

@ -85,7 +85,7 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti
} else {
var tmpl;
if (isWP) tmpl = '<div>' + showName +'</div>';
if (isWP) tmpl = '<div>' + showName + '</div>';
else tmpl = '<div class="item-icon-left">' + showName + '<ion-spinner class="spinner-stable" icon="lines"></ion-spinner></div>';
$ionicLoading.show({
template: tmpl
@ -95,8 +95,8 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti
if (isCordova && !isWP) {
window.plugins.spinnerDialog.hide();
} else {
$ionicLoading.hide();
}
$ionicLoading.hide();
}
}
};

View file

@ -10,9 +10,9 @@ angular.module('copayApp.services').service('sendMaxService', function(feeServic
*
*/
this.getInfo = function(wallet, cb) {
feeService.getCurrentFeeValue(wallet.credentials.network, function(err, feePerKb) {
feeService.getCurrentFeeValue(wallet.credentials.network, null, function(err, feePerKb) {
if (err) return cb(err);
var config = configService.getSync().wallet;
walletService.getSendMaxInfo(wallet, {