fix sweep paper wallet flag - fix sweep process

This commit is contained in:
Javier 2016-09-08 19:50:18 -03:00
commit e16e93e408
5 changed files with 121 additions and 76 deletions

View file

@ -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);

View file

@ -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();
});
};
});

View file

@ -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);
});