Skip to content

Commit

Permalink
mwr-638 backup not enough space error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mrZizik committed Sep 25, 2023
1 parent cecd122 commit 563234b
Show file tree
Hide file tree
Showing 48 changed files with 141 additions and 163 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ play {
serviceAccountCredentials = file(System.env.CI_PLAY_KEY ?: "../key/fake.json")
track = "internal"
releaseStatus = ReleaseStatus.DRAFT
releaseName = "3.4.0.2 - Explore Ecosystem"
releaseName = "3.4.0.4 - Explore Ecosystem"
}

dependencies {
Expand Down
14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,22 @@ buildscript {
composeMaterial : '1.4.3',
composeCompiler : '1.4.6',
composeConstraintLayout: '1.1.0-alpha05',
uiCore : '0.1.3',
uiCore : '0.1.4',
soraCard : '0.1.41',
lazySodium : '5.0.2',
jna : '5.8.0',
accompanist : '0.30.1',
xserializationjson : '1.5.0',
ktor : '2.3.1'
ktor : '2.3.1',
xbackup : '0.0.2-20230915.111539-1'
]

ext {
// soralution 108 3.4.0.2 2023.09.13
// soralution 110 3.4.0.4 2023.09.20
// sora dae 98 3.3.0.0 2023.08.18
// appVersionCode = Integer.valueOf(System.env.BUILD_NUMBER ?: 96)
appVersionCode = Integer.valueOf(System.env.CI_BUILD_ID ?: 108)
appVersionName = '3.4.0.2'
appVersionCode = Integer.valueOf(System.env.CI_BUILD_ID ?: 110)
appVersionName = '3.4.0.4'

compileVersion = 33
minVersion = 24
Expand Down Expand Up @@ -120,7 +121,6 @@ buildscript {
webSocketLibDep = "com.neovisionaries:nv-websocket-client:$versions.webSocketLib"
uiCoreDep = "jp.co.soramitsu:ui-core:$versions.uiCore"
sharedUtilsDep = "jp.co.soramitsu.shared_features:core:$versions.sharedUtils"
sharedFeaturesBackupDep = "jp.co.soramitsu.shared_features:backup:$versions.sharedUtils"
sharedFeaturesModelsDep = "jp.co.soramitsu.shared_features:models:$versions.sharedUtils"

soraCardDep = "jp.co.soramitsu:android-sora-card:$versions.soraCard"
Expand Down Expand Up @@ -149,6 +149,8 @@ buildscript {

web3jDep = "org.web3j:core:$versions.web3j"

xbackupDep = "jp.co.soramitsu:xbackup:$versions.xbackup"

permissionsAccompanistDep = "com.google.accompanist:accompanist-permissions:$versions.accompanist"
permissionsRuntimeDep = "com.guolindev.permissionx:permissionx:1.7.1"

Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ dependencies {
implementation navigationFragmentDep
implementation navigationUiDep

implementation sharedFeaturesBackupDep
implementation xbackupDep
implementation sharedUtilsDep

implementation gsonDep
Expand Down
2 changes: 1 addition & 1 deletion common/src/develop/assets/sora2_metadata

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import java.util.Locale
import java.util.TimeZone
import javax.inject.Singleton
import jp.co.soramitsu.androidfoundation.phone.BasicClipboardManager
import jp.co.soramitsu.backup.BackupService
import jp.co.soramitsu.common.BuildConfig
import jp.co.soramitsu.common.account.AccountAvatarGenerator
import jp.co.soramitsu.common.data.AppStateProviderImpl
Expand Down Expand Up @@ -83,6 +82,7 @@ import jp.co.soramitsu.common.util.json_decoder.JsonAccountsEncoder
import jp.co.soramitsu.common.vibration.DeviceVibrator
import jp.co.soramitsu.crypto.ed25519.Ed25519Sha3
import jp.co.soramitsu.shared_utils.encrypt.json.JsonSeedEncoder
import jp.co.soramitsu.xbackup.BackupService
import jp.co.soramitsu.xnetworking.networkclient.SoramitsuHttpClientProvider
import jp.co.soramitsu.xnetworking.networkclient.SoramitsuHttpClientProviderImpl
import jp.co.soramitsu.xnetworking.networkclient.SoramitsuNetworkClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ fun BigDecimal.nullZero(): BigDecimal? = if (this.isZero()) null else this

fun BigDecimal.divideBy(
divisor: BigDecimal,
scale: Int? = null
scale: Int? = null,
): BigDecimal {
return if (scale == null) {
val maxScale = max(this.scale(), divisor.scale())
val maxScale = max(this.scale(), divisor.scale()).coerceAtMost(OptionsProvider.defaultScale)

if (maxScale != 0) {
this.divide(divisor, maxScale, RoundingMode.HALF_EVEN)
Expand All @@ -79,7 +79,7 @@ fun BigDecimal.divideBy(

fun BigDecimal.safeDivide(
divisor: BigDecimal,
scale: Int? = null
scale: Int? = null,
): BigDecimal {
return if (divisor.isZero()) {
BigDecimal.ZERO
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@
<string name="invoice_scan_error_user_not_found">تعذر العثور على مستخدم من مسح QR</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">الأصول السائلة</string>
<string name="liquidity_pair_creation_description">سعر هذا الحوض سيحدد بناء على تقييم العملات الي تضيفها عندما يكون معدل التقييم مرضياً بالنسبة لك، انقر للبت بالعرض.</string>
<string name="liquidity_pair_creation_title">انت اول موفر سيولة</string>
<string name="logout_dialog_body">سيؤدي هذا الإجراء إلى حذف الحساب من هذا الجهاز. تأكد من حفظ نسخة احتياطية من كدمات الإستذكار الأولية قبل المتابعة.</string>
<string name="logout_remove_nodes_body">\n \n ستتم إزالة جميع العقد المخصصة أيضًا</string>
<string name="mnemonic_confirmation_select_word_2">من القائمة التي كتبتها</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-az/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">QR-dən istifadəçi tapa bilinmir</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Liquid assets</string>
<string name="liquidity_pair_creation_description">Əlavə etdiyiniz tokenlərin nisbəti bu hovuzun qiymətini təyin edəcək. Məzənnədən məmnun olduqdan sonra nəzərdən keçirmək üçün təchizatı klikləyin.</string>
<string name="liquidity_pair_creation_title">Siz ilk likvidlik təminatçısısınız</string>
<string name="logout_dialog_body">Bu əməliyyat hesabın bu cihazdan silinməsi ilə nəticələnəcəkdir. Davam etmədən əvvəl parol keçidinizi yedəklədiyinizə əmin olun.</string>
<string name="logout_remove_nodes_body">\n\nBütün fərdi qovşaqlarınız da silinəcək</string>
<string name="mnemonic_confirmation_select_word_2">from the list you have written down</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">Keinen Benutzer vom QR-Code gefunden</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Liquid assets</string>
<string name="liquidity_pair_creation_description">Das Verhältnis der Token, die du hinzufügst, bestimmt den Preis dieses Pools. Sobald du mit dem Preis zufrieden bist, klicke auf Angebot, um es zu überprüfen.</string>
<string name="liquidity_pair_creation_title">Du bist der erste Liquiditätsanbieter</string>
<string name="logout_dialog_body">Diese Aktion führt zum Löschen des Kontos von diesem Gerät. Stell sicher, dass du deine Passphrase sicher hinterlegt hast, bevor du fortfährst.</string>
<string name="logout_remove_nodes_body">\n\nAll your custom nodes will be removed as well</string>
<string name="mnemonic_confirmation_select_word_2">from the list you have written down</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">No se pudo encontrar un usuario desde ese código QR</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Activos Líquidos</string>
<string name="liquidity_pair_creation_description">The ratio of tokens you add will set the price of this pool. Once you are happy with the rate click supply to review.</string>
<string name="liquidity_pair_creation_title">You are the first liquidity provider</string>
<string name="logout_dialog_body">Esta acción resultará en la eliminación de la cuenta de este dispositivo. Asegúrese de haber realizado una copia de seguridad de su frase semilla antes de continuar.</string>
<string name="logout_remove_nodes_body">\n\nAll your custom nodes will be removed as well</string>
<string name="mnemonic_confirmation_select_word_2">de la lista que has anotado</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">کاربری با QR پیدا نمی شود</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Liquid assets</string>
<string name="liquidity_pair_creation_description">نسبت توکن‌هایی که اضافه می‌کنید، قیمت این مخزن را تعیین می‌کند. هر وقت از نرخ راضی بودید، برای بررسی روی تامین کلیک کنید.</string>
<string name="liquidity_pair_creation_title">شما اولین ارائه دهنده نقدینگی هستید</string>
<string name="logout_dialog_body">این عملکرد منجر به حذف حساب از این دستگاه می‌شود. قبل از ادامه مطمئن شوید که از کلمات بازیابی والت خود پشتیبان تهیه کرده اید.</string>
<string name="logout_remove_nodes_body">\n\nAll your custom nodes will be removed as well</string>
<string name="mnemonic_confirmation_select_word_2">from the list you have written down</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">Käyttäjää ei löydy QR:stä</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Liquid assets</string>
<string name="liquidity_pair_creation_description">The ratio of tokens you add will set the price of this pool. Once you are happy with the rate click supply to review.</string>
<string name="liquidity_pair_creation_title">You are the first liquidity provider</string>
<string name="logout_dialog_body">Tämä toiminto johtaa tilin poistamiseen tältä laitteelta. Varmista, että olet varmuuskopioinut salasanasi, ennen kuin jatkat.</string>
<string name="logout_remove_nodes_body">\n\nAll your custom nodes will be removed as well</string>
<string name="mnemonic_confirmation_select_word_2">from the list you have written down</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">Utilisateur introuvable à partir du QR code</string>
<string name="launch_screen_loading_title">Le chargement prend plus de temps cette fois-ci</string>
<string name="liquid_assets">Actifs liquides</string>
<string name="liquidity_pair_creation_description">Le ratio de jetons que vous ajoutez fixera le prix de ce pool. Une fois que vous êtes satisfait du taux, cliquez sur approvisionner pour le réviser.</string>
<string name="liquidity_pair_creation_title">Vous êtes le premier fournisseur de liquidités</string>
<string name="logout_dialog_body">Cette action entraînera la suppression du compte de cet appareil. Assurez-vous d\'avoir sauvegardé votre phrase secrète avant de continuer.</string>
<string name="logout_remove_nodes_body">\n\nTous vos nœuds personnalisés seront également supprimés</string>
<string name="mnemonic_confirmation_select_word_2">parmi la liste de mot que vous avez notée</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-hi-rIN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">क्यूआर से उपयोगकर्ता नहीं मिल रहा है</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">चल परिसंपत्ति</string>
<string name="liquidity_pair_creation_description">आपके द्वारा जोड़े गए टोकन का अनुपात इस पूल का मूल्य निर्धारित करेगा। एक बार जब आप दर से खुश हो जाते हैं तो समीक्षा के लिए आपूर्ति पर क्लिक करें।</string>
<string name="liquidity_pair_creation_title">आप पहले Liquidity प्रदाता हैं</string>
<string name="logout_dialog_body">इस कार्रवाई के परिणामस्वरूप इस डिवाइस से खाता हटा दिया जाएगा। सुनिश्चित करें कि आपने आगे बढ़ने से पहले अपने पदबंध का बैकअप किया है।</string>
<string name="logout_remove_nodes_body">\n \n आपके सभी कस्टम नोड भी हटा दिए जाएँगे</string>
<string name="mnemonic_confirmation_select_word_2">आपके द्वारा लिखी गई सूची में से</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@
<string name="invoice_scan_error_user_not_found">Tidak dapat menemukan pengguna dari QR</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Liquid assets</string>
<string name="liquidity_pair_creation_description">The ratio of tokens you add will set the price of this pool. Once you are happy with the rate click supply to review.</string>
<string name="liquidity_pair_creation_title">You are the first liquidity provider</string>
<string name="logout_dialog_body">Tindakan ini akan mengakibatkan penghapusan akun dari perangkat ini. Pastikan Anda telah membuat cadangan frasa sandi Anda sebelum melanjutkan.</string>
<string name="logout_remove_nodes_body">\n\nAll your custom nodes will be removed as well</string>
<string name="mnemonic_confirmation_select_word_2">from the list you have written down</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-iw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@
<string name="invoice_scan_error_user_not_found">לא מצליח למצוא משתמש מ- QR</string>
<string name="launch_screen_loading_title">זה נטען לעוד קצת זמן הפעם</string>
<string name="liquid_assets">נכסים נזילים</string>
<string name="liquidity_pair_creation_description">יחס הטוקנים שתוסיף יקבע את המחיר של המאגר הזה. לאחר שתהיה מרוצה מהשער לחץ על אספקה כדי לבדוק.</string>
<string name="liquidity_pair_creation_title">אתה ספק הנזילות הראשון</string>
<string name="logout_dialog_body">פעולה זו תגרום למחיקת חשבון ממכשיר זה. ודא שגיבית את מילות המפתח שלך לפני שתמשיך.</string>
<string name="logout_remove_nodes_body">\n\n כל הצמתים המותאמים אישית שלך יוסרו גם כן</string>
<string name="mnemonic_confirmation_select_word_2">מהרשימה שרשמת</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@
<string name="invoice_scan_error_user_not_found">QRコードからユーザーを見つけることができません。</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">流動資産</string>
<string name="liquidity_pair_creation_description">追加するトークンの比率によって、このプールの価格は設定されます。料金に満足したら、供給をタップして確認します。</string>
<string name="liquidity_pair_creation_title">あなたは最初の流動性供給者です</string>
<string name="logout_dialog_body">このアクションを行うと、このデバイスからアカウントが削除されます。続行する前に、パスフレーズのバックアップを取ったことを必ず確認してください</string>
<string name="logout_remove_nodes_body">\n\nカスタムノードも全て削除されます</string>
<string name="mnemonic_confirmation_select_word_2">書き出したリストから</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-ms-rMY/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@
<string name="invoice_scan_error_user_not_found">Tidak dapat mencari pengguna dari QR</string>
<string name="launch_screen_loading_title">Ia memuatkan sedikit lebih lama kali ini</string>
<string name="liquid_assets">Aset cair</string>
<string name="liquidity_pair_creation_description">Nisbah token yang anda tambah akan menetapkan harga kolam ini. Sebaik sahaja anda berpuas hati dengan kadar klik bekalan untuk menyemak.</string>
<string name="liquidity_pair_creation_title">Anda adalah pembekal kecairan pertama</string>
<string name="logout_dialog_body">Tindakan ini akan mengakibatkan penghapusan akaun dari peranti ini. Pastikan anda telah menyandarkan frasa laluan anda sebelum meneruskan.</string>
<string name="logout_remove_nodes_body">\n\nSemua nod tersuai anda juga akan dialih keluar</string>
<string name="mnemonic_confirmation_select_word_2">daripada senarai yang telah anda tulis</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">Finner ikke bruker fra QR</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Liquid assets</string>
<string name="liquidity_pair_creation_description">The ratio of tokens you add will set the price of this pool. Once you are happy with the rate click supply to review.</string>
<string name="liquidity_pair_creation_title">You are the first liquidity provider</string>
<string name="logout_dialog_body">Denne handlingen vil føre til at kontoen slettes fra denne enheten. Forsikre deg om at du har sikkerhetskopiert passordfrasen din før du fortsetter.</string>
<string name="logout_remove_nodes_body">\n\nAll your custom nodes will be removed as well</string>
<string name="mnemonic_confirmation_select_word_2">from the list you have written down</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">Kan geen gebruiker vinden via QR</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Liquid assets</string>
<string name="liquidity_pair_creation_description">De verhouding van tokens die u toevoegt, bepaalt de prijs van deze pool. Zodra u tevreden bent met de snelheid klik aanbod om te beoordelen.</string>
<string name="liquidity_pair_creation_title">U bent de eerste liquiditeitsverschaffer</string>
<string name="logout_dialog_body">Deze actie zal resulteren in het verwijderen van een account van dit apparaat. Zorg ervoor dat u een back-up hebt gemaakt van uw passphrase voordat u verder gaat.</string>
<string name="logout_remove_nodes_body">\n\nAlle aangepaste noden worden ook verwijderd</string>
<string name="mnemonic_confirmation_select_word_2">from the list you have written down</string>
Expand Down
2 changes: 0 additions & 2 deletions common/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@
<string name="invoice_scan_error_user_not_found">Não foi encontrado um utilizador através do código QR</string>
<string name="launch_screen_loading_title">It\'s loading for a little longer this time</string>
<string name="liquid_assets">Liquid assets</string>
<string name="liquidity_pair_creation_description">O rácio de tokens que adicionará vai definir o preço desta pool. Assim que estiver satisfeito com a taxa, clique fornecer para fazer a revisão.</string>
<string name="liquidity_pair_creation_title">É o primeiro fornecedor de liquidez</string>
<string name="logout_dialog_body">Esta ação resultará na exclusão da sua conta deste dispositivo. Certifique-se de ter guardado a sua passphrase antes de continuar.</string>
<string name="logout_remove_nodes_body">\n\nAll your custom nodes will be removed as well</string>
<string name="mnemonic_confirmation_select_word_2">from the list you have written down</string>
Expand Down
Loading

0 comments on commit 563234b

Please sign in to comment.