-
Notifications
You must be signed in to change notification settings - Fork 55
reset preferences when creating a new wallet #350
Comments
We could generate a UUID and put it in the Application Support directory, preferences and backups (so we never overwrite a non-matching backup, cf. #353). The UUID could probably be the wallet's public address for now. |
In fact, why reset the preferences? We could just extend backup to support multiple wallets per location. |
This should be a high-priority fix IMO. |
We're already doing it for the backups, e.g. wallet 1abcdefgh backs up to Hive-1abcd, and if you delete everything and create a new wallet 1mnopqrst it backs up to Hive-1mnop. The problem is that the backup location is set only if it isn't already set, and if it is for some reason (like described above), then the new wallet starts backing up in the wrong folder. Apps like AppCleaner are supposed to delete the Application Support and Preferences together, but if you're doing this manually you can miss one of them. Using UUIDs/prefixes in Application Support / Preferences implies that we support multiple Hive wallets coexisting on the disk at the same time. That could be useful for some users, but I'm afraid it would also cause a lot of confusion for others, so let's leave that as an idea for the future for now.
There's no reason for Preferences to remember the "Hive-1abcd" directory at all if the "1abcdefgh" wallet no longer exists in Application Support, because there's nothing to back up anymore. Of course the backup will stay there and "Hive-1mnop" will be created alongside the old one, but the location should be removed from the Preferences and only the new wallet should be backed up to the new location (since only the new wallet exists at this point). |
If for some reason the user clears the data directory but leaves the preferences file in place and starts Hive again, then the new wallet file starts backing up to Dropbox to the same place as the old one, overwriting the old one.
The text was updated successfully, but these errors were encountered: