import React from 'react'; 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 } 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(); const { colors } = useTheme(); const { width, height } = useWindowDimensions(); const styles = StyleSheet.create({ copyToClipboard: { justifyContent: 'center', alignItems: 'center', }, copyToClipboardText: { fontSize: 13, fontWeight: '400', color: '#68bbe1', }, center: { justifyContent: 'center', alignItems: 'center', marginTop: 54, }, logo: { width: 102, height: 124, }, textFree: { maxWidth: 260, marginVertical: 24, color: '#9AA0AA', fontSize: 15, textAlign: 'center', fontWeight: '500', }, textBackup: { maxWidth: 260, marginBottom: 40, color: colors.foregroundColor, fontSize: 15, textAlign: 'center', fontWeight: '500', }, buildWith: { backgroundColor: colors.inputBackgroundColor, padding: 16, paddingTop: 0, borderRadius: 8, }, buttonLink: { backgroundColor: colors.lightButton, borderRadius: 12, justifyContent: 'center', padding: 8, flexDirection: 'row', }, textLink: { color: colors.foregroundColor, marginLeft: 8, fontWeight: '600', }, }); const handleOnReleaseNotesPress = () => { navigate('ReleaseNotes'); }; const handleOnSelfTestPress = () => { navigate('Selftest'); }; const handleOnLicensingPress = () => { navigate('Licensing'); }; const handleOnTwitterPress = () => { Linking.openURL('https://twitter.com/bluewalletio'); }; const handleOnDiscordPress = () => { Linking.openURL('https://discord.gg/btWq2Aby2z'); }; const handleOnTelegramPress = () => { Linking.openURL('https://t.me/bluewallethat'); }; const handleOnGithubPress = () => { Linking.openURL('https://github.com/BlueWallet/BlueWallet'); }; const handleOnRatePress = () => { const options = { AppleAppID: '1376878040', GooglePackageName: 'io.bluewallet.bluewallet', preferredAndroidMarket: AndroidMarket.Google, preferInApp: true, openAppStoreIfInAppFails: true, fallbackPlatformURL: 'https://bluewallet.io', }; Rate.rate(options, success => { if (success) { console.log('User Rated.'); } }); }; return ( {loc.settings.about_free} {loc.settings.about_backup} {loc.settings.about_awesome} 👍 React Native bitcoinjs-lib Nodejs Electrum server {loc.settings.about_sm_github} {getApplicationName()} ver {getVersion()} (build {getBuildNumber()}) {new Date(getBuildNumber() * 1000).toGMTString()} {getBundleId()} w, h = {width}, {height} Unique ID: {getUniqueId()} { const stringToCopy = 'user.id:' + getUniqueId(); Sentry.captureMessage('copied unique id'); Clipboard.setString(stringToCopy); }} > {loc.transactions.details_copy} ); }; About.navigationOptions = navigationStyle({}, opts => ({ ...opts, title: loc.settings.about })); export default About;