Ref get/set fee level

This commit is contained in:
Gustavo Maximiliano Cortez 2016-02-22 19:56:53 -03:00
commit 4829b40250
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
11 changed files with 81 additions and 101 deletions

View file

@ -92,18 +92,13 @@ angular.module('copayApp.services').factory('txService', function($rootScope, pr
root.createTx = function(opts, cb) {
var fc = profileService.focusedClient;
var config = configService.getSync();
var configWallet = config.wallet;
var walletSettings = configWallet.settings;
var currentSpendUnconfirmed = configWallet.spendUnconfirmed;
var currentFeeLevel = walletSettings.feeLevel || 'normal';
var currentSpendUnconfirmed = configService.getSync().wallet.spendUnconfirmed;
var getFee = function(cb) {
if (opts.lockedCurrentFeePerKb) {
cb(null, opts.lockedCurrentFeePerKb);
} else {
feeService.getCurrentFeeValue(currentFeeLevel, cb);
feeService.getCurrentFeeValue(cb);
}
};