diff --git a/screens/Home.tsx b/screens/Home.tsx index 2cc934f..9c2ef84 100644 --- a/screens/Home.tsx +++ b/screens/Home.tsx @@ -58,7 +58,7 @@ function Home({navigation}): React.FC { //invoice stuff const [isFetchingInvoices, setIsFetchingInvoices] = useState(false); - const [lndInvoice, setLndInvoice] = useState(); + const [lndInvoice, setLndInvoice] = useState(null); const [invoiceIsPaid, setInvoiceIsPaid] = useState(false); const [invoiceLoading, setInvoiceLoading] = useState(false); @@ -303,7 +303,7 @@ function Home({navigation}): React.FC { setIsFetchingInvoices(false); clearInterval(fetchInvoiceInterval.current); fetchInvoiceInterval.current = undefined; - setLndInvoice(undefined); + setLndInvoice(null); setBoltLoading(false); setBoltServiceResponse(false); setBoltServiceCallback(true); @@ -626,9 +626,9 @@ function Home({navigation}): React.FC { - pinPress('7')} /> - pinPress('8')} /> - pinPress('9')} /> + pinPress('1')} /> + pinPress('2')} /> + pinPress('3')} /> pinPress('4')} /> @@ -636,9 +636,9 @@ function Home({navigation}): React.FC { pinPress('6')} /> - pinPress('1')} /> - pinPress('2')} /> - pinPress('3')} /> + pinPress('7')} /> + pinPress('8')} /> + pinPress('9')} /> @@ -830,7 +830,7 @@ function Home({navigation}): React.FC { - Paid! + Paid! ))} - {lndInvoice && - (!invoiceIsPaid && boltLoading) && - - Bolt Card Detected. - {boltServiceResponse && - - Bolt Service connected - - } - {boltServiceCallback && - <> - - Bolt Service Callback success - + + + + + Bolt Card Detected. + {boltServiceResponse && - Payment initiated... + Bolt Service connected - - } - - - - + + Bolt Service Callback success + + + Payment initiated... + + + } + + + + + + - } + )} @@ -910,6 +919,27 @@ const styles = StyleSheet.create({ highlight: { fontWeight: '700', }, + centeredView: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + marginTop: 22, + }, + modalView: { + margin: 20, + backgroundColor: 'white', + borderRadius: 20, + padding: 20, + alignItems: 'center', + shadowColor: '#000', + shadowOffset: { + width: 0, + height: 2, + }, + shadowOpacity: 0.25, + shadowRadius: 4, + elevation: 5, + }, }); export default Home; \ No newline at end of file