diff --git a/BlueComponents.js b/BlueComponents.js
index f8c062c39..15bfb574c 100644
--- a/BlueComponents.js
+++ b/BlueComponents.js
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
import Ionicons from 'react-native-vector-icons/Ionicons';
import { LinearGradient, Constants } from 'expo';
import { Icon, Button, FormLabel, FormInput, Text, Header, List, ListItem } from 'react-native-elements';
-import { TouchableOpacity, ActivityIndicator, View, StyleSheet, Dimensions, Image, SafeAreaView } from 'react-native';
+import { TouchableOpacity, ActivityIndicator, View, StyleSheet, Dimensions, Image, SafeAreaView, Clipboard } from 'react-native';
import { WatchOnlyWallet, LegacyWallet } from './class';
import Carousel from 'react-native-snap-carousel';
import { HDLegacyP2PKHWallet } from './class/hd-legacy-p2pkh-wallet';
@@ -146,6 +146,14 @@ export class BlueButtonLink extends Component {
}
}
+export const BlueCopyToClipboardButton = ({ stringToCopy }) => {
+ return (
+ Clipboard.setString(stringToCopy)}>
+ {loc.transactions.details.copy}
+
+ );
+};
+
export class SafeBlueArea extends Component {
render() {
return (
diff --git a/loc/en.js b/loc/en.js
index 857d3e867..c822a4e37 100644
--- a/loc/en.js
+++ b/loc/en.js
@@ -87,9 +87,10 @@ module.exports = {
conf: 'conf',
},
details: {
- title: 'transaction',
- from: 'Inputs',
- to: 'Outputs',
+ title: 'transaction details',
+ from: 'From',
+ to: 'To',
+ copy: 'Copy',
},
},
send: {
diff --git a/screen/transactions/details.js b/screen/transactions/details.js
index 9a12806c8..0a723edba 100644
--- a/screen/transactions/details.js
+++ b/screen/transactions/details.js
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
-import { View, ScrollView } from 'react-native';
-import { BlueButton, SafeBlueArea, BlueCard, BlueText, BlueHeaderDefaultSub, BlueLoading, BlueSpacing20 } from '../../BlueComponents';
+import { View, ScrollView, TouchableOpacity, Linking } from 'react-native';
+import { BlueButton, SafeBlueArea, BlueCard, BlueText, BlueHeaderDefaultSub, BlueLoading, BlueSpacing20, BlueCopyToClipboardButton } from '../../BlueComponents';
import PropTypes from 'prop-types';
/** @type {AppStorage} */
let BlueApp = require('../../BlueApp');
@@ -90,21 +90,41 @@ export default class TransactionsDetails extends Component {
}
})()}
- {loc.transactions.details.from}
+
+ {loc.transactions.details.from}
+
+
{this.state.from.filter(onlyUnique).join(', ')}
- {loc.transactions.details.to}
+
+ {loc.transactions.details.to}
+
+
{arrDiff(this.state.from, this.state.to.filter(onlyUnique)).join(', ')}
- Txid
- {this.state.tx.hash}
+
+ Txid
+
+
+ {
+ const url = `https://live.blockcypher.com/btc/tx/${this.state.tx.hash}`;
+ Linking.canOpenURL(url).then(supported => {
+ if (supported) {
+ Linking.openURL(url);
+ }
+ });
+ }}
+ >
+ {this.state.tx.hash}
+
Received
{formatTime(this.state.tx.received)}
- Confirmed
+ Block Height
{formatTime(this.state.tx.block_height)}
Confirmations