Skip to content

Commit

Permalink
update translations, update nostr data check
Browse files Browse the repository at this point in the history
  • Loading branch information
KKA11010 committed Nov 21, 2023
1 parent 6f2426f commit f7f78f3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion assets/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion assets/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion assets/translations/sw.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 6 additions & 4 deletions src/screens/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f7f78f3

Please sign in to comment.