fix send payments to destination address without backup

This commit is contained in:
Javier 2016-02-16 10:52:37 -03:00
commit 3c7012902e
2 changed files with 11 additions and 13 deletions

View file

@ -179,7 +179,7 @@
<div translate>Updating transaction history. Please stand by.</div> <div translate>Updating transaction history. Please stand by.</div>
</div> </div>
</div> </div>
</div> </div>
<div ng-if="index.txHistory[0] && index.updatingTxHistory && index.newTx" class="row collapse last-transactions-content animated fadeInDown"> <div ng-if="index.txHistory[0] && index.updatingTxHistory && index.newTx" class="row collapse last-transactions-content animated fadeInDown">
<div class="large-6 medium-6 small-6 columns size-14"> <div class="large-6 medium-6 small-6 columns size-14">
@ -358,12 +358,12 @@
<div class="pr p25b"> <div class="pr p25b">
<h4 class="title m0"> <h4 class="title m0">
<available-balance></available-balance> <available-balance></available-balance>
<span <span
ng-show="home.lockedCurrentFeePerKb || home.blockUx || home.lockAmount" ng-show="home.lockedCurrentFeePerKb || home.blockUx || home.lockAmount"
class="text-gray" translate>Send All</span> class="text-gray" translate>Send All</span>
<a <a
ng-show="index.availableBalanceSat > 0 && !home.lockedCurrentFeePerKb && !home.blockUx && !home.lockAmount" ng-show="index.availableBalanceSat > 0 && !home.lockedCurrentFeePerKb && !home.blockUx && !home.lockAmount"
ng-click="home.sendAll(index.totalBytesToSendMax, index.availableBalanceSat)" ng-click="home.sendAll(index.totalBytesToSendMax, index.availableBalanceSat)"
translate> Send All translate> Send All
</a> </a>
<div ng-show="!home.paymentExpired && home._paypro"> <div ng-show="!home.paymentExpired && home._paypro">
@ -394,7 +394,11 @@
<i class="icon-close-circle size-14"></i> <i class="icon-close-circle size-14"></i>
<span class="vm" translate>Not valid</span> <span class="vm" translate>Not valid</span>
</span> </span>
<small class="right text-primary" ng-show="!sendForm.address.$invalid"> <span class="has-error right size-12" ng-show="home.destinationAddressNeedsBackup">
<i class="icon-close-circle size-14"></i>
<span class="vm" translate>Destination address needs backup</span>
</span>
<small class="right text-primary" ng-show="!sendForm.address.$invalid && !home.destinationAddressNeedsBackup">
<i class="icon-checkmark-circle size-14"></i> <i class="icon-checkmark-circle size-14"></i>
</small> </small>
</span> </span>

View file

@ -25,8 +25,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
ret.isWindowsPhoneApp = isMobile.Windows() && isCordova; ret.isWindowsPhoneApp = isMobile.Windows() && isCordova;
var vanillaScope = ret; var vanillaScope = ret;
var disableScannerListener = $rootScope.$on('dataScanned', function(event, data) { var disableScannerListener = $rootScope.$on('dataScanned', function(event, data) {
self.setForm(data); self.setForm(data);
$rootScope.$emit('Local/SetTab', 'send'); $rootScope.$emit('Local/SetTab', 'send');
@ -94,8 +92,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$rootScope.shouldHideMenuBar = false; $rootScope.shouldHideMenuBar = false;
}); });
this.onQrCodeScanned = function(data) { this.onQrCodeScanned = function(data) {
if (data) go.send(); if (data) go.send();
$rootScope.$emit('dataScanned', data); $rootScope.$emit('dataScanned', data);
@ -984,11 +980,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
} }
}; };
this.resetForm = function() { this.resetForm = function() {
this.resetError(); this.resetError();
this.paymentExpired = false; this.destinationWalletNeedsBackup = null;
this._paypro = null; this._paypro = null;
this.lockedCurrentFeePerKb = null; this.lockedCurrentFeePerKb = null;
@ -1130,7 +1124,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
self._paypro = null; self._paypro = null;
self.error = gettext('Cannot sign: The payment request has expired'); self.error = gettext('Cannot sign: The payment request has expired');
}; };
}; };
this.setFromUri = function(uri) { this.setFromUri = function(uri) {
var self = this; var self = this;