updated fingerprint package and added release routine

This commit is contained in:
noumantahir 2022-07-26 22:06:30 +05:00
parent df8df111e2
commit 70990e3b86
3 changed files with 9 additions and 4 deletions

View File

@ -93,7 +93,7 @@
"react-native-dynamic": "^1.0.0",
"react-native-extended-stylesheet": "^0.10.0",
"react-native-fast-image": "^8.3.2",
"react-native-fingerprint-scanner": "^6.0.0",
"react-native-fingerprint-scanner": "hieuvp/react-native-fingerprint-scanner",
"react-native-gesture-handler": "^1.9.0",
"react-native-highlight-words": "^1.0.1",
"react-native-iap": "^7.5.6",

View File

@ -128,11 +128,14 @@ class PinCodeContainer extends Component {
} catch (err) {
console.warn('Failed to process biometric', err);
}
FingerprintScanner.release();
};
//this function updates realm with appropriate master key required for encyrption
//this function is important: must run while chaning pin
//and even logging in with existing pin code
//TODO: make sure this routine is not called
_updatePinCodeRealm = async (pinData) => {
try {
const { currentAccount, dispatch } = this.props;
@ -256,12 +259,14 @@ class PinCodeContainer extends Component {
} = this.props;
const { oldPinCode } = this.state;
//TOOD: make sure user is set with defualt pin here.
const pinData = {
pinCode: pin,
password: currentAccount ? currentAccount.password : '',
username: currentAccount ? currentAccount.name : '',
accessToken,
};
setUserDataWithPinCode(pinData).then((response) => {
getUser(currentAccount.name).then((user) => {
const _currentAccount = user;
@ -390,6 +395,7 @@ class PinCodeContainer extends Component {
});
});
//TODO: make sure pinCode is rather saved as different redux state, encryptedUnlockPin
_savePinCode = (pin) => {
const { dispatch } = this.props;
const encryptedPin = encryptKey(pin, Config.PIN_KEY);

View File

@ -8782,10 +8782,9 @@ react-native-fast-image@^8.3.2:
resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.3.4.tgz#79edca177e30311b19d59ff335625bcbe22650d7"
integrity sha512-LpzAdjUphihUpVEBn5fEv5AILe55rHav0YiZroPZ1rumKDhAl4u2cG01ku2Pb7l8sayjTsNu7FuURAlXUUDsow==
react-native-fingerprint-scanner@^6.0.0:
react-native-fingerprint-scanner@hieuvp/react-native-fingerprint-scanner:
version "6.0.0"
resolved "https://registry.yarnpkg.com/react-native-fingerprint-scanner/-/react-native-fingerprint-scanner-6.0.0.tgz#ecb47ad0682d2a66a5e126d2b9e4d95e73c8dbf2"
integrity sha512-8VoKSA0Z0kWnIni96yABZfUUzfmWFXQEXcELwWr1CNLloPt3WoPptYb/6pGsBcH0YxSsW3X4+C8tl0clgyBsvA==
resolved "https://codeload.github.com/hieuvp/react-native-fingerprint-scanner/tar.gz/9cecc0db326471c571553ea85f7c016fee2f803d"
react-native-flipper@^0.34.0:
version "0.34.0"