Skip to content

Commit

Permalink
Update the connect settings screen
Browse files Browse the repository at this point in the history
  • Loading branch information
chloehjung15 committed Dec 1, 2023
1 parent 9937a9f commit edbb96a
Showing 1 changed file with 40 additions and 36 deletions.
76 changes: 40 additions & 36 deletions screens/settings/ConnectToHub.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,45 +226,49 @@ const ConnectToHub = props => {
onPress={() => onScanSuccess({data: hub})}
/>
</View>
<Button
title="Clear Hub Connection"
onPress={async () => {
try {
setLndhubUser(null);
setLndhub(null);
setShopWallet(null);
await AsyncStorage.setItem('manager-pin', '');
} catch (err) {
Toast.show({
type: 'error',
text1: 'PIN reset error',
text2: err.message,
});
}
}}
/>
{lndhub && lndhub != 'blank' && (
<View style={{marginTop: 10}}>
<Button
title="Clear Hub Connection"
onPress={async () => {
try {
setLndhubUser(null);
setLndhub(null);
setShopWallet(null);
await AsyncStorage.setItem('manager-pin', '');
} catch (err) {
Toast.show({
type: 'error',
text1: 'PIN reset error',
text2: err.message,
});
}
}}
/>
</View>
)}
</View>
</ScrollView>
)}
// <PinSetScreen
// showBaseModal={showPinSetScreen}
// onClose={() => setShowPinSetScreen(false)}
// title="Set Admin Access PIN"
// successMessage="LND Hub Save Success."
// successCallback={() => {
// setLndhubUser(hubData[0]);
// setLndhub(hubData[1]);
// Toast.show({
// type: 'success',
// text1: 'LND Connect',
// text2: 'LND Hub Save Success.',
// });
// setHubData([]);
// }}
// failCallback={() => {
// setHubData([]);
// }}
// />
{/*<PinSetScreen
showBaseModal={showPinSetScreen}
onClose={() => setShowPinSetScreen(false)}
title="Set Admin Access PIN"
successMessage="LND Hub Save Success."
successCallback={() => {
setLndhubUser(hubData[0]);
setLndhub(hubData[1]);
Toast.show({
type: 'success',
text1: 'LND Connect',
text2: 'LND Hub Save Success.',
});
setHubData([]);
}}
failCallback={() => {
setHubData([]);
}}
/>*/}
</>
);
};
Expand Down

0 comments on commit edbb96a

Please sign in to comment.