fixed display bug of generating address, and copy bitcoincash:
This commit is contained in:
parent
81b808f369
commit
37b5ef6ed9
3 changed files with 10 additions and 6 deletions
|
|
@ -69,6 +69,7 @@ angular.module('copayApp.controllers').controller('addressesController', functio
|
|||
$scope.addressType = {
|
||||
type: currentDate >= cashaddrDate ? 'cashaddr' : 'legacy'
|
||||
};
|
||||
$scope.showAddressTypes = true;
|
||||
}
|
||||
|
||||
cachedWallet = $scope.wallet.id;
|
||||
|
|
@ -137,7 +138,10 @@ angular.module('copayApp.controllers').controller('addressesController', functio
|
|||
ongoingProcess.set('generatingNewAddress', false);
|
||||
if (err) return popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
if (addr != _addr[0].address) return popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('New address could not be generated. Please try again.'));
|
||||
|
||||
if ($scope.wallet.coin == 'bch') {
|
||||
_addr[0].translatedAddresses = bitcoinCashJsService.translateAddresses(_addr[0].address);
|
||||
}
|
||||
|
||||
$scope.noBalance = [_addr[0]].concat($scope.noBalance);
|
||||
$scope.latestUnused = lodash.slice($scope.noBalance, 0, UNUSED_ADDRESS_LIMIT);
|
||||
$scope.viewAll = {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<i class="icon ion-ios-arrow-thin-right"></i>
|
||||
</div>
|
||||
|
||||
<div ng-if="wallet.coin == 'bch'" class="item item-input item-select">
|
||||
<div ng-if="showAddressTypes" class="item item-input item-select">
|
||||
<div class="view-all input-label" translate>
|
||||
Address type
|
||||
</div>
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<p ng-if="showMore"><span translate>The restore process will stop when 20 addresses are generated in a row which contain no funds. To safely generate more addresses, make a payment to one of the unused addresses which has already been generated.</span> <a ng-click="readMore()" translate>Read less</a></p>
|
||||
</div>
|
||||
|
||||
<div class="item" ng-repeat="u in latestUnused track by $index" copy-to-clipboard="wallet.coin == 'bch' ? u.translatedAddresses[addressType.type] : u.address">
|
||||
<div class="item" ng-repeat="u in latestUnused track by $index" copy-to-clipboard="wallet.coin == 'bch' ? (addressType.type == 'cashaddr' ? 'bitcoincash:' : '') + u.translatedAddresses[addressType.type] : u.address">
|
||||
{{wallet.coin == 'bch' ? u.translatedAddresses[addressType.type] : u.address}}
|
||||
<div class="addr-path">
|
||||
{{u.path}} {{u.createdOn * 1000 | amDateFormat:'MMMM Do YYYY, hh:mm a'}}
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
Addresses With Balance
|
||||
</div>
|
||||
|
||||
<div class="item" ng-repeat="w in latestWithBalance track by $index" copy-to-clipboard="wallet.coin == 'bch' ? w.translatedAddresses[addressType.type] : w.address">
|
||||
<div class="item" ng-repeat="w in latestWithBalance track by $index" copy-to-clipboard="wallet.coin == 'bch' ? (addressType.type == 'cashaddr' ? 'bitcoincash:' : '') + w.translatedAddresses[addressType.type] : w.address">
|
||||
{{wallet.coin == 'bch' ? w.translatedAddresses[addressType.type] : w.address}}
|
||||
<div class="addr-balance">{{w.balanceStr}}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<div class="addr-list list">
|
||||
<div class="item item-divider"></div>
|
||||
|
||||
<div ng-if="wallet.coin == 'bch'" class="item item-input item-select">
|
||||
<div ng-if="showAddressTypes" class="item item-input item-select">
|
||||
<div class="view-all input-label" translate>
|
||||
Address type
|
||||
</div>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<div class="item item-divider"></div>
|
||||
</div>
|
||||
|
||||
<div class="item" ng-repeat="a in allAddresses track by $index" copy-to-clipboard="wallet.coin == 'bch' ? a.translatedAddresses[addressType.type] : a.address">
|
||||
<div class="item" ng-repeat="a in allAddresses track by $index" copy-to-clipboard="wallet.coin == 'bch' ? (addressType.type == 'cashaddr' ? 'bitcoincash:' : '') + a.translatedAddresses[addressType.type] : a.address">
|
||||
{{wallet.coin == 'bch' ? a.translatedAddresses[addressType.type] : a.address}}
|
||||
<div class="addr-path" ng-if="!a.balanceStr">
|
||||
{{a.path}} {{a.createdOn * 1000 | amDateFormat:'MMMM Do YYYY, hh:mm a'}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue