Open dangeross opened 1 year ago
How about, if that happens, we delete the local sql
files and re-populate them based on the new seed?
I find myself doing this a lot during tests, when switching between wallets.
It can be made configurable, or with a new flag added to connect
.
Alternatively, we could store the DB files in a per-wallet subfolder, whose name is derived from the seed (HD wallet fingerprint).
Each new restore would then access the files from the matching DB, or create a new subfolder.
Alternatively, we could store the DB files in a per-wallet subfolder, whose name is derived from the seed (HD wallet fingerprint).
Each new restore would then access the files from the matching DB, or create a new subfolder.
This would better suit the multi-instance scenario, where different HWW determine the seed. I think Roy mentioned also having a method to clear the state cache for a particular seed (or with an optional flag when calling disconnect
)
This would better suit the multi-instance scenario, where different HWW determine the seed. I think Roy mentioned also having a method to clear the state cache for a particular seed (or with an optional flag when calling
disconnect
)
I like this approach.
When trying to connect the SDK with a seed different to the encrypted credential, SDK throws an error:
This can be handled by creating a different working directory for the SDK to use with the different seed, but that is not immediately obvious to a developer.