Merge pull request #263 from Bitcoin-com/wallet/task/537

Cleaning code
This commit is contained in:
Jean-Baptiste Dominguez 2018-08-10 19:11:22 +09:00 committed by GitHub
commit 3cf577fcfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu
sendFlowService.popState(); sendFlowService.popState();
} }
var stateParams = sendFlowService.getState(); $scope.params = sendFlowService.getState();
var config = configService.getSync().wallet.settings; var config = configService.getSync().wallet.settings;
priceDisplayAsFiat = config.priceDisplay === 'fiat'; priceDisplayAsFiat = config.priceDisplay === 'fiat';
@ -29,18 +29,17 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu
$scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer');
break; break;
case 'tabs.send.destination': case 'tabs.send.destination':
if (stateParams.fromWalletId) { if ($scope.params.fromWalletId) {
$scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer');
} }
break; break;
default: default:
if (!stateParams.thirdParty) { if (!$scope.params.thirdParty) {
$scope.sendFlowTitle = gettextCatalog.getString('Send'); $scope.sendFlowTitle = gettextCatalog.getString('Send');
} }
// nop // nop
} }
$scope.params = sendFlowService;
$scope.coin = false; // Wallets to show (for destination screen or contacts) $scope.coin = false; // Wallets to show (for destination screen or contacts)
$scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination $scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination
fromWalletId = $scope.params['fromWalletId']; fromWalletId = $scope.params['fromWalletId'];