diff --git a/lib/components/keyserver-connection-handler.js b/lib/components/keyserver-connection-handler.js --- a/lib/components/keyserver-connection-handler.js +++ b/lib/components/keyserver-connection-handler.js @@ -144,28 +144,22 @@ await dispatchActionPromise( keyserverAuthActionTypes, - (async () => { - const result = await keyserverAuth({ - userID, - deviceID, - doNotRegister: false, - calendarQuery, - deviceTokenUpdateInput, - authActionSource: process.env.BROWSER - ? logInActionSources.keyserverAuthFromWeb - : logInActionSources.keyserverAuthFromNative, - keyserverData: { - [keyserverID]: { - initialContentEncryptedMessage: contentSession, - initialNotificationsEncryptedMessage: notifsSession, - }, + keyserverAuth({ + userID, + deviceID, + doNotRegister: false, + calendarQuery, + deviceTokenUpdateInput, + authActionSource: process.env.BROWSER + ? logInActionSources.keyserverAuthFromWeb + : logInActionSources.keyserverAuthFromNative, + keyserverData: { + [keyserverID]: { + initialContentEncryptedMessage: contentSession, + initialNotificationsEncryptedMessage: notifsSession, }, - }); - if (cancelled) { - throw new Error(CANCELLED_ERROR); - } - return result; - })(), + }, + }), ); } catch (e) { if (cancelled) { @@ -266,11 +260,6 @@ keyserverID, getInitialNotificationsEncryptedMessageForRecovery, ); - if (cancelled) { - // TODO: cancellation won't work because above call handles Redux - // dispatch directly - throw new Error(CANCELLED_ERROR); - } const sessionChange = recoverySessionChange ?? genericCookieInvalidation; if (