mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
more promise/utils helper conversions
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
cryptoService.hashPassword($scope.masterPassword, key, function (keyHash) {
|
||||
cryptoService.getKeyHash(function (storedKeyHash) {
|
||||
if (storedKeyHash && keyHash && storedKeyHash === keyHash) {
|
||||
cryptoService.setKey(key, function () {
|
||||
cryptoService.setKey(key).then(function () {
|
||||
chrome.runtime.sendMessage({ command: 'unlocked' });
|
||||
$state.go('tabs.current');
|
||||
});
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
|
||||
tokenService.setTokens(response.accessToken, response.refreshToken, function () {
|
||||
cryptoService.setKey(key, function () {
|
||||
cryptoService.setKey(key).then(function () {
|
||||
cryptoService.setKeyHash(hashedPassword, function () {
|
||||
userService.setUserIdAndEmail(tokenService.getUserId(), tokenService.getEmail(),
|
||||
function () {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
chrome.storage.local.set(obj, function () {
|
||||
cryptoService.getKeyHash(function (keyHash) {
|
||||
if (keyHash) {
|
||||
cryptoService.toggleKey(function () { });
|
||||
cryptoService.toggleKey();
|
||||
}
|
||||
else {
|
||||
SweetAlert.swal({
|
||||
@@ -44,7 +44,7 @@
|
||||
cancelButtonText: i18nService.cancel
|
||||
}, function (confirmed) {
|
||||
if (confirmed) {
|
||||
cryptoService.toggleKey(function () { });
|
||||
cryptoService.toggleKey();
|
||||
chrome.runtime.sendMessage({ command: 'logout' });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user