Hide AdvOpts after click on SendAll
This commit is contained in:
parent
e72b76941b
commit
cfcda94052
2 changed files with 10 additions and 4 deletions
|
|
@ -278,7 +278,7 @@
|
|||
|
||||
<a class="right lh"
|
||||
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, index.feeRateToSendMax, index.currentFeeLevel)"
|
||||
translate> Send All
|
||||
</a>
|
||||
|
||||
|
|
@ -383,7 +383,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m20b" ng-init="home.hideAdvSend=true">
|
||||
<div class="m20b" ng-init="home.hideAdvSend=true" ng-show="!home.disableAdvSend">
|
||||
<a class="button outline light-gray expand tiny m0" ng-click="home.hideAdvSend=!home.hideAdvSend">
|
||||
<i class="fi-widget m3r"></i>
|
||||
<span translate ng-hide="!home.hideAdvSend">Show advanced options</span>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
this.isMobile = isMobile.any();
|
||||
this.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||
this.blockUx = false;
|
||||
this.disableAdvSend = false;
|
||||
this.isRateAvailable = false;
|
||||
this.showScanner = false;
|
||||
this.isMobile = isMobile.any();
|
||||
|
|
@ -1022,6 +1023,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
this.lockAmount = false;
|
||||
this.currentSendFeeLevel = null;
|
||||
this.hideAdvSend = true;
|
||||
this.disableAdvSend = false;
|
||||
$scope.currentSpendUnconfirmed = configService.getSync().wallet.spendUnconfirmed;
|
||||
|
||||
this._amount = this._address = null;
|
||||
|
|
@ -1285,15 +1287,19 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
this.setForm(null, amount, null, feeRate);
|
||||
};
|
||||
|
||||
this.sendAll = function(amount, feeStr, feeRate) {
|
||||
this.sendAll = function(amount, feeStr, feeRate, currentFeeLevel) {
|
||||
var self = this;
|
||||
var msg = gettextCatalog.getString("{{fee}} will be deducted for bitcoin networking fees", {
|
||||
fee: feeStr
|
||||
});
|
||||
|
||||
confirmDialog.show(msg, function(confirmed) {
|
||||
if (confirmed)
|
||||
if (confirmed) {
|
||||
self._doSendAll(amount, feeRate);
|
||||
self.disableAdvSend = true;
|
||||
self.currentSendFeeLevel = currentFeeLevel;
|
||||
$scope.currentSpendUnconfirmed = configService.getSync().wallet.spendUnconfirmed;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue