"has no funds" case
This commit is contained in:
parent
c3cded5cb0
commit
893dbe5c6f
4 changed files with 103 additions and 21 deletions
|
|
@ -1,14 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, profileService, configService) {
|
||||
|
||||
// TODO: change according to which screen this is, origin/destination
|
||||
$scope.headerTitle = gettextCatalog.getString('Choose your origin wallet');
|
||||
$scope.headerSubtitle = gettextCatalog.getString('This is where the Bitcoin will be taken out from.');
|
||||
angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, configService, gettextCatalog, profileService) {
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
$scope.walletsBch = profileService.getWallets({coin: 'bch'});
|
||||
$scope.walletsBtc = profileService.getWallets({coin: 'btc'});
|
||||
$scope.type = 'origin';
|
||||
$scope.coin = 'bch';
|
||||
$scope.walletsEmpty = [];
|
||||
$scope.isPaymentRequest = true;
|
||||
|
||||
if ($scope.type === 'origin') {
|
||||
$scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from');
|
||||
$scope.walletsEmpty = profileService.getWallets({coin: $scope.coin, hasNoFunds: true});
|
||||
} else if ($scope.type === 'destination') {
|
||||
$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'});
|
||||
|
||||
configService.whenAvailable(function(config) {
|
||||
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay;
|
||||
});
|
||||
|
|
@ -17,5 +26,4 @@ angular.module('copayApp.controllers').controller('walletToWalletController', fu
|
|||
$scope.useWallet = function(wallet) {
|
||||
// Do something with selected wallet
|
||||
};
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue