Merge pull request #216 from Bitcoin-com/wallet/task/461
Improvement - 461 - Remove automatic address copying when opening Receive tab
This commit is contained in:
commit
ad64758883
2 changed files with 9 additions and 7 deletions
|
|
@ -24,7 +24,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
});
|
||||
};
|
||||
|
||||
$scope.setAddress = function(newAddr) {
|
||||
$scope.setAddress = function(newAddr, copyAddress) {
|
||||
$scope.addr = null;
|
||||
if (!$scope.wallet || $scope.generatingAddress || !$scope.wallet.isComplete()) return;
|
||||
$scope.generatingAddress = true;
|
||||
|
|
@ -58,11 +58,13 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
paymentSubscriptionObj.addr = $scope.addr
|
||||
}
|
||||
|
||||
try {
|
||||
clipboardService.copyToClipboard($scope.wallet.coin == 'bch' && $scope.bchAddressType.type == 'cashaddr' ? 'bitcoincash:' + $scope.addr : $scope.addr);
|
||||
} catch (error) {
|
||||
$log.debug("Error copying to clipboard:");
|
||||
$log.debug(error);
|
||||
if (copyAddress === true) {
|
||||
try {
|
||||
clipboardService.copyToClipboard($scope.wallet.coin == 'bch' && $scope.bchAddressType.type == 'cashaddr' ? 'bitcoincash:' + $scope.addr : $scope.addr);
|
||||
} catch (error) {
|
||||
$log.debug("Error copying to clipboard:");
|
||||
$log.debug(error);
|
||||
}
|
||||
}
|
||||
// create subscription
|
||||
var msg = JSON.stringify(paymentSubscriptionObj);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button ng-show="addr" class="button-address" ng-click="setAddress(true)">
|
||||
<button ng-show="addr" class="button-address" ng-click="setAddress(true, true)">
|
||||
<span translate>Generate new address</span>
|
||||
</button><br/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue