Skip to content

Commit

Permalink
update account history on login/create account
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Dec 4, 2023
1 parent e119d9b commit 7a80a35
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ class AccountRepository(
withContext(dispatcher) {
val deferred = async { accountCreationEvents.first() }
messageHandler.trySendRequest(Request.CreateAccount)
deferred.await()
deferred.await().also { fetchAccountHistory() }
}

suspend fun login(accountToken: String): LoginResult =
withContext(Dispatchers.IO) {
val deferred = async { loginEvents.first() }
messageHandler.trySendRequest(Request.Login(accountToken))
deferred.await()
deferred.await().also { fetchAccountHistory() }
}

fun logout() {
Expand Down

0 comments on commit 7a80a35

Please sign in to comment.