diff --git a/screen/settings/lightningSettings.js b/screen/settings/lightningSettings.js index 4f7c8bce9..e62cd07a8 100644 --- a/screen/settings/lightningSettings.js +++ b/screen/settings/lightningSettings.js @@ -2,8 +2,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import { View, TextInput, Linking, StyleSheet } from 'react-native'; import { Button } from 'react-native-elements'; -import { useTheme } from '@react-navigation/native'; - +import { useTheme, useNavigation, useRoute } from '@react-navigation/native'; import { AppStorage } from '../../class'; import AsyncStorage from '@react-native-community/async-storage'; import { @@ -14,6 +13,7 @@ import { BlueNavigationStyle, BlueLoadingHook, BlueTextHooks, + BlueButtonLink, } from '../../BlueComponents'; import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet'; import loc from '../../loc'; @@ -51,6 +51,8 @@ const LightningSettings = () => { const [isLoading, setIsLoading] = useState(true); const [URI, setURI] = useState(); const { colors } = useTheme(); + const route = useRoute(); + const navigation = useNavigation(); useEffect(() => { AsyncStorage.getItem(AppStorage.LNDHUB) @@ -79,6 +81,18 @@ const LightningSettings = () => { setIsLoading(false); }, [URI]); + const importScan = () => { + navigation.navigate('ScanQRCodeRoot', { + screen: 'ScanQRCode', + params: { + launchedBy: route.name, + onBarScanned: setLndhubURI, + showFileImportButton: true, + }, + }); + }; + + return ( @@ -115,6 +129,7 @@ const LightningSettings = () => { /> + {isLoading ? : }