This commit is contained in:
Nouman Tahir 2021-06-29 15:02:35 +05:00
parent 97109ddc24
commit f44da57529
2 changed files with 4 additions and 6 deletions

View File

@ -24,8 +24,7 @@ const AccountsBottomSheetContainer = ({ navigation }) => {
); );
const currentAccount = useSelector((state) => state.account.currentAccount); const currentAccount = useSelector((state) => state.account.currentAccount);
const accounts = useSelector((state) => state.account.otherAccounts); const accounts = useSelector((state) => state.account.otherAccounts);
const pinHash = useSelector((state)=>state.application.pin); const pinHash = useSelector((state) => state.application.pin);
useEffect(() => { useEffect(() => {
if (isVisibleAccountsBottomSheet) { if (isVisibleAccountsBottomSheet) {
@ -73,12 +72,11 @@ const AccountsBottomSheetContainer = ({ navigation }) => {
_currentAccount.local = realmData[0]; _currentAccount.local = realmData[0];
//migreate account to use access token for master key auth type //migreate account to use access token for master key auth type
if (realmData[0].authType === AUTH_TYPE.MASTER_KEY && realmData[0].accessToken === "") { if (realmData[0].authType === AUTH_TYPE.MASTER_KEY && realmData[0].accessToken === '') {
_currentAccount = await migrateToMasterKeyWithAccessToken(_currentAccount, pinHash); _currentAccount = await migrateToMasterKeyWithAccessToken(_currentAccount, pinHash);
} }
dispatch(updateCurrentAccount(_currentAccount)); dispatch(updateCurrentAccount(_currentAccount));
}; };
return ( return (

View File

@ -812,7 +812,7 @@ class ApplicationContainer extends Component {
[_currentAccount.local] = realmData; [_currentAccount.local] = realmData;
//migreate account to use access token for master key auth type //migreate account to use access token for master key auth type
if (realmData[0].authType === AUTH_TYPE.MASTER_KEY && realmData[0].accessToken === "") { if (realmData[0].authType === AUTH_TYPE.MASTER_KEY && realmData[0].accessToken === '') {
_currentAccount = await migrateToMasterKeyWithAccessToken(_currentAccount, pinCode); _currentAccount = await migrateToMasterKeyWithAccessToken(_currentAccount, pinCode);
} }