From c443e2348d563651325ec7849ed99eef1a609dfc Mon Sep 17 00:00:00 2001 From: arvifox Date: Fri, 6 Oct 2023 13:13:23 +0300 Subject: [PATCH] sca-8 sca-130 sca-133, balance, iban --- android-foundation | 2 +- build.gradle | 2 +- .../common/domain/OptionsProvider.kt | 2 + .../soramitsu/common/util/NumbersFormatter.kt | 3 +- common/src/main/res/values-ar/strings.xml | 8 +- common/src/main/res/values-az/strings.xml | 6 ++ common/src/main/res/values-de/strings.xml | 8 +- common/src/main/res/values-es/strings.xml | 8 +- common/src/main/res/values-fa/strings.xml | 8 +- common/src/main/res/values-fi/strings.xml | 8 +- common/src/main/res/values-fr/strings.xml | 8 +- common/src/main/res/values-hi-rIN/strings.xml | 8 +- common/src/main/res/values-in/strings.xml | 8 +- common/src/main/res/values-iw/strings.xml | 92 ++++++++++--------- common/src/main/res/values-ja/strings.xml | 8 +- common/src/main/res/values-ms-rMY/strings.xml | 8 +- common/src/main/res/values-nb/strings.xml | 8 +- common/src/main/res/values-nl/strings.xml | 8 +- common/src/main/res/values-pt/strings.xml | 8 +- common/src/main/res/values-ru/strings.xml | 10 +- common/src/main/res/values-sr/strings.xml | 8 +- common/src/main/res/values-tr/strings.xml | 8 +- common/src/main/res/values-vi/strings.xml | 6 ++ common/src/main/res/values-zh-rCN/strings.xml | 6 ++ common/src/main/res/values-zh-rTW/strings.xml | 8 +- common/src/main/res/values/strings.xml | 9 +- .../presentation/compose/states/CardState.kt | 2 +- .../domain/SoraCardInteractor.kt | 2 +- .../domain/SoraCardInteractorImpl.kt | 6 +- .../details/SoraCardDetailsFragment.kt | 6 +- .../details/SoraCardDetailsScreen.kt | 7 +- .../details/SoraCardDetailsViewModel.kt | 27 +++++- .../details/SoraCardMainSoraContentCard.kt | 50 +++++----- .../details/SoraCardSettingsCard.kt | 24 +++-- .../cardshub/CardsHubViewModel.kt | 20 ++-- .../presentation/cardshub/SoraCard.kt | 37 ++++---- 36 files changed, 301 insertions(+), 146 deletions(-) diff --git a/android-foundation b/android-foundation index ead7e75bf..71b8d1433 160000 --- a/android-foundation +++ b/android-foundation @@ -1 +1 @@ -Subproject commit ead7e75bfdba7b00cac5f3e69f5c34295d64d78b +Subproject commit 71b8d143362a155e943af891860f1174392f4ff9 diff --git a/build.gradle b/build.gradle index 9f9fbb84c..5d7f1f189 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ buildscript { composeCompiler : '1.5.3', composeConstraintLayout: '1.1.0-alpha05', uiCore : '0.2.7', - soraCard : '0.1.49', + soraCard : '0.1.51', lazySodium : '5.0.2', jna : '5.8.0', accompanist : '0.30.1', diff --git a/common/src/main/java/jp/co/soramitsu/common/domain/OptionsProvider.kt b/common/src/main/java/jp/co/soramitsu/common/domain/OptionsProvider.kt index dc1d85ba4..0b62e694a 100644 --- a/common/src/main/java/jp/co/soramitsu/common/domain/OptionsProvider.kt +++ b/common/src/main/java/jp/co/soramitsu/common/domain/OptionsProvider.kt @@ -50,6 +50,8 @@ object OptionsProvider { const val defaultScale = 18 const val nameByteLimit = 32 const val fiatSymbol = "$" + const val nbspace = ' ' + const val euroSign = '€' const val website = "https://sora.org" const val sourceLink = "https://github.com/sora-xor/Sora-Android" diff --git a/common/src/main/java/jp/co/soramitsu/common/util/NumbersFormatter.kt b/common/src/main/java/jp/co/soramitsu/common/util/NumbersFormatter.kt index 4b84aec19..e36417758 100644 --- a/common/src/main/java/jp/co/soramitsu/common/util/NumbersFormatter.kt +++ b/common/src/main/java/jp/co/soramitsu/common/util/NumbersFormatter.kt @@ -40,13 +40,12 @@ import java.text.NumberFormat import java.util.Currency import java.util.Locale import jp.co.soramitsu.common.domain.OptionsProvider +import jp.co.soramitsu.common.domain.OptionsProvider.nbspace import kotlin.math.absoluteValue import kotlin.math.pow private const val DECIMAL_PATTERN_BASE = "###,###." private const val TWO_DIGITS_PATTERN = "00" -const val nbspace = ' ' -const val euro = '€' private const val DEFAULT_PRECISION = 2 diff --git a/common/src/main/res/values-ar/strings.xml b/common/src/main/res/values-ar/strings.xml index 3645ace78..0c96dd521 100644 --- a/common/src/main/res/values-ar/strings.xml +++ b/common/src/main/res/values-ar/strings.xml @@ -39,6 +39,8 @@ سعر الرمز المميز تجمعات %s الخاصة بك الأصول المراد إرسالها + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ شراء توكن XOR شراء أو بيع توكن XOR باليورو شراء XOR مع فيات + Can\'t load balance تغيير اللغة تغيير PIN اختر عملة @@ -172,6 +175,7 @@ تحديث إزالة Request + Rewrite الروسية مسح ضوئي مسح QR @@ -235,6 +239,7 @@ Incorrect password Enter password ارصدة غير كافية لرسوم المعاملة + Create pool Provide liquidity and earn rewards Swap tokens on SORA network إذا فقدت الوصول إلى هذا الجهاز ، فستفقد أموالك ، ما لم تقم بعمل نسخة احتياطية! @@ -515,7 +520,7 @@ IBAN account details Log in or Sign up لا مزيد من المحاولات المجانية - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -536,6 +541,7 @@ ناجح الحالة You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node مظهر النظام diff --git a/common/src/main/res/values-az/strings.xml b/common/src/main/res/values-az/strings.xml index 9356db09b..4d065ebc3 100644 --- a/common/src/main/res/values-az/strings.xml +++ b/common/src/main/res/values-az/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Yedək artıq mövcuddur. Yenidən yazmağa davam edin. + Yedəkləmə alınmadı. Google Diskinizdə kifayət qədər yer yoxdur. Bir az yer boşaltın və yenidən cəhd edin. Parol üçün məcburi tələb yerinə yetirildi Minimum altı simvol. İsteğe bağlı olaraq, daha yaxşı təhlükəsizlik üçün böyük hərflər, rəqəmlər və qeyri-əlifba simvolları daxil edin. Parolun təyin edilməsi Google ehtiyat nüsxənizi şifrələyəcək. Pul kisəsini bərpa edərkən bunu daxil etməlisiniz.\n Minimum parol uzunluğu 6 simvoldur. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Balansı yükləmək mümkün deyil Change language Change PIN Token seçin @@ -168,6 +171,7 @@ Refresh Sil Request + Yenidən yazmaq Rus dili Tara Scan QR @@ -231,6 +235,7 @@ Incorrect password Enter password Əməliyyat haqqı üçün kifayət qədər vəsait yoxdur + Hovuz yaradın Likvidliyi təmin edin və mükafatlar qazanın SORA şəbəkəsində tokenləri dəyişdirin If you loose access to this device, your funds will be lost, unless you back up! @@ -512,6 +517,7 @@ Successful Status You have succesfully imported an account + Dəstək söhbəti Bu əməliyyatdan sonra %s qaldığınıza əmin olun. Əks halda, başqa sövdələşmə edə bilməyəcəksiniz. Switch node System appearance diff --git a/common/src/main/res/values-de/strings.xml b/common/src/main/res/values-de/strings.xml index e0ad4261f..02fe233d0 100644 --- a/common/src/main/res/values-de/strings.xml +++ b/common/src/main/res/values-de/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN Token\nauswählen @@ -168,6 +171,7 @@ Refresh Entfernen Request + Rewrite Russisch Scan Scan QR @@ -231,6 +235,7 @@ Incorrect password Enter password Nicht genügend Guthaben für die Transaktionsgebühr + Create pool Provide liquidity and earn rewards Swap tokens on SORA network Wenn du den Zugang zu diesem Gerät verlierst, gehen deine Assets verloren, es sei denn, du machst ein Backup! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Successful Status You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-es/strings.xml b/common/src/main/res/values-es/strings.xml index 0c0b2b908..ba8254ca8 100644 --- a/common/src/main/res/values-es/strings.xml +++ b/common/src/main/res/values-es/strings.xml @@ -39,6 +39,8 @@ Precio del token Tus %spares de liquidez Activo a enviar + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Comprar XOR token Comprar o Vender XOR con euro Comprar XOR con fiat + Can\'t load balance Change language Change PIN Select token @@ -168,6 +171,7 @@ Refrescar Remove Request + Rewrite Ruso Escanear Escanear QR @@ -231,6 +235,7 @@ Incorrect password Enter password No hay fondos suficientes para la comisión de la transacción + Create pool Provide liquidity and earn rewards Swap tokens on SORA network If you loose access to this device, your funds will be lost, unless you back up! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up No quedan más intentos gratuitos - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Successful Estado You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-fa/strings.xml b/common/src/main/res/values-fa/strings.xml index 1f64856a6..42b8c7acd 100644 --- a/common/src/main/res/values-fa/strings.xml +++ b/common/src/main/res/values-fa/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN توکن را انتخاب کنید @@ -168,6 +171,7 @@ Refresh برداشت Request + Rewrite روسی اسکن Scan QR @@ -231,6 +235,7 @@ Incorrect password Enter password بودجه کافی برای هزینه تراکنش وجود ندارد + Create pool Provide liquidity and earn rewards Swap tokens on SORA network If you loose access to this device, your funds will be lost, unless you back up! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Successful وضعیت You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-fi/strings.xml b/common/src/main/res/values-fi/strings.xml index 3ad5d1120..f90468ebb 100644 --- a/common/src/main/res/values-fi/strings.xml +++ b/common/src/main/res/values-fi/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN Valitse tokeni @@ -168,6 +171,7 @@ Refresh Poista Request + Rewrite Venäjän kieli Skannata Scan QR @@ -231,6 +235,7 @@ Incorrect password Enter password Ei riittävästi varoja siirtomaksuun + Create pool Provide liquidity and earn rewards Swap tokens on SORA network If you loose access to this device, your funds will be lost, unless you back up! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Successful Tila You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-fr/strings.xml b/common/src/main/res/values-fr/strings.xml index 701f5b309..1ba47a01c 100644 --- a/common/src/main/res/values-fr/strings.xml +++ b/common/src/main/res/values-fr/strings.xml @@ -39,6 +39,8 @@ Prix du jeton Vos %s pool(s) Actif à envoyer + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Critères de sécurité obligatoires remplis Minimum six caractères. Pour une meilleure sécurité, inclure des lettres majuscules, des nombres et des caractères spéciaux. Définir un mot de passe va encrypter votre sauvegarde. Vous devred entrer le mot de passe pour restaurer votre portefeuille.\nLe mot de passe doit être d\'au moins six caractères. @@ -48,6 +50,7 @@ Acheter des jetons XOR Acheter ou vendre des jetons XOR avec des euros Acheter du XOR avec des euros + Can\'t load balance Changer la langue Changer le code PIN Choisissez le jeton @@ -168,6 +171,7 @@ Rafraîchir Supprimer Demander + Rewrite Russe Analyse Scanner code QR @@ -231,6 +235,7 @@ Mot de passe incorrect Entrer le mot de passe Pas assez de fonds pour les frais de transaction + Create pool Fournir des liquidités et gagner des récompenses Échanger des tokens sur le réseau SORA Si vous perdez l\'accès à cet appareil, vos fonds seront perdus, sauf si vous sauvegardez! @@ -491,7 +496,7 @@ IBAN account details Se connecter ou s\'inscrire Nombre d\'essais gratuits épuisé - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Parrainer et gagner Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Confirmée Statut Vous avez importé votre compte avec succès + Support chat Assurez-vous qu’il vous reste %s après cette transaction. Sinon, vous ne pourrez pas effectuer une autre transaction. Changer de nœud Apparence du système diff --git a/common/src/main/res/values-hi-rIN/strings.xml b/common/src/main/res/values-hi-rIN/strings.xml index 694bc10f4..2c293bbb5 100644 --- a/common/src/main/res/values-hi-rIN/strings.xml +++ b/common/src/main/res/values-hi-rIN/strings.xml @@ -39,6 +39,8 @@ टोकन मूल्य आपके %s पूल भेजने के लिए संपत्ति + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ XOR टोकन खरीदें यूरो के साथ XOR टोकन खरीदें या बेचें फिएट के साथ XOR खरीदें + Can\'t load balance भाषा बदलें पिन बदलिए टोकन चुनें @@ -168,6 +171,7 @@ ताज़ा करना हटाये Request + Rewrite रूसी स्कैन QR स्कैन करें @@ -231,6 +235,7 @@ Incorrect password Enter password नेटवर्क शुल्क के लिए पर्याप्त धनराशि नहीं है + Create pool Provide liquidity and earn rewards Swap tokens on SORA network अगर आप इस डिवाइस का एक्सेस खो देते हैं, तो आपके फंड का नुकसान हो जाएगा, जब तक कि आप बैकअप नहीं लेते! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up कोई और मुफ़्त प्रयास नहीं - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ सफल स्थिति You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node सिस्टम स्थिति diff --git a/common/src/main/res/values-in/strings.xml b/common/src/main/res/values-in/strings.xml index 23490c60d..d1eaa408d 100644 --- a/common/src/main/res/values-in/strings.xml +++ b/common/src/main/res/values-in/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN Select token @@ -167,6 +170,7 @@ Refresh Remove Request + Rewrite Rusia Pindai Scan QR @@ -230,6 +234,7 @@ Incorrect password Enter password Tidak cukup dana untuk biaya transaksi + Create pool Provide liquidity and earn rewards Swap tokens on SORA network If you loose access to this device, your funds will be lost, unless you back up! @@ -486,7 +491,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -507,6 +512,7 @@ Successful Status You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-iw/strings.xml b/common/src/main/res/values-iw/strings.xml index 508f31438..82d95945d 100644 --- a/common/src/main/res/values-iw/strings.xml +++ b/common/src/main/res/values-iw/strings.xml @@ -18,8 +18,8 @@ אשר סיסמה מנומונית אשר את מילות המפתח אפשרויות חשבון - גיבוי ל- Google - מחק את הגיבוי של Google + גיבוי לגוגל + מחק את הגיבוי של גוגל חלק מהנתונים אינם מעודכנים אתה תראה את הפעילות שלך כאן ברגע שתתחיל לבצע טרנזקציות לא היתה אפשרות לטעון את הפעילות שלך. נסה לרענן את הרשימה @@ -39,15 +39,18 @@ מחיר טוקן %s המאגרים שלך נכס לשליחה - Mandatory requirement for the password fulfilled - Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. - הגדרת סיסמה תצפין את גיבוי ה-Google שלך. יהיה עליך להזין אותה בעת שחזור הארנק שלך. - Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet. + גיבוי כבר קיים. המשך לשכתב אותו. + הגיבוי נכשל. אין מספיק מקום בגוגל דרייב שלך. פנה קצת מקום ונסה שוב. + דרישת חובה למילוי הסיסמה + מינימום שישה תווים. לחלופין, לאבטחה טובה יותר, כלול אותיות רישיות, מספרים ותווים שאינם אלפביתיים. + הגדרת סיסמה תצפין את גיבוי הגוגל שלך. יהיה עליך להזין אותה בעת שחזור הארנק שלך. + הגדרת סיסמה תצפין את גיבוי הגוגל שלך. יהיה עליך להזין זאת בעת שחזור הארנק. לאמת האש בלוק קנה טוקן XOR קנה או מכור טוקן XOR באירו קנה XOR עם פיאט + Can\'t load balance שנה שפה שנה PIN בחר טוקן @@ -86,14 +89,14 @@ הועתק ללוח צור בקשת QR קרואטית - Currencies + מטבעות מחק - Disabled + מושבת גלה בוצע הולנדית ערוך - Enabled + מופעל אנגלית הזן סכום תוצאה דו-משמעית @@ -132,14 +135,14 @@ לא ניתן להמשיך בפעולה כי סטטוס המשתמש אינו חוקי אסטונית הרחב - לחקור + סקירה נכשל פיליפינית פינית צרפתית גרמנית - Google authorization failed - Backup decryption failed. Please check password and try again + הרשאת גוגל נכשלה + פענוח הגיבוי נכשל. אנא בדוק את הסיסמה ונסה שוב עברית הינדי @@ -170,6 +173,7 @@ רענן הסר בקשה + כתוב מחדש רוסית סרוק סרוק QR @@ -218,14 +222,14 @@ סיסמה חלשה צור חשבון חדש מצב כהה - אם תמחק את הגיבוי של Google, תוכל לשחזר את הארנק שלך רק באמצעות גיבוי ידני של מילות המפתח. + אם תמחק את גיבוי הגוגל שלך, תוכל לשחזר את הארנק שלך רק באמצעות גיבוי ידני של מילות המפתח. האם אתה בטוח? קפוא נמשך מהמאגר נשלח למאגר מפתחי סורה עובדים כעת על תכונה שתציג רשימה מלאה של מאגרים שהם פעילים בפולקסוואפ.\n\nלעת עתה, אם ברצונך ליצור/להוסיף למאגר אנא השתמש בכפתור למטה. מאגרי פולקסוואפ - Edit view + ערוך תצוגה אין נמענים אחרונים.\n כתובות שנשלחו יוצגו כאן. הנמענים יופיעו כאן הזן סיסמת גיבוי @@ -233,8 +237,9 @@ סיסמה שגויה הזן סיסמה אין מספיק כספים עבור עמלת רשת - Provide liquidity and earn rewards - Swap tokens on SORA network + צור מאגר + ספק נזילות והרווח תגמולים + החלף טוקנים ברשת סורה אם תאבד את הגישה למכשיר הזה, הכספים שלך יאבדו, אלא אם תעשה גיבוי! אפשרויות גיבוי הצג את מילות המפתח @@ -296,7 +301,7 @@ הצומת הזה כבר נוסף: %s \n נוצר חיבור עם הצומת %s לא הצליח לאמת כתובת האתר (פרוטוקול URL שגוי) צומת במצב לא מקוון - המשך עם Google + המשך עם גוגל הזן שם עבור החשבון החדש שלך וכיצד הוא יופיע תחת הכתובת שלך. עם זהות ברשת, ניתן להפוך אותה לזמינה לאחרים. גלוי רק עבורך ומאוחסן באופן מקומי קבע שם לחשבון שלך @@ -322,11 +327,11 @@ נשאר לך עוד ניסיון אחד לפני ההתקררות הגדר קוד PIN גע בסורק טביעת האצבע - Powered by Demeter Farming - Some portion of your pool share is staked. To have access to it you have to unstake it first. - Your pool share staked - Staked for %s - To remove liquidity you need to unstake it first + מופעל על ידי Demeter Farming + חלק מהנתח שלך במאגר מושקע. כדי לקבל גישה אליו, עליך להסיר אותו תחילה מהמאגר. + נתח המאגר שלך נעול + נעול עבור %s + כדי להסיר נזילות ראשית עליך להסיר את הנעילה פולקסוואפ מתוחזק על ידי קהילת סורה. לפני שתמשיך להשתמש בפולקסוואפ, אנא עיין %%בשאלות הנפוצות של פולקסוואפ%% ובתיעוד, הכולל הסבר מפורט על אופן הפעולה של פולקסוואפ, כמו גם את %%תזכיר המדיניות ותנאי השירותים של פולקסוואפ%%, ו- %%מדיניות הפרטיות%%.\n\nמסמכים אלה חיוניים לחוויית משתמש מאובטחת וחיובית. על ידי שימוש בפולקסוואפ, אתה מכיר בכך שקראת והבנת את המסמכים האלה. אתה גם מאשר את הדברים הבאים: האחריות הבלעדית שלך לעמידה בכל החוקים שעשויים לחול על השימוש הספציפי שלך בפולקסוואפ בתחום השיפוט הסמכותי שלך; @@ -340,8 +345,8 @@ אין מספיק נזילות עמלת מאגר נזילות חלק מכל עסקה הולך לספקי נזילות כתמריץ פרוטוקול. - Swap fee - Your swap involves both a Synthetic fee and an LP fee.\nThe Synthetic fee is accounted when the swap goes through the XST liquidity source for synthetic assets, and the LP fee when the swap goes through liquidity pools. + עמלת החלפה + ההחלפה שלך כוללת גם עמלה סינתטית וגם עמלת אספקת נזילות.\nהעמלה הסינתטית נלקחת בחשבון כאשר ההחלפה עוברת דרך מקור הנזילות XST עבור נכסים סינתטיים, ועמלת אספקת הנזילות כאשר ההחלפה עוברת דרך מאגרי נזילות. שוק ניתוב נזילות SMART מבטיח את המחיר הטוב ביותר לכל טרנזקציה על ידי שילוב אפשרויות המחיר הטובות ביותר בלבד מכל השווקים הזמינים. כאשר זמין, עקומת צירוף הטוקנים (TBC) תשמש לנזילות כל עוד מחיר הנכס משתלם יותר מאשר ממקורות אחרים, שעליהם מנוצל מאגר XYK. TBC - קנייה רק מעקומת צירוף הטוקנים (השוק העיקרי). קיימת אפשרות שהמחיר יכול להפוך לבלתי משתלם בהשוואה למאגר XYK (שוק משני), אך הערך המתקבל מהתגמולים המוענקים לאורך זמן עשוי להתברר כמשתלם הרבה יותר לטווח ארוך. @@ -354,7 +359,7 @@ עמלת הרשת משמשת כדי להבטיח את הצמיחה והביצועים היציבים של מערכת סורה. התפוקה מוערכת. תקבל לפחות %s או שהטרנזקציה תחזור. הבריכה לא נוצרה - Rewards payout in + תשלום תגמולים ב תגמול פארמינג על אספקת נזילות הטרנזקציה שלך עשויה להיות מקודמת הטרנזקציות שלך יחזרו אם המחיר ישתנה באופן בלתי משתלם יותר מאחוז זה @@ -411,7 +416,7 @@ צרף למאגר XOR הזן את הקישור של המפנה קבל הזמנות נוספות - %s מצורף למאגר לכל הזמנה כדי לכסות את דמי הרשת עבור החברים שלך להצטרף. \n \n אתה יכול להסיר מהמאגר את ה- XOR שלך בכל עת עבור הזמנות שאינן בשימוש. + %s מצורף למאגר לכל הזמנה כדי לכסות את דמי הרשת עבור צירוף החברים שלך. \nאתה יכול להסיר מהמאגר את ה- XOR שלך שאינו בשימוש בכל עת. הזן את כמות ההזמנות הרצויה הזמנות זמינות קישור להזמנה @@ -448,7 +453,7 @@ מסלול הצג את קוד ה-QR שלי חפש נכסים - אין תוצאות חיפוש + אין תוצאות חפש כתובת חשבון חפש או הוסף כתובת חדשה בחר חשבון לייבוא @@ -483,32 +488,32 @@ הצג עוד הצג יתרות אפסיות החלקה - Something went wrong - Exchange - Freeze - Top up - Transfer + משהו השתבש + החלף + הקפא + טען + העבר כבר יש לי כרטיס €0 דמי שירות שנתיים - Card info + פרטי כרטיס לא נכלל באפליקציה תושבים ממדינות מסוימות אינם יכולים להגיש בקשה לכרטיס סורה ברגע זה קנה XOR עם EUR - Card management is coming soon - Card details + ניהול כרטיסים יגיע בקרוב + פרטי כרטיס הנפקת כרטיס חינם או 20 € דמי רישום אם אתה מחזיק, נועל או מספק נזילות בשווי של לפחות 100 אירו של XOR בחשבון סורה שלך השג עוד XOR - IBAN account details + פרטי חשבון IBAN התחבר או הירשם אין עוד ניסיונות בחינם - Log out SORA Card - You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. - Refer & Earn - Refer SORA Card.\nGet €20 bonus. - ראה את הפרטים - Card settings + התנתק מכרטיס סורה + אתה עומד להתנתק מכרטיס סורה. עדיין תהיה לך גישה לאפליקציה העצמאית של כרטיס סורה, אך היתרה לא תהיה זמינה לך יותר בארנק סורה. + הפנה והרווח + הפנה כרטיס סורה.\n קבל בונוס של 20 אירו. + הצג פרטים + הגדרות כרטיס הגש בקשה לכרטיס או התחבר אם יש ברשותך כבר אחד החלף קריפטו עבור XOR הטען את כרטיס סורה עם פיאט או קריפטו ושלם באינטרנט, בחנות או משוך מכספומט @@ -524,6 +529,7 @@ מוצלח סטטוס ייבאת חשבון בהצלחה + Support chat ודא שנותרו לך %s לאחר עסקה זו. אחרת, לא תוכל לבצע עסקה אחרת. החלף צומת מראה חיצוני של המערכת @@ -538,7 +544,7 @@ על ידי יצירת חשבון אתה מסכים עם %%התנאים וההגבלות%% ו- %%מדיניות הפרטיות%% תנאים והגבלות כשאתה ממשיך אתה מסכים עם ה- - An unexpected error has occured.\n\nYou may troubleshoot this issue in SORA community at the @SORAhappiness Telegram chat. + אירעה שגיאה בלתי צפויה. \n\n אתה יכול לפתור בעיה זו בצ\'אט הטלגרם של קהילת סורה @SORAhappiness. עדכון עבור אפליקצית סורה הורד והוא מוכן להתקנה.\n\nחשוב להשתמש בגירסה העדכנית ביותר של האפליקציה.\n\nכדי לעדכן את האפליקציה, נדרשת הפעלה מחדש. האם ברצונך להתקין את העדכון כעת? נעול diff --git a/common/src/main/res/values-ja/strings.xml b/common/src/main/res/values-ja/strings.xml index 7499e4d5d..ba2a23722 100644 --- a/common/src/main/res/values-ja/strings.xml +++ b/common/src/main/res/values-ja/strings.xml @@ -39,6 +39,8 @@ トークン価格 %s プール 送信するアセット + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ XORトークンの購入 ユーロでXORトークンを売買 法定通貨で XOR を購入 + Can\'t load balance 言語の変更 PINの変更 トークンの選択 @@ -167,6 +170,7 @@ 更新 削除 Request + Rewrite ロシア語 スキャン QRをスキャン @@ -230,6 +234,7 @@ Incorrect password Enter password ネットワーク手数料のための資金が不足しています + Create pool Provide liquidity and earn rewards Swap tokens on SORA network このデバイスへのアクセスを失った場合、バックアップしない限り、資金は失われます! @@ -485,7 +490,7 @@ IBAN account details Log in or Sign up これ以上の無料試行はありません - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -506,6 +511,7 @@ 成功 ステータス You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node システム外観 diff --git a/common/src/main/res/values-ms-rMY/strings.xml b/common/src/main/res/values-ms-rMY/strings.xml index a3e76e6e6..33cb9bf97 100644 --- a/common/src/main/res/values-ms-rMY/strings.xml +++ b/common/src/main/res/values-ms-rMY/strings.xml @@ -39,6 +39,8 @@ Harga token Kolam %s anda Aset untuk dihantar + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Menetapkan kata laluan akan menyulitkan sandaran Google anda. Anda perlu memasukkannya semasa memulihkan dompet anda. @@ -48,6 +50,7 @@ Beli token XOR Beli atau jual token XOR dengan euro Beli XOR dengan fiat + Can\'t load balance Tukar bahasa Tukar PIN Pilih token @@ -167,6 +170,7 @@ Segarkan semula Mengalih keluar Permintaan + Rewrite Bahasa Rusia Imbas Imbas QR @@ -230,6 +234,7 @@ Kata laluan tidak betul Masukkan kata laluan Tidak cukup dana untuk bayaran transaksi + Create pool Provide liquidity and earn rewards Swap tokens on SORA network Jika anda kehilangan akses kepada peranti ini, dana anda akan hilang, melainkan anda membuat sandaran! @@ -485,7 +490,7 @@ IBAN account details Log masuk atau Daftar Tiada lagi percubaan percuma - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -506,6 +511,7 @@ Berjaya Status Anda telah berjaya mengimport akaun + Support chat Pastikan anda mempunyai %s yang tersisa selepas transaksi ini. Jika tidak, anda tidak akan dapat melakukan transaksi lain. Tukar nod Penampilan sistem diff --git a/common/src/main/res/values-nb/strings.xml b/common/src/main/res/values-nb/strings.xml index 14d078f7a..064ef9eb4 100644 --- a/common/src/main/res/values-nb/strings.xml +++ b/common/src/main/res/values-nb/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN Select token @@ -168,6 +171,7 @@ Refresh Remove Request + Rewrite Russisk Skann Scan QR @@ -231,6 +235,7 @@ Incorrect password Enter password Ikke nok midler til transaksjonsgebyr + Create pool Provide liquidity and earn rewards Swap tokens on SORA network If you loose access to this device, your funds will be lost, unless you back up! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Successful Status You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-nl/strings.xml b/common/src/main/res/values-nl/strings.xml index 1b55e7ba3..7862bc668 100644 --- a/common/src/main/res/values-nl/strings.xml +++ b/common/src/main/res/values-nl/strings.xml @@ -39,6 +39,8 @@ Token prijs Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Taal veranderen PIN wijzigen Kies token @@ -168,6 +171,7 @@ Refresh Verwijder Request + Rewrite Russisch Scannen Scan QR @@ -231,6 +235,7 @@ Incorrect password Enter password Niet genoeg fondsen voor transactiekosten + Create pool Provide liquidity and earn rewards Swap tokens on SORA network Als u de toegang tot dit apparaat verliest, gaat uw geld verloren, tenzij u een back-up maakt! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up Geen gratis pogingen meer - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Succesvol Status You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node Systeem verschijning diff --git a/common/src/main/res/values-pt/strings.xml b/common/src/main/res/values-pt/strings.xml index f8799c0d3..75e38d06f 100644 --- a/common/src/main/res/values-pt/strings.xml +++ b/common/src/main/res/values-pt/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN Selecione token @@ -168,6 +171,7 @@ Refresh Remover Request + Rewrite Russo Scan Scan QR @@ -231,6 +235,7 @@ Incorrect password Enter password Fundos insuficientes para a taxa de transação + Create pool Provide liquidity and earn rewards Swap tokens on SORA network If you loose access to this device, your funds will be lost, unless you back up! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Successful Status You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-ru/strings.xml b/common/src/main/res/values-ru/strings.xml index 0c00d3223..f60614d2a 100644 --- a/common/src/main/res/values-ru/strings.xml +++ b/common/src/main/res/values-ru/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Отправляемый ассет + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Обязательное требование к паролю выполнено Минимум шесть символов. По желанию, для повышения безопасности, можно включить заглавные буквы, цифры и неалфавитные символы. Установка пароля зашифрует резервную копию Google. Его нужно будет ввести при восстановлении кошелька.\nМинимальная длина пароля - 6 символов. @@ -48,6 +50,7 @@ Купить токен XOR Купить или продать токен XOR за евро Купить XOR за фиат + Не удается загрузить баланс Изменить язык Изменить пин-код Выберите токен @@ -171,6 +174,7 @@ Refresh Удалить Запрос + Rewrite Русский Сканировать Сканировать QR-код @@ -234,13 +238,14 @@ Неверный пароль Введите пароль Недостаточно средств для оплаты комиссии + Create pool Предоставляйте ликвидность и получайте вознаграждения Меняйте токены в сети SORA При потере доступа к этому устройству, ваши средства будут потеряны, если вы не сделаете резервную копию! Параметры резервного копирования Показать парольную фразу Показать Raw Seed - Параметры открытия счета + Открыть настройки аккаунта Пароль требуется для шифрования вашей учетной записи и сохранения в виде Restore JSON. Пожалуйста, создайте пароль для продолжения работы. Скачать JSON Подтвердить пароль @@ -509,7 +514,7 @@ IBAN account details Войдите или зарегистрируйтесь No more free attempts - Log out SORA Card + Выйти из SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -530,6 +535,7 @@ Successful Статус Вы успешно импортировали учетную запись + Чат поддержки Убедитесь, что у вас останется %s после этой транзакции. Иначе вы не сможете оплатить комиссию сети за другую транзакцию. Переключить ноду Внешний вид системы diff --git a/common/src/main/res/values-sr/strings.xml b/common/src/main/res/values-sr/strings.xml index 1e69ecb58..6bd4cb62b 100644 --- a/common/src/main/res/values-sr/strings.xml +++ b/common/src/main/res/values-sr/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN Изаберите токeн @@ -169,6 +172,7 @@ Refresh Povuci Request + Rewrite Руски Скенирај Scan QR @@ -232,6 +236,7 @@ Incorrect password Enter password Нема довољно средстава за накнаду за трансакцију + Create pool Provide liquidity and earn rewards Swap tokens on SORA network Ako izgubite pristup ovom uređaju, vaša sredstva će biti izgubljena osim ako ne napravite rezervnu kopiju! @@ -496,7 +501,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -517,6 +522,7 @@ Successful Статус You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-tr/strings.xml b/common/src/main/res/values-tr/strings.xml index f08b52ae1..aa8ee92cb 100644 --- a/common/src/main/res/values-tr/strings.xml +++ b/common/src/main/res/values-tr/strings.xml @@ -39,6 +39,8 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN Token seçin @@ -168,6 +171,7 @@ Refresh Kaldırmak Request + Rewrite Rusça Tarama Scan QR @@ -231,6 +235,7 @@ Incorrect password Enter password İşlem ücreti için yeterli miktar yok + Create pool Provide liquidity and earn rewards Swap tokens on SORA network If you loose access to this device, your funds will be lost, unless you back up! @@ -491,7 +496,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -512,6 +517,7 @@ Successful Durum You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values-vi/strings.xml b/common/src/main/res/values-vi/strings.xml index 43dc2682e..ed96206f9 100644 --- a/common/src/main/res/values-vi/strings.xml +++ b/common/src/main/res/values-vi/strings.xml @@ -39,6 +39,8 @@ Giá token %s pool của bạn Tài sản cần gửi + Sao lưu đã tồn tại. Tiến hành viết lại nó. + Sao lưu không thành công. Không đủ dung lượng trên Google Drive của bạn. Hãy giải phóng một số dung lượng và thử lại. Yêu cầu bắt buộc đối với mật khẩu được đáp ứng Tối thiểu sáu ký tự. Tùy chọn, để bảo mật tốt hơn, hãy bao gồm các chữ cái viết hoa, số và các ký tự không phải bảng chữ cái. Đặt mật khẩu sẽ mã hóa bản sao lưu Google của bạn. Bạn sẽ cần nhập thông tin này khi khôi phục ví của mình.\nĐộ dài mật khẩu tối thiểu là 6 ký tự. @@ -48,6 +50,7 @@ Mua token XOR Mua hoặc bán XOR bằng euro Mua XOR bằng tiền pháp định + Can\'t load balance Thay đổi ngôn ngữ Thay đổi mã PIN Chọn token @@ -167,6 +170,7 @@ Làm mới Gỡ bỏ Yêu cầu + Ghi lại Tiếng Nga Quét Quét mã QR @@ -230,6 +234,7 @@ Mật khẩu không chính xác Nhập mật khẩu Không đủ tiền cho phí giao dịch + Tạo pool Cung cấp thanh khoản và kiếm phần thưởng Hoán đổi token trên mạng SORA Nếu bạn mất quyền truy cập vào thiết bị này, tiền của bạn sẽ bị mất, trừ khi bạn sao lưu! @@ -506,6 +511,7 @@ Thành công Trạng thái Bạn đã nhập thành công một tài khoản + Support chat Đảm bảo rằng bạn còn %s sau giao dịch này. Nếu không, bạn sẽ không thể thực hiện một giao dịch khác. Chuyển node Hệ thống hiển thị diff --git a/common/src/main/res/values-zh-rCN/strings.xml b/common/src/main/res/values-zh-rCN/strings.xml index d01891b59..ae146573f 100644 --- a/common/src/main/res/values-zh-rCN/strings.xml +++ b/common/src/main/res/values-zh-rCN/strings.xml @@ -39,6 +39,8 @@ 代币价格 你的%s池子 待发送的资产 + 备份已存在。继续覆盖它。 + 备份失败。您的Google Drive空间不足,请释放一些空间并重试。 密码的强制要求已满足 至少六个字符。为了更好的安全性,可以包含大写字母、数字和非字母字符。 设置密码将加密您的Google备份。在恢复钱包时,您需要输入此密码。\n最小密码长度为6个字符。 @@ -48,6 +50,7 @@ 购买XOR代币 用欧元购买或出售XOR代币 用法币购买XOR + Can\'t load balance 更改语言 更改PIN码 选择代币 @@ -167,6 +170,7 @@ 刷新 移除 请求 + 重写 俄语 扫描 扫描二维码 @@ -230,6 +234,7 @@ 密码错误 输入密码 网络费用不足 + 创建池子 提供流动性并获得奖励 在SORA网络上进行代币兑换 如果您无法访问此设备,您的资金将会丢失,除非您备份! @@ -506,6 +511,7 @@ 成功的 状态 您已成功导入一个账户 + Support chat 确保在此事务之后还剩下 %s。否则,您将无法进行其他交易。 切换节点 系统外观 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index a07c9e99b..847b70231 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -39,6 +39,8 @@ 代幣價格 Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. @@ -48,6 +50,7 @@ Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN 選擇\n令牌 @@ -167,6 +170,7 @@ Refresh 消除 Request + Rewrite 俄語 掃描 Scan QR @@ -230,6 +234,7 @@ Incorrect password Enter password 手續費用資金不足 + Create pool Provide liquidity and earn rewards Swap tokens on SORA network 如果您無法訪問此設備,您的資金將會丟失,除非您備份! @@ -486,7 +491,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -507,6 +512,7 @@ Successful 狀態 You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 56e1530cd..52fe01341 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -39,16 +39,18 @@ Token price Your %s pools Asset to send + Backup already exists. Proceed to rewrite it. + Backup failed. Not enough space on your Google Drive. Free some space and try again. Mandatory requirement for the password fulfilled Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters. Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet. - Backup failed. Not enough space on your Google Drive. Free some space and try again. Authenticate Block hash Buy XOR token Buy or sell XOR token with euro Buy XOR with fiat + Can\'t load balance Change language Change PIN Select token @@ -169,6 +171,7 @@ Refresh Remove Request + Rewrite Russian Scan Scan QR @@ -232,6 +235,7 @@ Incorrect password Enter password Not enough funds for network fee + Create pool Provide liquidity and earn rewards Swap tokens on SORA network If you loose access to this device, your funds will be lost, unless you back up! @@ -492,7 +496,7 @@ IBAN account details Log in or Sign up No more free attempts - Log out SORA Card + Log out of SORA Card You are about to log out of SORA Card. You will still have access to the SORA Card standalone app, but the balance will no longer be available to you in the SORA Wallet. Refer & Earn Refer SORA Card.\nGet €20 bonus. @@ -513,6 +517,7 @@ Successful Status You have succesfully imported an account + Support chat Ensure that you have %s left after this transaction. Otherwise, you won’t be able to do another transaction. Switch node System appearance diff --git a/common_wallet/src/main/java/jp/co/soramitsu/common_wallet/presentation/compose/states/CardState.kt b/common_wallet/src/main/java/jp/co/soramitsu/common_wallet/presentation/compose/states/CardState.kt index 1084ddb4b..563667706 100644 --- a/common_wallet/src/main/java/jp/co/soramitsu/common_wallet/presentation/compose/states/CardState.kt +++ b/common_wallet/src/main/java/jp/co/soramitsu/common_wallet/presentation/compose/states/CardState.kt @@ -118,7 +118,7 @@ fun mapAssetsToCardState( } data class SoraCardState( - val success: Boolean, + val balance: String?, val kycStatus: String?, val visible: Boolean = false, ) : CardState diff --git a/feature_sora_card_api/src/main/java/jp/co/soramitsu/feature_sora_card_api/domain/SoraCardInteractor.kt b/feature_sora_card_api/src/main/java/jp/co/soramitsu/feature_sora_card_api/domain/SoraCardInteractor.kt index 38583a19d..b11d24b43 100644 --- a/feature_sora_card_api/src/main/java/jp/co/soramitsu/feature_sora_card_api/domain/SoraCardInteractor.kt +++ b/feature_sora_card_api/src/main/java/jp/co/soramitsu/feature_sora_card_api/domain/SoraCardInteractor.kt @@ -49,7 +49,7 @@ interface SoraCardInteractor { suspend fun fetchUserIbanAccount(): Result - suspend fun fetchIbanBalance(): Result + suspend fun fetchIbanBalance(): Result suspend fun logOutFromSoraCard() } diff --git a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/domain/SoraCardInteractorImpl.kt b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/domain/SoraCardInteractorImpl.kt index 16bd56353..a91bd25e9 100644 --- a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/domain/SoraCardInteractorImpl.kt +++ b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/domain/SoraCardInteractorImpl.kt @@ -35,6 +35,7 @@ package jp.co.soramitsu.feature_sora_card_impl.domain import java.math.BigDecimal import javax.inject.Inject import jp.co.soramitsu.common.domain.CoroutineManager +import jp.co.soramitsu.common.domain.OptionsProvider.euroSign import jp.co.soramitsu.common.domain.compareByTotal import jp.co.soramitsu.common.util.NumbersFormatter import jp.co.soramitsu.common.util.ext.Big100 @@ -171,10 +172,11 @@ internal class SoraCardInteractorImpl @Inject constructor( sorted.first().iban } - override suspend fun fetchIbanBalance(): Result = + override suspend fun fetchIbanBalance(): Result = soraCardClientProxy.getIBAN().mapCatching { wrapper -> val sorted = wrapper.ibans.sortedByDescending { it.createdDate } - sorted.first().availableBalance + val euroValue = (sorted.first().availableBalance / 100.0) + "%s%.2f".format(euroSign, euroValue) } override suspend fun logOutFromSoraCard() { diff --git a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsFragment.kt b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsFragment.kt index f85f1fd45..66b65d60f 100644 --- a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsFragment.kt +++ b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsFragment.kt @@ -34,7 +34,6 @@ package jp.co.soramitsu.feature_sora_card_impl.presentation.details import android.os.Bundle import android.view.View -import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.foundation.ScrollState import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row @@ -53,6 +52,7 @@ import androidx.navigation.NavHostController import androidx.navigation.compose.composable import dagger.hilt.android.AndroidEntryPoint import jp.co.soramitsu.androidfoundation.intent.ShareUtil.shareText +import jp.co.soramitsu.androidfoundation.intent.openSoraTelegramSupportChat import jp.co.soramitsu.common.R import jp.co.soramitsu.common.base.SoraBaseFragment import jp.co.soramitsu.common.base.theOnlyRoute @@ -76,9 +76,11 @@ class SoraCardDetailsFragment : SoraBaseFragment() { shareText(c, getString(R.string.common_share), share) } } + viewModel.telegramChat.observe { + openSoraTelegramSupportChat(context) + } } - @OptIn(ExperimentalAnimationApi::class) override fun NavGraphBuilder.content( scrollState: ScrollState, navController: NavHostController diff --git a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsScreen.kt b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsScreen.kt index e09513e63..d68351f5f 100644 --- a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsScreen.kt +++ b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsScreen.kt @@ -147,9 +147,8 @@ private fun PreviewSoraCardDetailsScreen() { scrollState = rememberScrollState(), soraCardDetailsScreenState = SoraCardDetailsScreenState( soraCardMainSoraContentCardState = SoraCardMainSoraContentCardState( - balance = 3665.50f, - isCardEnabled = false, - soraCardMenuActions = SoraCardMenuAction.values().toList() + balance = "3665.50", + soraCardMenuActions = SoraCardMenuAction.entries ), soraCardReferralBannerCardState = true, soraCardRecentActivitiesCardState = SoraCardRecentActivitiesCardState( @@ -159,7 +158,7 @@ private fun PreviewSoraCardDetailsScreen() { iban = "LT61 3250 0467 7252 5583", ), soraCardSettingsCard = SoraCardSettingsCardState( - soraCardSettingsOptions = SoraCardSettingsOption.values().toList() + soraCardSettingsOptions = SoraCardSettingsOption.entries ), logoutDialog = false, ), diff --git a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsViewModel.kt b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsViewModel.kt index 1af2c6fc1..616d71205 100644 --- a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsViewModel.kt +++ b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardDetailsViewModel.kt @@ -58,17 +58,18 @@ class SoraCardDetailsViewModel @Inject constructor( private val _shareLinkEvent = SingleLiveEvent() val shareLinkEvent: LiveData = _shareLinkEvent + val telegramChat = SingleLiveEvent() + private var ibanCache: String? = null private val _soraCardDetailsScreenState = MutableStateFlow( SoraCardDetailsScreenState( soraCardMainSoraContentCardState = SoraCardMainSoraContentCardState( - balance = 0f, - isCardEnabled = false, - soraCardMenuActions = SoraCardMenuAction.entries + balance = null, + soraCardMenuActions = SoraCardMenuAction.entries, ), soraCardSettingsCard = SoraCardSettingsCardState( - soraCardSettingsOptions = SoraCardSettingsOption.entries + soraCardSettingsOptions = SoraCardSettingsOption.entries, ), logoutDialog = false, ) @@ -86,16 +87,29 @@ class SoraCardDetailsViewModel @Inject constructor( viewModelScope.launch { tryCatch { + var local = _soraCardDetailsScreenState.value soraCardInteractor.fetchUserIbanAccount() .onSuccess { iban -> ibanCache = iban - _soraCardDetailsScreenState.value = soraCardDetailsScreenState.value.copy( + local = local.copy( soraCardIBANCardState = SoraCardIBANCardState(iban) ) } .onFailure { onError(it) } + soraCardInteractor.fetchIbanBalance() + .onFailure { + onError(it) + } + .onSuccess { + local = local.copy( + soraCardMainSoraContentCardState = local.soraCardMainSoraContentCardState.copy( + balance = it + ) + ) + } + _soraCardDetailsScreenState.value = local } } } @@ -145,6 +159,9 @@ class SoraCardDetailsViewModel @Inject constructor( SoraCardSettingsOption.LOG_OUT -> _soraCardDetailsScreenState.value = _soraCardDetailsScreenState.value.copy(logoutDialog = true) + + SoraCardSettingsOption.SUPPORT_CHAT -> + telegramChat.trigger() } } diff --git a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardMainSoraContentCard.kt b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardMainSoraContentCard.kt index b48dc7713..af8f51bc0 100644 --- a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardMainSoraContentCard.kt +++ b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardMainSoraContentCard.kt @@ -40,7 +40,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.layout.wrapContentSize -import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.runtime.Composable @@ -53,10 +52,6 @@ import jp.co.soramitsu.common.R import jp.co.soramitsu.common.presentation.compose.components.SoraCardImage import jp.co.soramitsu.common.presentation.compose.uikit.tokens.Image import jp.co.soramitsu.common.presentation.compose.uikit.tokens.Text -import jp.co.soramitsu.common.util.euro -import jp.co.soramitsu.ui_core.component.button.BleachedButton -import jp.co.soramitsu.ui_core.component.button.properties.Order -import jp.co.soramitsu.ui_core.component.button.properties.Size import jp.co.soramitsu.ui_core.component.card.ContentCard import jp.co.soramitsu.ui_core.resources.Dimens import jp.co.soramitsu.ui_core.theme.customColors @@ -67,8 +62,7 @@ enum class SoraCardMenuAction { } data class SoraCardMainSoraContentCardState( - val balance: Float, - val isCardEnabled: Boolean, + val balance: String?, val actionsEnabled: Boolean = false, val soraCardMenuActions: List, ) { @@ -83,6 +77,7 @@ data class SoraCardMainSoraContentCardState( text = Text.StringRes(id = R.string.sora_card_action_top_up), isEnabled = actionsEnabled, ) + SoraCardMenuAction.TRANSFER -> IconButtonMenuState( testTagId = it.toString(), @@ -90,6 +85,7 @@ data class SoraCardMainSoraContentCardState( text = Text.StringRes(id = R.string.sora_card_action_transfer), isEnabled = actionsEnabled, ) + SoraCardMenuAction.EXCHANGE -> IconButtonMenuState( testTagId = it.toString(), @@ -97,6 +93,7 @@ data class SoraCardMainSoraContentCardState( text = Text.StringRes(id = R.string.sora_card_action_exchange), isEnabled = actionsEnabled, ) + SoraCardMenuAction.FREEZE -> IconButtonMenuState( testTagId = it.toString(), @@ -127,21 +124,24 @@ fun SoraCardMainSoraContentCard( Box( modifier = Modifier.wrapContentSize() ) { - SoraCardImage(modifier = Modifier.fillMaxWidth().wrapContentHeight()) - if (soraCardMainSoraContentCardState.isCardEnabled) - BleachedButton( - modifier = Modifier - .wrapContentSize() - .align(Alignment.BottomEnd) - .padding(Dimens.x1_5), - shape = CircleShape, - size = Size.Small, - order = Order.SECONDARY, - text = stringResource(id = R.string.show_more), - onClick = onShowMoreClick - ) + SoraCardImage( + modifier = Modifier + .fillMaxWidth() + .wrapContentHeight() + ) +// BleachedButton( +// modifier = Modifier +// .wrapContentSize() +// .align(Alignment.BottomEnd) +// .padding(Dimens.x1_5), +// shape = CircleShape, +// size = Size.Small, +// order = Order.SECONDARY, +// text = stringResource(id = R.string.show_more), +// onClick = onShowMoreClick, +// ) } - if (soraCardMainSoraContentCardState.isCardEnabled) + if (soraCardMainSoraContentCardState.balance != null) Row( modifier = Modifier .fillMaxWidth() @@ -156,7 +156,7 @@ fun SoraCardMainSoraContentCard( color = MaterialTheme.customColors.fgPrimary ) Text( - text = "%s%.2f".format(euro, soraCardMainSoraContentCardState.balance), + text = soraCardMainSoraContentCardState.balance, style = MaterialTheme.customTypography.headline2, color = MaterialTheme.customColors.fgPrimary ) @@ -182,8 +182,7 @@ fun SoraCardMainSoraContentCard( private fun PreviewMainSoraContentCard() { SoraCardMainSoraContentCard( soraCardMainSoraContentCardState = SoraCardMainSoraContentCardState( - balance = 3644.50f, - isCardEnabled = true, + balance = "3644.50", soraCardMenuActions = SoraCardMenuAction.entries ), onShowMoreClick = {}, @@ -196,8 +195,7 @@ private fun PreviewMainSoraContentCard() { private fun PreviewMainSoraContentCard2() { SoraCardMainSoraContentCard( soraCardMainSoraContentCardState = SoraCardMainSoraContentCardState( - balance = 3644.50f, - isCardEnabled = true, + balance = "3644.50", soraCardMenuActions = SoraCardMenuAction.entries ), onShowMoreClick = {}, diff --git a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardSettingsCard.kt b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardSettingsCard.kt index 60006f47d..df189bcdd 100644 --- a/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardSettingsCard.kt +++ b/feature_sora_card_impl/src/main/java/jp/co/soramitsu/feature_sora_card_impl/presentation/details/SoraCardSettingsCard.kt @@ -39,30 +39,25 @@ import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import jp.co.soramitsu.common.R import jp.co.soramitsu.common.presentation.compose.uikit.tokens.Image import jp.co.soramitsu.common.presentation.compose.uikit.tokens.Text -import jp.co.soramitsu.common.presentation.compose.uikit.tokens.retrieveString import jp.co.soramitsu.ui_core.component.card.ContentCard import jp.co.soramitsu.ui_core.resources.Dimens import jp.co.soramitsu.ui_core.theme.customColors import jp.co.soramitsu.ui_core.theme.customTypography enum class SoraCardSettingsOption { - LOG_OUT + SUPPORT_CHAT, LOG_OUT } data class SoraCardSettingsCardState( val soraCardSettingsOptions: List ) { - val headlineText: Text = Text.StringRes( - id = R.string.sora_card_settings_headline - ) - val settings: List = soraCardSettingsOptions.map { when (it) { SoraCardSettingsOption.LOG_OUT -> @@ -73,6 +68,15 @@ data class SoraCardSettingsCardState( title = Text.StringRes(id = R.string.sora_card_option_logout), icon = Image.ResImage(id = R.drawable.ic_arrow_right) ) + + SoraCardSettingsOption.SUPPORT_CHAT -> + ListTileState( + testTagId = it.toString(), + variant = ListTileVariant.TITLE_NAVIGATION_HINT, + flag = ListTileFlag.NORMAL, + title = Text.StringRes(id = R.string.support_chat), + icon = Image.ResImage(id = R.drawable.ic_arrow_right) + ) } } } @@ -95,14 +99,14 @@ fun SoraCardSettingsCard( .wrapContentSize() .padding(horizontal = Dimens.x1) .padding(top = Dimens.x1, bottom = Dimens.x2), - text = state.headlineText.retrieveString(), + text = stringResource(id = R.string.sora_card_settings_headline), style = MaterialTheme.customTypography.headline2, color = MaterialTheme.customColors.fgPrimary, ) repeat(state.settings.size) { ListTileView( listTileState = state.settings[it], - onItemClick = remember { { onItemClick.invoke(it) } } + onItemClick = { onItemClick.invoke(it) }, ) } } @@ -114,7 +118,7 @@ fun SoraCardSettingsCard( private fun PreviewSoraCardSettingsCard() { SoraCardSettingsCard( state = SoraCardSettingsCardState( - soraCardSettingsOptions = SoraCardSettingsOption.values().toList() + soraCardSettingsOptions = SoraCardSettingsOption.entries ), onItemClick = { _ -> } ) diff --git a/feature_wallet_impl/src/main/java/jp/co/soramitsu/feature_wallet_impl/presentation/cardshub/CardsHubViewModel.kt b/feature_wallet_impl/src/main/java/jp/co/soramitsu/feature_wallet_impl/presentation/cardshub/CardsHubViewModel.kt index 0b9ab996a..68f1cd93f 100644 --- a/feature_wallet_impl/src/main/java/jp/co/soramitsu/feature_wallet_impl/presentation/cardshub/CardsHubViewModel.kt +++ b/feature_wallet_impl/src/main/java/jp/co/soramitsu/feature_wallet_impl/presentation/cardshub/CardsHubViewModel.kt @@ -159,8 +159,8 @@ class CardsHubViewModel @Inject constructor( cardHub to listOf( SoraCardState( visible = cardHub.visibility, - kycStatus = mapped.first, - success = mapped.second, + kycStatus = mapped, + balance = if (status == SoraCardCommonVerification.Successful) soraCardInteractor.fetchIbanBalance().getOrDefault("") else null, ) ) } @@ -205,26 +205,26 @@ class CardsHubViewModel @Inject constructor( }.launchIn(viewModelScope) } - private fun mapKycStatus(kycStatus: SoraCardCommonVerification): Pair { + private fun mapKycStatus(kycStatus: SoraCardCommonVerification): String? { return when (kycStatus) { SoraCardCommonVerification.Failed -> { - resourceManager.getString(R.string.sora_card_verification_failed) to false + resourceManager.getString(R.string.sora_card_verification_failed) } SoraCardCommonVerification.Rejected -> { - resourceManager.getString(R.string.sora_card_verification_rejected) to false + resourceManager.getString(R.string.sora_card_verification_rejected) } SoraCardCommonVerification.Pending -> { - resourceManager.getString(R.string.sora_card_verification_in_progress) to false + resourceManager.getString(R.string.sora_card_verification_in_progress) } SoraCardCommonVerification.Successful -> { - resourceManager.getString(R.string.sora_card_verification_successful) to true + resourceManager.getString(R.string.sora_card_verification_successful) } - SoraCardCommonVerification.NotFound -> { - null to false + else -> { + null } } } @@ -338,7 +338,7 @@ class CardsHubViewModel @Inject constructor( if (card.kycStatus == null) { if (!connectionManager.isConnected) return mainRouter.showGetSoraCard() - } else if (card.success) { + } else if (card.balance != null) { mainRouter.showSoraCardDetails() } else { currentSoraCardContractData?.let { contractData -> diff --git a/feature_wallet_impl/src/main/java/jp/co/soramitsu/feature_wallet_impl/presentation/cardshub/SoraCard.kt b/feature_wallet_impl/src/main/java/jp/co/soramitsu/feature_wallet_impl/presentation/cardshub/SoraCard.kt index 7e35ea1ec..620855efd 100644 --- a/feature_wallet_impl/src/main/java/jp/co/soramitsu/feature_wallet_impl/presentation/cardshub/SoraCard.kt +++ b/feature_wallet_impl/src/main/java/jp/co/soramitsu/feature_wallet_impl/presentation/cardshub/SoraCard.kt @@ -49,6 +49,7 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import jp.co.soramitsu.common.R +import jp.co.soramitsu.common.domain.OptionsProvider.euroSign import jp.co.soramitsu.common.presentation.compose.components.SoraCardImage import jp.co.soramitsu.common.presentation.compose.theme.SoraAppTheme import jp.co.soramitsu.common.util.ext.testTagAsId @@ -83,19 +84,19 @@ fun SoraCard( modifier = Modifier .wrapContentWidth() .run { - if (state.success.not()) + if (state.balance == null) padding(bottom = Dimens.x3) else padding(all = Dimens.x1) } .run { - if (state.success.not()) + if (state.balance == null) align(Alignment.BottomCenter) else align(Alignment.BottomEnd) }, kycStatus = state.kycStatus, - success = state.success, + balance = state.balance, onCardStateClicked = onCardStateClicked, ) - if (state.success.not()) + if (state.balance == null) BleachedButton( modifier = Modifier .wrapContentWidth() @@ -114,7 +115,7 @@ fun SoraCard( private fun CardStateButton( modifier: Modifier = Modifier, kycStatus: String?, - success: Boolean, + balance: String?, onCardStateClicked: () -> Unit ) { if (kycStatus == null) { @@ -127,7 +128,16 @@ private fun CardStateButton( text = stringResource(R.string.sora_card_see_details), ) } else { - if (success.not()) + if (balance != null) + BleachedButton( + modifier = modifier + .testTagAsId("CardInfo"), + size = Size.ExtraSmall, + order = Order.SECONDARY, + onClick = onCardStateClicked, + text = balance, + ) + else TonalButton( modifier = modifier .testTagAsId("SoraCardButton"), @@ -136,15 +146,6 @@ private fun CardStateButton( onClick = onCardStateClicked, text = kycStatus, ) - else - BleachedButton( - modifier = modifier - .testTagAsId("CardInfo"), - size = Size.ExtraSmall, - order = Order.SECONDARY, - onClick = onCardStateClicked, - text = stringResource(id = R.string.sora_card_banner_title_card_info) - ) } } @@ -153,7 +154,7 @@ private fun CardStateButton( private fun PreviewSoraCard1() { SoraCard( modifier = Modifier.fillMaxWidth(), - state = SoraCardState(kycStatus = "", success = true, visible = true), + state = SoraCardState(kycStatus = "", balance = "${euroSign}345.3", visible = true), onCloseClicked = {}, onCardStateClicked = {} ) @@ -165,7 +166,7 @@ private fun PreviewSoraCard2() { SoraAppTheme { SoraCard( modifier = Modifier.fillMaxWidth(), - state = SoraCardState(kycStatus = "Pending", success = false, visible = true), + state = SoraCardState(kycStatus = "Pending", balance = null, visible = true), onCloseClicked = {}, onCardStateClicked = {} ) @@ -178,7 +179,7 @@ private fun PreviewSoraCard3() { SoraAppTheme { SoraCard( modifier = Modifier.fillMaxWidth(), - state = SoraCardState(kycStatus = null, success = false, visible = true), + state = SoraCardState(kycStatus = null, balance = null, visible = true), onCloseClicked = {}, onCardStateClicked = {} )