import React, { Component } from 'react'; import { TextInput, ScrollView, Linking, TouchableOpacity, Clipboard, StyleSheet, TouchableWithoutFeedback, Keyboard } from 'react-native'; import { Text } from 'react-native-elements'; import { BlueNavigationStyle, SafeBlueArea, BlueCard, BlueText } from '../../BlueComponents'; import PropTypes from 'prop-types'; let loc = require('../../loc'); export default class SendCreate extends Component { static navigationOptions = () => ({ ...BlueNavigationStyle, title: loc.send.create.details, }); constructor(props) { super(props); console.log('send/create constructor'); this.state = { isLoading: false, amount: props.navigation.getParam('amount'), fee: props.navigation.getParam('fee'), address: props.navigation.getParam('address'), memo: props.navigation.getParam('memo'), size: Math.round(props.navigation.getParam('tx').length / 2), tx: props.navigation.getParam('tx'), satoshiPerByte: props.navigation.getParam('satoshiPerByte'), }; } async componentDidMount() { console.log('send/create - componentDidMount'); console.log('address = ', this.state.address); } render() { return ( {loc.send.create.this_is_hex} Clipboard.setString(this.state.tx)}> Copy and broadcast later Linking.openURL('https://coinb.in/?verify=' + this.state.tx)}> Verify on coinb.in {loc.send.create.to} {this.state.address} {loc.send.create.amount} {this.state.amount} BTC {loc.send.create.fee} {this.state.fee} BTC {loc.send.create.tx_size} {this.state.size} bytes {loc.send.create.satoshi_per_byte} {this.state.satoshiPerByte} Sat/B {loc.send.create.memo} {this.state.memo} ); } } const styles = StyleSheet.create({ transactionDetailsTitle: { color: '#0c2550', fontWeight: '500', fontSize: 17, marginBottom: 2, }, transactionDetailsSubtitle: { color: '#9aa0aa', fontWeight: '500', fontSize: 15, marginBottom: 20, }, }); SendCreate.propTypes = { navigation: PropTypes.shape({ goBack: PropTypes.function, getParam: PropTypes.function, navigate: PropTypes.function, dismiss: PropTypes.function, state: PropTypes.shape({ params: PropTypes.shape({ amount: PropTypes.string, fee: PropTypes.number, address: PropTypes.string, memo: PropTypes.string, }), }), }), };