From 0200ec4f400f061d2b9a48da8697cc57bf95e564 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Thu, 29 Aug 2019 13:54:48 +0300 Subject: [PATCH] Fixed pin close issue --- src/providers/steem/auth.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/providers/steem/auth.js b/src/providers/steem/auth.js index 1d27a58b6..a516cccc0 100644 --- a/src/providers/steem/auth.js +++ b/src/providers/steem/auth.js @@ -171,9 +171,9 @@ export const updatePinCode = data => let currentUser = null; try { setPinCode(data.pinCode); - getUserData().then(users => { + getUserData().then(async users => { if (users && users.length > 0) { - users.forEach(userData => { + await users.forEach(userData => { if (userData.authType === AUTH_TYPE.MASTER_KEY) { data.password = decryptKey(userData.masterKey, data.oldPinCode); } else if (userData.authType === AUTH_TYPE.STEEM_CONNECT) { @@ -184,8 +184,8 @@ export const updatePinCode = data => if (userData.username === data.username) { currentUser = updatedUserData; } - resolve(currentUser); }); + resolve(currentUser); } }); } catch (error) {