mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 21:35:21 +01:00
REF: sentry unique id
This commit is contained in:
parent
44522b45af
commit
4714e2c5e1
7
App.js
7
App.js
@ -21,7 +21,6 @@ import * as NavigationService from './NavigationService';
|
||||
import { BlueTextCentered, BlueButton, SecondButton } from './BlueComponents';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
import { Chain } from './models/bitcoinUnits';
|
||||
import * as Sentry from '@sentry/react-native';
|
||||
import OnAppLaunch from './class/on-app-launch';
|
||||
import DeeplinkSchemaMatch from './class/deeplink-schema-match';
|
||||
import loc from './loc';
|
||||
@ -41,12 +40,6 @@ const A = require('./blue_modules/analytics');
|
||||
|
||||
const eventEmitter = new NativeEventEmitter(NativeModules.EventEmitter);
|
||||
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
Sentry.init({
|
||||
dsn: 'https://23377936131848ca8003448a893cb622@sentry.io/1295736',
|
||||
});
|
||||
}
|
||||
|
||||
const ClipboardContentType = Object.freeze({
|
||||
BITCOIN: 'BITCOIN',
|
||||
LIGHTNING: 'LIGHTNING',
|
||||
|
@ -1,9 +1,16 @@
|
||||
import * as Sentry from '@sentry/react-native';
|
||||
import amplitude from 'amplitude-js';
|
||||
import { getVersion, getSystemName } from 'react-native-device-info';
|
||||
import { getVersion, getSystemName, getUniqueId } from 'react-native-device-info';
|
||||
import { Platform } from 'react-native';
|
||||
const BlueApp = require('../BlueApp');
|
||||
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
Sentry.init({
|
||||
dsn: 'https://23377936131848ca8003448a893cb622@sentry.io/1295736',
|
||||
});
|
||||
Sentry.setUser({ id: getUniqueId() });
|
||||
}
|
||||
|
||||
amplitude.getInstance().init('8b7cf19e8eea3cdcf16340f5fbf16330', null, {
|
||||
useNativeDeviceInfo: true,
|
||||
platform: getSystemName().toLocaleLowerCase().includes('mac') ? getSystemName() : Platform.OS,
|
||||
|
@ -1,13 +1,15 @@
|
||||
import React from 'react';
|
||||
import { TouchableOpacity, ScrollView, Linking, Image, View, Text, StyleSheet, useWindowDimensions, Platform } from 'react-native';
|
||||
import { TouchableOpacity, ScrollView, Linking, Image, View, Text, StyleSheet, useWindowDimensions } from 'react-native';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { getApplicationName, getVersion, getBundleId, getBuildNumber, getUniqueId } from 'react-native-device-info';
|
||||
import Rate, { AndroidMarket } from 'react-native-rate';
|
||||
|
||||
import { BlueButton, BlueCard, BlueListItem, BlueSpacing20, BlueTextCentered, BlueCopyToClipboardButton } from '../../BlueComponents';
|
||||
import { BlueButton, BlueCard, BlueListItem, BlueSpacing20, BlueTextCentered } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import loc from '../../loc';
|
||||
import Clipboard from '@react-native-clipboard/clipboard';
|
||||
import * as Sentry from '@sentry/react-native';
|
||||
|
||||
const About = () => {
|
||||
const { navigate } = useNavigation();
|
||||
@ -18,6 +20,11 @@ const About = () => {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
copyToClipboardText: {
|
||||
fontSize: 13,
|
||||
fontWeight: '400',
|
||||
color: '#68bbe1',
|
||||
},
|
||||
center: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
@ -203,10 +210,15 @@ const About = () => {
|
||||
</BlueTextCentered>
|
||||
<BlueTextCentered>Unique ID: {getUniqueId()}</BlueTextCentered>
|
||||
<View style={styles.copyToClipboard}>
|
||||
<BlueCopyToClipboardButton
|
||||
stringToCopy={(Platform.OS === 'android' ? 'user.id:' : 'app.device:') + getUniqueId()}
|
||||
displayText={loc.transactions.details_copy}
|
||||
/>
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
const stringToCopy = 'user.id:' + getUniqueId();
|
||||
Sentry.captureMessage('copied unique id');
|
||||
Clipboard.setString(stringToCopy);
|
||||
}}
|
||||
>
|
||||
<Text style={styles.copyToClipboardText}>{loc.transactions.details_copy}</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<BlueSpacing20 />
|
||||
<BlueSpacing20 />
|
||||
|
Loading…
Reference in New Issue
Block a user