Skip to content

Commit

Permalink
add missing condition for login event
Browse files Browse the repository at this point in the history
  • Loading branch information
jackson-dean committed Sep 18, 2023
1 parent d71e8e2 commit 8b1a56e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/identity/identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1750,9 +1750,6 @@ export class Identity<T extends StorageProvider> {
})
);
this.#pendingWindowRequest?.resolve(payload);

// This condition identifies the "get deso" flow where a user did not
// login, but was simply prompted to get some free deso.
} else if (
payload.publicKeyAdded &&
!payload.signedUp &&
Expand All @@ -1764,6 +1761,8 @@ export class Identity<T extends StorageProvider> {
endEvent = NOTIFICATION_EVENTS.GET_FREE_DESO_END;
} else if (startEvent === NOTIFICATION_EVENTS.VERIFY_PHONE_NUMBER_START) {
endEvent = NOTIFICATION_EVENTS.VERIFY_PHONE_NUMBER_END;
} else if (startEvent === NOTIFICATION_EVENTS.LOGIN_START) {
endEvent = NOTIFICATION_EVENTS.LOGIN_END;
} else {
throw new Error(`unexpected identity event: ${startEvent}`);
}
Expand Down

0 comments on commit 8b1a56e

Please sign in to comment.