Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sn-2950 backup #223

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class Navigator :
}

override fun popBackStackToAccountDetails() {
navController?.popBackStack(R.id.accoundDetailsFragment, false)
navController?.popBackStack(R.id.accountDetailsFragment, false)
}

override fun showSelectLanguage() {
Expand Down Expand Up @@ -317,7 +317,7 @@ class Navigator :

override fun showAccountList() {
navController?.navigate(
R.id.export_account_nav_graph,
R.id.accountListFragment,
null,
)
}
Expand Down Expand Up @@ -355,7 +355,7 @@ class Navigator :

override fun showAccountDetails(address: String) {
navController?.navigate(
R.id.accoundDetailsFragment,
R.id.accountDetailsFragment,
withArgs {
this.address = address
},
Expand Down
26 changes: 25 additions & 1 deletion app/src/main/res/navigation/main_nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,35 @@
android:id="@+id/soraCardDetailsFragment"
android:name="jp.co.soramitsu.feature_sora_card_impl.presentation.details.SoraCardDetailsFragment" />

<fragment
android:id="@+id/accountDetailsFragment"
android:name="jp.co.soramitsu.feature_multiaccount_impl.presentation.export_account.account_details.AccountDetailsFragment"
android:label="AccountDetailsFragment" />

<fragment
android:id="@+id/accountListFragment"
android:name="jp.co.soramitsu.feature_multiaccount_impl.presentation.export_account.account_list.AccountListFragment"
android:label="AccountListFragment" />

<fragment
android:id="@+id/exportProtectionFragment"
android:name="jp.co.soramitsu.feature_multiaccount_impl.presentation.export_account.protection.ExportProtectionFragment"
android:label="ExportProtectionFragment" />

<fragment
android:id="@+id/backupFragment"
android:name="jp.co.soramitsu.feature_multiaccount_impl.presentation.export_account.backup.BackupFragment"
android:label="BackupFragment" />

<fragment
android:id="@+id/backupJsonFragment"
android:name="jp.co.soramitsu.feature_multiaccount_impl.presentation.export_account.backup.json.BackupJsonFragment"
android:label="BackupJsonFragment" />

<include app:graph="@navigation/activities_nav_graph" />
<include app:graph="@navigation/profile_nav_graph" />
<include app:graph="@navigation/wallet_nav_graph" />
<include app:graph="@navigation/referral_nav_graph" />
<include app:graph="@navigation/export_account_nav_graph" />
<include app:graph="@navigation/select_node_nav_graph" />
<include app:graph="@navigation/sora_card_nav_graph" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class CommonModule {
@Singleton
@Provides
fun provideSoramitsuNetworkClient(): SoramitsuNetworkClient =
SoramitsuNetworkClient(logging = BuildConfig.DEBUG)
SoramitsuNetworkClient(logging = BuildConfig.DEBUG, timeout = 20000)

@Singleton
@Provides
Expand Down
2 changes: 2 additions & 0 deletions common/src/main/java/jp/co/soramitsu/common/domain/CardHub.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const val POOLS_HUB_NAME = "pools"
const val GET_SORA_CARD_HUB_NAME = "get sora card"
const val BUY_XOR_TOKEN_HUB_NAME = "buy xor token"
const val REFERRAL_SYSTEM_HUB_NAME = "referral system"
const val BACKUP_WALLET_HUB_NAME = "backup wallet"

data class CardHub(
val cardType: CardHubType,
Expand Down Expand Up @@ -73,6 +74,7 @@ enum class CardHubType(
R.string.referral_toolbar_title,
),

BACKUP(BACKUP_WALLET_HUB_NAME, order = -1, boundToAccount = true, R.string.wallet_backup),
ASSETS(ASSETS_HUB_NAME, order = 0, boundToAccount = true, R.string.liquid_assets),
POOLS(POOLS_HUB_NAME, order = 1, boundToAccount = true, R.string.pooled_assets),
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ fun BasicBannerCard(
description: String,
button: String,
onButtonClicked: () -> Unit,
closeEnabled: Boolean,
onCloseCard: () -> Unit,
) {
ContentCard(
Expand Down Expand Up @@ -117,18 +118,20 @@ fun BasicBannerCard(
)
}

BleachedButton(
modifier = Modifier
.wrapContentWidth()
.align(Alignment.TopEnd)
.padding(Dimens.x1)
.alpha(0.8f),
size = Size.ExtraSmall,
order = Order.TERTIARY,
shape = CircleShape,
onClick = onCloseCard,
leftIcon = painterResource(R.drawable.ic_cross),
)
if (closeEnabled) {
BleachedButton(
modifier = Modifier
.wrapContentWidth()
.align(Alignment.TopEnd)
.padding(Dimens.x1)
.alpha(0.8f),
size = Size.ExtraSmall,
order = Order.TERTIARY,
shape = CircleShape,
onClick = onCloseCard,
leftIcon = painterResource(R.drawable.ic_cross),
)
}
}
}
}
Expand Down Expand Up @@ -183,6 +186,7 @@ private fun PreviewBasicBannerCard1() {
title = "Some title of banner card, let it be longeeerr",
description = "Long description of banner card, The quick brown fox jumps over the lazy dog, The quick brown fox jumps over the lazy dog.And I, even I Artaxerxes the king, do make a decree to all the treasurers which are beyond the river, that whatsoever Ezra the priest, the scribe of the law of the God of heaven, shall require of you, it be done speedily",
button = "Just button title",
closeEnabled = true,
onCloseCard = {},
onButtonClicked = {},
)
Expand All @@ -196,6 +200,7 @@ private fun PreviewBasicBannerCard12() {
title = "Some title",
description = "Long description of banner",
button = "Just button title",
closeEnabled = false,
onCloseCard = {},
onButtonClicked = {},
)
Expand All @@ -209,6 +214,7 @@ private fun PreviewBasicBannerCard2() {
title = "Title",
description = "Description",
button = "Button",
closeEnabled = true,
onCloseCard = {},
onButtonClicked = {},
)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion common/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="asset_to_send">الأصول المراد إرسالها</string>
<string name="backup_account_already_exist">Backup already exists. Proceed to rewrite it.</string>
<string name="backup_not_enough_space_error">Backup failed. Not enough space on your Google Drive. Free some space and try again.</string>
<string name="backup_now">Backup now</string>
<string name="backup_password_mandatory_reqs_fulfilled">Mandatory requirement for the password fulfilled</string>
<string name="backup_password_requirments">Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters.</string>
<string name="backup_password_title">Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters.</string>
Expand Down Expand Up @@ -410,6 +411,7 @@
<item quantity="other">%s ثواني</item>
</plurals>
<string name="project_ended_template">انتهى %s</string>
<string name="protect_loss_access_funds">Protect yourself from losing access to your funds</string>
<string name="qr_code">رمز الاستجابة السريعة QR</string>
<string name="qr_upload">التحميل من معرض الصور</string>
<string name="receive_tokens">تلقي العملات</string>
Expand Down Expand Up @@ -514,7 +516,6 @@
<string name="sora_card_details_card_management_coming_soon">Card management is coming soon</string>
<string name="sora_card_details_title">Card details</string>
<string name="sora_card_free_card_issuance">اصدار بطاقة مجاني</string>
<string name="sora_card_free_card_issuance_conditions_euro">أو 20 € رسوم الطلب</string>
<string name="sora_card_free_card_issuance_conditions_xor">إذا كنت تحتفظ أو تشارك أو توفر السيولة لما لا يقل عن 100 يورو من XOR في حساب SORA الخاص بك</string>
<string name="sora_card_get_more_xor">احصل على المزيد من XOR</string>
<string name="sora_card_iban_headline">IBAN account details</string>
Expand Down Expand Up @@ -559,6 +560,7 @@
<string name="unexpected_error">An unexpected error has occured.\n\nYou may troubleshoot this issue in SORA community at the @SORAhappiness Telegram chat.</string>
<string name="update_downloaded">تم اصدار تحديث تطبيق SORA وهو جاهز للتثبيت.\n\nمن المهم استخدام أحدث إصدار من التطبيق.\n\nلتحديث التطبيق، يلزمك إعادة التشغيل.</string>
<string name="update_install_now">هل تود تثبيت التحديث الآن؟</string>
<string name="wallet_backup">Wallet backup</string>
<string name="wallet_balance_locked">المقفل</string>
<string name="wallet_balance_reserved">المدخر</string>
<string name="wallet_bonded">المسند</string>
Expand Down
6 changes: 4 additions & 2 deletions common/src/main/res/values-az/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="asset_to_send">Asset to send</string>
<string name="backup_account_already_exist">Yedək artıq mövcuddur. Yenidən yazmağa davam edin.</string>
<string name="backup_not_enough_space_error">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.</string>
<string name="backup_now">İndi yedəkləyin</string>
<string name="backup_password_mandatory_reqs_fulfilled">Parol üçün məcburi tələb yerinə yetirildi</string>
<string name="backup_password_requirments">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.</string>
<string name="backup_password_title">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.</string>
Expand Down Expand Up @@ -238,7 +239,7 @@
<string name="explore_create_pool">Hovuz yaradın</string>
<string name="explore_provide_and_earn">Likvidliyi təmin edin və mükafatlar qazanın</string>
<string name="explore_swap_tokens_on_sora">SORA şəbəkəsində tokenləri dəyişdirin</string>
<string name="export_account_details_backup_description">If you loose access to this device, your funds will be lost, unless you back up!</string>
<string name="export_account_details_backup_description">Bu cihaza girişi itirsəniz, ehtiyat nüsxəsini çıxarmasanız, vəsaitiniz itiriləcək!</string>
<string name="export_account_details_backup_options">Yedəkləmə seçimləri</string>
<string name="export_account_details_show_passphrase">Parol ifadəsini göstərin</string>
<string name="export_account_details_show_raw_seed">Xam Toxumu göstərin</string>
Expand Down Expand Up @@ -390,6 +391,7 @@
<item quantity="other">saniyələr qalıb</item>
</plurals>
<string name="project_ended_template">Tamamlandı</string>
<string name="protect_loss_access_funds">Özünüzü pulunuza girişi itirməkdən qoruyun</string>
<string name="qr_code">QR kodu</string>
<string name="qr_upload">Qalereyadan yükləyin</string>
<string name="receive_tokens">Receive tokens</string>
Expand Down Expand Up @@ -490,7 +492,6 @@
<string name="sora_card_details_card_management_coming_soon">Kart idarəçiliyi tezliklə gələcək</string>
<string name="sora_card_details_title">Kart təfərrüatları</string>
<string name="sora_card_free_card_issuance">Free card issuance</string>
<string name="sora_card_free_card_issuance_conditions_euro">və ya €20 ərizə haqqı</string>
<string name="sora_card_free_card_issuance_conditions_xor">If you hold, stake or provide liquidity for at least €100 worth of XOR in your SORA account</string>
<string name="sora_card_get_more_xor">Get more XOR</string>
<string name="sora_card_iban_headline">IBAN hesabı təfərrüatları</string>
Expand Down Expand Up @@ -535,6 +536,7 @@
<string name="unexpected_error">Gözlənilməz xəta baş verdi. \n\n Siz @SORAhappiness Telegram çatında SORA icmasında bu problemi həll edə bilərsiniz.</string>
<string name="update_downloaded">SORA tətbiqi üçün yeniləmə endirilib və quraşdırılmağa hazırdır. \n\n Proqramın ən son versiyasından istifadə etmək vacibdir. \n\n Proqramı yeniləmək üçün yenidən başladın tələb olunur.</string>
<string name="update_install_now">Güncəlləməni indi quraşdırmaq istərdinizmi?</string>
<string name="wallet_backup">Pulqabı ehtiyat nüsxəsi</string>
<string name="wallet_balance_locked">Kilidlənmiş</string>
<string name="wallet_balance_reserved">Rezerv edilmiş</string>
<string name="wallet_bonded">Bağlı</string>
Expand Down
4 changes: 3 additions & 1 deletion common/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="asset_to_send">Asset to send</string>
<string name="backup_account_already_exist">Backup already exists. Proceed to rewrite it.</string>
<string name="backup_not_enough_space_error">Backup failed. Not enough space on your Google Drive. Free some space and try again.</string>
<string name="backup_now">Backup now</string>
<string name="backup_password_mandatory_reqs_fulfilled">Mandatory requirement for the password fulfilled</string>
<string name="backup_password_requirments">Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters.</string>
<string name="backup_password_title">Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters.</string>
Expand Down Expand Up @@ -390,6 +391,7 @@
<item quantity="other">Es verbleiben noch %s Sekunden</item>
</plurals>
<string name="project_ended_template">%s ist beendet</string>
<string name="protect_loss_access_funds">Protect yourself from losing access to your funds</string>
<string name="qr_code">QR-Code</string>
<string name="qr_upload">Aus Galerie hochladen</string>
<string name="receive_tokens">Receive tokens</string>
Expand Down Expand Up @@ -490,7 +492,6 @@
<string name="sora_card_details_card_management_coming_soon">Card management is coming soon</string>
<string name="sora_card_details_title">Card details</string>
<string name="sora_card_free_card_issuance">Free card issuance</string>
<string name="sora_card_free_card_issuance_conditions_euro">or €20 application fee</string>
<string name="sora_card_free_card_issuance_conditions_xor">If you hold, stake or provide liquidity for at least €100 worth of XOR in your SORA account</string>
<string name="sora_card_get_more_xor">Get more XOR</string>
<string name="sora_card_iban_headline">IBAN account details</string>
Expand Down Expand Up @@ -535,6 +536,7 @@
<string name="unexpected_error">An unexpected error has occured.\n\nYou may troubleshoot this issue in SORA community at the @SORAhappiness Telegram chat.</string>
<string name="update_downloaded">Ein Update für die SORA-App wurde heruntergeladen und kann nun installiert werden.\n\nEs ist wichtig, die neueste Version der App zu verwenden.\n\nUm die App zu aktualisieren, ist ein Neustart erforderlich.</string>
<string name="update_install_now">Möchtest du das Update jetzt installieren?</string>
<string name="wallet_backup">Wallet backup</string>
<string name="wallet_balance_locked">Gesperrt</string>
<string name="wallet_balance_reserved">Reserviert</string>
<string name="wallet_bonded">Zugeordnet</string>
Expand Down
6 changes: 4 additions & 2 deletions common/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<string name="asset_to_send">Activo a enviar</string>
<string name="backup_account_already_exist">Backup already exists. Proceed to rewrite it.</string>
<string name="backup_not_enough_space_error">Backup failed. Not enough space on your Google Drive. Free some space and try again.</string>
<string name="backup_now">Backup now</string>
<string name="backup_password_mandatory_reqs_fulfilled">Mandatory requirement for the password fulfilled</string>
<string name="backup_password_requirments">Minimum six characters. Optionally, for better security, include uppercase letters, numbers and non-alphabetic characters.</string>
<string name="backup_password_title">Setting a password will encrypt your Google backup. You’ll need to enter this when restoring your wallet.\nMinimum password length is 6 characters.</string>
Expand Down Expand Up @@ -238,7 +239,7 @@
<string name="explore_create_pool">Create pool</string>
<string name="explore_provide_and_earn">Provide liquidity and earn rewards</string>
<string name="explore_swap_tokens_on_sora">Swap tokens on SORA network</string>
<string name="export_account_details_backup_description">If you loose access to this device, your funds will be lost, unless you back up!</string>
<string name="export_account_details_backup_description">If you lose access to this device, your funds will be lost, unless you back up!</string>
<string name="export_account_details_backup_options">Backup options</string>
<string name="export_account_details_show_passphrase">Show Passphrase</string>
<string name="export_account_details_show_raw_seed">Show Raw Seed</string>
Expand Down Expand Up @@ -390,6 +391,7 @@
<item quantity="other">%s segundos restantes</item>
</plurals>
<string name="project_ended_template">Terminado %s</string>
<string name="protect_loss_access_funds">Protect yourself from losing access to your funds</string>
<string name="qr_code">Código QR</string>
<string name="qr_upload">Subir desde la galería</string>
<string name="receive_tokens">Recibir tokens</string>
Expand Down Expand Up @@ -490,7 +492,6 @@
<string name="sora_card_details_card_management_coming_soon">Card management is coming soon</string>
<string name="sora_card_details_title">Card details</string>
<string name="sora_card_free_card_issuance">Emisión de tarjeta gratuita</string>
<string name="sora_card_free_card_issuance_conditions_euro">o tarifa de inscripción 20 €</string>
<string name="sora_card_free_card_issuance_conditions_xor">If you hold, stake or provide liquidity for at least €100 worth of XOR in your SORA account</string>
<string name="sora_card_get_more_xor">Conseguir más XOR</string>
<string name="sora_card_iban_headline">IBAN account details</string>
Expand Down Expand Up @@ -535,6 +536,7 @@
<string name="unexpected_error">An unexpected error has occured.\n\nYou may troubleshoot this issue in SORA community at the @SORAhappiness Telegram chat.</string>
<string name="update_downloaded">An update for the SORA application has been downloaded and is ready to be installed.\n\nIt is important to use the latest version of the application.\n\nIn order to update the app, a restart is required.</string>
<string name="update_install_now">Would you like to install the update now?</string>
<string name="wallet_backup">Wallet backup</string>
<string name="wallet_balance_locked">Bloqueado</string>
<string name="wallet_balance_reserved">Reservado</string>
<string name="wallet_bonded">Vinculado</string>
Expand Down
Loading