@@ -13,7 +13,7 @@
Wallet Information
-
+
Sweep paper wallet
diff --git a/src/js/controllers/backup.js b/src/js/controllers/backup.js
index ce0cba754..e2c85231a 100644
--- a/src/js/controllers/backup.js
+++ b/src/js/controllers/backup.js
@@ -95,7 +95,10 @@ angular.module('copayApp.controllers').controller('backupController',
if (val) {
confirmBackupPopup.close();
if ($stateParams.fromOnboarding) $state.go('onboarding.disclaimer');
- else $state.go('tabs.home')
+ else {
+ $ionicHistory.clearHistory();
+ $state.go('tabs.home');
+ }
} else {
confirmBackupPopup.close();
$scope.goToStep(1);
diff --git a/src/js/controllers/paperWallet.js b/src/js/controllers/paperWallet.js
index 6393fdc3f..06560a31b 100644
--- a/src/js/controllers/paperWallet.js
+++ b/src/js/controllers/paperWallet.js
@@ -1,11 +1,27 @@
angular.module('copayApp.controllers').controller('paperWalletController',
- function($scope, $timeout, $log, $ionicModal, $ionicHistory, configService, profileService, $state, addressService, bitcore, ongoingProcess, txFormatService, $stateParams, walletService) {
-
+ function($scope, $timeout, $log, $ionicModal, $ionicHistory, platformInfo, configService, profileService, $state, addressService, bitcore, ongoingProcess, txFormatService, $stateParams, walletService) {
var wallet = profileService.getWallet($stateParams.walletId);
var rawTx;
+ $scope.init = function() {
+ $scope.wallet = wallet;
+ $scope.isCordova = platformInfo.isCordova;
+ $scope.needsBackup = wallet.needsBackup;
+ $scope.walletAlias = wallet.name;
+ $scope.walletName = wallet.credentials.walletName;
+ $scope.formData = {};
+ $scope.formData.inputData = null;
+ $scope.scannedKey = null;
+ $scope.balance = null;
+ $scope.balanceSat = null;
+ $scope.scanned = false;
+ $timeout(function() {
+ $scope.$apply();
+ }, 10);
+ };
+
$scope.onQrCodeScanned = function(data) {
- $scope.inputData = data;
+ $scope.formData.inputData = data;
$scope.onData(data);
};
@@ -62,6 +78,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
$scope.balanceSat = balance;
var config = configService.getSync().wallet.settings;
$scope.balance = txFormatService.formatAmount(balance) + ' ' + config.unitName;
+ $scope.scanned = true;
}
$scope.$apply();
@@ -125,5 +142,4 @@ angular.module('copayApp.controllers').controller('paperWalletController',
$scope.txStatusModal.show();
});
};
-
});
diff --git a/src/js/controllers/preferencesAdvancedController.js b/src/js/controllers/preferencesAdvancedController.js
new file mode 100644
index 000000000..0af8cf258
--- /dev/null
+++ b/src/js/controllers/preferencesAdvancedController.js
@@ -0,0 +1,10 @@
+'use strict';
+
+angular.module('copayApp.controllers').controller('preferencesAdvancedController', function($scope, $timeout, $stateParams, profileService) {
+ var wallet = profileService.getWallet($stateParams.walletId);
+ $scope.network = wallet.network;
+
+ $timeout(function() {
+ $scope.$apply();
+ }, 1);
+});