2023-10-23 21:28:44 -04:00
|
|
|
import { useRoute } from '@react-navigation/native';
|
2024-05-20 10:54:13 +01:00
|
|
|
import React from 'react';
|
|
|
|
import { StyleSheet, View } from 'react-native';
|
|
|
|
|
2024-03-27 00:37:43 -04:00
|
|
|
import { BlueSpacing20, BlueTextCentered } from '../../BlueComponents';
|
2024-05-20 10:54:13 +01:00
|
|
|
import CopyTextToClipboard from '../../components/CopyTextToClipboard';
|
2021-08-26 21:31:36 -04:00
|
|
|
import QRCodeComponent from '../../components/QRCodeComponent';
|
2023-12-27 13:52:11 +07:00
|
|
|
import SafeArea from '../../components/SafeArea';
|
2024-05-20 10:54:13 +01:00
|
|
|
import { useTheme } from '../../components/themes';
|
|
|
|
import loc from '../../loc';
|
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 (
|
2023-12-27 13:52:11 +07:00
|
|
|
<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 />
|
2024-03-27 00:37:43 -04:00
|
|
|
<CopyTextToClipboard text={preImageData} />
|
2020-11-27 22:24:20 -05:00
|
|
|
</View>
|
2023-12-27 13:52:11 +07:00
|
|
|
</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;
|