comments & show wallets

This commit is contained in:
Sebastiaan Pasma 2018-07-23 14:48:25 +02:00
commit 7aecd2306f
No known key found for this signature in database
GPG key ID: 9A2B0C8B95A1D26F

View file

@ -3,10 +3,10 @@
angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, configService, gettextCatalog, profileService) {
$scope.$on("$ionicView.enter", function(event, data) {
$scope.type = 'origin';
$scope.coin = 'bch';
$scope.type = 'origin'; // origin || destination
$scope.coin = false; // Wallets to show (for destination screen)
$scope.walletsEmpty = [];
$scope.isPaymentRequest = true;
$scope.isPaymentRequest = true; // Show price-header
if ($scope.type === 'origin') {
$scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from');
@ -15,8 +15,12 @@ angular.module('copayApp.controllers').controller('walletToWalletController', fu
$scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to');
}
$scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'});
$scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type==='origin'});
if (!$scope.coin || $scope.coin === 'bch') {
$scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'});
}
if (!$scope.coin || $scope.coin === 'btc') {
$scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type === 'origin'});
}
configService.whenAvailable(function(config) {
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay;