set disclaimer flag when import wallet

This commit is contained in:
Gabriel Bazán 2016-08-30 17:31:29 -03:00
commit a595c60892
2 changed files with 31 additions and 1 deletions

View file

@ -110,6 +110,11 @@ angular.module('copayApp.controllers').controller('importController',
});
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
if ($stateParams.fromOnboarding)
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
$state.go('tabs.home');
});
}, 100);
@ -137,6 +142,11 @@ angular.module('copayApp.controllers').controller('importController',
});
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
if ($stateParams.fromOnboarding)
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
$state.go('tabs.home');
});
}, 100);
@ -157,6 +167,11 @@ angular.module('copayApp.controllers').controller('importController',
});
}
$rootScope.$emit('Local/WalletImported', walletId);
if ($stateParams.fromOnboarding)
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
$state.go('tabs.home');
});
}, 100);
@ -186,6 +201,11 @@ angular.module('copayApp.controllers').controller('importController',
});
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
if ($stateParams.fromOnboarding)
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
$state.go('tabs.home');
});
}, 100);
@ -320,6 +340,11 @@ angular.module('copayApp.controllers').controller('importController',
$log.debug('Remote preferences saved for:' + wallet.walletId)
});
$rootScope.$emit('Local/WalletImported', wallet.walletId);
if ($stateParams.fromOnboarding)
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
$state.go('tabs.home');
});
}, 100);
@ -397,6 +422,12 @@ angular.module('copayApp.controllers').controller('importController',
$log.debug('Remote preferences saved for:' + wallet.walletId)
});
$rootScope.$emit('Local/WalletImported', wallet.walletId);
if ($stateParams.fromOnboarding)
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
});
$state.go('tabs.home');
});
}, 100);

View file

@ -462,7 +462,6 @@ angular.module('copayApp.services')
if (!client || !client.credentials)
return cb(gettext('Could not access wallet'));
if (root.profile) root.profile = Profile.create();
var walletId = client.credentials.walletId
if (!root.profile.addWallet(JSON.parse(client.export())))