diff --git a/android/app/build.gradle b/android/app/build.gradle index 2a72709a..fbea6a7e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -81,7 +81,7 @@ android { applicationId "com.bithyve.tribe" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 79 + versionCode 80 versionName "0.2.6" missingDimensionStrategy 'react-native-camera', 'general' } diff --git a/ios/tribe.xcodeproj/project.pbxproj b/ios/tribe.xcodeproj/project.pbxproj index e887818d..0483c899 100644 --- a/ios/tribe.xcodeproj/project.pbxproj +++ b/ios/tribe.xcodeproj/project.pbxproj @@ -707,7 +707,7 @@ CODE_SIGN_ENTITLEMENTS = tribe/tribe.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 79; + CURRENT_PROJECT_VERSION = 80; DEVELOPMENT_TEAM = Y5TCB759QL; ENABLE_BITCODE = NO; INFOPLIST_FILE = tribe/Info.plist; @@ -742,7 +742,7 @@ CODE_SIGN_ENTITLEMENTS = tribe/tribe.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 79; + CURRENT_PROJECT_VERSION = 80; DEVELOPMENT_TEAM = Y5TCB759QL; INFOPLIST_FILE = tribe/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Tribe; diff --git a/src/assets/images/icon_recieve_light.svg b/src/assets/images/icon_recieve_light.svg index 2af4ea17..a67f42d9 100644 --- a/src/assets/images/icon_recieve_light.svg +++ b/src/assets/images/icon_recieve_light.svg @@ -1,4 +1,5 @@ - - - + + + + diff --git a/src/assets/images/icon_send_light.svg b/src/assets/images/icon_send_light.svg index 479cdef0..cb6b0f5e 100644 --- a/src/assets/images/icon_send_light.svg +++ b/src/assets/images/icon_send_light.svg @@ -1,4 +1,5 @@ - - - + + + + diff --git a/src/assets/images/lnLearnMoreIllustration.svg b/src/assets/images/lnLearnMoreIllustration.svg new file mode 100644 index 00000000..a8544b15 --- /dev/null +++ b/src/assets/images/lnLearnMoreIllustration.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/onchainLearnMoreIllustration.svg b/src/assets/images/onchainLearnMoreIllustration.svg new file mode 100644 index 00000000..ec038057 --- /dev/null +++ b/src/assets/images/onchainLearnMoreIllustration.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/onchainLearnMoreIllustration_light.svg b/src/assets/images/onchainLearnMoreIllustration_light.svg new file mode 100644 index 00000000..7caff750 --- /dev/null +++ b/src/assets/images/onchainLearnMoreIllustration_light.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/satsRequestIcon_light.svg b/src/assets/images/satsRequestIcon_light.svg index b0e96eb2..38a52ada 100644 --- a/src/assets/images/satsRequestIcon_light.svg +++ b/src/assets/images/satsRequestIcon_light.svg @@ -1,3 +1,3 @@ - - + + diff --git a/src/assets/images/supportLearnMoreIllustration.svg b/src/assets/images/supportLearnMoreIllustration.svg new file mode 100644 index 00000000..01402a18 --- /dev/null +++ b/src/assets/images/supportLearnMoreIllustration.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/useRGBAsset_light.svg b/src/assets/images/useRGBAsset_light.svg new file mode 100644 index 00000000..05a1e02c --- /dev/null +++ b/src/assets/images/useRGBAsset_light.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/QRScanner.tsx b/src/components/QRScanner.tsx index f0ecc0b5..8c69db0d 100644 --- a/src/components/QRScanner.tsx +++ b/src/components/QRScanner.tsx @@ -8,6 +8,7 @@ import { } from 'react-native'; import { Camera, + Code, useCameraDevice, useCodeScanner, } from 'react-native-vision-camera'; @@ -25,16 +26,16 @@ import pickImage from 'src/utils/imagePicker'; import Toast from './Toast'; type QRScannerProps = { - onCodeScanned: (codes: string) => void; + onCodeScanned: (codes: Code[]) => void; + isScanning: boolean; }; const QRScanner = (props: QRScannerProps) => { - const { onCodeScanned } = props; + const { onCodeScanned, isScanning = true } = props; const device = useCameraDevice('back'); const { translations } = useContext(LocalizationContext); const { sendScreen } = translations; const [cameraPermission, setCameraPermission] = useState(null); - const [isScanning, setIsScanning] = useState(true); const theme: AppTheme = useTheme(); const styles = React.useMemo(() => getStyles(theme), [theme]); @@ -89,10 +90,11 @@ const QRScanner = (props: QRScannerProps) => { const codeScanner = useCodeScanner({ codeTypes: ['qr', 'ean-13'], onCodeScanned: codes => { - if (isScanning) { - setIsScanning(false); // Stop scanning after detecting a QR code - onCodeScanned(codes); // Pass the detected codes - } + onCodeScanned(codes); + // if (isScanning) { + // setIsScanning(false); // Stop scanning after detecting a QR code + // onCodeScanned(codes); // Pass the detected codes + // } }, }); diff --git a/src/loc/content/cn.json b/src/loc/content/cn.json index ca0eb6f1..88ae3562 100644 --- a/src/loc/content/cn.json +++ b/src/loc/content/cn.json @@ -133,7 +133,31 @@ "recoverLoadingSubTitle": "请稍等片刻,我们正在完成恢复过程。请勿关闭应用程序以确保一切顺利进行。感谢您的耐心等待!", "onchainLearMoreInfo": "适用于所有比特币交易的安全钱包。", "lightningLearnMoreInfo": "适用于小额交易的快速低成本解决方案。", - "supportLearnMoreInfo": "兼容其他比特币应用程序的钱包。" + "supportLearnMoreInfo": "兼容其他比特币应用程序的钱包。", + "onChainLearnMoreSubTitle": "链上钱包通过将您的比特币安全地存储在比特币区块链上,确保您完全控制您的比特币。", + "onchainLearnMoreLabel1": "自我托管", + "onchainLearnMoreContent1": "您拥有自己的私钥,确保终极安全。", + "onchainLearnMoreLabel2": "透明性", + "onchainLearnMoreContent2": "交易完全记录在区块链上。", + "onchainLearnMoreLabel3": "最适合", + "onchainLearnMoreContent3": "适合长期存储和安全的大额交易。", + "onchainLearnMoreContent4": "通过链上自我托管完全掌控您的比特币。", + "lnLearnMoreSubtitle": "闪电钱包提供快速且经济高效的比特币交易,同时让您完全掌控您的资金。", + "lnLearnMoreLabel1": "自我托管", + "lnLearnMoreContent1": "您掌握自己的私钥,确保完全的所有权和安全性。", + "lnLearnMoreLabel2": "即时交易", + "lnLearnMoreContent2": "非常适合快速支付和极低的费用。", + "lnLearnMoreLabel3": "最适合", + "lnLearnMoreContent3": "适合日常小额交易和快速转账。", + "lnLearnMoreContent4": "在闪电网络上通过自我托管享受比特币的速度和效率。", + "supportLearnMoreSubtitle": "支持的钱包通过利用中继服务进行资产管理,在便利性和安全性之间实现平衡。", + "supportLearnMoreLabel1": "共享托管", + "supportLearnMoreContent1": "托管通过可信的中继服务管理,简化了钱包管理。", + "supportLearnMoreLabel2": "易用性", + "supportLearnMoreContent2": "适合喜欢简单设置和最小复杂性的用户。", + "supportLearnMoreLabel3": "备份支持", + "supportLearnMoreContent3": "基于中继的备份确保资产恢复和安全管理。", + "supportLearnMoreContent4": "在支持模式下,享受增强安全性的用户友好体验。" }, "home": { "addAssets": "接收资产", @@ -257,7 +281,9 @@ "step1": "步骤 1", "step2": "步骤 2", "activateWalletTypeLabel": "钱包类型", - "copyWalletIDMsg": "钱包 ID 已成功复制!" + "copyWalletIDMsg": "钱包 ID 已成功复制!", + "walletBackupSuccessMsg": "您的钱包已成功备份", + "assetBackupSuccessMsg": "您的 RGB 资产已成功备份" }, "receciveScreen": { "headerSubTitle": "扫描二维码", @@ -293,6 +319,7 @@ "sendSuccessSubTitle": "交易已成功广播", "invalidBtcAddress": "无效的比特币地址", "invalidRGBInvoiceAddress": "无效的 RGB 发票", + "invalidBtcAndRgbInput": "无效的比特币地址或 RGB 发票。", "sentSuccessfully": "发送成功", "amountMoreThanSpend": "输入的金额超过了可支配金额", "transFeeErrMsg": "错误:交易费用信息缺失", @@ -372,7 +399,7 @@ "transferDetails": "转账详情", "viewUnspent": "查看未花费的UTXO", "walletRefreshMsg": "钱包更新成功", - "unspentTitle": "RGB UTXO列表", + "unspentTitle": "未使用交易输出概览", "satsAmount": "Sats金额", "rgbAssetID": "RGB资产ID", "testSatsRecived": "接收测试Sats", @@ -384,7 +411,11 @@ "bitcoin": "比特币", "reserveAmtText": "为资产交易保留", "requestTSatsTitle": "请求测试 Sats", - "requestTSatSubTitle": "请加入我们的Telegram群组以接收测试Sats,体验RGB的乐趣。" + "requestTSatSubTitle": "请加入我们的Telegram群组以接收测试Sats,体验RGB的乐趣。", + "coloured": "彩色", + "unColoured": "非彩色", + "availableTxnFee": "可用交易费", + "output": "输出" }, "assets": { "assetCreateMsg": "资产创建成功", diff --git a/src/loc/content/en.json b/src/loc/content/en.json index 189ba1a5..36df1da5 100644 --- a/src/loc/content/en.json +++ b/src/loc/content/en.json @@ -133,7 +133,31 @@ "recoverLoadingSubTitle": "Please hold on for a moment while we complete the recovery process. Avoid closing the app to ensure everything runs smoothly. Thank you for your patience!", "onchainLearMoreInfo": "A secure wallet for all your Bitcoin transactions. ", "lightningLearnMoreInfo": "Fast and low-cost transactions for small amounts. ", - "supportLearnMoreInfo": "A wallet compatible with other Bitcoin applications. " + "supportLearnMoreInfo": "A wallet compatible with other Bitcoin applications. ", + "onChainLearnMoreSubTitle": "An On-Chain Wallet ensures full control of your Bitcoin by storing it securely on the Bitcoin blockchain.", + "onchainLearnMoreLabel1": "Self-Custody", + "onchainLearnMoreContent1": "You own your private keys for ultimate security.", + "onchainLearnMoreLabel2": "Transparency", + "onchainLearnMoreContent2": "Transactions are fully recorded on the blockchain.", + "onchainLearnMoreLabel3": "Best For", + "onchainLearnMoreContent3": "Long-term storage and secure large transactions.", + "onchainLearnMoreContent4": "Take full control of your Bitcoin with self-custody on-chain.", + "lnLearnMoreSubtitle": "A Lightning Wallet offers fast and cost-effective Bitcoin transactions while maintaining full control over your funds.", + "lnLearnMoreLabel1": "Self-Custody", + "lnLearnMoreContent1": "You hold your private keys, ensuring complete ownership and security.", + "lnLearnMoreLabel2": "Instant Transactions", + "lnLearnMoreContent2": "Perfect for quick payments with minimal fees.", + "lnLearnMoreLabel3": "Best For", + "lnLearnMoreContent3": "Everyday microtransactions and fast transfers.", + "lnLearnMoreContent4": "Enjoy the speed and efficiency of Bitcoin with self-custody on the Lightning Network.", + "supportLearnMoreSubtitle": "A Supported Wallet provides a balance of convenience and security by leveraging relay services for asset management.", + "supportLearnMoreLabel1": "Shared Custody", + "supportLearnMoreContent1": "Custody is managed with the help of a trusted relay, simplifying wallet management.", + "supportLearnMoreLabel2": "Ease of Use", + "supportLearnMoreContent2": "Ideal for users who prefer a straightforward setup and minimal complexity.", + "supportLearnMoreLabel3": "Backup Support", + "supportLearnMoreContent3": "Relay-based backups ensure asset recovery and secure management.", + "supportLearnMoreContent4": "Enjoy a user-friendly experience with enhanced security in Supported Mode." }, "home": { "addAssets": "Receive Asset", @@ -257,7 +281,9 @@ "step1": "Step 1", "step2": "Step 2", "activateWalletTypeLabel": "Wallet Type", - "copyWalletIDMsg": "Wallet ID copied successfully!" + "copyWalletIDMsg": "Wallet ID copied successfully!", + "walletBackupSuccessMsg": "Your wallet has been successfully backed up", + "assetBackupSuccessMsg": "Your RGB Assets has been successfully backed up" }, "receciveScreen": { "headerSubTitle": "Scan QR", @@ -293,6 +319,7 @@ "sendSuccessSubTitle": "The transaction has been broadcasted successfully", "invalidBtcAddress": "Invalid Bitcoin address", "invalidRGBInvoiceAddress": "Invalid RGB invoice", + "invalidBtcAndRgbInput": "Invalid Bitcoin address or RGB invoice.", "sentSuccessfully": "Sent successfully", "amountMoreThanSpend": "Amount entered is more than available to spend", "transFeeErrMsg": "Error: Transaction Fee intel missing", @@ -372,7 +399,7 @@ "transferDetails": "Transfer Details", "viewUnspent": "View Unspent UTXOs", "walletRefreshMsg": "Wallet successfully updated", - "unspentTitle": "List of RGB UTXOs", + "unspentTitle": "UTXOs Overview", "satsAmount": "Sats Amount", "rgbAssetID": "RGB Asset ID", "testSatsRecived": "Test-sats received", @@ -384,7 +411,11 @@ "bitcoin": "Bitcoin", "reserveAmtText": "Reserved for asset transactions", "requestTSatsTitle": "Request Test Sats", - "requestTSatSubTitle": "Please join our Telegram group to receive test sats and enjoy playing around with RGB." + "requestTSatSubTitle": "Please join our Telegram group to receive test sats and enjoy playing around with RGB.", + "coloured": "Coloured", + "unColoured": "UnColoured", + "availableTxnFee": "Available transaction fee", + "output": "Output" }, "assets": { "assetCreateMsg": "Asset created successfully", diff --git a/src/loc/content/es.json b/src/loc/content/es.json index 14fb5a6f..767b6f6d 100644 --- a/src/loc/content/es.json +++ b/src/loc/content/es.json @@ -133,7 +133,31 @@ "recoverLoadingSubTitle": "Por favor, espera un momento mientras completamos el proceso de recuperación. Evita cerrar la aplicación para asegurar que todo funcione sin problemas. ¡Gracias por tu paciencia!", "onchainLearMoreInfo": "Una billetera segura para todas tus transacciones de Bitcoin.", "lightningLearnMoreInfo": "Transacciones rápidas y de bajo costo para montos pequeños.", - "supportLearnMoreInfo": "Una billetera compatible con otras aplicaciones de Bitcoin." + "supportLearnMoreInfo": "Una billetera compatible con otras aplicaciones de Bitcoin.", + "onChainLearnMoreSubTitle": "Una billetera On-Chain garantiza el control total de tu Bitcoin almacenándolo de forma segura en la blockchain de Bitcoin.", + "onchainLearnMoreLabel1": "Auto-custodia", + "onchainLearnMoreContent1": "Tú posees tus claves privadas para máxima seguridad.", + "onchainLearnMoreLabel2": "Transparencia", + "onchainLearnMoreContent2": "Las transacciones se registran completamente en la blockchain.", + "onchainLearnMoreLabel3": "Mejor para", + "onchainLearnMoreContent3": "Almacenamiento a largo plazo y transacciones grandes y seguras.", + "onchainLearnMoreContent4": "Toma el control total de tu Bitcoin con la autocustodia en cadena.", + "lnLearnMoreSubtitle": "Una billetera Lightning ofrece transacciones rápidas y rentables de Bitcoin mientras mantienes el control total sobre tus fondos.", + "lnLearnMoreLabel1": "Auto-custodia", + "lnLearnMoreContent1": "Tú tienes tus claves privadas, asegurando propiedad y seguridad completas.", + "lnLearnMoreLabel2": "Transacciones instantáneas", + "lnLearnMoreContent2": "Perfecto para pagos rápidos con tarifas mínimas.", + "lnLearnMoreLabel3": "Mejor para", + "lnLearnMoreContent3": "Micropagos diarios y transferencias rápidas.", + "lnLearnMoreContent4": "Disfruta de la velocidad y eficiencia de Bitcoin con autocustodia en la Lightning Network.", + "supportLearnMoreSubtitle": "Una billetera compatible ofrece un equilibrio entre comodidad y seguridad al utilizar servicios de retransmisión para la gestión de activos.", + "supportLearnMoreLabel1": "Custodia compartida", + "supportLearnMoreContent1": "La custodia se gestiona con la ayuda de un relé confiable, simplificando la gestión de la billetera.", + "supportLearnMoreLabel2": "Facilidad de uso", + "supportLearnMoreContent2": "Ideal para usuarios que prefieren una configuración sencilla y mínima complejidad.", + "supportLearnMoreLabel3": "Soporte de respaldo", + "supportLearnMoreContent3": "Las copias de seguridad basadas en relé garantizan la recuperación de activos y una gestión segura.", + "supportLearnMoreContent4": "Disfruta de una experiencia fácil de usar con mayor seguridad en el modo compatible." }, "home": { "addAssets": "Recibir activo", @@ -257,7 +281,9 @@ "step1": "Paso 1", "step2": "Paso 2", "activateWalletTypeLabel": "Tipo de Billetera", - "copyWalletIDMsg": "¡ID de billetera copiado con éxito!" + "copyWalletIDMsg": "¡ID de billetera copiado con éxito!", + "walletBackupSuccessMsg": "Tu billetera ha sido respaldada con éxito", + "assetBackupSuccessMsg": "Tus activos RGB han sido respaldados con éxito" }, "receciveScreen": { "headerSubTitle": "Escanear QR", @@ -293,6 +319,7 @@ "sendSuccessSubTitle": "La transacción se ha transmitido con éxito", "invalidBtcAddress": "Dirección Bitcoin no válida", "invalidRGBInvoiceAddress": "Factura RGB no válida", + "invalidBtcAndRgbInput": "Dirección de Bitcoin o factura RGB no válida.", "sentSuccessfully": "Enviado exitosamente", "amountMoreThanSpend": "El monto ingresado es más que disponible para gastar", "transFeeErrMsg": "Error: falta información sobre la tarifa de transacción", @@ -372,7 +399,7 @@ "transferDetails": "Detalles de la transferencia", "viewUnspent": "Ver UTXOs no gastados", "walletRefreshMsg": "Billetera actualizada con éxito", - "unspentTitle": "Lista de UTXO RGB", + "unspentTitle": "Descripción general de UTXOs", "satsAmount": "Cantidad de sats", "rgbAssetID": "ID de activo RGB", "testSatsRecived": "Pruebas recibidas", @@ -384,7 +411,11 @@ "bitcoin": "Bitcoin", "reserveAmtText": "Reservado para transacciones de activos", "requestTSatsTitle": "Solicitar Sats de Prueba", - "requestTSatSubTitle": "Únete a nuestro grupo de Telegram para recibir sats de prueba y disfrutar experimentando con RGB." + "requestTSatSubTitle": "Únete a nuestro grupo de Telegram para recibir sats de prueba y disfrutar experimentando con RGB.", + "coloured": "Coloreado", + "unColoured": "Sin color", + "availableTxnFee": "Tarifa de transacción disponible", + "output": "Salida" }, "assets": { "assetCreateMsg": "Activo creado con éxito", diff --git a/src/loc/content/hi.json b/src/loc/content/hi.json index f3a104c6..44fa5da2 100644 --- a/src/loc/content/hi.json +++ b/src/loc/content/hi.json @@ -133,7 +133,31 @@ "recoverLoadingSubTitle": "कृपया एक पल धैर्य रखें जब तक हम पुनर्प्राप्ति प्रक्रिया पूरी कर लें। सुनिश्चित करने के लिए ऐप बंद न करें कि सब कुछ सुचारू रूप से चले। आपके धैर्य के लिए धन्यवाद!", "onchainLearMoreInfo": "आपके सभी बिटकॉइन लेनदेन के लिए एक सुरक्षित वॉलेट।", "lightningLearnMoreInfo": "छोटी राशियों के लिए तेज़ और कम लागत वाले लेनदेन।", - "supportLearnMoreInfo": "अन्य बिटकॉइन एप्लिकेशन के साथ संगत वॉलेट।" + "supportLearnMoreInfo": "अन्य बिटकॉइन एप्लिकेशन के साथ संगत वॉलेट।", + "onChainLearnMoreSubTitle": "ऑन-चेन वॉलेट आपके बिटकॉइन को बिटकॉइन ब्लॉकचेन पर सुरक्षित रूप से संग्रहीत करके उस पर पूर्ण नियंत्रण सुनिश्चित करता है।", + "onchainLearnMoreLabel1": "स्व-कस्टडी", + "onchainLearnMoreContent1": "आपकी निजी चाबियाँ आपकी हैं, जो सर्वोत्तम सुरक्षा सुनिश्चित करती हैं।", + "onchainLearnMoreLabel2": "पारदर्शिता", + "onchainLearnMoreContent2": "लेनदेन पूरी तरह से ब्लॉकचेन पर दर्ज होते हैं।", + "onchainLearnMoreLabel3": "सबसे उपयुक्त", + "onchainLearnMoreContent3": "दीर्घकालिक भंडारण और सुरक्षित बड़े लेनदेन।", + "onchainLearnMoreContent4": "ऑन-चेन स्व-कस्टडी के साथ अपने बिटकॉइन पर पूर्ण नियंत्रण रखें।", + "lnLearnMoreSubtitle": "एक लाइटनिंग वॉलेट तेज़ और किफायती बिटकॉइन लेन-देन प्रदान करता है, साथ ही आपके धन पर पूर्ण नियंत्रण बनाए रखता है।", + "lnLearnMoreLabel1": "स्व-कस्टडी", + "lnLearnMoreContent1": "आप अपनी निजी चाबियाँ रखते हैं, जो पूर्ण स्वामित्व और सुरक्षा सुनिश्चित करती हैं।", + "lnLearnMoreLabel2": "त्वरित लेन-देन", + "lnLearnMoreContent2": "न्यूनतम शुल्क के साथ त्वरित भुगतान के लिए बिल्कुल उपयुक्त।", + "lnLearnMoreLabel3": "सबसे उपयुक्त", + "lnLearnMoreContent3": "दैनिक माइक्रोलेन-देन और तेज़ हस्तांतरण।", + "lnLearnMoreContent4": "लाइटनिंग नेटवर्क पर स्व-कस्टडी के साथ बिटकॉइन की गति और दक्षता का आनंद लें।", + "supportLearnMoreSubtitle": "एक समर्थित वॉलेट रिले सेवाओं का उपयोग करके संपत्ति प्रबंधन के लिए सुविधा और सुरक्षा के बीच संतुलन प्रदान करता है।", + "supportLearnMoreLabel1": "साझा कस्टडी", + "supportLearnMoreContent1": "कस्टडी को एक विश्वसनीय रिले की मदद से प्रबंधित किया जाता है, जिससे वॉलेट प्रबंधन आसान हो जाता है।", + "supportLearnMoreLabel2": "उपयोग में सरलता", + "supportLearnMoreContent2": "उन उपयोगकर्ताओं के लिए आदर्श जो सीधे सेटअप और न्यूनतम जटिलता पसंद करते हैं।", + "supportLearnMoreLabel3": "बैकअप समर्थन", + "supportLearnMoreContent3": "रिले-आधारित बैकअप संपत्ति पुनर्प्राप्ति और सुरक्षित प्रबंधन सुनिश्चित करता है।", + "supportLearnMoreContent4": "समर्थित मोड में उन्नत सुरक्षा के साथ एक उपयोगकर्ता-अनुकूल अनुभव का आनंद लें।" }, "home": { "addAssets": "संपत्ति प्राप्त करें", @@ -257,7 +281,9 @@ "step1": "चरण 1", "step2": "चरण 2", "activateWalletTypeLabel": "वॉलेट प्रकार", - "copyWalletIDMsg": "वॉलेट ID सफलतापूर्वक कॉपी किया गया!" + "copyWalletIDMsg": "वॉलेट ID सफलतापूर्वक कॉपी किया गया!", + "walletBackupSuccessMsg": "आपका वॉलेट सफलतापूर्वक बैकअप किया गया है", + "assetBackupSuccessMsg": "आपके RGB संपत्तियां सफलतापूर्वक बैकअप की गई हैं" }, "receciveScreen": { "headerSubTitle": "QR स्कैन करें", @@ -293,6 +319,7 @@ "sendSuccessSubTitle": "लेन-देन को सफलतापूर्वक प्रसारित कर दिया गया है", "invalidBtcAddress": "अमान्य बिटकॉइन पता", "invalidRGBInvoiceAddress": "अमान्य RGB इनवॉइस", + "invalidBtcAndRgbInput": "अमान्य बिटकॉइन पता या आरजीबी चालान।", "sentSuccessfully": "सफलतापूर्वक भेजा गया", "amountMoreThanSpend": "दर्ज की गई राशि खर्च करने के लिए उपलब्ध राशि से अधिक है", "transFeeErrMsg": "त्रुटि: लेनदेन शुल्क इंटेल गायब है", @@ -372,7 +399,7 @@ "transferDetails": "स्थानांतरण विवरण", "viewUnspent": "अनस्पेंट UTXOs देखें", "walletRefreshMsg": "वॉलेट सफलतापूर्वक अपडेट किया गया", - "unspentTitle": "आरजीबी यूटीएक्सओ की सूची", + "unspentTitle": "UTXOs का अवलोकन", "satsAmount": "सैट्स राशि", "rgbAssetID": "आरजीबी एसेट आईडी", "testSatsRecived": "टेस्ट-सैट्स प्राप्त हुए", @@ -384,7 +411,11 @@ "bitcoin": "बिटकॉइन", "reserveAmtText": "संपत्ति लेनदेन के लिए आरक्षित", "requestTSatsTitle": "टेस्ट सैट्स का अनुरोध करें", - "requestTSatSubTitle": "कृपया टेस्ट सैट्स प्राप्त करने और RGB के साथ खेलने का आनंद लेने के लिए हमारे टेलीग्राम समूह में शामिल हों।" + "requestTSatSubTitle": "कृपया टेस्ट सैट्स प्राप्त करने और RGB के साथ खेलने का आनंद लेने के लिए हमारे टेलीग्राम समूह में शामिल हों।", + "coloured": "रंगीन", + "unColoured": "बिना रंग का", + "availableTxnFee": "उपलब्ध लेन-देन शुल्क", + "output": "आउटपुट" }, "assets": { "assetCreateMsg": "संपत्ति सफलतापूर्वक बनाई गई", diff --git a/src/loc/content/it.json b/src/loc/content/it.json index a2885609..878f0084 100644 --- a/src/loc/content/it.json +++ b/src/loc/content/it.json @@ -133,7 +133,31 @@ "recoverLoadingSubTitle": "Attendi un momento mentre completiamo il processo di recupero. Evita di chiudere l'app per garantire che tutto funzioni correttamente. Grazie per la tua pazienza!", "onchainLearMoreInfo": "Un portafoglio sicuro per tutte le tue transazioni Bitcoin.", "lightningLearnMoreInfo": "Transazioni veloci e a basso costo per importi ridotti.", - "supportLearnMoreInfo": "Un portafoglio compatibile con altre applicazioni Bitcoin." + "supportLearnMoreInfo": "Un portafoglio compatibile con altre applicazioni Bitcoin.", + "onChainLearnMoreSubTitle": "Un wallet On-Chain garantisce il pieno controllo dei tuoi Bitcoin conservandoli in modo sicuro sulla blockchain di Bitcoin.", + "onchainLearnMoreLabel1": "Auto-custodia", + "onchainLearnMoreContent1": "Possiedi le tue chiavi private per la massima sicurezza.", + "onchainLearnMoreLabel2": "Trasparenza", + "onchainLearnMoreContent2": "Le transazioni sono completamente registrate sulla blockchain.", + "onchainLearnMoreLabel3": "Ideale per", + "onchainLearnMoreContent3": "Conservazione a lungo termine e transazioni sicure di grandi importi.", + "onchainLearnMoreContent4": "Prendi il pieno controllo dei tuoi Bitcoin con l'auto-custodia on-chain.", + "lnLearnMoreSubtitle": "Un portafoglio Lightning offre transazioni Bitcoin veloci ed economiche, mantenendo il pieno controllo sui tuoi fondi.", + "lnLearnMoreLabel1": "Auto-custodia", + "lnLearnMoreContent1": "Tieni le tue chiavi private, garantendo proprietà e sicurezza complete.", + "lnLearnMoreLabel2": "Transazioni istantanee", + "lnLearnMoreContent2": "Perfetto per pagamenti rapidi con commissioni minime.", + "lnLearnMoreLabel3": "Ideale per", + "lnLearnMoreContent3": "Microtransazioni quotidiane e trasferimenti rapidi.", + "lnLearnMoreContent4": "Goditi la velocità e l'efficienza di Bitcoin con l'auto-custodia sulla rete Lightning.", + "supportLearnMoreSubtitle": "Un wallet supportato offre un equilibrio tra comodità e sicurezza sfruttando i servizi di relay per la gestione degli asset.", + "supportLearnMoreLabel1": "Custodia condivisa", + "supportLearnMoreContent1": "La custodia è gestita con l'aiuto di un relay affidabile, semplificando la gestione del wallet.", + "supportLearnMoreLabel2": "Facilità d'uso", + "supportLearnMoreContent2": "Ideale per utenti che preferiscono una configurazione semplice e una complessità minima.", + "supportLearnMoreLabel3": "Supporto di backup", + "supportLearnMoreContent3": "I backup basati su relay garantiscono il recupero degli asset e una gestione sicura.", + "supportLearnMoreContent4": "Goditi un'esperienza intuitiva con una maggiore sicurezza in modalità supportata." }, "home": { "addAssets": "Ricevi asset", @@ -257,7 +281,9 @@ "step1": "Passo 1", "step2": "Passo 2", "activateWalletTypeLabel": "Tipo di Wallet", - "copyWalletIDMsg": "ID del portafoglio copiato con successo!" + "copyWalletIDMsg": "ID del portafoglio copiato con successo!", + "walletBackupSuccessMsg": "Il tuo portafoglio è stato correttamente salvato", + "assetBackupSuccessMsg": "I tuoi asset RGB sono stati correttamente salvati" }, "receciveScreen": { "headerSubTitle": "Scansiona QR", @@ -293,6 +319,7 @@ "sendSuccessSubTitle": "La transazione è stata trasmessa con successo", "invalidBtcAddress": "Indirizzo Bitcoin non valido", "invalidRGBInvoiceAddress": "Fattura RGB non valida", + "invalidBtcAndRgbInput": "Indirizzo Bitcoin o fattura RGB non valido.", "sentSuccessfully": "Inviato con successo", "amountMoreThanSpend": "L'importo inserito è superiore a quello disponibile per la spesa", "transFeeErrMsg": "Errore: Intel mancante per la tassa di transazione", @@ -372,7 +399,7 @@ "transferDetails": "Dettagli trasferimento", "viewUnspent": "Visualizza UTXO non spesi", "walletRefreshMsg": "Portafoglio aggiornato con successo", - "unspentTitle": "Elenco di RGB UTXO", + "unspentTitle": "Panoramica UTXOs", "satsAmount": "Importo Sats", "rgbAssetID": "ID risorsa RGB", "testSatsRecived": "Test-sats ricevuti", @@ -384,7 +411,11 @@ "bitcoin": "Bitcoin", "reserveAmtText": "Riservato per le transazioni di asset", "requestTSatsTitle": "Richiedi Test Sats", - "requestTSatSubTitle": "Unisciti al nostro gruppo Telegram per ricevere test sats e divertirti con RGB." + "requestTSatSubTitle": "Unisciti al nostro gruppo Telegram per ricevere test sats e divertirti con RGB.", + "coloured": "Colorato", + "unColoured": "Non colorato", + "availableTxnFee": "Commissione di transazione disponibile", + "output": "Uscita" }, "assets": { "assetCreateMsg": "Risorsa creata con successo", diff --git a/src/loc/content/ja.json b/src/loc/content/ja.json index eaecdd37..3834e349 100644 --- a/src/loc/content/ja.json +++ b/src/loc/content/ja.json @@ -133,7 +133,31 @@ "recoverLoadingSubTitle": "復元プロセスを完了するまでしばらくお待ちください。すべてがスムーズに進むよう、アプリを閉じないでください。ご理解とご協力に感謝いたします!", "onchainLearMoreInfo": "すべてのビットコイン取引に対応する安全なウォレット。", "lightningLearnMoreInfo": "少額の取引に最適な高速で低コストなソリューション。", - "supportLearnMoreInfo": "他のビットコインアプリケーションと互換性のあるウォレット。" + "supportLearnMoreInfo": "他のビットコインアプリケーションと互換性のあるウォレット。", + "onChainLearnMoreSubTitle": "オンチェーンウォレットは、ビットコインをビットコインブロックチェーン上に安全に保管することで、ビットコインの完全な管理を保証します。", + "onchainLearnMoreLabel1": "自己管理", + "onchainLearnMoreContent1": "あなたのプライベートキーを所有しているため、究極のセキュリティが保証されます。", + "onchainLearnMoreLabel2": "透明性", + "onchainLearnMoreContent2": "取引はブロックチェーンに完全に記録されます。", + "onchainLearnMoreLabel3": "最適な用途", + "onchainLearnMoreContent3": "長期保管と安全な大規模取引に最適です。", + "onchainLearnMoreContent4": "オンチェーンでの自己管理により、ビットコインを完全にコントロールしましょう。", + "lnLearnMoreSubtitle": "ライトニングウォレットは、高速で費用対効果の高いビットコイン取引を提供しながら、資金を完全に管理できます。", + "lnLearnMoreLabel1": "自己管理", + "lnLearnMoreContent1": "あなたはプライベートキーを保持し、完全な所有権とセキュリティを確保します。", + "lnLearnMoreLabel2": "即時取引", + "lnLearnMoreContent2": "最小限の手数料で迅速な支払いに最適です。", + "lnLearnMoreLabel3": "最適な用途", + "lnLearnMoreContent3": "日常の少額取引や迅速な送金に適しています。", + "lnLearnMoreContent4": "ライトニングネットワークで自己管理しながら、ビットコインのスピードと効率を楽しんでください。", + "supportLearnMoreSubtitle": "サポートされているウォレットは、リレーサービスを活用して資産管理を行うことで、利便性とセキュリティのバランスを提供します。", + "supportLearnMoreLabel1": "共有管理", + "supportLearnMoreContent1": "信頼できるリレーを活用して管理を行い、ウォレット管理を簡素化します。", + "supportLearnMoreLabel2": "使いやすさ", + "supportLearnMoreContent2": "シンプルなセットアップと最小限の複雑さを好むユーザーに最適です。", + "supportLearnMoreLabel3": "バックアップサポート", + "supportLearnMoreContent3": "リレーベースのバックアップにより、資産の回復と安全な管理が保証されます。", + "supportLearnMoreContent4": "サポートモードで強化されたセキュリティと使いやすさをお楽しみください。" }, "home": { "addAssets": "資産を受け取る", @@ -257,7 +281,9 @@ "step1": "ステップ 1", "step2": "ステップ 2", "activateWalletTypeLabel": "ウォレットタイプ", - "copyWalletIDMsg": "ウォレット ID が正常にコピーされました!" + "copyWalletIDMsg": "ウォレット ID が正常にコピーされました!", + "walletBackupSuccessMsg": "あなたのウォレットは正常にバックアップされました", + "assetBackupSuccessMsg": "あなたのRGB資産は正常にバックアップされました" }, "receciveScreen": { "headerSubTitle": "QRをスキャン", @@ -293,6 +319,7 @@ "sendSuccessSubTitle": "取引が正常にブロードキャストされました", "invalidBtcAddress": "無効なビットコインアドレス", "invalidRGBInvoiceAddress": "無効なRGBインボイス", + "invalidBtcAndRgbInput": "無効なビットコインアドレスまたはRGB請求書です。", "sentSuccessfully": "正常に送信されました", "amountMoreThanSpend": "入力された金額が利用可能な金額を超えています", "transFeeErrMsg": "エラー: 取引手数料の情報が不足しています", @@ -372,7 +399,7 @@ "transferDetails": "転送の詳細", "viewUnspent": "未使用UTXOを表示", "walletRefreshMsg": "ウォレットが正常に更新されました", - "unspentTitle": "RGB UTXOの一覧", + "unspentTitle": "未使用トランザクション出力(UTXO)の概要", "satsAmount": "サットの金額", "rgbAssetID": "RGBアセットID", "testSatsRecived": "テストサットを受信しました", @@ -384,7 +411,11 @@ "bitcoin": "ビットコイン", "reserveAmtText": "資産取引のために予約済み", "requestTSatsTitle": "テストサッツをリクエスト", - "requestTSatSubTitle": "テストサッツを受け取り、RGBを楽しむために、私たちのTelegramグループに参加してください。" + "requestTSatSubTitle": "テストサッツを受け取り、RGBを楽しむために、私たちのTelegramグループに参加してください。", + "coloured": "カラード", + "unColoured": "無色", + "availableTxnFee": "利用可能な取引手数料", + "output": "出力" }, "assets": { "assetCreateMsg": "アセットが正常に作成されました", diff --git a/src/models/interfaces/RGBWallet.ts b/src/models/interfaces/RGBWallet.ts index a3f818dd..163137f4 100644 --- a/src/models/interfaces/RGBWallet.ts +++ b/src/models/interfaces/RGBWallet.ts @@ -137,7 +137,7 @@ export interface RgbUnspent { export enum AssetType { Coin = 'Coin', Collectible = 'Collectible', - UDA = 'UDA' + UDA = 'UDA', } export enum AssetFace { @@ -145,12 +145,17 @@ export enum AssetFace { RGB20 = 'RGB20', } +export enum UtxoType { + Coloured = 'Coloured', + Uncoloured = 'Uncoloured', +} + export interface RgbNodeConnectParams { nodeUrl: string; nodeId: string; authentication: string; peerDNS?: string; - mnemonic?: string + mnemonic?: string; } export interface NodeInfo { diff --git a/src/navigation/NavigationRoutes.ts b/src/navigation/NavigationRoutes.ts index 1b2a66d4..298d6a2f 100644 --- a/src/navigation/NavigationRoutes.ts +++ b/src/navigation/NavigationRoutes.ts @@ -62,5 +62,8 @@ export enum NavigationRoutes { SENDBTCSCREEN = 'SENDBTCSCREEN', LIGHTNINGSEND = 'LIGHTNINGSEND', IMPORTRGBBACKUP = 'IMPORTRGBBACKUP', - VIEWLOGS = 'VIEWLOGS' + VIEWLOGS = 'VIEWLOGS', + ONCHAINLEARNMORE = 'ONCHAINLEARNMORE', + LNLEARNMORE = 'LNLEARNMORE', + SUPPORTLEARNMORE = 'SUPPORTLEARNMORE', } diff --git a/src/navigation/Navigator.tsx b/src/navigation/Navigator.tsx index 6886fc84..a891ca83 100644 --- a/src/navigation/Navigator.tsx +++ b/src/navigation/Navigator.tsx @@ -64,6 +64,9 @@ import RGBWalletStatus from 'src/components/RGBWalletOffline'; import OnboardingSlides from 'src/screens/onBoarding/OnboardingSlides'; import ImportRgbBackup from 'src/screens/onBoarding/ImportRgbBackup'; import ViewLogs from 'src/screens/settings/ViewLogs'; +import OnchainLearnMore from 'src/screens/onBoarding/OnchainLearnMore'; +import LNLearnMore from 'src/screens/onBoarding/LNLearnMore'; +import SupportLearnMore from 'src/screens/onBoarding/SupportLearnMore'; import { Keys } from 'src/storage'; import { useMMKVBoolean } from 'react-native-mmkv'; import { useTheme } from 'react-native-paper'; @@ -111,6 +114,18 @@ function LoginStack() { name={NavigationRoutes.IMPORTRGBBACKUP} component={ImportRgbBackup} /> + + + ); } diff --git a/src/navigation/types.ts b/src/navigation/types.ts index f3cbe6d1..13b8dc5a 100644 --- a/src/navigation/types.ts +++ b/src/navigation/types.ts @@ -54,7 +54,9 @@ export type AppStackParams = { [NavigationRoutes.LIGHTNINGRECEIVE]: undefined; [NavigationRoutes.SUPPORTTERMANDCONDITION]: undefined; [NavigationRoutes.SENDBTCSCREEN]: undefined; - + [NavigationRoutes.ONCHAINLEARNMORE]: undefined; + [NavigationRoutes.LNLEARNMORE]: undefined; + [NavigationRoutes.SUPPORTLEARNMORE]: undefined; // Add other routes as needed }; diff --git a/src/screens/assets/CoinDetailsHeader.tsx b/src/screens/assets/CoinDetailsHeader.tsx index c6f39bbf..c7cd35c9 100644 --- a/src/screens/assets/CoinDetailsHeader.tsx +++ b/src/screens/assets/CoinDetailsHeader.tsx @@ -1,98 +1,250 @@ import React, { useContext } from 'react'; -import { View, StyleSheet, Platform } from 'react-native'; +import { View, StyleSheet } from 'react-native'; import { useTheme } from 'react-native-paper'; -import { useNavigation } from '@react-navigation/native'; +import { useMMKVBoolean } from 'react-native-mmkv'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { useQuery as realmUseQuery } from '@realm/react'; -import AppText from 'src/components/AppText'; -import { NavigationRoutes } from 'src/navigation/NavigationRoutes'; import { AppTheme } from 'src/theme'; import { LocalizationContext } from 'src/contexts/LocalizationContext'; -import { hp } from 'src/constants/responsive'; -import TransactionButtons from '../wallet/components/TransactionButtons'; -import { Coin } from 'src/models/interfaces/RGBWallet'; -import Toolbar from './Toolbar'; +import { hp, wp } from 'src/constants/responsive'; +import { Coin, Collectible } from 'src/models/interfaces/RGBWallet'; +import AppHeader from 'src/components/AppHeader'; +import IconBTC from 'src/assets/images/icon_btc_new.svg'; +import IconLightning from 'src/assets/images/icon_lightning_new.svg'; +import { Keys } from 'src/storage'; +import AppText from 'src/components/AppText'; import { numberWithCommas } from 'src/utils/numberWithCommas'; -import { Wallet } from 'src/services/wallets/interfaces/wallet'; +import TransactionButtons from 'src/screens/wallet/components/TransactionButtons'; +import InfoIcon from 'src/assets/images/infoIcon.svg'; +import InfoIconLight from 'src/assets/images/infoIcon_light.svg'; +import Identicon from 'src/components/Identicon'; +import AppType from 'src/models/enums/AppType'; +import { RealmSchema } from 'src/storage/enum'; +import { TribeApp } from 'src/models/interfaces/TribeApp'; +import AppTouchable from 'src/components/AppTouchable'; -type CoinDetailsHeaderProps = { - coin: Coin; - wallet: Wallet; - onPressSetting: () => void; +type assetDetailsHeaderProps = { + asset?: Coin | Collectible; + onPressSetting?: () => void; + onPressSend: () => void; + onPressRecieve: () => void; onPressBuy?: () => void; + smallHeaderOpacity?: any; + largeHeaderHeight?: any; + headerRightIcon?: React.ReactNode; }; -function CoinDetailsHeader(props: CoinDetailsHeaderProps) { - const navigation = useNavigation(); +function CoinDetailsHeader(props: assetDetailsHeaderProps) { + const { + asset, + onPressSetting, + onPressSend, + onPressRecieve, + onPressBuy, + smallHeaderOpacity, + largeHeaderHeight, + headerRightIcon, + } = props; + const insets = useSafeAreaInsets(); const { translations } = useContext(LocalizationContext); const { home } = translations; + const [isThemeDark] = useMMKVBoolean(Keys.THEME_MODE); const theme: AppTheme = useTheme(); - const styles = getStyles(theme); - const { coin, wallet, onPressSetting, onPressBuy } = props; + const combinedBalance = + asset.balance.future + asset.balance?.offchainOutbound || 0; + const lengthOfTotalBalance = combinedBalance.toString().length; + const app: TribeApp = realmUseQuery(RealmSchema.TribeApp)[0]; + const styles = getStyles(theme, insets, lengthOfTotalBalance); + return ( - - - - {coin.name} - - - - {home.totalBalance} - + <> + {/* + + */} + + : } + onSettingsPress={onPressSetting} + /> + + + {app.appType === AppType.NODE_CONNECT ? ( + + + + {numberWithCommas( + asset.balance.future + asset.balance?.offchainOutbound, + )} + + + {home.totalBalance} + + + + + + + 0.0000 + + + + + + 0.0000 + + + + + ) : ( + + + + + + + + + + {asset.ticker} + + + {asset.name} + + + + {}}> + + + {numberWithCommas( + asset.balance.future + asset.balance?.offchainOutbound, + )} + + + + {home.totalBalance} + + + + )} + + + + + - - 10 ? 24 : 39, - }, - ]}> - {numberWithCommas( - coin.balance.future + coin.balance?.offchainOutbound, - )} - - - - navigation.navigate(NavigationRoutes.SCANASSET, { - assetId: coin.assetId, - rgbInvoice: '', - wallet: wallet, - }) - } - // onPressBuy={onPressBuy} - onPressRecieve={() => - navigation.navigate(NavigationRoutes.RECEIVEASSET, { - refresh: true, - }) - } - /> - + ); } -const getStyles = (theme: AppTheme) => +const getStyles = (theme: AppTheme, insets, lengthOfTotalBalance) => StyleSheet.create({ - container: { + smallHeader: { + position: 'absolute', + top: insets.top, + left: 0, + right: 0, alignItems: 'center', + zIndex: 10, + paddingHorizontal: hp(16), + backgroundColor: theme.colors.primaryBackground, + }, + largeHeader: { + alignItems: 'center', + height: '50%', + }, + largeHeaderContainer: { + borderColor: theme.colors.borderColor, + borderWidth: 1, + borderRadius: hp(20), width: '100%', - paddingBottom: Platform.OS === 'android' ? 0 : 10, + paddingVertical: hp(10), }, - usernameText: { - color: theme.colors.accent3, - textAlign: 'center', - marginVertical: 10, + largeHeaderContentWrapper: { + paddingHorizontal: hp(10), + paddingVertical: hp(15), + width: '100%', + borderRadius: hp(40), + // overflow: 'visible', + position: 'relative', + }, + totalBalance: { + color: theme.colors.headingColor, + }, + totalBalanceLabel: { + color: theme.colors.secondaryHeadingColor, + }, + balanceText: { + color: theme.colors.headingColor, + marginLeft: hp(5), + }, + balanceContainer: { + flexDirection: 'row', + width: '100%', + marginVertical: hp(10), + }, + totalBalanceWrapper: { + width: '50%', + borderRightWidth: 1, + borderRightColor: theme.colors.borderColor, + alignItems: 'center', + }, + totalBalanceWrapper1: { + flexDirection: 'row', + alignItems: 'center', + }, + modeBalanceWrapper: { + width: '50%', + alignItems: 'center', }, balanceWrapper: { flexDirection: 'row', alignItems: 'center', - marginBottom: hp(10), }, - balanceText: { + transCtaWrapper: { + marginTop: hp(15), + alignItems: 'center', + }, + identiconWrapper: { + alignSelf: 'center', + marginVertical: hp(10), + }, + identiconWrapper2: { + borderColor: theme.colors.coinsBorderColor, + borderWidth: 2, + padding: 5, + borderRadius: 110, + }, + identiconView: { + height: 50, + width: 50, + borderRadius: 50, + }, + assetTickerText: { color: theme.colors.headingColor, + textAlign: 'center', }, - totalBalText: { + assetNameText: { color: theme.colors.secondaryHeadingColor, - fontWeight: '400', + textAlign: 'center', + }, + onChainTotalBalanceWrapper: { + width: '50%', + alignItems: 'center', + justifyContent: 'center', }, }); export default CoinDetailsHeader; diff --git a/src/screens/assets/CoinDetailsScreen.tsx b/src/screens/assets/CoinDetailsScreen.tsx index 6c348007..cd7c57b5 100644 --- a/src/screens/assets/CoinDetailsScreen.tsx +++ b/src/screens/assets/CoinDetailsScreen.tsx @@ -1,11 +1,7 @@ import { Animated, StyleSheet } from 'react-native'; import React, { useContext, useEffect, useRef, useState } from 'react'; import ScreenContainer from 'src/components/ScreenContainer'; -import { - CommonActions, - useNavigation, - useRoute, -} from '@react-navigation/native'; +import { useNavigation, useRoute } from '@react-navigation/native'; import { useObject } from '@realm/react'; import { useMutation } from 'react-query'; import { useMMKVBoolean } from 'react-native-mmkv'; @@ -17,12 +13,12 @@ import TransactionsList from './TransactionsList'; import { NavigationRoutes } from 'src/navigation/NavigationRoutes'; import useWallets from 'src/hooks/useWallets'; import { Wallet } from 'src/services/wallets/interfaces/wallet'; -import AssetDetailsHeader from './components/AssetDetailsHeader'; import AppType from 'src/models/enums/AppType'; import { AppContext } from 'src/contexts/AppContext'; import InfoIcon from 'src/assets/images/infoIcon.svg'; import InfoIconLight from 'src/assets/images/infoIcon_light.svg'; import { Keys } from 'src/storage'; +import CoinDetailsHeader from './CoinDetailsHeader'; const CoinDetailsScreen = () => { const navigation = useNavigation(); @@ -78,10 +74,8 @@ const CoinDetailsScreen = () => { return ( - : } diff --git a/src/screens/assets/components/AssetDetailsHeader.tsx b/src/screens/assets/components/AssetDetailsHeader.tsx index 6e0040d1..907aa230 100644 --- a/src/screens/assets/components/AssetDetailsHeader.tsx +++ b/src/screens/assets/components/AssetDetailsHeader.tsx @@ -7,7 +7,7 @@ import { useQuery as realmUseQuery } from '@realm/react'; import { AppTheme } from 'src/theme'; import { LocalizationContext } from 'src/contexts/LocalizationContext'; -import { hp } from 'src/constants/responsive'; +import { hp, wp } from 'src/constants/responsive'; import { AssetFace, Coin, Collectible } from 'src/models/interfaces/RGBWallet'; import AppHeader from 'src/components/AppHeader'; // import GradientView from 'src/components/GradientView'; @@ -164,6 +164,8 @@ function AssetDetailsHeader(props: assetDetailsHeaderProps) { onPressSend={onPressSend} onPressRecieve={onPressRecieve} onPressBuy={onPressBuy} + sendCtaWidth={wp(150)} + receiveCtaWidth={wp(150)} /> diff --git a/src/screens/assets/components/SelectAssetToSendContainer.tsx b/src/screens/assets/components/SelectAssetToSendContainer.tsx index c196d39d..643c2cbb 100644 --- a/src/screens/assets/components/SelectAssetToSendContainer.tsx +++ b/src/screens/assets/components/SelectAssetToSendContainer.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useMemo } from 'react'; +import React, { useContext } from 'react'; import { FlatList, Image, @@ -8,14 +8,16 @@ import { View, } from 'react-native'; import { useTheme } from 'react-native-paper'; +import { useMMKVBoolean } from 'react-native-mmkv'; +import { useNavigation } from '@react-navigation/native'; import EmptyStateView from 'src/components/EmptyStateView'; import NoAssetsIllustration from 'src/assets/images/noAssets.svg'; +import NoAssetsIllustrationLight from 'src/assets/images/noAssets_light.svg'; import { LocalizationContext } from 'src/contexts/LocalizationContext'; import { Asset, AssetFace } from 'src/models/interfaces/RGBWallet'; import { AppTheme } from 'src/theme'; import AppText from 'src/components/AppText'; -import { useNavigation, useRoute } from '@react-navigation/native'; import { NavigationRoutes } from 'src/navigation/NavigationRoutes'; import { hp } from 'src/constants/responsive'; import GradientView from 'src/components/GradientView'; @@ -24,6 +26,7 @@ import { Wallet } from 'src/services/wallets/interfaces/wallet'; import AssetChip from 'src/components/AssetChip'; import Capitalize from 'src/utils/capitalizeUtils'; import Identicon from 'src/components/Identicon'; +import { Keys } from 'src/storage'; type selectAssetsProps = { assetsData: Asset[]; @@ -119,6 +122,7 @@ function SelectAssetToSendContainer(props: selectAssetsProps) { const { assetsData, wallet, rgbInvoice, amount } = props; const navigation = useNavigation(); const theme: AppTheme = useTheme(); + const [isThemeDark] = useMMKVBoolean(Keys.THEME_MODE); const styles = React.useMemo(() => getStyles(theme), [theme]); const { translations } = useContext(LocalizationContext); const { assets, home } = translations; @@ -138,7 +142,13 @@ function SelectAssetToSendContainer(props: selectAssetsProps) { } + IllustartionImage={ + isThemeDark ? ( + + ) : ( + + ) + } /> } renderItem={({ item, index }) => ( diff --git a/src/screens/collectiblesCoins/UnspentUTXOElement.tsx b/src/screens/collectiblesCoins/UnspentUTXOElement.tsx index 703b10f9..24a9a017 100644 --- a/src/screens/collectiblesCoins/UnspentUTXOElement.tsx +++ b/src/screens/collectiblesCoins/UnspentUTXOElement.tsx @@ -1,13 +1,21 @@ import * as React from 'react'; import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'; +import { useMMKVBoolean, useMMKVString } from 'react-native-mmkv'; import { useTheme } from 'react-native-paper'; + import AppText from 'src/components/AppText'; import GradientView from 'src/components/GradientView'; import { hp } from 'src/constants/responsive'; +import useBalance from 'src/hooks/useBalance'; +import CurrencyKind from 'src/models/enums/CurrencyKind'; import { Asset } from 'src/models/interfaces/RGBWallet'; - +import { Keys } from 'src/storage'; +import IconBitcoin from 'src/assets/images/icon_btc2.svg'; +import IconBitcoinLight from 'src/assets/images/icon_btc2_light.svg'; import { AppTheme } from 'src/theme'; import { numberWithCommas } from 'src/utils/numberWithCommas'; +import { LocalizationContext } from 'src/contexts/LocalizationContext'; +import AllocatedAssets from './components/AllocatedAssets'; type UnspentUTXOElementProps = { transID: string; @@ -25,13 +33,23 @@ function UnspentUTXOElement({ }: UnspentUTXOElementProps) { const theme: AppTheme = useTheme(); const styles = React.useMemo(() => getStyles(theme), [theme]); + const { translations } = React.useContext(LocalizationContext); + const { wallet: walletTranslations } = translations; + const { getBalance, getCurrencyIcon } = useBalance(); + const [currentCurrencyMode] = useMMKVString(Keys.CURRENCY_MODE); + const initialCurrencyMode = currentCurrencyMode || CurrencyKind.SATS; + const [isThemeDark] = useMMKVBoolean(Keys.THEME_MODE); const assetMap = React.useMemo(() => { if (!assets) return {}; return assets.reduce((map, asset) => { - map[asset.assetId] = asset.name; + map[asset.assetId] = { + assetId: asset.assetId, // Include assetId + name: asset.name, // Include the name + ...asset, // Include the full asset object if needed + }; return map; - }, {} as Record); + }, {} as Record); }, [assets]); return ( @@ -42,46 +60,88 @@ function UnspentUTXOElement({ theme.colors.cardGradient2, theme.colors.cardGradient3, ]}> - - - - {transID} - - - - -  {numberWithCommas(satsAmount)} sats - - - + {rgbAllocations?.map(allocation => { const assetName = allocation.assetId - ? assetMap[allocation.assetId] + ? assetMap[allocation.assetId]?.name : null; return ( allocation.assetId && ( - - {assetName} - - + + + + {assetName} + + + {numberWithCommas(allocation.amount)} ) ); - }) ?? ( - - )} + }) ?? } + + {rgbAllocations?.some(allocation => allocation?.assetId) + ? rgbAllocations.map((allocation, index) => { + const assetID = allocation?.assetId; + return assetID ? ( + + {assetID} + + ) : null; // Skip invalid allocations + }) + : null} + + + + {walletTranslations.availableTxnFee} + + + + + {initialCurrencyMode !== CurrencyKind.SATS && + getCurrencyIcon( + isThemeDark ? IconBitcoin : IconBitcoinLight, + isThemeDark ? 'dark' : 'light', + )} + 10 ? 11 : 16, + }, + ]}> +  {isNaN(satsAmount) ? 0 : getBalance(satsAmount)} + + {initialCurrencyMode === CurrencyKind.SATS && ( + + sats + + )} + + + + + + + {walletTranslations.output} + + + + + {transID} + + ); @@ -98,6 +158,7 @@ const getStyles = (theme: AppTheme) => contentWrapper: { flexDirection: 'row', width: '100%', + marginVertical: hp(3), }, transIDWrapper: { width: '70%', @@ -113,12 +174,44 @@ const getStyles = (theme: AppTheme) => color: theme.colors.headingColor, }, assetIDText: { - marginTop: hp(3), color: theme.colors.secondaryHeadingColor, }, + labelWrapper: { + width: '30%', + alignItems: 'flex-start', + }, + assetNameText: { + color: theme.colors.headingColor, + marginLeft: hp(10), + }, + labelTextStyle: { + color: theme.colors.secondaryHeadingColor, + }, + assetAmountText: { + color: theme.colors.headingColor, + }, allocationWrapper: { flexDirection: 'row', justifyContent: 'space-between', + marginBottom: hp(12), + }, + allocationWrapper1: { + flexDirection: 'row', + alignItems: 'center', + }, + amtIconWrapper: { + flex: 1, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'flex-end', + }, + satsText: { + color: theme.colors.headingColor, + marginLeft: hp(5), + }, + assetIdStyle: { + marginVertical: hp(3), + color: theme.colors.secondaryHeadingColor, }, }); export default UnspentUTXOElement; diff --git a/src/screens/collectiblesCoins/ViewUnspentScreen.tsx b/src/screens/collectiblesCoins/ViewUnspentScreen.tsx index 75429f5e..80ac01eb 100644 --- a/src/screens/collectiblesCoins/ViewUnspentScreen.tsx +++ b/src/screens/collectiblesCoins/ViewUnspentScreen.tsx @@ -1,14 +1,20 @@ -import React, { useContext, useEffect, useMemo } from 'react'; -import { StyleSheet, FlatList } from 'react-native'; +import React, { useContext, useEffect, useMemo, useState } from 'react'; +import { StyleSheet, FlatList, View } from 'react-native'; import { useTheme } from 'react-native-paper'; import { useMutation } from 'react-query'; import { useMMKVBoolean } from 'react-native-mmkv'; import { useQuery } from '@realm/react'; +import SegmentedButtons from 'src/components/SegmentedButtons'; import ScreenContainer from 'src/components/ScreenContainer'; import AppHeader from 'src/components/AppHeader'; import { ApiHandler } from 'src/services/handler/apiHandler'; -import { Asset, Coin, Collectible } from 'src/models/interfaces/RGBWallet'; +import { + Asset, + Coin, + Collectible, + UtxoType, +} from 'src/models/interfaces/RGBWallet'; import { AppTheme } from 'src/theme'; import { LocalizationContext } from 'src/contexts/LocalizationContext'; import openLink from 'src/utils/OpenLink'; @@ -24,6 +30,7 @@ import dbManager from 'src/storage/realm/dbManager'; import { Keys } from 'src/storage'; import { TribeApp } from 'src/models/interfaces/TribeApp'; import AppType from 'src/models/enums/AppType'; +import ModalLoading from 'src/components/ModalLoading'; const getStyles = (theme: AppTheme) => StyleSheet.create({}); @@ -33,11 +40,15 @@ const ViewUnspentScreen = () => { const { translations } = useContext(LocalizationContext); const { wallet, assets } = translations || { wallet: {}, assets: {} }; const styles = useMemo(() => getStyles(theme), [theme]); + const [utxoType, setUtxoType] = useState(UtxoType.Coloured); const app: TribeApp | undefined = useQuery(RealmSchema.TribeApp)[0]; const coins = useQuery(RealmSchema.Coin); const collectibles = useQuery(RealmSchema.Collectible); - const combined: Asset[] = useMemo(() => [...coins, ...collectibles], [coins, collectibles]); + const combined: Asset[] = useMemo( + () => [...coins, ...collectibles], + [coins, collectibles], + ); const storedWallet = dbManager.getObjectByIndex(RealmSchema.RgbWallet); const UnspentUTXOData = useMemo(() => { @@ -45,6 +56,13 @@ const ViewUnspentScreen = () => { return storedWallet.utxos.map(utxoStr => JSON.parse(utxoStr)); }, [storedWallet]); + const filteredColorableUTXOs = UnspentUTXOData.filter( + utxo => utxo.utxo.colorable === true, + ); + const filteredUnColorableUTXOs = UnspentUTXOData.filter( + utxo => utxo.utxo.colorable === false, + ); + const { mutate, isLoading } = useMutation(ApiHandler.viewUtxos); useEffect(() => { @@ -61,11 +79,41 @@ const ViewUnspentScreen = () => { return ( - + + { + if (value !== utxoType) { + setUtxoType(value); + } else { + } + }} + buttons={[ + { + value: UtxoType.Coloured, + label: wallet.coloured, + }, + { + value: UtxoType.Uncoloured, + label: wallet.unColoured, + }, + ]} + /> + + + ( - redirectToBlockExplorer(item.utxo.outpoint.txid)}> + redirectToBlockExplorer(item.utxo.outpoint.txid)}> { + const theme: AppTheme = useTheme(); + const styles = React.useMemo(() => getStyles(theme), [theme]); + const { assetId, media } = assets; + return ( + + + {media && media.filePath ? ( + + ) : ( + + )} + + + ); +}; + +const getStyles = (theme: AppTheme) => + StyleSheet.create({ + container: {}, + assetImage: { + width: 30, + height: 30, + borderRadius: 30, + backgroundColor: theme.colors.inputBackground, + }, + identiconView: { + height: 30, + width: 30, + borderRadius: 30, + }, + }); + +export default AllocatedAssets; diff --git a/src/screens/onBoarding/LNLearnMore.tsx b/src/screens/onBoarding/LNLearnMore.tsx new file mode 100644 index 00000000..30b9234f --- /dev/null +++ b/src/screens/onBoarding/LNLearnMore.tsx @@ -0,0 +1,65 @@ +import React, { useContext } from 'react'; +import { ScrollView, StyleSheet, View } from 'react-native'; +import { useTheme } from 'react-native-paper'; +import AppHeader from 'src/components/AppHeader'; + +import ScreenContainer from 'src/components/ScreenContainer'; +import { hp } from 'src/constants/responsive'; +import { LocalizationContext } from 'src/contexts/LocalizationContext'; +import { AppTheme } from 'src/theme'; +import LNLearnMoreIllustration from 'src/assets/images/lnLearnMoreIllustration.svg'; +import AppText from 'src/components/AppText'; +import LearnMoreContentSection from './components/LearnMoreContentSection'; + +function LNLearnMore() { + const theme: AppTheme = useTheme(); + const { translations } = useContext(LocalizationContext); + const { onBoarding } = translations; + const styles = getStyles(theme); + return ( + + + + + + {onBoarding.lnLearnMoreSubtitle} + + + } + /> + + + + + + ); +} +const getStyles = (theme: AppTheme) => + StyleSheet.create({ + wrapper: {}, + illustrationWrapper: { + alignItems: 'center', + justifyContent: 'center', + marginVertical: hp(30), + }, + contentWrapper: { + marginVertical: hp(10), + }, + titleText: { + color: theme.colors.headingColor, + marginBottom: hp(3), + }, + subTitleText: { + color: theme.colors.secondaryHeadingColor, + }, + }); +export default LNLearnMore; diff --git a/src/screens/onBoarding/OnchainLearnMore.tsx b/src/screens/onBoarding/OnchainLearnMore.tsx new file mode 100644 index 00000000..2414350b --- /dev/null +++ b/src/screens/onBoarding/OnchainLearnMore.tsx @@ -0,0 +1,64 @@ +import React, { useContext } from 'react'; +import { ScrollView, StyleSheet, View } from 'react-native'; +import { useTheme } from 'react-native-paper'; +import { useMMKVBoolean } from 'react-native-mmkv'; + +import AppHeader from 'src/components/AppHeader'; +import ScreenContainer from 'src/components/ScreenContainer'; +import { hp } from 'src/constants/responsive'; +import { LocalizationContext } from 'src/contexts/LocalizationContext'; +import { AppTheme } from 'src/theme'; +import OnchainLearnMoreIllustration from 'src/assets/images/onchainLearnMoreIllustration.svg'; +import OnchainLearnMoreIllustrationLight from 'src/assets/images/onchainLearnMoreIllustration_light.svg'; +import AppText from 'src/components/AppText'; +import { Keys } from 'src/storage'; +import LearnMoreContentSection from './components/LearnMoreContentSection'; + +function OnchainLearnMore() { + const theme: AppTheme = useTheme(); + const { translations } = useContext(LocalizationContext); + const { onBoarding } = translations; + const styles = getStyles(theme); + const [isThemeDark] = useMMKVBoolean(Keys.THEME_MODE); + return ( + + + + + + {onBoarding.onChainLearnMoreSubTitle} + + + + ) : ( + + ) + } + /> + + + + + + ); +} +const getStyles = (theme: AppTheme) => + StyleSheet.create({ + wrapper: {}, + titleText: { + color: theme.colors.headingColor, + marginBottom: hp(3), + }, + }); +export default OnchainLearnMore; diff --git a/src/screens/onBoarding/SelectWallet.tsx b/src/screens/onBoarding/SelectWallet.tsx index aed389ea..49d9eb10 100644 --- a/src/screens/onBoarding/SelectWallet.tsx +++ b/src/screens/onBoarding/SelectWallet.tsx @@ -108,7 +108,7 @@ function SelectWallet() { /> {}} + onPress={() => navigation.navigate(NavigationRoutes.ONCHAINLEARNMORE)} /> {openAdvanceOptions && ( <> @@ -132,7 +132,9 @@ function SelectWallet() { /> {}} + onPress={() => + navigation.navigate(NavigationRoutes.LNLEARNMORE) + } /> {}} + onPress={() => + navigation.navigate(NavigationRoutes.SUPPORTLEARNMORE) + } /> diff --git a/src/screens/onBoarding/SupportLearnMore.tsx b/src/screens/onBoarding/SupportLearnMore.tsx new file mode 100644 index 00000000..c6b69fa9 --- /dev/null +++ b/src/screens/onBoarding/SupportLearnMore.tsx @@ -0,0 +1,65 @@ +import React, { useContext } from 'react'; +import { ScrollView, StyleSheet, View } from 'react-native'; +import { useTheme } from 'react-native-paper'; +import AppHeader from 'src/components/AppHeader'; + +import ScreenContainer from 'src/components/ScreenContainer'; +import { hp } from 'src/constants/responsive'; +import { LocalizationContext } from 'src/contexts/LocalizationContext'; +import { AppTheme } from 'src/theme'; +import SupportIllustration from 'src/assets/images/supportLearnMoreIllustration.svg'; +import AppText from 'src/components/AppText'; +import LearnMoreContentSection from './components/LearnMoreContentSection'; + +function SupportLearnMore() { + const theme: AppTheme = useTheme(); + const { translations } = useContext(LocalizationContext); + const { onBoarding } = translations; + const styles = getStyles(theme); + return ( + + + + + + {onBoarding.supportLearnMoreSubtitle} + + + } + /> + + + + + + ); +} +const getStyles = (theme: AppTheme) => + StyleSheet.create({ + wrapper: {}, + illustrationWrapper: { + alignItems: 'center', + justifyContent: 'center', + marginVertical: hp(30), + }, + contentWrapper: { + marginVertical: hp(10), + }, + titleText: { + color: theme.colors.headingColor, + marginBottom: hp(3), + }, + subTitleText: { + color: theme.colors.secondaryHeadingColor, + }, + }); +export default SupportLearnMore; diff --git a/src/screens/onBoarding/components/LearnMoreContentSection.tsx b/src/screens/onBoarding/components/LearnMoreContentSection.tsx new file mode 100644 index 00000000..cb93bbc5 --- /dev/null +++ b/src/screens/onBoarding/components/LearnMoreContentSection.tsx @@ -0,0 +1,59 @@ +import React from 'react'; +import { StyleSheet, View } from 'react-native'; +import AppText from 'src/components/AppText'; +import { AppTheme } from 'src/theme'; +import { hp } from 'src/constants/responsive'; +import { useTheme } from 'react-native-paper'; + +interface ContentSectionProps { + title: string; + subtitle?: string; + illustration?: React.ReactNode; +} + +const LearnMoreContentSection: React.FC = ({ + title, + subtitle, + illustration, +}) => { + const theme: AppTheme = useTheme(); + const styles = getStyles(theme); + return ( + + {illustration && ( + {illustration} + )} + + + {title} + + {subtitle && ( + + {subtitle} + + )} + + + ); +}; + +const getStyles = (theme: AppTheme) => + StyleSheet.create({ + illustrationWrapper: { + alignItems: 'center', + justifyContent: 'center', + marginVertical: hp(30), + }, + contentWrapper: { + marginVertical: hp(10), + }, + titleText: { + color: theme.colors.headingColor, + marginBottom: hp(3), + }, + subTitleText: { + color: theme.colors.secondaryHeadingColor, + }, + }); + +export default LearnMoreContentSection; diff --git a/src/screens/onBoarding/components/LearnMoreTextView.tsx b/src/screens/onBoarding/components/LearnMoreTextView.tsx index fd90ecef..6bf4b790 100644 --- a/src/screens/onBoarding/components/LearnMoreTextView.tsx +++ b/src/screens/onBoarding/components/LearnMoreTextView.tsx @@ -21,9 +21,9 @@ function LearnMoreTextView(props: LearnMoreTextViewProps) { {title}  - {/* + {onBoarding.learnMore} - */} + ); diff --git a/src/screens/onBoarding/components/UseRGBAssetPopupContainer.tsx b/src/screens/onBoarding/components/UseRGBAssetPopupContainer.tsx index 66888739..87595917 100644 --- a/src/screens/onBoarding/components/UseRGBAssetPopupContainer.tsx +++ b/src/screens/onBoarding/components/UseRGBAssetPopupContainer.tsx @@ -5,11 +5,13 @@ import { useTheme } from 'react-native-paper'; import AppText from 'src/components/AppText'; import UseRGBAssetIllustration from 'src/assets/images/useRGBAsset.svg'; +import UseRGBAssetIllustrationLight from 'src/assets/images/useRGBAsset_light.svg'; import { hp } from 'src/constants/responsive'; import { LocalizationContext } from 'src/contexts/LocalizationContext'; import { Keys } from 'src/storage'; import { AppTheme } from 'src/theme'; import SecondaryCTA from 'src/components/SecondaryCTA'; +import PrimaryCTA from 'src/components/PrimaryCTA'; type UseRGBAssetProps = { title: string; @@ -35,10 +37,14 @@ function UseRGBAssetPopupContainer(props: UseRGBAssetProps) { - + {isThemeDark ? ( + + ) : ( + + )} - (RealmSchema.Coin); const collectibles = useQuery(RealmSchema.Collectible); const allAssets: Asset[] = [...coins, ...collectibles]; - const handlePaymentInfo = useCallback( async (input: { codes?: Code[]; paymentInfo?: string }) => { + setIsScanning(false); const { codes, paymentInfo } = input; const value = paymentInfo || codes?.[0]?.value; if (!value) { + setIsScanning(true); return; } if (value.startsWith('rgb:')) { - setValidatingInvoiceLoader(true); + // setValidatingInvoiceLoader(true); const res = await ApiHandler.decodeInvoice(value); if (res.assetId) { const assetData = allAssets.find( item => item.assetId === res.assetId, ); if (!assetData) { - setValidatingInvoiceLoader(false); + // setValidatingInvoiceLoader(false); + setIsScanning(true); Toast(assets.assetNotFoundMsg, true); - setTimeout(() => { - navigation.goBack(); - }, 1000); + navigation.goBack(); } else { - setValidatingInvoiceLoader(false); - setTimeout(() => { - navigation.replace(NavigationRoutes.SENDASSET, { - assetId: res.assetId, - wallet: wallet, - rgbInvoice: value, - amount: res.amount.toString(), - }); - }, 1000); - } - } else { - setValidatingInvoiceLoader(false); - setTimeout(() => { - navigation.replace(NavigationRoutes.SELECTASSETTOSEND, { - wallet, + // setValidatingInvoiceLoader(false); + setIsScanning(true); + navigation.replace(NavigationRoutes.SENDASSET, { + assetId: res.assetId, + wallet: wallet, rgbInvoice: value, - assetID: '', - amount: '', + amount: res.amount.toString(), }); - }, 1000); + } + } else { + // setValidatingInvoiceLoader(false); + setIsScanning(true); + navigation.replace(NavigationRoutes.SELECTASSETTOSEND, { + wallet, + rgbInvoice: value, + assetID: '', + amount: '', + }); } return; } - if (value.startsWith('lnbc')) { + setIsScanning(true); navigation.replace(NavigationRoutes.LIGHTNINGSEND, { invoice: value, }); return; } - const network = WalletUtilities.getNetworkByType( paymentInfo ? app.networkType : config.NETWORK_TYPE, ); @@ -105,9 +103,11 @@ function SendScreen({ route, navigation }) { switch (paymentInfoKind) { case PaymentInfoKind.ADDRESS: + setIsScanning(true); navigation.navigate(NavigationRoutes.SENDTO, { wallet, address }); break; case PaymentInfoKind.PAYMENT_URI: + setIsScanning(true); navigation.navigate(NavigationRoutes.SENDTO, { wallet, address, @@ -115,16 +115,14 @@ function SendScreen({ route, navigation }) { }); break; case PaymentInfoKind.RLN_INVOICE: + setIsScanning(true); navigation.replace(NavigationRoutes.LIGHTNINGSEND, { invoice: value, }); break; default: - if (value.startsWith('rgb:')) { - Toast(sendScreen.invalidRGBInvoiceAddress, true); - } else { - Toast(sendScreen.invalidBtcAddress, true); - } + setIsScanning(true); + Toast(sendScreen.invalidBtcAndRgbInput, true); } }, [wallet, navigation], @@ -140,11 +138,13 @@ function SendScreen({ route, navigation }) { return ( - + {/* - + */} - {!visible && } + {!visible && ( + + )} + + {app.primaryMnemonic !== '' && ( + + + {settings.step1} + + + backup + ? navigation.navigate(NavigationRoutes.WALLETBACKUPHISTORY) + : pinMethod !== PinMethod.DEFAULT + ? setVisible(true) + : navigation.navigate(NavigationRoutes.APPBACKUP, { + viewOnly: false, + }) + } + backup={backup} + /> + {backup ? ( + + {settings.walletBackupSuccessMsg} + + ) : ( + + {settings.walletBackupInfo} + + )} + + )} - {app.primaryMnemonic !== '' && ( - - - {settings.step1} - - - backup - ? navigation.navigate(NavigationRoutes.WALLETBACKUPHISTORY) - : pinMethod !== PinMethod.DEFAULT - ? setVisible(true) - : navigation.navigate(NavigationRoutes.APPBACKUP, { - viewOnly: false, - }) - } - backup={backup} - /> - - {settings.walletBackupInfo} - - - )} - - {app.appType === AppType.ON_CHAIN && ( - - - {settings.step2} - - { - !backup - ? Toast(settings.appBackupStepCheck, true) - : rgbAssetsbackup(); - }} - backup={assetBackup} - /> - - {`${settings.relayBackupTime} ${moment(lastRelayBackup).format( - 'DD MMM YY • hh:mm a', - )}`} - - - {settings.assetBackupInfo1} - - - {settings.assetBackupInfo2} - - - {settings.assetBackupInfo3} - - - {settings.assetBackupInfo4} - - - )} + {app.appType === AppType.ON_CHAIN && ( + + + {settings.step2} + + { + !backup + ? Toast(settings.appBackupStepCheck, true) + : rgbAssetsbackup(); + }} + backup={assetBackup} + /> + {assetBackup ? ( + + {settings.assetBackupSuccessMsg} + + ) : ( + <> + + {settings.assetBackupInfo1} + + + {settings.assetBackupInfo2} + + + {settings.assetBackupInfo3} + + + {settings.assetBackupInfo4} + + + )} + + )} + + + + {`${settings.relayBackupTime} ${moment(lastRelayBackup).format( + 'DD MMM YY • hh:mm a', + )}`} + + marginTop: hp(5), marginHorizontal: hp(15), }, - textStepTime: { + textSuccessMsg: { color: theme.colors.greenText, + textAlign: 'justify', + marginTop: hp(5), marginHorizontal: hp(15), + }, + textStepTime: { + color: theme.colors.greenText, marginBottom: hp(5), + textAlign: 'center', + }, + bodyWrapper: { + height: Platform.OS === 'android' ? '70%' : '74%', }, }); export default AppBackupMenu; diff --git a/src/screens/wallet/components/ReservedSatsView.tsx b/src/screens/wallet/components/ReservedSatsView.tsx index 16cebdd1..ee9259a2 100644 --- a/src/screens/wallet/components/ReservedSatsView.tsx +++ b/src/screens/wallet/components/ReservedSatsView.tsx @@ -2,6 +2,7 @@ import React, { useContext, useMemo } from 'react'; import { StyleSheet, View } from 'react-native'; import { useMMKVBoolean, useMMKVString } from 'react-native-mmkv'; import { useTheme } from 'react-native-paper'; +import { useNavigation } from '@react-navigation/native'; import AppText from 'src/components/AppText'; import GradientView from 'src/components/GradientView'; @@ -18,8 +19,11 @@ import ReserveAmtIcon from 'src/assets/images/reserveAmtIcon.svg'; import ReserveAmtIconLight from 'src/assets/images/reserveAmtIcon_light.svg'; import { RealmSchema } from 'src/storage/enum'; import { ApiHandler } from 'src/services/handler/apiHandler'; +import AppTouchable from 'src/components/AppTouchable'; +import { NavigationRoutes } from 'src/navigation/NavigationRoutes'; function ReservedSatsView() { + const navigation = useNavigation(); const { translations } = useContext(LocalizationContext); const { wallet: walletTranslations } = translations; const theme: AppTheme = useTheme(); @@ -40,37 +44,40 @@ function ReservedSatsView() { }, [UnspentUTXOData]); return ( - - - {isThemeDark ? : } - - {walletTranslations.reserveAmtText} - - - - - {initialCurrencyMode !== CurrencyKind.SATS && - getCurrencyIcon( - isThemeDark ? IconBitcoin : IconBitcoinLight, - isThemeDark ? 'dark' : 'light', - )} - -  {getBalance(totalReserveSatsAmount)} + navigation.navigate(NavigationRoutes.VIEWUNSPENT)}> + + + {isThemeDark ? : } + + {walletTranslations.reserveAmtText} - {initialCurrencyMode === CurrencyKind.SATS && ( - - sats + + + + {initialCurrencyMode !== CurrencyKind.SATS && + getCurrencyIcon( + isThemeDark ? IconBitcoin : IconBitcoinLight, + isThemeDark ? 'dark' : 'light', + )} + +  {getBalance(totalReserveSatsAmount)} - )} + {initialCurrencyMode === CurrencyKind.SATS && ( + + sats + + )} + - - + + ); } const getStyles = (theme: AppTheme) => diff --git a/src/screens/wallet/components/TransactionButtons.tsx b/src/screens/wallet/components/TransactionButtons.tsx index aa51df02..d9e6b366 100644 --- a/src/screens/wallet/components/TransactionButtons.tsx +++ b/src/screens/wallet/components/TransactionButtons.tsx @@ -23,9 +23,19 @@ type transButtonProps = { onPressSend: () => void; onPressRecieve: () => void; onPressBuy?: () => void; + sendCtaWidth?: number; + receiveCtaWidth?: number; + buyCtaWidth?: number; }; const TransactionButtons = (props: transButtonProps) => { - const { onPressSend, onPressRecieve, onPressBuy } = props; + const { + onPressSend, + onPressRecieve, + onPressBuy, + sendCtaWidth = wp(105), + receiveCtaWidth = wp(105), + buyCtaWidth = wp(105), + } = props; const [isThemeDark] = useMMKVBoolean(Keys.THEME_MODE); const { translations } = useContext(LocalizationContext); const { common } = translations; @@ -44,7 +54,7 @@ const TransactionButtons = (props: transButtonProps) => { icon={isThemeDark ? : } buttonColor={theme.colors.sendCtaBorderColor} title={common.send} - width={wp(105)} + width={sendCtaWidth} onPress={onPressSend} /> @@ -78,7 +88,7 @@ const TransactionButtons = (props: transButtonProps) => { ? common.request : common.buy } - width={wp(105)} + width={buyCtaWidth} onPress={onPressBuy} /> @@ -94,7 +104,7 @@ const TransactionButtons = (props: transButtonProps) => { icon={isThemeDark ? : } buttonColor={theme.colors.recieveCtaBorderColor} title={common.receive} - width={wp(105)} + width={receiveCtaWidth} onPress={onPressRecieve} /> diff --git a/src/screens/wallet/components/WalletDetailsHeader.tsx b/src/screens/wallet/components/WalletDetailsHeader.tsx index d721471e..d27418f1 100644 --- a/src/screens/wallet/components/WalletDetailsHeader.tsx +++ b/src/screens/wallet/components/WalletDetailsHeader.tsx @@ -132,13 +132,13 @@ function WalletDetailsHeader(props: walletDetailsHeaderProps) { - 0.7000 + 0.000 - 0.1345 + 0.000 diff --git a/src/theme/index.ts b/src/theme/index.ts index 7e2c740b..b3a6d9bf 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -161,9 +161,9 @@ const CombinedDefaultTheme: AppTheme = { roundBuyCTAGradient1: Colors.BrandeisBlue2, roundBuyCTAGradient2: Colors.BrandeisBlue2, roundBuyCTAGradient3: Colors.BrandeisBlue2, - roundSendCTATitle: Colors.CandyAppleRed, - roundBuyCTATitle: Colors.BrandeisBlue, - roundReceiveCTATitle: Colors.UFOGreen1, + roundSendCTATitle: Colors.ChineseBlack, + roundBuyCTATitle: Colors.ChineseBlack, + roundReceiveCTATitle: Colors.ChineseBlack, segmentSelectTitle: Colors.BrandeisBlue, suggestedText: Colors.White, //