Wording changes, recovery fixes

This commit is contained in:
pokkst 2023-12-06 23:23:56 -06:00
parent 47b31ac5ad
commit cab3a0d79f
No known key found for this signature in database
GPG key ID: EC4FAAA66859FAA4
7 changed files with 36 additions and 22 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId "net.mynero.wallet" applicationId "net.mynero.wallet"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 34 targetSdkVersion 34
versionCode 50100 versionCode 50200
versionName "0.5.1 'Fluorine Fermi'" versionName "0.5.2 'Fluorine Fermi'"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
cmake { cmake {

View file

@ -121,10 +121,12 @@ class OnboardingFragment : Fragment(), NodeSelectionDialogListener, AddNodeListe
seedOffsetCheckbox?.visibility = View.VISIBLE seedOffsetCheckbox?.visibility = View.VISIBLE
walletRestoreHeightEditText?.visibility = View.VISIBLE walletRestoreHeightEditText?.visibility = View.VISIBLE
walletPasswordEditText?.hint = getString(R.string.password_optional) walletPasswordEditText?.hint = getString(R.string.password_optional)
walletSeedEditText?.hint = getString(R.string.recovery_phrase_optional_legacy)
} else { } else {
seedOffsetCheckbox?.visibility = View.GONE seedOffsetCheckbox?.visibility = View.GONE
walletRestoreHeightEditText?.visibility = View.GONE walletRestoreHeightEditText?.visibility = View.GONE
walletPasswordEditText?.hint = getString(R.string.password_non_optional) walletPasswordEditText?.hint = getString(R.string.password_non_optional)
walletSeedEditText?.hint = getString(R.string.recovery_phrase_optional_polyseed)
} }
} }
} }

View file

