Preferences: update wallet info beforeEnter
This commit is contained in:
parent
e8a18c9eb4
commit
82879cca20
1 changed files with 7 additions and 4 deletions
|
|
@ -1,10 +1,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesController',
|
angular.module('copayApp.controllers').controller('preferencesController',
|
||||||
function($scope, $rootScope, $timeout, $log, $stateParams, $ionicHistory, configService, profileService, fingerprintService, walletService) {
|
function($scope, $rootScope, $timeout, $log, $ionicHistory, configService, profileService, fingerprintService, walletService) {
|
||||||
var wallet = profileService.getWallet($stateParams.walletId);
|
var wallet;
|
||||||
var walletId = wallet.credentials.walletId;
|
var walletId;
|
||||||
$scope.wallet = wallet;
|
|
||||||
|
|
||||||
$scope.encryptEnabled = {
|
$scope.encryptEnabled = {
|
||||||
value: walletService.isEncrypted(wallet)
|
value: walletService.isEncrypted(wallet)
|
||||||
|
|
@ -78,6 +77,10 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
|
wallet = profileService.getWallet(data.stateParams.walletId);
|
||||||
|
walletId = wallet.credentials.walletId;
|
||||||
|
$scope.wallet = wallet;
|
||||||
|
|
||||||
$scope.externalSource = null;
|
$scope.externalSource = null;
|
||||||
|
|
||||||
if (!wallet)
|
if (!wallet)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue