mirror of https://github.com/BTCPrivate/copay.git
Fix addresses view. Also show adddress cached if error occurs
This commit is contained in:
parent
664cec174a
commit
88b6e722f2
|
@ -84,7 +84,11 @@ angular.module('copayApp.controllers').controller('addressesController', functio
|
|||
walletService.getAddress($scope.wallet, true, function(err, addr) {
|
||||
if (err) {
|
||||
ongoingProcess.set('generatingNewAddress', false);
|
||||
$scope.gapReached = true;
|
||||
if (err.toString().match('MAIN_ADDRESS_GAP_REACHED')) {
|
||||
$scope.gapReached = true;
|
||||
} else {
|
||||
popupService.showAlert(err);
|
||||
}
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
|
||||
if (err) {
|
||||
//Error is already formated
|
||||
return popupService.showAlert(err);
|
||||
popupService.showAlert(err);
|
||||
}
|
||||
|
||||
$scope.addr = addr;
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
<div class="item item-icon-right view-all" ng-if="viewAll.value" ng-click="viewAllAddresses()">
|
||||
<span translate>View All Addresses</span>
|
||||
<i class="icon ion-ios-arrow-thin-right"></i>
|
||||
</div>
|
||||
|
||||
<div class="item item-divider item-icon-right" ng-click="newAddress()">
|
||||
<span translate>Unused Addresses</span>
|
||||
<i class="icon ion-ios-plus-empty"></i>
|
||||
</div>
|
||||
|
||||
<div ng-if="loading" class="updating">
|
||||
|
@ -47,11 +52,6 @@
|
|||
</div>
|
||||
|
||||
<div ng-if="latestUnused[0]">
|
||||
<div class="item item-divider item-icon-right" ng-click="newAddress()">
|
||||
<span translate>Unused Addresses</span>
|
||||
<i class="icon ion-ios-plus-empty"></i>
|
||||
</div>
|
||||
|
||||
<div class="box-error" ng-if="gapReached">
|
||||
<h5 translate>Unused Addresses Limit</h5>
|
||||
<p><span translate>The maximum number of consecutive unused addresses (20) has been reached. When one of your unused addresses receives a payment, a new address will be generated and shown in your Receive tab.</span> <a ng-click="readMore()" ng-if="!showMore" translate>Read more</a></p>
|
||||
|
|
Loading…
Reference in New Issue