BlueWallet/screen/lnd/lndViewAdditionalInvoicePreImage.js

52 lines
1.6 KiB
JavaScript
Raw Normal View History

2020-11-27 22:24:20 -05:00
import React from 'react';
import { View, StyleSheet } from 'react-native';
2023-10-23 21:28:44 -04:00
import { useRoute } from '@react-navigation/native';
import { BlueCopyTextToClipboard, BlueSpacing20, BlueTextCentered } from '../../BlueComponents';
2020-12-25 19:09:53 +03:00
import navigationStyle from '../../components/navigationStyle';
import loc from '../../loc';
2021-08-26 21:31:36 -04:00
import QRCodeComponent from '../../components/QRCodeComponent';
2023-10-23 21:28:44 -04:00
import { useTheme } from '../../components/themes';
import SafeArea from '../../components/SafeArea';
2020-12-25 19:09:53 +03:00
2020-11-27 22:24:20 -05:00
const LNDViewAdditionalInvoicePreImage = () => {
// state = { walletInfo: undefined };
const { colors } = useTheme();
const { preImageData } = useRoute().params;
const stylesHook = StyleSheet.create({
root: {
backgroundColor: colors.elevated,
},
});
return (
<SafeArea style={stylesHook.root}>
2020-11-27 22:24:20 -05:00
<View style={styles.wrapper}>
<BlueTextCentered>{loc.lndViewInvoice.preimage}:</BlueTextCentered>
<BlueSpacing20 />
<View style={styles.qrCodeContainer}>
2021-08-26 21:31:36 -04:00
<QRCodeComponent value={preImageData} size={300} logoSize={90} />
2020-11-27 22:24:20 -05:00
</View>
<BlueSpacing20 />
<BlueCopyTextToClipboard text={preImageData} />
</View>
</SafeArea>
2020-11-27 22:24:20 -05:00
);
};
const styles = StyleSheet.create({
wrapper: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
qrCodeContainer: {
justifyContent: 'center',
alignItems: 'center',
marginHorizontal: 16,
},
});
export default LNDViewAdditionalInvoicePreImage;
2021-02-15 11:03:54 +03:00
LNDViewAdditionalInvoicePreImage.navigationOptions = navigationStyle({}, opts => ({ ...opts, title: loc.lndViewInvoice.additional_info }));