Feature/wallet reset confirmation#276
Merged
El-swaggerito merged 2 commits intoJul 23, 2026
Merged
Conversation
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #174
Summary
This Pull Request improves user experience and guards against accidental wallet deletion by requiring a deliberate confirmation phrase (
"confirm reset") for all destructive wallet reset flows. Previously, the settings reset required typing a single word (RESET), and the critical secure storage inaccessible error fallback reset could be executed with a simple alert box confirmation click. Both entry points have now been unified under a secure, case-insensitive, and accessible text-entry confirmation modal.Rationale & Impact
Accidentally resetting wallet data deletes the user's secure keystore database on-device, including Stellar secret keys, transaction history, app settings, and cached contact lists. If a user does not have their recovery phrase or secret key written down offline, this action is irreversible and leads to total loss of funds access.
By upgrading the validation phrase to a multi-word lowercase phrase (
"confirm reset") and applying it to both settings and startup recovery/error screens, we guarantee that the user is making a conscious, deliberate choice before execution.Detailed Changes
1. Unified Confirmation Behavior
src/components/WalletResetConfirmModal.tsxCONFIRMATION_TEXTfrom'RESET'to'confirm reset'.autoCapitalize="none"to make entering the lowercase phrase painless on mobile keyboard overlays.2. Error Fallback Screen Integration
app/_layout.tsxAlert.alertconfirm button insidehandleResetwith theWalletResetConfirmModal."Failed to restore wallet securely"error view, protecting users from wiping their database accidentally during startup troubleshooting.Verification & Testing Plan
Automated Verification
tsc --noEmitto verify type safety on the updated layout files and modals.Manual Test Checklist
"confirm reset"."CONFIRM RESET","confirm reset ", or"Confirm Reset"activates the "Delete Everything" action (verifying case-insensitivity and trim checks).Failed to restore wallet securelyfallback."confirm reset"input validation before deleting data.