mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
wip
This commit is contained in:
parent
324e82ebdc
commit
8fb84d12d8
2 changed files with 14 additions and 6 deletions
|
@ -38,14 +38,16 @@ const LNDViewAdditionalInvoiceInformation: React.FC = () => {
|
|||
.fetchInfo()
|
||||
.then(() => {
|
||||
const info = wallet.info_raw;
|
||||
if (info && info.uris && info.uris[0]) {
|
||||
// @ts-ignore: idk
|
||||
if (info?.uris?.[0]) {
|
||||
// @ts-ignore: idk
|
||||
setWalletInfo(info);
|
||||
} else {
|
||||
presentAlert({ message: loc.errors.network });
|
||||
goBack();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
.catch((error: Error) => {
|
||||
console.error(error);
|
||||
presentAlert({ title: loc.errors.network, message: error.message });
|
||||
goBack();
|
||||
|
@ -60,11 +62,11 @@ const LNDViewAdditionalInvoiceInformation: React.FC = () => {
|
|||
) : (
|
||||
<View style={styles.wrapper}>
|
||||
<View style={styles.qrcode}>
|
||||
<QRCodeComponent value={walletInfo.uris![0]} size={300} />
|
||||
<QRCodeComponent value={walletInfo.uris?.[0] ?? ''} size={300} />
|
||||
</View>
|
||||
<BlueSpacing20 />
|
||||
<BlueText>{loc.lndViewInvoice.open_direct_channel}</BlueText>
|
||||
<CopyTextToClipboard text={walletInfo.uris![0]} />
|
||||
<CopyTextToClipboard text={walletInfo.uris?.[0] ?? ''} />
|
||||
<View style={styles.share}>
|
||||
<Button
|
||||
icon={{
|
||||
|
@ -74,7 +76,7 @@ const LNDViewAdditionalInvoiceInformation: React.FC = () => {
|
|||
}}
|
||||
onPress={async () => {
|
||||
Share.share({
|
||||
message: walletInfo.uris![0],
|
||||
message: walletInfo.uris?.[0] ?? '',
|
||||
});
|
||||
}}
|
||||
title={loc.receive.details_share}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { I18nManager, Linking, ScrollView, StyleSheet, TextInput, View, Pressabl
|
|||
import { Button as ButtonRNElements } from '@rneui/themed';
|
||||
// @ts-ignore: no declaration file
|
||||
import Notifications from '../../blue_modules/notifications';
|
||||
import { BlueCard, BlueSpacing20, BlueText } from '../../BlueComponents';
|
||||
import { BlueCard, BlueSpacing20, BlueSpacing40, BlueText } from '../../BlueComponents';
|
||||
import presentAlert from '../../components/Alert';
|
||||
import { Button } from '../../components/Button';
|
||||
import CopyToClipboardButton from '../../components/CopyToClipboardButton';
|
||||
|
@ -123,6 +123,10 @@ const NotificationSettings: React.FC = () => {
|
|||
setIsLoading(false);
|
||||
}, [URI]);
|
||||
|
||||
const onSystemSettings = () => {
|
||||
Linking.openSettings();
|
||||
};
|
||||
|
||||
return (
|
||||
<ScrollView style={stylesWithThemeHook.scroll} automaticallyAdjustContentInsets contentInsetAdjustmentBehavior="automatic">
|
||||
<ListItem
|
||||
|
@ -193,6 +197,8 @@ const NotificationSettings: React.FC = () => {
|
|||
</BlueCard>
|
||||
</>
|
||||
)}
|
||||
<BlueSpacing40 />
|
||||
<ListItem title={loc.settings.privacy_system_settings} onPress={onSystemSettings} chevron />
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue