import React, { Component } from 'react';
import { ScrollView, Linking, Dimensions } from 'react-native';
import {
BlueTextCentered,
BlueLoading,
BlueSpacing20,
BlueButton,
SafeBlueArea,
BlueCard,
BlueText,
BlueNavigationStyle,
} from '../../BlueComponents';
import PropTypes from 'prop-types';
import { getApplicationName, getVersion, getBundleId, getBuildNumber } from 'react-native-device-info';
import Rate, { AndroidMarket } from 'react-native-rate';
/** @type {AppStorage} */
let BlueApp = require('../../BlueApp');
const { width, height } = Dimensions.get('window');
const loc = require('../../loc/');
export default class About extends Component {
static navigationOptions = () => ({
...BlueNavigationStyle(),
title: loc.settings.about,
});
constructor(props) {
super(props);
this.state = {
isLoading: true,
};
}
async componentDidMount() {
this.setState({
isLoading: false,
});
}
render() {
if (this.state.isLoading) {
return ;
}
return (
BlueWallet is a free and open source Bitcoin wallet. Licensed MIT.
Always backup your keys
{
Linking.openURL('https://github.com/BlueWallet/BlueWallet');
}}
title="github.com/BlueWallet/BlueWallet"
/>
{
Linking.openURL('https://twitter.com/bluewalletio');
}}
title="Follow us on Twitter"
/>
{
Linking.openURL('https://t.me/bluewallet');
}}
title="Join Telegram chat"
/>
{
let 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.');
}
});
}}
title="Rate BlueWallet"
/>
Built with awesome:
* React Native
* Bitcoinjs-lib
* blockcypher.com API
* Nodejs
* react-native-elements
* rn-nodeify
* bignumber.js
{
this.props.navigation.navigate('ReleaseNotes');
}}
title="Release notes"
/>
{
this.props.navigation.navigate('Selftest');
}}
title="Run self test"
/>
{getApplicationName()} ver {getVersion()} (build {getBuildNumber()})
{new Date(getBuildNumber() * 1000).toGMTString()}
{getBundleId()}
w, h = {width}, {height}
);
}
}
About.propTypes = {
navigation: PropTypes.shape({
navigate: PropTypes.func,
goBack: PropTypes.func,
}),
};