-
-
Notifications
You must be signed in to change notification settings - Fork 230
Description
Describe your enhancement idea
RestartUtils.ts exports restartNeeded(force?: boolean). When called with force=true, the Android restart alert shows only one button: Restart. Tapping outside of the modal and back button also do nothing, so there is no way to cancel this.
In most places this is reasonable: after deleting a node, after completing seed recovery, or when the user explicitly tapped "Enable and Restart" for Express Graph Sync.
However, there are two call sites where force=true creates poor UX because the user may simply want to stay on their current wallet and not restart:
setWalletConfigurationAsActive() in WalletConfiguration.tsx:
User is on the WalletConfiguration screen and taps the button to make an embedded node the active wallet. Zeus tells them a restart is required, with no way to back out.
Wallets.tsx -> switching to embedded node from wallet list:
Same situation, different entry point...
In both cases the user may have tapped by mistake or changed their mind. There is no reason to prevent them from cancelling.
Proposed solution
Add an optional onConfirm: () => Promise<void> callback to restartNeeded. For the two cases above, updateSettings (which currently runs before the dialog) would move into onConfirm, so settings are only committed if the user confirms. The restart logic itself stays centralized in RestartUtils. These call sites would also drop force=true so the "No"-button appears.