diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ea92af15..0ce88997 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -49,7 +49,7 @@ The [**cashu-ts**](https://github.com/cashubtc/cashu-ts) library and SQLite are
1. Fork this repository and create a local clone.
2. Navigate inside the repository and run `npm i`
-3. Start the Expo dev server by running `npm run start`
+3. Start the Expo dev server by running `npm run start` or with an empty cache by running `npm run s:c`
4. Download the [Expo Go](https://expo.dev/client) app.
- **Android users**: Scan the QR code provided by your terminal using the Expo-go app
- **iOS users**: Press on the local dev server shown in the Expo-go app or scan the QR code using your camera app.
diff --git a/assets/translations/de.json b/assets/translations/de.json
index 5c1b66f8..ad839d4f 100644
--- a/assets/translations/de.json
+++ b/assets/translations/de.json
@@ -13,7 +13,7 @@
"createPin": "PIN erstellen",
"editPin": "PIN ändern",
"pinMismatch": "PIN inkorrekt!",
- "pinSetup": "Sie können optional eine PIN erstellen um Ihre App zu schützen.\n\n ACHTUNG: Wenn die PIN vergessen wird, ist derzeit keine Wiederherstellung möglich!",
+ "pinSetup": "Sie können optional eine PIN erstellen um Ihre App zu schützen.",
"pleaseConfirm": "Bitte bestätigen Sie Ihre PIN.",
"pleaseConfirmNewPin": "Bitte bestätigen Sie Ihre neue PIN.",
"pleaseEnter": "Bitte geben Sie Ihre PIN ein.",
@@ -29,6 +29,7 @@
"common": {
"copy": "Kopieren",
"cycle": "Zyklus",
+ "findMint": "Eine Mint finden",
"manualCounterIncrease": "Zähler erhöhen",
"manualCounterIncreaseHint": "Die Zähler erhöhen sich automatisch nach jeder Transaktion, aber in seltenen Fällen kann dies fehlschlagen, was zu Fehlern während des Wiederherstellungsprozesses führt. Das manuelle Erhöhen der Zähler kann den Zustand beheben.",
"increaseCounterHint": "Sind Sie sicher, dass Sie die Zähler erhöhen möchten? Dies sollte nur geschehen, wenn Sie sicher sind, dass die Zähler nicht synchron sind.",
@@ -56,7 +57,6 @@
"confirmSeed": "Bestätigen Sie bitte Ihren Seed, indem Sie das richtige Wort eingeben.",
"aboutToLeaveTo": "Sie sind im Begriff die App zu verlassen",
"accept": "Annehmen",
- "addEnutsMint": "eNuts mint verwenden",
"amount": "Betrag",
"back": "Zurück",
"backToDashboard": "Zurück zu Wallet",
@@ -122,7 +122,6 @@
"from": "von",
"fromMint": "von folgende Mint",
"german": "Deutsch",
- "getStarted": "Loslegen",
"githubIssues": "Melden Sie Fehler auf Github",
"shareOrReport": "Feedback teilen oder Fehler melden",
"historyDeleted": "Verlauf gelöscht",
@@ -160,7 +159,7 @@
"recipient": "Empfänger",
"reqTimeout": "Timeout für Netzwerkanfragen",
"save": "Speichern",
- "scanAgain": "Hier tippen, um erneut zu scannen",
+ "scanAgain": "Erneut scannen",
"scan": "Scannen",
"seconds": "Sekunden",
"selectAmount": "Betrag auswählen",
@@ -168,8 +167,6 @@
"selectMint": "Mint für Zahlung auswählen",
"sendEcash": "Ecash senden",
"share": "Teilen",
- "smthWrong": "Etwas is schief gelaufen",
- "startHint": "Sie können entweder die bereits vorhandene eNuts-Mint verwenden oder Ihre eigene.",
"submitPaymentReq": "Auszahlen",
"to": "bis",
"today": "Heute",
@@ -180,7 +177,6 @@
"unknownType": "Unbekannter Code-Typ",
"version": "Version",
"willDoLater": "Mache ich später",
- "addMintUrl": "Mint URL hinzufügen",
"yes": "Ja",
"invalidPubKey": "Invalider öffentlicher Schlüssel!",
"walletLocked": "Wallet gesperrt",
diff --git a/assets/translations/en.json b/assets/translations/en.json
index 44dec848..4ad3ab1b 100644
--- a/assets/translations/en.json
+++ b/assets/translations/en.json
@@ -13,7 +13,7 @@
"createPin": "Create PIN",
"editPin": "Edit PIN",
"pinMismatch": "Incorrect PIN!",
- "pinSetup": "You can optionally setup a PIN to secure your app.\n\nWARNING: If the PIN is forgotten, restoration is currently unavailable!",
+ "pinSetup": "You can optionally setup a PIN to secure your app.",
"pleaseConfirm": "Please confirm your PIN.",
"pleaseConfirmNewPin": "Please confirm your new PIN.",
"pleaseEnter": "Please enter your PIN now.",
@@ -29,6 +29,7 @@
"common": {
"copy": "Copy",
"cycle": "Cycle",
+ "findMint": "Find a mint",
"manualCounterIncrease": "Increase counters",
"manualCounterIncreaseHint": "The counters increment automatically after each transaction, but in rare cases, this may fail, leading to errors during the restoration process. Manually raising the counters can resolve the state.",
"increaseCounterHint": "Are you sure you want to increase the counters? This should only be done if you are sure that the counters are out of sync.",
@@ -56,7 +57,6 @@
"confirmSeed": "Please confirm your seed by typing the correct word.",
"aboutToLeaveTo": "You are about to leave",
"accept": "Accept",
- "addEnutsMint": "Use the eNuts mint",
"amount": "Amount",
"back": "Back",
"backToDashboard": "Back to dashboard",
@@ -122,7 +122,6 @@
"from": "from",
"fromMint": "from the following mint",
"german": "German",
- "getStarted": "Get started",
"githubIssues": "Report bugs on Github",
"shareOrReport": "Share feedback or report bugs",
"historyDeleted": "History deleted",
@@ -160,7 +159,7 @@
"recipient": "Recipient",
"reqTimeout": "Network request timeout",
"save": "Save",
- "scanAgain": "Tap to Scan Again",
+ "scanAgain": "Scan Again",
"scan": "Scan",
"seconds": "seconds",
"selectAmount": "Select amount",
@@ -168,8 +167,6 @@
"selectMint": "Select a mint to send from",
"sendEcash": "Send Ecash",
"share": "Share",
- "smthWrong": "Something went wrong",
- "startHint": "You can either use the pre-existing eNuts mint or introduce another custom mint.",
"submitPaymentReq": "Cash out",
"to": "to",
"today": "Today",
@@ -180,7 +177,6 @@
"unknownType": "Unknown data",
"version": "Version",
"willDoLater": "Will do later",
- "addMintUrl": "Add mint URL",
"yes": "Yes",
"invalidPubKey": "Invalid public key!",
"walletLocked": "Wallet locked",
diff --git a/assets/translations/es.json b/assets/translations/es.json
index 71b89a13..18b9c0a1 100644
--- a/assets/translations/es.json
+++ b/assets/translations/es.json
@@ -13,7 +13,7 @@
"createPin": "Crear PIN",
"editPin": "Editar PIN",
"pinMismatch": "¡PIN incorrecto!",
- "pinSetup": "Puedes establecer un PIN para proteger la aplicación (opcional).\n\nADVERTENCIA: ¡Todavía no es posible restaurar si olvidas el PIN!",
+ "pinSetup": "Puedes establecer un PIN para proteger la aplicación (opcional).",
"pleaseConfirm": "Por favor, confirma tu PIN.",
"pleaseConfirmNewPin": "Por favor, confirma tu nuevo PIN.",
"pleaseEnter": "Por favor, introduce tu PIN.",
@@ -29,6 +29,7 @@
"common": {
"copy": "Copiar",
"cycle": "Ciclo",
+ "findMint": "Buscar ceca",
"manualCounterIncrease": "Incrementar contadores",
"manualCounterIncreaseHint": "Los contadores se incrementan automáticamente después de cada transacción, pero en casos raros, esto puede fallar, lo que lleva a errores durante el proceso de restauración. Elevar manualmente los contadores puede resolver el estado.",
"increaseCounterHint": "¿Estás seguro de que quieres incrementar los contadores? Esto solo debe hacerse si estás seguro de que los contadores no están sincronizados.",
@@ -56,7 +57,6 @@
"confirmSeed": "Por favor, confirma tu semilla escribiendo la palabra correcta.",
"aboutToLeaveTo": "Estás a punto de salir",
"accept": "Aceptar",
- "addEnutsMint": "Usar la ceca de eNuts",
"amount": "Cantidad",
"back": "Volver",
"backToDashboard": "Volver al panel de control",
@@ -122,7 +122,6 @@
"from": "desde",
"fromMint": "desde la siguiente ceca",
"german": "Alemán",
- "getStarted": "Empezar",
"githubIssues": "Reportar bugs en Github",
"shareOrReport": "Compartir opiniones o reportar bugs",
"historyDeleted": "Historial eliminado",
@@ -160,7 +159,7 @@
"recipient": "Receptor",
"reqTimeout": "Tiempo de espera de la solicitud de red agotado",
"save": "Guardar",
- "scanAgain": "Toca para escanear de nuevo",
+ "scanAgain": "Escanear de nuevo",
"scan": "Escanear",
"seconds": "segundos",
"selectAmount": "Seleccionar cantidad",
@@ -168,8 +167,6 @@
"selectMint": "Seleccionar una ceca desde la que enviar",
"sendEcash": "Enviar Ecash",
"share": "Compartir",
- "smthWrong": "Algo falló",
- "startHint": "Puedes utilizar la ceca de eNuts o introducir otra ceca personalizada.",
"submitPaymentReq": "Retirar efectivo",
"to": "para",
"today": "Hoy",
@@ -180,7 +177,6 @@
"unknownType": "Desconocido",
"version": "Versión",
"willDoLater": "Dejar para después",
- "addMintUrl": "Añade la URL de la ceca",
"yes": "Sí",
"invalidPubKey": "¡Clave pública inválida!",
"walletLocked": "Cartera bloqueada",
diff --git a/assets/translations/fr.json b/assets/translations/fr.json
index 526de411..1b4d9b7c 100644
--- a/assets/translations/fr.json
+++ b/assets/translations/fr.json
@@ -13,7 +13,7 @@
"createPin": "Créer un PIN",
"editPin": "Modifier le PIN",
"pinMismatch": "PIN incorrect!",
- "pinSetup": "Vous pouvez facultativement configurer un PIN pour sécuriser votre app.\n\nATTENTION: Si le code PIN est oublié, la restauration est actuellement indisponible!",
+ "pinSetup": "Vous pouvez facultativement configurer un PIN pour sécuriser votre app.",
"pleaseConfirm": "Veuillez confirmer votre PIN.",
"pleaseConfirmNewPin": "Veuillez confirmer votre nouveau PIN.",
"pleaseEnter": "Veuillez entrer votre PIN",
@@ -29,6 +29,7 @@
"common": {
"copy": "Copier",
"cycle": "Cycle",
+ "findMint": "Trouver une mint",
"manualCounterIncrease": "Incrémenter les compteurs",
"manualCounterIncreaseHint": "Les compteurs s'incrémentent automatiquement après chaque transaction, mais dans de rares cas, cela peut échouer, entraînant des erreurs lors du processus de restauration. L'augmentation manuelle des compteurs peut résoudre l'état.",
"increaseCounterHint": "Êtes-vous sûr de vouloir augmenter les compteurs? Cela ne devrait être fait que si vous êtes sûr que les compteurs ne sont pas synchronisés.",
@@ -56,7 +57,6 @@
"confirmSeed": "Veuillez confirmer votre graine en tapant le mot correct.",
"aboutToLeaveTo": "Vous êtes sur le point de quitter",
"accept": "Accepter",
- "addEnutsMint": "Utiliser eNuts mint",
"amount": "Montant",
"back": "Retour",
"backToDashboard": "Retour au tableau de bord",
@@ -122,7 +122,6 @@
"from": "de",
"fromMint": "de la Mint suivante",
"german": "Allemand",
- "getStarted": "Commencer",
"githubIssues": "Signalez des bugs sur Github",
"shareOrReport": "Signaler des bugs",
"historyDeleted": "Historique supprimé",
@@ -160,7 +159,7 @@
"recipient": "Bénéficiaire",
"reqTimeout": "Délais de la requête réseau",
"save": "Enregistrer",
- "scanAgain": "Appuyez pour scanner à nouveau",
+ "scanAgain": "Scanner à nouveau",
"scan": "Scanner",
"seconds": "secondes",
"selectAmount": "Sélectionner le montant",
@@ -168,8 +167,6 @@
"selectMint": "Sélectionnez une Mint à partir de laquelle envoyer",
"sendEcash": "Envoyer Ecash",
"share": "Partager",
- "smthWrong": "Quelque chose s'est mal passé",
- "startHint": "Vous pouvez soit utiliser la mint de eNuts préexistante, soit une autre out votre propre mint.",
"submitPaymentReq": "Retirer votre argent",
"to": "à",
"today": "Aujourd'hui",
@@ -180,7 +177,6 @@
"unknownType": "Données inconnues",
"version": "Version",
"willDoLater": "Je ferai plus tard",
- "addMintUrl": "Ajouter mint URL",
"yes": "Oui",
"invalidPubKey": "Clé publique invalide!",
"walletLocked": "Wallet verrouillé",
diff --git a/assets/translations/hu.json b/assets/translations/hu.json
index 56461943..5a992d92 100644
--- a/assets/translations/hu.json
+++ b/assets/translations/hu.json
@@ -13,7 +13,7 @@
"createPin": "PIN létrehozása",
"editPin": "PIN szerkesztése",
"pinMismatch": "Helytelen PIN!",
- "pinSetup": "Lehetőséged van PIN-t beállítani az alkalmazás védelmére.\n\nFIGYELEM: Ha elfelejted a PIN-t annak visszaállítása nem lehetséges!",
+ "pinSetup": "Lehetőséged van PIN-t beállítani az alkalmazás védelmére.",
"pleaseConfirm": "Kérjük erősítsd meg a PIN-t.",
"pleaseConfirmNewPin": "Kérjük erősítsd meg az új PIN-t.",
"pleaseEnter": "Kérjük add meg a PIN-t most.",
@@ -29,6 +29,7 @@
"common": {
"copy": "Másolás",
"cycle": "Ciklus",
+ "findMint": "Verde keresése",
"manualCounterIncrease": "Számlálók növelése",
"manualCounterIncreaseHint": "A számlálók automatikusan növekednek minden tranzakció után, de ritka esetekben ez hibához vezethet, ami problémákat okozhat a helyreállítási folyamat során. A számlálók manuális növelése megoldhatja ezt az állapotot.",
"increaseCounterHint": "Biztosan növelni szeretnéd a számlálókat? Ezt csak akkor szabad megtenni, ha biztos vagy benne, hogy a számlálók nincsenek szinkronban.",
@@ -56,7 +57,6 @@
"confirmSeed": "Kérjük erősítsd meg a helyreállító jelmondatot a helyes szavak begépelésével.",
"aboutToLeaveTo": "Épp kilépni készülsz",
"accept": "Elfogad",
- "addEnutsMint": "eNuts verde használata",
"amount": "Összeg",
"back": "Vissza",
"backToDashboard": "Vissza a kezdőképernyőre",
@@ -122,7 +122,6 @@
"from": "innen",
"fromMint": "az alábbi verdétől",
"german": "Német",
- "getStarted": "Kezdeti lépések",
"githubIssues": "Hibák jelentése Github-on",
"shareOrReport": "Visszajelzés küldése vagy hibák jelentése",
"historyDeleted": "Előzmények eltávolítva",
@@ -168,8 +167,6 @@
"selectMint": "Válassz verdét a küldéshez",
"sendEcash": "Ecash küldése",
"share": "Megosztás",
- "smthWrong": "Valami hiba történt",
- "startHint": "Használhatod a létező eNuts verdét vagy megadhadsz egyedi verdét.",
"submitPaymentReq": "Kifizetés",
"to": "ide",
"today": "Ma",
@@ -180,7 +177,6 @@
"unknownType": "Ismeretlen adat",
"version": "Verzió",
"willDoLater": "Majd később",
- "addMintUrl": "Új verde URL",
"yes": "Igen",
"invalidPubKey": "Érvénytelen publikus kulcs!",
"walletLocked": "Tárca zárolva",
diff --git a/assets/translations/sw.json b/assets/translations/sw.json
index 2e84a8db..b39ac54f 100644
--- a/assets/translations/sw.json
+++ b/assets/translations/sw.json
@@ -13,7 +13,7 @@
"createPin": "Tengeneza PIN",
"editPin": "Hariri PIN",
"pinMismatch": "PIN isiyo sahihi!",
- "pinSetup": "Unaweza hiari kuweka PIN kwa usalama wa programu yako.\n\nTAHADHARI: Ikiwa PIN itasahaulika, kurejesha sasa haipatikani!",
+ "pinSetup": "Unaweza hiari kuweka PIN kwa usalama wa programu yako.",
"pleaseConfirm": "Tafadhali thibitisha PIN yako.",
"pleaseConfirmNewPin": "Tafadhali thibitisha PIN mpya yako.",
"pleaseEnter": "Tafadhali ingiza PIN yako sasa.",
@@ -29,6 +29,7 @@
"common": {
"copy": "Nakili",
"cycle": "kurejesha",
+ "findMint": "Tafuta sarafu",
"manualCounterIncrease": "Ongeza vitunguu",
"manualCounterIncreaseHint": "Vitunguu huongezeka kiotomatiki baada ya kila muamala, lakini katika hali nadra, hii inaweza kushindwa, ikisababisha makosa wakati wa mchakato wa urejeshaji. Kuongeza vitunguu kwa mikono kunaweza kutatua hali hiyo.",
"increaseCounterHint": "Una uhakika unataka kuongeza vitunguu? Hii inapaswa kufanywa tu ikiwa una uhakika kwamba vitunguu haviko kwa usawazishaji.",
@@ -56,7 +57,6 @@
"confirmSeed": "Tafadhali thibitisha mbegu yako kwa kuingiza neno sahihi.",
"aboutToLeaveTo": "Unaenda kuondoka",
"accept": "Kubali",
- "addEnutsMint": "Tumia sarafu ya eNuts",
"amount": "Kiasi",
"back": "Rudi",
"backToDashboard": "Rudi kwenye dashibodi",
@@ -122,7 +122,6 @@
"from": "kutoka",
"fromMint": "kutoka kwa sarafu ifuatayo",
"german": "Kijerumani",
- "getStarted": "Anza",
"githubIssues": "Ripoti matatizo kwenye Github",
"shareOrReport": "Shiriki maoni au ripoti matatizo",
"historyDeleted": "Historia imefutwa",
@@ -168,8 +167,6 @@
"selectMint": "Chagua sarafu ya kutuma kutoka",
"sendEcash": "Tuma Ecash",
"share": "Shiriki",
- "smthWrong": "Kitu kimekwenda vibaya",
- "startHint": "Unaweza kutumia sarafu ya eNuts iliyopo au kuongeza sarafu nyingine ya desturi.",
"submitPaymentReq": "Kutoa pesa",
"to": "kwa",
"today": "Leo",
@@ -180,7 +177,6 @@
"unknownType": "Aina isiyojulikana",
"version": "Toleo",
"willDoLater": "Nitafanya baadaye",
- "addMintUrl": "Ongeza URL ya sarafu",
"yes": "Ndio",
"invalidPubKey": "Kitufe cha umma batili!",
"walletLocked": "Pochi imefungwa",
diff --git a/src/components/Balance.tsx b/src/components/Balance.tsx
index 926cb18a..416e023f 100644
--- a/src/components/Balance.tsx
+++ b/src/components/Balance.tsx
@@ -15,7 +15,7 @@ import { formatBalance, formatInt, formatSatStr, isBool } from '@util'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Text, TouchableOpacity, View } from 'react-native'
-import { s, ScaledSheet, vs } from 'react-native-size-matters'
+import { s, ScaledSheet } from 'react-native-size-matters'
import { TxtButton } from './Button'
import Logo from './Logo'
@@ -79,7 +79,7 @@ export default function Balance({ balance, nav }: IBalanceProps) {
void handleLogoPress()}
>
-
+
{/* balance */}
{!hidden.balance &&
@@ -131,7 +131,7 @@ export default function Balance({ balance, nav }: IBalanceProps) {
txt={t('seeFullHistory')}
onPress={() => nav?.navigate('history')}
txtColor={getColor(highlight, color)}
- style={[{ paddingTop: vs(15), paddingBottom: hidden.txs ? vs(15) : 0 }]}
+ style={[{ paddingTop: s(15), paddingBottom: hidden.txs ? s(15) : 0 }]}
/>
}
@@ -163,8 +163,8 @@ function HistoryEntry({ icon, txType, isSwap, timestamp, amount, onPress }: IHis
{icon}
-
-
+
+
@@ -179,24 +179,24 @@ const styles = ScaledSheet.create({
borderBottomLeftRadius: 50,
borderBottomRightRadius: 50,
paddingHorizontal: '20@s',
- paddingTop: '40@vs',
- paddingBottom: '50@vs',
- minHeight: '50%'
+ paddingTop: '40@s',
+ paddingBottom: '50@s',
+ minHeight: '55%'
},
balanceWrap: {
alignItems: 'center',
marginHorizontal: '-20@s',
- marginBottom: '5@vs',
+ marginBottom: '10@s',
},
balAmount: {
alignItems: 'center',
- fontSize: '42@vs',
+ fontSize: '42@s',
fontWeight: '600',
},
balAssetNameWrap: {
flexDirection: 'row',
alignItems: 'center',
- marginBottom: '10@vs',
+ marginBottom: '10@s',
},
balAssetName: {
fontSize: '14@vs',
@@ -204,13 +204,13 @@ const styles = ScaledSheet.create({
},
iconWrap: {
minWidth: '40@s',
- paddingTop: '3@vs',
+ paddingTop: '3@s',
},
entry: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
- paddingBottom: '6@vs',
+ paddingBottom: '10@s',
},
wrap: {
flexDirection: 'row',
diff --git a/src/components/Empty.tsx b/src/components/Empty.tsx
index bd3325d4..84a2454d 100644
--- a/src/components/Empty.tsx
+++ b/src/components/Empty.tsx
@@ -4,7 +4,7 @@ import { useThemeContext } from '@src/context/Theme'
import { Image } from 'expo-image'
import { useTranslation } from 'react-i18next'
import { View } from 'react-native'
-import { ScaledSheet,vs } from 'react-native-size-matters'
+import { ScaledSheet, vs } from 'react-native-size-matters'
import { TxtButton } from './Button'
import Txt from './Txt'
@@ -12,6 +12,7 @@ import Txt from './Txt'
interface IEmptyProps {
txt: string
hint?: string
+ hintComponent?: React.ReactNode
hasOk?: boolean
pressable?: boolean
onPress?: () => void
@@ -19,7 +20,7 @@ interface IEmptyProps {
NativeStackNavigationProp
}
-export default function Empty({ txt, hint, hasOk, pressable, onPress, nav }: IEmptyProps) {
+export default function Empty({ txt, hint, hintComponent, hasOk, pressable, onPress, nav }: IEmptyProps) {
const { t } = useTranslation()
const { color } = useThemeContext()
return (
@@ -31,10 +32,13 @@ export default function Empty({ txt, hint, hasOk, pressable, onPress, nav }: IEm
contentFit='contain'
/>
{pressable && onPress ?
-
+ <>
+ {hintComponent}
+
+ >
:
<>
void
- onCancel: () => void
-}
-
-export default function InitialModal({ visible, onConfirm, onCancel }: IInitialModalProps) {
- const { t } = useTranslation([NS.common])
- const { color, highlight } = useThemeContext()
- return (
-
-
- {t('getStarted')}
-
-
- {t('startHint')}
-
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/consts/env.ts b/src/consts/env.ts
index fb404e2e..19c6e0b9 100644
--- a/src/consts/env.ts
+++ b/src/consts/env.ts
@@ -72,4 +72,5 @@ export const isTestMode = (typeof __TEST__ === 'boolean' && __TEST__)
|| process?.env?.NODE_ENV === 'test' || config?.extra?.NODE_ENV === 'test'
export const isIOS = Platform.OS === 'ios'
+export const isNotIosStore = __DEV__ || env.isExpoBeta || !isIOS
export const appVersion = `eNuts v${version}${env.isExpoBeta ? '-beta' : ''}`
diff --git a/src/consts/urls.ts b/src/consts/urls.ts
index ab7eb857..1dba3f22 100644
--- a/src/consts/urls.ts
+++ b/src/consts/urls.ts
@@ -2,4 +2,5 @@ export const repoIssueUrl = 'https://github.com/cashubtc/eNuts/issues/new'
export const latestReleaseUrl = 'https://api.github.com/repos/cashubtc/eNuts/releases/latest'
export const latestApkUrl = (v: string) => `https://www.enuts.cash/apk/enuts-${v}.apk`
export const releaseUrl = (v: string) => `https://github.com/cashubtc/eNuts/releases/tag/${v}`
-export const testflightUrl = 'https://testflight.apple.com/join/2pXy9lZ1'
\ No newline at end of file
+export const testflightUrl = 'https://testflight.apple.com/join/2pXy9lZ1'
+export const BITCOIN_MINTS_URL = 'https://bitcoinmints.com'
\ No newline at end of file
diff --git a/src/model/nav.ts b/src/model/nav.ts
index a4d7c007..d513f067 100644
--- a/src/model/nav.ts
+++ b/src/model/nav.ts
@@ -24,10 +24,7 @@ export type RootStackParamList = {
dashboard: undefined
disclaimer: undefined
history: undefined
- mints: {
- defaultMint?: boolean
- newMint?: boolean
- } | undefined
+ mints: undefined
Settings: undefined
'General settings': undefined
'Security settings': undefined
diff --git a/src/screens/Addressbook/index.tsx b/src/screens/Addressbook/index.tsx
index e8740696..7e5a3817 100644
--- a/src/screens/Addressbook/index.tsx
+++ b/src/screens/Addressbook/index.tsx
@@ -60,7 +60,6 @@ export interface ISearchStates {
hasResults: boolean
}
-const marginBottom = isIOS ? vs(45) : vs(70)
const marginBottomPayment = isIOS ? vs(20) : 0
// https://github.com/nostr-protocol/nips/blob/master/04.md#security-warning
@@ -417,7 +416,7 @@ export default function AddressbookPage({ navigation, route }: TAddressBookPageP
{contactsRef.current.length > 0 ?
{search.input.length > 0 && search.results.length > 0 && search.hasResults ?
{attempts.locked && !isConfirm && }
-
-
-
{!shouldEdit && !shouldRemove && auth.length > 0 &&
}
@@ -247,29 +244,31 @@ export default function AuthPage({ navigation, route }: TAuthPageProps) {
{attempts.locked && !isConfirm ?
:
-
- {attempts.mismatch &&
-
- }
- {shouldShowPinSection() ?
-
-
-
- :
- 0}
- shouldEdit={shouldEdit}
- shouldRemove={shouldRemove}
- />
- }
+
+
+ {attempts.mismatch &&
+
+ }
+ {shouldShowPinSection() ?
+
+
+
+ :
+ 0}
+ shouldEdit={shouldEdit}
+ shouldRemove={shouldRemove}
+ />
+ }
+
{/* number pad */}
-
+
{
- setModal(prev => ({ ...prev, mint: false }))
- navigation.navigate('mints', { defaultMint: forEnutsMint, newMint: !forEnutsMint })
- }
-
- const handleEnutsMint = async () => {
- try {
- await saveDefaultOnInit()
- } catch (e) {
- // TODO update error message: Mint could not be added, please add a different one or try again later.
- openPromptAutoClose({ msg: isErr(e) ? e.message : t('smthWrong') })
- return handleMintModal(false)
- }
- handleMintModal(true)
- }
-
// This function is only called if the mint of the received token is available as trusted in user DB
const handleTokenSubmit = async (deepUrl: string) => {
// clear deep link
@@ -322,27 +303,31 @@ export default function Dashboard({ navigation, route }: TDashboardPageProps) {
{/* Send button or add first mint */}
{hasMint ?
}
+ icon={}
txt={t('send', { ns: NS.wallet })}
color={hi[highlight]}
- onPress={() => setModal(prev => ({ ...prev, sendOpts: true }))}
+ onPress={() => {
+ setModal(prev => ({ ...prev, sendOpts: true }))
+ }}
/>
:
}
+ icon={}
txt={t('mint')}
color={hi[highlight]}
- onPress={() => setModal(prev => ({ ...prev, mint: true }))}
+ onPress={() => {
+ navigation.navigate('mints')
+ }}
/>
}
}
+ icon={}
txt={t('scan')}
color={hi[highlight]}
onPress={() => navigation.navigate('qr scan', { mint: undefined })}
/>
}
+ icon={}
txt={t('receive', { ns: NS.wallet })}
color={hi[highlight]}
onPress={() => {
@@ -361,8 +346,7 @@ export default function Dashboard({ navigation, route }: TDashboardPageProps) {
onPress={() => navigation.navigate('disclaimer')}
style={styles.betaHint}
>
-
-
+
}
@@ -383,12 +367,6 @@ export default function Dashboard({ navigation, route }: TDashboardPageProps) {
}}
/>
}
- {/* Initial mint modal prompt */}
- void handleEnutsMint()}
- onCancel={() => void handleMintModal()}
- />
{/* Send options */}
navigation.goBack()}
/>
-
+
{getAmount()}
@@ -276,9 +276,9 @@ export default function DetailsPage({ navigation, route }: THistoryEntryPageProp
{value.length > 0 &&
<>
{copy.value ?
-
+
:
-
+
}
>
}
@@ -307,7 +307,7 @@ export default function DetailsPage({ navigation, route }: THistoryEntryPageProp
onPress={() => void handleClaim()}
>
- {loading ? : }
+ {loading ? : }
>
@@ -334,9 +334,9 @@ export default function DetailsPage({ navigation, route }: THistoryEntryPageProp
{hash.length > 0 &&
<>
{copy.hash ?
-
+
:
-
+
}
>
}
@@ -358,7 +358,7 @@ export default function DetailsPage({ navigation, route }: THistoryEntryPageProp
onPress={handleQR}
>
-
+
}
@@ -409,7 +409,7 @@ const styles = ScaledSheet.create({
maxWidth: '200@s',
},
amount: {
- fontSize: '48@vs',
+ fontSize: '40@vs',
fontWeight: '600',
},
entryInfo: {
diff --git a/src/screens/Mints/index.tsx b/src/screens/Mints/index.tsx
index 5058856f..04a5f9f2 100644
--- a/src/screens/Mints/index.tsx
+++ b/src/screens/Mints/index.tsx
@@ -1,5 +1,5 @@
import ActionButtons from '@comps/ActionButtons'
-import Button, { IconBtn } from '@comps/Button'
+import Button, { IconBtn, TxtButton } from '@comps/Button'
import Empty from '@comps/Empty'
import { CheckCircleIcon, ChevronRightIcon, MintBoardIcon, PlusIcon, QRIcon, ZapIcon } from '@comps/Icons'
import Separator from '@comps/Separator'
@@ -13,24 +13,26 @@ import { BottomModal } from '@modal/Question'
import type { IMintBalWithName, IMintUrl } from '@model'
import type { TMintsPageProps } from '@model/nav'
import TopNav from '@nav/TopNav'
+import { BITCOIN_MINTS_URL } from '@src/consts/urls'
import { usePromptContext } from '@src/context/Prompt'
import { useThemeContext } from '@src/context/Theme'
import { NS } from '@src/i18n'
import { getCustomMintNames, getDefaultMint } from '@store/mintStore'
import { globals, highlight as hi, mainColors } from '@styles'
import { getColor } from '@styles/colors'
-import { formatMintUrl, formatSatStr, isErr, normalizeMintUrl, sortMintsByDefault } from '@util'
+import { formatMintUrl, formatSatStr, isErr, normalizeMintUrl, openUrl, sortMintsByDefault } from '@util'
import { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { ScrollView, Text, TouchableOpacity, View } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { s, ScaledSheet, vs } from 'react-native-size-matters'
-export default function Mints({ navigation, route }: TMintsPageProps) {
+export default function Mints({ navigation }: TMintsPageProps) {
const { t } = useTranslation([NS.common])
const { prompt, closePrompt, openPromptAutoClose } = usePromptContext()
const { color, highlight } = useThemeContext()
const insets = useSafeAreaInsets()
+ const [loading, setLoading] = useState(false)
// mint list
const [usertMints, setUserMints] = useState([])
// this state is used to determine which mint has been pressed
@@ -55,27 +57,32 @@ export default function Mints({ navigation, route }: TMintsPageProps) {
// adds a mint via input
const handleMintInput = async () => {
+ setLoading(true)
// Allow user to submit URL without "https://" and add it ourself if not available
const submitted = normalizeMintUrl(input)
if (!submitted?.length) {
+ setLoading(false)
return openPromptAutoClose({ msg: t('invalidUrl', { ns: NS.mints }), ms: 1500 })
}
try {
// check if mint is already in db
const mints = await getMintsUrls(true)
if (mints.some(m => m.mintUrl === submitted)) {
+ setLoading(false)
return openPromptAutoClose({ msg: t('mntAlreadyAdded', { ns: NS.mints }), ms: 1500 })
}
// add mint url to db
await addMint(submitted)
setSelectedMint({ mintUrl: submitted })
} catch (e) {
+ setLoading(false)
return openPromptAutoClose({ msg: isErr(e) ? e.message : t('mintConnectionFail', { ns: NS.mints }), ms: 2000 })
}
setNewMintModal(false)
- openTopUpModal()
const mints = await getMintsBalances()
setUserMints(await getCustomMintNames(mints))
+ setLoading(false)
+ openTopUpModal()
}
// trust modal asks user for confirmation on adding a default mint to its trusted list
@@ -102,24 +109,10 @@ export default function Mints({ navigation, route }: TMintsPageProps) {
}, [])
const handleInitialRender = useCallback(async () => {
- // user comes from dashboard and wants to add his own mint url, open prompt
- if (route.params?.newMint) {
- // timeout is needed on IOS only when different prompts are called synchronously
- const t = setTimeout(() => {
- setNewMintModal(true)
- clearTimeout(t)
- }, 200)
- return
- }
await handleMintsState()
const defaultt = await getDefaultMint()
setDefaultM(defaultt ?? '')
- // this is the case when user adds the initial default mint
- if (route.params?.defaultMint) {
- // ask to mint new token
- openTopUpModal()
- }
- }, [openTopUpModal, handleMintsState, route.params?.defaultMint, route.params?.newMint])
+ }, [handleMintsState])
// Show user mints with balances and default mint icon
useEffect(() => {
@@ -140,8 +133,7 @@ export default function Mints({ navigation, route }: TMintsPageProps) {
return (
void openUrl(BITCOIN_MINTS_URL)?.catch(e =>
+ openPromptAutoClose({ msg: isErr(e) ? e.message : t('deepLinkErr') }))
+ }
+ />
+ }
pressable
onPress={() => setNewMintModal(true)}
/>
@@ -248,7 +248,8 @@ export default function Mints({ navigation, route }: TMintsPageProps) {