From 9937a9ff6c79db54d12c1f1174f6fb778255aae7 Mon Sep 17 00:00:00 2001 From: Chloe Jung Date: Fri, 1 Dec 2023 15:51:01 +1300 Subject: [PATCH] Add a switch component to enable and disable manager PIN in settings. Update --- screens/settings/ConnectToHub.js | 85 +++++++++++++++++--------------- screens/settings/Settings.js | 36 ++++++++++++-- 2 files changed, 76 insertions(+), 45 deletions(-) diff --git a/screens/settings/ConnectToHub.js b/screens/settings/ConnectToHub.js index d114f2a..b944165 100644 --- a/screens/settings/ConnectToHub.js +++ b/screens/settings/ConnectToHub.js @@ -32,7 +32,7 @@ const ConnectToHub = props => { }; const [scanMode, setScanMode] = useState(false); - const [showPinSetScreen, setShowPinSetScreen] = useState(false); + // const [showPinSetScreen, setShowPinSetScreen] = useState(false); const textStyle = { color: isDarkMode ? '#fff' : '#000', @@ -49,9 +49,14 @@ const ConnectToHub = props => { console.log('Toast.show'); } else { setScanMode(false); - setShowPinSetScreen(true); - - setHubData(e.data.split('@')); + const data = e.data.split('@'); + setLndhubUser(data[0]); + setLndhub(data[1]); + Toast.show({ + type: 'success', + text1: 'LND Connect', + text2: 'LND Hub Save Success.', + }); } }; @@ -184,23 +189,6 @@ const ConnectToHub = props => { {lndhub && lndhub != 'blank' && lndhub} -