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

[ABW-3645] - Seed phrase UI refinements #1115

Merged
merged 10 commits into from
Aug 6, 2024

Conversation

sergiupuhalschi-rdx
Copy link
Contributor

@sergiupuhalschi-rdx sergiupuhalschi-rdx commented Aug 1, 2024

Jira Ticket

Description

This PR refines the UI mainly for the Seed Phrase entry screen:

  • General spacing and UI style adjustments
  • Removed Advanced Mode button for Babylon seed phrase
  • Removed seed phrase words suggestions and autocompletion
  • Fixed brief content flickering when entering RestoreMnemonicsScreen
  • Ensured the focused word in the seed phrase screen is above the keyboard when typing
  • Hidden keyboard when fully scrolled to the bottom in the seed phrase screen
  • Added loading state to the skip button in RestoreMnemonicsScreen
  • Updated transition animations related to the seed phrase screen
  • Fixed content transition animations within RestoreMnemonicsScreen

How to test

Mnemonic restoring from a backup:

  1. Fresh install or factory reset the wallet
  2. Choose Restore Wallet
  3. Connect to Google Drive and select a backup (preferably with multiple seed phrases)
  4. Test the general look & feel, especially for the seed phrase input screen

Mnemonic restoring for accounts recovery:

  1. Fresh install or factory reset the wallet
  2. Choose Restore Wallet
  3. Skip Google Drive -> Other Restore Options -> Recover Control with Main Seed Phrase
  4. Test the general look & feel, especially for the seed phrase input screen

Mnemonic restoring for Olympia wallet import:

  1. Ensure the selected gateway is Mainnet
  2. Go to Settings -> Troubleshooting -> Import from a Legacy Wallet
  3. Scan an Olympia wallet accounts export QR
  4. Test the general look & feel, especially for the seed phrase input screen

PR submission checklist

  • I have tested all of the above

@@ -277,6 +278,12 @@ class RestoreMnemonicsViewModel @Inject constructor(
val isMainBabylonSeedPhrase: Boolean
get() = recoverableFactorSource?.factorSource?.id == mainBabylonFactorSourceId

val showAdvancedMode: Boolean
get() = recoverableFactorSource?.factorSource?.hasOlympiaSeedPhraseLength ?: false
Copy link
Contributor

@micbakos-rdx micbakos-rdx Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is the correct way of doing it? hasOlympiaSeedPhraseLength is 24 similar to babylon. This is not the correct way of looking if a seed phrase belongs to an account created with olympia. I think a better approach is FactorSourceCryptoParameters.supportsOlympia.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we would add same seed phrase in account recovery scan both as babylon and olympia, of size 24, you would have a seed that supports both olympia and babylon and length is 24

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasOlympiaSeedPhraseLength checks if the word count is different than 24 and I thought this is enough to know it's not a Babylon seed phrase. But it's good to know there is a better and more reliable way to check this. Thank you!

Copy link
Contributor

@micbakos-rdx micbakos-rdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some UI related comments:

  1. I tried to restore a legacy olympia wallet. The textfields are hidden behind the keyboard when I write.
  2. Since autocompletion is removed, when I was writing I used the keyboard's auto-completion by choosing a word. Google's auto completion adds a space to the word making it invalid. Could you trim the words?
  3. I didn't understand what was the requirement here. Should we remove the bottom bar with the suggestions, or remove our own auto-completion, or both? Now it seems that both are removed. Is that correct?
  4. I am not sure the advanced mode check is the correct one. See related comment.

Copy link

sonarcloud bot commented Aug 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarCloud

@sergiupuhalschi-rdx sergiupuhalschi-rdx merged commit 3ee9741 into main Aug 6, 2024
8 of 9 checks passed
@sergiupuhalschi-rdx sergiupuhalschi-rdx deleted the sp/ABW-3645-seed-phrase-ui-refinements branch August 6, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants