diff --git a/src/components/App.tsx b/src/components/App.tsx index 6d22f5cf..d2407f16 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -243,7 +243,7 @@ function _App(_initialProps: IInitialProps) { {/* claim token if app comes to foreground and clipboard has valid cashu token */} - + setClaimOpen(false)}> Found a cashu token in your clipboard diff --git a/src/components/InitialModal.tsx b/src/components/InitialModal.tsx index 39d04829..ad3d8c23 100644 --- a/src/components/InitialModal.tsx +++ b/src/components/InitialModal.tsx @@ -15,7 +15,7 @@ interface IInitialModalProps { export default function InitialModal({ visible, onConfirm, onCancel }: IInitialModalProps) { const { color, highlight } = useContext(ThemeContext) return ( - + Get started diff --git a/src/components/modal/OptsModal.tsx b/src/components/modal/OptsModal.tsx index e4d21a01..1d0589aa 100644 --- a/src/components/modal/OptsModal.tsx +++ b/src/components/modal/OptsModal.tsx @@ -25,7 +25,7 @@ export default function OptsModal({ }: IOptsModal) { const { color, highlight } = useContext(ThemeContext) return ( - + + {header} diff --git a/src/components/modal/TrustMint.tsx b/src/components/modal/TrustMint.tsx index 54acbbc6..984fc4de 100644 --- a/src/components/modal/TrustMint.tsx +++ b/src/components/modal/TrustMint.tsx @@ -18,7 +18,7 @@ interface ITrustModalProps { export default function TrustMintModal({ loading, tokenInfo, handleTrustModal, closeModal }: ITrustModalProps) { const { color, highlight } = useContext(ThemeContext) return ( - + Do you want to trust this mint? diff --git a/src/components/modal/index.tsx b/src/components/modal/index.tsx index a17a2456..640c4b56 100644 --- a/src/components/modal/index.tsx +++ b/src/components/modal/index.tsx @@ -10,6 +10,7 @@ interface IMyModalProps { visible: boolean success?: boolean isContactList?: boolean + close?: () => void children: React.ReactNode } @@ -19,6 +20,7 @@ export default function MyModal({ visible, success, isContactList, + close, children }: IMyModalProps) { @@ -52,9 +54,10 @@ export default function MyModal({ visible ? } {/* Add new contact modal */} - + setOpenNew({ open: false, isOwner: false })} + > {openNew.isOwner ? 'Your LNURL' : 'New contact'} diff --git a/src/components/screens/Addressbook/Contact.tsx b/src/components/screens/Addressbook/Contact.tsx index 998acf48..741fed47 100644 --- a/src/components/screens/Addressbook/Contact.tsx +++ b/src/components/screens/Addressbook/Contact.tsx @@ -50,6 +50,13 @@ export default function ContactPage({ navigation, route }: IContactPageProps) { setOpenEdit(false) } } + const handleEditCancel = () => { + setOpenEdit(false) + setEditContact({ + name: route.params.contact?.name, + ln: route.params.contact?.ln + }) + } useEffect(() => { setEditContact({ name: route.params.contact?.name, @@ -96,7 +103,12 @@ export default function ContactPage({ navigation, route }: IContactPageProps) { {/* Edit contact modal */} - + Edit contact @@ -122,13 +134,7 @@ export default function ContactPage({ navigation, route }: IContactPageProps) { /> { - setOpenEdit(false) - setEditContact({ - name: route.params.contact?.name, - ln: route.params.contact?.ln - }) - }} + onPress={handleEditCancel} > Cancel diff --git a/src/components/screens/Addressbook/modal.tsx b/src/components/screens/Addressbook/modal.tsx index 3797324a..b9dbac63 100644 --- a/src/components/screens/Addressbook/modal.tsx +++ b/src/components/screens/Addressbook/modal.tsx @@ -9,7 +9,7 @@ interface IAddressBookModalProps { export default function AddressbookModal({ closeModal, setInput }: IAddressBookModalProps) { return ( - + - + setQr({ open: false, error: false })}> {qr.error ? : diff --git a/src/components/screens/Lightning/modal.tsx b/src/components/screens/Lightning/modal.tsx index 3f3b166b..e49c3a75 100644 --- a/src/components/screens/Lightning/modal.tsx +++ b/src/components/screens/Lightning/modal.tsx @@ -86,7 +86,13 @@ export function InvoiceModal({ visible, invoice, mintUrl, close }: IInvoiceModal } }, [expiry, expiryTime]) return ( - + {invoice.decoded && mintUrl !== _mintUrl && (!paid || paid === 'unpaid') ? @@ -174,6 +180,10 @@ export function CoinSelectionModal({ mint, lnAmount, disableCS, proofs, setProof const { color, highlight } = useContext(ThemeContext) const [visible, setVisible] = useState(true) const [mintKeysetId, setMintKeysetId] = useState('') + const cancelCoinSelection = () => { + setVisible(false) + disableCS() + } // get the active keysetid of a mint once on initial render to compare with the proof keysets in the list useEffect(() => { if (!mint?.mintUrl) { return } @@ -182,17 +192,14 @@ export function CoinSelectionModal({ mint, lnAmount, disableCS, proofs, setProof })() }, [mint?.mintUrl]) return ( - + Coin selection { - setVisible(false) - disableCS() - }} + onPress={cancelCoinSelection} > Cancel diff --git a/src/components/screens/Lightning/scannedQR.tsx b/src/components/screens/Lightning/scannedQR.tsx index 3f300dd8..cdcb1a63 100644 --- a/src/components/screens/Lightning/scannedQR.tsx +++ b/src/components/screens/Lightning/scannedQR.tsx @@ -127,7 +127,7 @@ export default function ScannedQRDetails({ lnDecoded, closeDetails, nav }: IScan } }, [timeLeft]) return ( - + Lightning payment request diff --git a/src/components/screens/Mints/MintManagement.tsx b/src/components/screens/Mints/MintManagement.tsx index e7dd618d..c4a79f46 100644 --- a/src/components/screens/Mints/MintManagement.tsx +++ b/src/components/screens/Mints/MintManagement.tsx @@ -312,7 +312,7 @@ export default function MintManagement({ navigation, route }: TMintManagementPag } {/* Custom mint name */} {customNameOpen && - + setCustomNameOpen(false)}> {edit ? 'Edit mint name' : 'Add a custom name'} diff --git a/src/components/screens/Mints/index.tsx b/src/components/screens/Mints/index.tsx index c05dfeac..65cc8cb9 100644 --- a/src/components/screens/Mints/index.tsx +++ b/src/components/screens/Mints/index.tsx @@ -179,7 +179,12 @@ export default function Mints({ navigation, route }: TMintsPageProps) { {/* Submit new mint URL modal */} - + setNewMintModal(false)} + > Add a new mint