changed address type select to selector and cleaned receive screen
This commit is contained in:
parent
eb00d3026b
commit
fa6a4c2323
2 changed files with 18 additions and 22 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError, bitcoinCashJsService) {
|
angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError, bitcoinCashJsService) {
|
||||||
|
|
||||||
var listeners = [];
|
var listeners = [];
|
||||||
$scope.bchAddressType = 'cashaddr';
|
$scope.bchAddressType = { type: 'cashaddr' };
|
||||||
var bchAddresses = {};
|
var bchAddresses = {};
|
||||||
|
|
||||||
$scope.isCordova = platformInfo.isCordova;
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
|
|
@ -30,7 +30,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
|
|
||||||
if ($scope.wallet.coin == 'bch') {
|
if ($scope.wallet.coin == 'bch') {
|
||||||
bchAddresses = bitcoinCashJsService.translateAddresses(addr);
|
bchAddresses = bitcoinCashJsService.translateAddresses(addr);
|
||||||
$scope.addr = bchAddresses[$scope.bchAddressType];
|
$scope.addr = bchAddresses[$scope.bchAddressType.type];
|
||||||
} else {
|
} else {
|
||||||
$scope.addr = addr;
|
$scope.addr = addr;
|
||||||
}
|
}
|
||||||
|
|
@ -42,8 +42,8 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.displayAddress = function(type) {
|
$scope.displayAddress = function(type) {
|
||||||
$scope.bchAddressType = type;
|
$scope.bchAddressType.type = type;
|
||||||
$scope.addr = bchAddresses[$scope.bchAddressType];
|
$scope.addr = bchAddresses[$scope.bchAddressType.type];
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.goCopayers = function() {
|
$scope.goCopayers = function() {
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,9 @@
|
||||||
<div>
|
<div>
|
||||||
<button ng-show="addr" class="button button-standard button-small" ng-click="requestSpecificAmount()">
|
<button ng-show="addr" class="button button-standard button-small" ng-click="requestSpecificAmount()">
|
||||||
<span translate>Request Specific amount</span>
|
<span translate>Request Specific amount</span>
|
||||||
<i class="icon ion-ios-arrow-right"></i>
|
|
||||||
</button><br/><br/>
|
</button><br/><br/>
|
||||||
</div>
|
</div>
|
||||||
<div copy-to-clipboard="wallet.coin == 'bch' && bchAddressType == 'cashaddr' ? 'bitcoincash:' + addr : addr">
|
<div copy-to-clipboard="wallet.coin == 'bch' && bchAddressType.type == 'cashaddr' ? 'bitcoincash:' + addr : addr">
|
||||||
<span ng-show="shouldShowReceiveAddressFromHardware()">
|
<span ng-show="shouldShowReceiveAddressFromHardware()">
|
||||||
<button class="button button-standard button-primary" ng-click="showReceiveAddressFromHardware()">
|
<button class="button button-standard button-primary" ng-click="showReceiveAddressFromHardware()">
|
||||||
<span translate>Show address</span>
|
<span translate>Show address</span>
|
||||||
|
|
@ -46,25 +45,22 @@
|
||||||
<ion-spinner ng-show="!addr" class="spinner-dark" icon="crescent"></ion-spinner>
|
<ion-spinner ng-show="!addr" class="spinner-dark" icon="crescent"></ion-spinner>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<button ng-show="addr && wallet.coin == 'bch' && bchAddressType != 'cashaddr'" class="button-address" ng-click="displayAddress('cashaddr')">
|
|
||||||
<span translate>Display new style address</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<button ng-show="addr && wallet.coin == 'bch' && bchAddressType != 'legacy'" class="button-address" ng-click="displayAddress('legacy')">
|
|
||||||
<span translate>Display legacy address</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<button ng-show="addr && wallet.coin == 'bch' && bchAddressType != 'bitpay'" class="button-address" ng-click="displayAddress('bitpay')">
|
|
||||||
<span translate>Display BitPay address</span>
|
|
||||||
</button>
|
|
||||||
</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)">
|
||||||
<span translate>Generate new address</span>
|
<span translate>Generate new address</span>
|
||||||
</button>
|
</button><br/>
|
||||||
|
</div>
|
||||||
|
<div ng-show="addr && wallet.coin == 'bch'">
|
||||||
|
<label class="item-input item-select">
|
||||||
|
<div class="input-label" translate>
|
||||||
|
Address Type:
|
||||||
|
</div>
|
||||||
|
<select ng-model="bchAddressType.type" ng-change="displayAddress(bchAddressType.type)">
|
||||||
|
<option value="cashaddr">Cash Address</option>
|
||||||
|
<option value="legacy">Legacy</option>
|
||||||
|
<option value="bitpay">BitPay</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue