From 7081accef6ff9b45c859c96b1f23b5356307e4a7 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Tue, 13 Aug 2019 11:41:31 +0300 Subject: [PATCH] Fixed login issue --- src/providers/steem/auth.js | 3 ++- src/screens/application/container/applicationContainer.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/providers/steem/auth.js b/src/providers/steem/auth.js index c78dc0470..1d27a58b6 100644 --- a/src/providers/steem/auth.js +++ b/src/providers/steem/auth.js @@ -85,6 +85,7 @@ export const login = async (username, password, isPinCodeOpen) => { const updatedUserData = await getUpdatedUserData(userData, resData); account.local = updatedUserData; + account.local.avatar = avatar; } const authData = { @@ -94,7 +95,7 @@ export const login = async (username, password, isPinCodeOpen) => { await setAuthStatus(authData); // Save user data to Realm DB - await setUserData(userData); + await setUserData(account.local); await updateCurrentUsername(account.name); return { ...account, password }; } diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js index bebaa961f..e996c2715 100644 --- a/src/screens/application/container/applicationContainer.js +++ b/src/screens/application/container/applicationContainer.js @@ -476,6 +476,7 @@ class ApplicationContainer extends Component { return realmObject[0]; } + dispatch(updateCurrentAccount({})); dispatch(activeApplication()); dispatch(isLoginDone());