diff --git a/src/js/controllers/paperWallet.js b/src/js/controllers/paperWallet.js index abd5308e0..2344f6e5a 100644 --- a/src/js/controllers/paperWallet.js +++ b/src/js/controllers/paperWallet.js @@ -68,14 +68,15 @@ angular.module('copayApp.controllers').controller('paperWalletController', $state.go('tabs.home'); } else { $scope.privateKey = privateKey; - $scope.btcBalanceSat = btcBalance; - $scope.bchBalanceSat = bchBalance; - if ($scope.balanceSat <= 0) - popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not funds found')); + $scope.btcBalance = btcBalance; + $scope.bchBalance = bchBalance; + if ($scope.btcWallet) - $scope.btcBalance = txFormatService.formatAmountStr($scope.btcWallet.coin, btcBalance); + $scope.btcBalanceText = txFormatService.formatAmountStr($scope.btcWallet.coin, btcBalance); if ($scope.bchWallet) - $scope.bchBalance = txFormatService.formatAmountStr($scope.bchWallet.coin, bchBalance); + $scope.bchBalanceText = txFormatService.formatAmountStr($scope.bchWallet.coin, bchBalance); + + $scope.readyToShow = true; } $scope.$apply(); }); @@ -162,17 +163,13 @@ angular.module('copayApp.controllers').controller('paperWalletController', network: 'livenet', }); - $scope.noMatchingWallet = false; - if (!wallets || wallets.length == 0) { - $scope.noMatchingWallet = true; - return; - } - $scope.wallets = wallets; $scope.btcWallets = _.filter($scope.wallets, function(w) { return w.coin == 'btc'; }); $scope.bchWallets = _.filter($scope.wallets, function(w) { return w.coin == 'bch'; }); $scope.singleBtcWallet = $scope.btcWallets.length == 1; $scope.singleBchWallet = $scope.bchWallets.length == 1; + $scope.noMatchingBtcWallet = $scope.btcWallets.length == 0; + $scope.noMatchingBchWallet = $scope.bchWallets.length == 0; }); $scope.$on("$ionicView.enter", function(event, data) { diff --git a/www/views/paperWallet.html b/www/views/paperWallet.html index 211977ea9..54ccf2f92 100644 --- a/www/views/paperWallet.html +++ b/www/views/paperWallet.html @@ -3,29 +3,18 @@ {{'Sweep paper wallet' | translate}} - - - -
-
-
-
-

Funds found:

-
- {{btcBalance}} - - - -
-
...
+
+
+
+

Funds found:

+
+ {{btcBalanceText}}
+
+
Funds will be transferred to:
@@ -48,28 +37,29 @@
+
- - Funds transferred - -
-
-
-

Funds found:

-
- {{bchBalance}} - - - -
-
...
+
+
+ No BTC wallet to transfer funds to found. +
+
+
+
+
+

No BTC found

+
+
+
+
+
+

Funds found:

+
+ {{bchBalanceText}}
+
+
Funds will be transferred to:
@@ -81,7 +71,6 @@

{{bchWallet.status.totalBalanceStr}} - [Balance Hidden] {{bchWallet.m}}-of-{{bchWallet.n}} @@ -92,17 +81,25 @@

+ +
+
+
+ No BCH wallet to transfer funds to found. +
- - Funds transferred -
-
- No wallets available to receive funds +
+
+

No BCH found

+
+ + Funds transferred +