Adds three levels of dynamic fees
This commit is contained in:
parent
49c606f135
commit
5742dee340
10 changed files with 241 additions and 110 deletions
|
|
@ -1,38 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesFeeController',
|
||||
function($rootScope, $scope, configService, go, gettext) {
|
||||
var config = configService.getSync();
|
||||
this.feeName = config.wallet.settings.feeName || 'Priority';
|
||||
this.feeOpts = [{
|
||||
name: gettext('Priority'),
|
||||
value: 100,
|
||||
}, {
|
||||
name: gettext('Normal'),
|
||||
value: 50,
|
||||
}, {
|
||||
name: gettext('Economy'),
|
||||
value: 10,
|
||||
}, {
|
||||
name: gettext('Emergency'),
|
||||
red: true,
|
||||
value: 500,
|
||||
}, ];
|
||||
|
||||
this.save = function(newFee) {
|
||||
var opts = {
|
||||
wallet: {
|
||||
settings: {
|
||||
feeName: newFee.name,
|
||||
feeValue: newFee.value * 100,
|
||||
}
|
||||
}
|
||||
};
|
||||
this.feeName = newFee.name;
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) console.log(err);
|
||||
});
|
||||
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue