Removes unused fee rate variable

This commit is contained in:
Gustavo Maximiliano Cortez 2015-12-02 12:21:26 -03:00
commit 4cbee7261e
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
2 changed files with 10 additions and 17 deletions

View file

@ -270,7 +270,7 @@
<available-balance></available-balance>
<a class="db"
ng-if="index.feeToSendMaxStr && index.availableBalanceSat > 0 && !home.blockUx && !home.lockAmount"
ng-click="home.sendAll(index.availableMaxBalance, index.feeToSendMaxStr, index.feeRateToSendMax)"
ng-click="home.sendAll(index.availableMaxBalance, index.feeToSendMaxStr)"
translate> Send All
</a>
</h4>
@ -311,7 +311,7 @@
</div>
<a class="postfix button"
ng-style="{'background-color':index.backgroundColor}"
ng-click="openDestinationAddressModal(index.otherWallets, _address)">
ng-click="home.openDestinationAddressModal(index.otherWallets, _address)">
<i class="fi-plus size-14 lh"></i>
</a>
</div>

View file

@ -113,10 +113,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
var cancel_msg = gettextCatalog.getString('Cancel');
var confirm_msg = gettextCatalog.getString('Confirm');
$scope.openDestinationAddressModal = function(wallets, address) {
this.openDestinationAddressModal = function(wallets, address) {
$rootScope.modalOpened = true;
var fc = profileService.focusedClient;
self.resetForm();
self.lockAddress = false;
self._address = null;
var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.wallets = wallets;
@ -969,7 +970,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
});
};
this.setForm = function(to, amount, comment, feeRate) {
this.setForm = function(to, amount, comment) {
var form = $scope.sendForm;
if (to) {
form.address.$setViewValue(to);
@ -990,10 +991,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
form.comment.$isValid = true;
form.comment.$render();
}
if (feeRate) {
form.feeRate = feeRate;
}
};
@ -1009,10 +1006,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
var form = $scope.sendForm;
if (form && form.feeRate) {
form.feeRate = null;
}
if (form && form.amount) {
form.amount.$pristine = true;
form.amount.$setViewValue('');
@ -1262,11 +1255,11 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
return actions.hasOwnProperty('create');
};
this._doSendAll = function(amount, feeRate) {
this.setForm(null, amount, null, feeRate);
this._doSendAll = function(amount) {
this.setForm(null, amount, null);
};
this.sendAll = function(amount, feeStr, feeRate) {
this.sendAll = function(amount, feeStr) {
var self = this;
var msg = gettextCatalog.getString("{{fee}} will be deducted for bitcoin networking fees", {
fee: feeStr
@ -1274,7 +1267,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
confirmDialog.show(msg, function(confirmed) {
if (confirmed) {
self._doSendAll(amount, feeRate);
self._doSendAll(amount);
}
});
};