CW 818: Improve Passphrase Discoverability When Restoring (#2224)

* feat(passphrase for restore): improve passphrase discoverability for restore flow.

Makes the option for adding a passphrase more visible for the user to see while restoring a wallet with seeds.

This change:
- Adds a checkbox on the restore from seeds page that asks if the wallet has a passphrase
- Switches the main CTA for the page to "Add Passphrase" when the checkbox is checked
- Pops up a bottomsheet with input fields for the passphrase when the "Add Passphrase" button is pressed
- Completes the flow and restores the wallet with the passphrase when the "Restore" button on the bottomsheet is pressed
- Hides the passphrase input fields in AdvancedSettings page when its a restore flow.

* feat(passphrase for restore): improve passphrase discoverability for restore flow. (Cont.)

This change:
- Obscures the passpgrase input fields by default
- Changes the color for the main CTA button

* feat(passphrase for restore): improve passphrase discoverability for restore flow. (Cont.)

This change:
- Adjusts the colors for the buttons on both the seed page and the bottomsheet

* feat(passphrase for restore): improve passphrase discoverability for restore flow. (Cont.)

This change:
- Combines the control for the visibility icons of the passphrase input fields - one tap to rule them all :)
This commit is contained in:
David Adegoke 2025-05-02 00:56:06 +01:00 committed by GitHub
parent cb257e1391
commit dd8413bae2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 491 additions and 57 deletions

View file

@ -43,6 +43,7 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store {
type == WalletType.solana ||
type == WalletType.tron,
isButtonEnabled = false,
hasPassphrase = false,
mode = restoredWallet?.restoreMode ?? WalletRestoreMode.seed,
super(appStore, walletInfoSource, walletCreationService, seedSettingsViewModel,
type: type, isRecovery: true) {
@ -89,6 +90,9 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store {
@observable
WalletRestoreMode mode;
@observable
bool hasPassphrase;
@observable
bool isButtonEnabled;