@ -93,8 +93,8 @@ class OnboardingViewModel : ViewModel() {
if (offset.isNotEmpty()) { if (offset.isNotEmpty()) {
PrefService.instance?.edit()?.putBoolean(Constants.PREF_USES_OFFSET, true)?.apply() PrefService.instance?.edit()?.putBoolean(Constants.PREF_USES_OFFSET, true)?.apply()
} }
val seedTypeValue = seedType.value ?: return@execute
if (walletSeed.isEmpty()) { if (walletSeed.isEmpty()) {
val seedTypeValue = seedType.value ?: return@execute
if (seedTypeValue == SeedType.POLYSEED) { if (seedTypeValue == SeedType.POLYSEED) {
wallet = if (offset.isEmpty()) { wallet = if (offset.isEmpty()) {
mainActivity.runOnUiThread { mainActivity.runOnUiThread {
@ -145,13 +145,22 @@ class OnboardingViewModel : ViewModel() {
if (restoreHeightText.isNotEmpty()) { if (restoreHeightText.isNotEmpty()) {
restoreHeight = restoreHeightText.toLong() restoreHeight = restoreHeightText.toLong()
} }
wallet = WalletManager.instance?.recoveryWallet( if (seedTypeValue == SeedType.POLYSEED) {
walletFile, wallet = WalletManager.instance?.recoveryWalletPolyseed(
walletPassword, walletFile,
walletSeed, walletPassword,
offset, walletSeed,
restoreHeight offset
) )
} else if (seedTypeValue == SeedType.LEGACY) {
wallet = WalletManager.instance?.recoveryWallet(
walletFile,
walletPassword,
walletSeed,
offset,
restoreHeight
)
}
} }
val walletStatus = wallet?.status val walletStatus = wallet?.status
wallet?.close() wallet?.close()

View file

@ -183,7 +183,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/edittext_bg" android:background="@drawable/edittext_bg"
android:hint="@string/recovery_phrase_optional" android:hint="@string/recovery_phrase_optional_polyseed"
android:minHeight="48dp" android:minHeight="48dp"
app:layout_constraintBottom_toTopOf="@id/wallet_restore_height_edittext" app:layout_constraintBottom_toTopOf="@id/wallet_restore_height_edittext"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View file

@ -214,6 +214,7 @@
android:elevation="6dp" android:elevation="6dp"
android:visibility="gone" android:visibility="gone"
android:importantForAccessibility="yes" android:importantForAccessibility="yes"
android:contentDescription="@string/slide_to_send_transaction"
app:area_margin="10dp" app:area_margin="10dp"
app:border_radius="20dp" app:border_radius="20dp"
app:inner_color="@android:color/white" app:inner_color="@android:color/white"

View file

@ -31,8 +31,8 @@
android:id="@+id/wallet_seed_label_textview" android:id="@+id/wallet_seed_label_textview"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="32dp"
android:textSize="18sp" android:textSize="24sp"
android:textStyle="bold" android:textStyle="bold"
android:text="@string/wallet_seed_label" android:text="@string/wallet_seed_label"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -81,8 +81,8 @@
android:id="@+id/wallet_viewkey_label_textview" android:id="@+id/wallet_viewkey_label_textview"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="32dp"
android:textSize="18sp" android:textSize="24sp"
android:textStyle="bold" android:textStyle="bold"
android:text="@string/wallet_viewkey_label" android:text="@string/wallet_viewkey_label"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -133,8 +133,8 @@
android:id="@+id/wallet_restore_height_label_textview" android:id="@+id/wallet_restore_height_label_textview"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="16dp"
android:textSize="18sp" android:textSize="24sp"
android:textStyle="bold" android:textStyle="bold"
android:text="@string/wallet_restore_height_label" android:text="@string/wallet_restore_height_label"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View file

@ -48,10 +48,11 @@
<string name="send_monero">Send</string> <string name="send_monero">Send</string>
<string name="recv_monero">Receive</string> <string name="recv_monero">Receive</string>
<string name="more_options">More options</string> <string name="more_options">More options</string>
<string name="recovery_phrase_optional">Recovery phrase (optional)</string> <string name="recovery_phrase_optional_legacy">Recovery seed (legacy)</string>
<string name="recovery_phrase_optional_polyseed">Recovery seed (polyseed)</string>
<string name="restore_height_optional">Restore height (optional)</string> <string name="restore_height_optional">Restore height (optional)</string>
<string name="password_optional">Passphrase (optional)</string> <string name="password_optional">Passphrase (optional)</string>
<string name="password_non_optional">Enter a passphrase</string> <string name="password_non_optional">Passphrase (seed offset; required)</string>
<string name="password_confirm">Confirm passphrase</string> <string name="password_confirm">Confirm passphrase</string>
<string name="password">Passphrase</string> <string name="password">Passphrase</string>
<string name="label">Label</string> <string name="label">Label</string>
@ -125,9 +126,9 @@
<string name="cant_edit_current_node">Cannot edit current node.</string> <string name="cant_edit_current_node">Cannot edit current node.</string>
<string name="cant_edit_default_nodes">Cannot edit default node.</string> <string name="cant_edit_default_nodes">Cannot edit default node.</string>
<string name="edit_node">Edit Node</string> <string name="edit_node">Edit Node</string>
<string name="wallet_seed_label">Recovery phrase</string> <string name="wallet_seed_label">Recovery seed</string>
<string name="wallet_seed_desc">Anyone with your recovery phrase can spend ALL coins in this wallet!</string> <string name="wallet_seed_desc">Anyone with your recovery seed can spend ALL coins in this wallet!</string>
<string name="wallet_seed_offset_desc">Your wallet seed offset (sometimes called a seed passphrase) is the passphrase you use to unlock the wallet in this app. It will not be displayed here, but it is needed to FULLY restore the keys to this wallet.</string> <string name="wallet_seed_offset_desc">Your wallet seed passphrase (sometimes called a seed offset) is the passphrase you use to unlock the wallet in this app. It will not be displayed here, but it is needed to FULLY restore the keys to this wallet.</string>
<string name="wallet_viewkey_label">Private view-key</string> <string name="wallet_viewkey_label">Private view-key</string>
<string name="wallet_viewkey_desc">Anyone with your private view-key can see all incoming transactions!</string> <string name="wallet_viewkey_desc">Anyone with your private view-key can see all incoming transactions!</string>
<string name="wallet_restore_height_label">Restore height</string> <string name="wallet_restore_height_label">Restore height</string>
@ -157,5 +158,6 @@
<string name="seed_desc_legacy">Older, 25 word seed; supported in all Monero wallets. In Mysu, seed passphrase is not enforced for these wallets.</string> <string name="seed_desc_legacy">Older, 25 word seed; supported in all Monero wallets. In Mysu, seed passphrase is not enforced for these wallets.</string>
<string name="approve_the_transaction">Send transaction</string> <string name="approve_the_transaction">Send transaction</string>
<string name="paste_clipboard_into_passphrase_field">Paste clipboard into passphrase field</string> <string name="paste_clipboard_into_passphrase_field">Paste clipboard into passphrase field</string>
<string name="slide_to_send_transaction">Slide to send transaction</string>
</resources> </resources>