diff --git a/assets/translations/de.json b/assets/translations/de.json index 3b248cf6..46d9e8d1 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -75,7 +75,6 @@ "delHistoryQ": "Verlauf löschen?", "resetQ": "Wallet zurücksetzen?", "delHistoryTxt": "Die Daten können nachträglich nicht wiederhergestellt werden.", - "plsRestart": "Bitte starten Sie die App neu", "disclaimer": "Haftungsausschluss", "ecashPayment": "Ecash Zahlung", "english": "Englisch", diff --git a/assets/translations/en.json b/assets/translations/en.json index 0affa2a6..09d43644 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -75,7 +75,6 @@ "delHistoryQ": "Delete history?", "resetQ": "Reset your wallet?", "delHistoryTxt": "The data can not be retrieved afterwards.", - "plsRestart": "Please restart the app now", "disclaimer": "Disclaimer", "ecashPayment": "Ecash payment", "english": "English", diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 91868f6e..b1fea1cd 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -75,7 +75,6 @@ "resetQ": "Réinitialiser?", "delHistoryQ": "Supprimer l'historique?", "delHistoryTxt": "Les données ne pourront pas être récupérées ultérieurement.", - "plsRestart": "Veuillez redémarrer l'application maintenant", "disclaimer": "Clause de non-responsabilité", "ecashPayment": "Paiement Ecash", "english": "Anglais", diff --git a/assets/translations/sw.json b/assets/translations/sw.json index 13288d8d..10b76a11 100644 --- a/assets/translations/sw.json +++ b/assets/translations/sw.json @@ -75,7 +75,6 @@ "delHistoryQ": "Futa historia?", "resetQ": "Weka upya mkoba wako?", "delHistoryTxt": "Data haiwezi kurudishwa baadaye.", - "plsRestart": "Tafadhali anzisha tena programu sasa", "disclaimer": "Taarifa ya kutumia", "ecashPayment": "Malipo ya Ecash", "english": "Kiingereza", diff --git a/src/screens/Dashboard.tsx b/src/screens/Dashboard.tsx index 3b3337fa..7f1ef006 100644 --- a/src/screens/Dashboard.tsx +++ b/src/screens/Dashboard.tsx @@ -26,7 +26,7 @@ import { STORE_KEYS } from '@store/consts' import { addToHistory } from '@store/latestHistoryEntries' import { saveDefaultOnInit } from '@store/mintStore' import { highlight as hi, mainColors } from '@styles' -import { extractStrFromURL, getStrFromClipboard, hasTrustedMint, isCashuToken, isErr, isLnInvoice } from '@util' +import { extractStrFromURL, getStrFromClipboard, hasTrustedMint, isCashuToken, isErr, isLnInvoice, isStr } from '@util' import { claimToken, getMintsForPayment } from '@wallet' import { getTokenInfo } from '@wallet/proofs' import { useEffect, useState } from 'react' @@ -65,7 +65,7 @@ export default function Dashboard({ navigation, route }: TDashboardPageProps) { sendOpts: false, resetNostr: false, }) - const { nostr, resetNostrData } = useNostrContext() + const { resetNostrData } = useNostrContext() // This function is only called if the mints of the received token are not in the user DB const handleTrustModal = async () => { @@ -238,14 +238,16 @@ export default function Dashboard({ navigation, route }: TDashboardPageProps) { useEffect(() => { void (async () => { - const [userHasMints, seenNostrIssue] = await Promise.all([ + const [userHasMints, nutPub, seenNostrIssue] = await Promise.all([ hasMints(), + store.get(STORE_KEYS.nutpub), store.get(STORE_KEYS.nostrReseted), ]) setHasMint(userHasMints) + l({ nutPub, seenNostrIssue }) setModal(prev => ({ ...prev, - resetNostr: nostr.nutPub.length > 0 && seenNostrIssue !== '1' + resetNostr: isStr(nutPub) && nutPub.length > 0 && seenNostrIssue !== '1' })) })() // eslint-disable-next-line react-hooks/exhaustive-deps