diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 4e368e722d..7810b2d479 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -37994,12 +37994,12 @@ var TextSecureServer = (function() { keyId : res.keyId, publicKey : res.keyPair.pubKey, signature : res.signature - }); - }).then(function() { - textsecure.storage.put('signedKeyId', signedKeyId + 1); - textsecure.storage.remove('signedKeyRotationRejected'); - return store.storeSignedPreKey(res.keyId, res.keyPair).then(function() { - return cleanSignedPreKeys(); + }).then(function() { + textsecure.storage.put('signedKeyId', signedKeyId + 1); + textsecure.storage.remove('signedKeyRotationRejected'); + return store.storeSignedPreKey(res.keyId, res.keyPair).then(function() { + return cleanSignedPreKeys(); + }); }); }).catch(function(e) { console.log( diff --git a/libtextsecure/account_manager.js b/libtextsecure/account_manager.js index f0bfb60191..897d58407e 100644 --- a/libtextsecure/account_manager.js +++ b/libtextsecure/account_manager.js @@ -132,12 +132,12 @@ keyId : res.keyId, publicKey : res.keyPair.pubKey, signature : res.signature - }); - }).then(function() { - textsecure.storage.put('signedKeyId', signedKeyId + 1); - textsecure.storage.remove('signedKeyRotationRejected'); - return store.storeSignedPreKey(res.keyId, res.keyPair).then(function() { - return cleanSignedPreKeys(); + }).then(function() { + textsecure.storage.put('signedKeyId', signedKeyId + 1); + textsecure.storage.remove('signedKeyRotationRejected'); + return store.storeSignedPreKey(res.keyId, res.keyPair).then(function() { + return cleanSignedPreKeys(); + }); }); }).catch(function(e) { console.log(