fixed hsToken not refreshing after pinCode migration

This commit is contained in:
Nouman Tahir 2022-07-27 18:09:43 +05:00
parent c1dae1a977
commit 007b98acb9

View File

@ -703,14 +703,14 @@ class ApplicationContainer extends Component {
}; };
_fetchUserDataFromDsteem = async (realmObject) => { _fetchUserDataFromDsteem = async (realmObject) => {
const { dispatch, intl, pinCode, isPinCodeOpen } = this.props; const { dispatch, intl, pinCode, isPinCodeOpen, encUnlockPin } = this.props;
try { try {
let accountData = await getUser(realmObject.username); let accountData = await getUser(realmObject.username);
accountData.local = realmObject; accountData.local = realmObject;
//cannot migrate or refresh token since pin would null while pin code modal is open //cannot migrate or refresh token since pin would null while pin code modal is open
if (!isPinCodeOpen) { if (!isPinCodeOpen || encUnlockPin) {
//migration script for previously mast key based logged in user not having access token //migration script for previously mast key based logged in user not having access token
if (realmObject.authType !== AUTH_TYPE.STEEM_CONNECT && realmObject.accessToken === '') { if (realmObject.authType !== AUTH_TYPE.STEEM_CONNECT && realmObject.accessToken === '') {
accountData = await migrateToMasterKeyWithAccessToken(accountData, realmObject, pinCode); accountData = await migrateToMasterKeyWithAccessToken(accountData, realmObject, pinCode);