OPS: Update RN Device Info

This commit is contained in:
Marcos Rodriguez Velez 2023-10-19 14:46:33 -04:00
parent 6c85265e6c
commit 0ae11e19f1
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7
5 changed files with 21 additions and 13 deletions

View File

@ -5,10 +5,11 @@ const BlueApp = require('../BlueApp');
let userHasOptedOut = false;
if (process.env.NODE_ENV !== 'development') {
const uniqueID = await getUniqueId();
Bugsnag.start({
collectUserIp: false,
user: {
id: getUniqueId(),
id: uniqueID,
},
onError: function (event) {
return !userHasOptedOut;

View File

@ -404,7 +404,7 @@ PODS:
- React-Core
- RNDefaultPreference (1.4.4):
- React-Core
- RNDeviceInfo (8.7.1):
- RNDeviceInfo (10.11.0):
- React-Core
- RNFS (2.20.0):
- React-Core
@ -774,7 +774,7 @@ SPEC CHECKSUMS:
RNCClipboard: d77213bfa269013bf4b857b7a9ca37ee062d8ef1
RNCPushNotificationIOS: 64218f3c776c03d7408284a819b2abfda1834bc8
RNDefaultPreference: 08bdb06cfa9188d5da97d4642dac745218d7fb31
RNDeviceInfo: aad3c663b25752a52bf8fce93f2354001dd185aa
RNDeviceInfo: bf8a32acbcb875f568217285d1793b0e8588c974
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: fa40ab6b6cafaa7609294d31f8e8fbbd0cce8ea6
RNHandoff: d3b0754cca3a6bcd9b25f544f733f7f033ccf5fa

14
package-lock.json generated
View File

@ -63,7 +63,7 @@
"react-native-camera-kit": "13.0.0",
"react-native-crypto": "2.2.0",
"react-native-default-preference": "1.4.4",
"react-native-device-info": "8.7.1",
"react-native-device-info": "^10.11.0",
"react-native-document-picker": "https://github.com/BlueWallet/react-native-document-picker#857655cdddf17751c0fae1286a9121fda2a6d568",
"react-native-draggable-flatlist": "github:BlueWallet/react-native-draggable-flatlist#ebfddc4",
"react-native-elements": "3.4.3",
@ -94,7 +94,7 @@
"react-native-safe-area-context": "3.4.1",
"react-native-screens": "3.20.0",
"react-native-secure-key-store": "https://github.com/BlueWallet/react-native-secure-key-store#2076b48",
"react-native-share": "^9.4.1",
"react-native-share": "9.4.1",
"react-native-svg": "13.14.0",
"react-native-tcp-socket": "5.6.2",
"react-native-tor": "0.1.8",
@ -18128,8 +18128,9 @@
}
},
"node_modules/react-native-device-info": {
"version": "8.7.1",
"integrity": "sha512-cVMZztFa2Qn6qpQa601W61CtUwZQ1KXfqCOeltejAWEXmgIWivC692WGSdtGudj4upSi1UgMSaGcvKjfcpdGjg==",
"version": "10.11.0",
"resolved": "https://registry.npmjs.org/react-native-device-info/-/react-native-device-info-10.11.0.tgz",
"integrity": "sha512-qRzhuYOm5ZXQi5dhfJFjDq157oipxcEW/fo0QyMm5+TI6V6/+P/tju+Hif6z0rpLCf7MV7iDVRv2Kqha4D/yvQ==",
"peerDependencies": {
"react-native": "*"
}
@ -34168,8 +34169,9 @@
"integrity": "sha512-h0vtgiSKws3UmMRJykXAVM4ne1SgfoocUcoBD19ewRpQd6wqurE0HJRQGrSxcHK5LdKE7QPSIB1VX3YGIVS8Jg=="
},
"react-native-device-info": {
"version": "8.7.1",
"integrity": "sha512-cVMZztFa2Qn6qpQa601W61CtUwZQ1KXfqCOeltejAWEXmgIWivC692WGSdtGudj4upSi1UgMSaGcvKjfcpdGjg=="
"version": "10.11.0",
"resolved": "https://registry.npmjs.org/react-native-device-info/-/react-native-device-info-10.11.0.tgz",
"integrity": "sha512-qRzhuYOm5ZXQi5dhfJFjDq157oipxcEW/fo0QyMm5+TI6V6/+P/tju+Hif6z0rpLCf7MV7iDVRv2Kqha4D/yvQ=="
},
"react-native-document-picker": {
"version": "git+ssh://git@github.com/BlueWallet/react-native-document-picker.git#857655cdddf17751c0fae1286a9121fda2a6d568",

View File

@ -148,7 +148,7 @@
"react-native-camera-kit": "13.0.0",
"react-native-crypto": "2.2.0",
"react-native-default-preference": "1.4.4",
"react-native-device-info": "8.7.1",
"react-native-device-info": "10.11.0",
"react-native-document-picker": "https://github.com/BlueWallet/react-native-document-picker#857655cdddf17751c0fae1286a9121fda2a6d568",
"react-native-draggable-flatlist": "github:BlueWallet/react-native-draggable-flatlist#ebfddc4",
"react-native-elements": "3.4.3",

View File

@ -1,4 +1,4 @@
import React, { useContext } from 'react';
import React, { useContext, useEffect, useState } from 'react';
import { TouchableOpacity, ScrollView, Linking, Image, View, Text, StyleSheet, useWindowDimensions, Platform, Alert } from 'react-native';
import { useNavigation, useTheme } from '@react-navigation/native';
import { Icon } from 'react-native-elements';
@ -20,6 +20,7 @@ const About = () => {
const { colors } = useTheme();
const { width, height } = useWindowDimensions();
const { isElectrumDisabled } = useContext(BlueStorageContext);
const [uniqueID, setUniqueID] = useState();
const styles = StyleSheet.create({
copyToClipboard: {
justifyContent: 'center',
@ -75,6 +76,10 @@ const About = () => {
},
});
useEffect(() => {
getUniqueId().then(setUniqueID);
}, []);
const handleOnReleaseNotesPress = () => {
navigate('ReleaseNotes');
};
@ -244,12 +249,12 @@ const About = () => {
<BlueTextCentered>
w, h = {width}, {height}
</BlueTextCentered>
<BlueTextCentered>Unique ID: {getUniqueId()}</BlueTextCentered>
<BlueTextCentered>Unique ID: {uniqueID}</BlueTextCentered>
<View style={styles.copyToClipboard}>
<TouchableOpacity
accessibilityRole="button"
onPress={() => {
const stringToCopy = 'userId:' + getUniqueId();
const stringToCopy = 'userId:' + uniqueID;
A.logError('copied unique id');
Clipboard.setString(stringToCopy);
}}