cake_wallet
cake_wallet copied to clipboard
wallet_restore_page: Credentials supplied to restored wallets have a path with random basename.
Describe the bug
Restored wallets are not supplied a dirPath that uses the wallet name. Being a random name, this may cause trouble if two are randomly the same. The dirPath is not visible to the user anywhere. It is probably intended for the dirPath to use the name.
To Reproduce
- Put some prints in to see what values are return when doing any
restoreFromSeed - Restore a wallet.
- Compare
credentials.walletInfo!.dirPathandcredentials.walletInfo!.pathto the wallet name.
Expected behavior dirPath is created from the coin dir and the wallet name.
Platform:
- all
Additional context A simple change fixes for newer wallets, but unsure if this is causing unintended bugs elsewhere that should also be fixed at the same time. https://github.com/JoeGruffins/cake_wallet/commit/6cd82595e08718b66bb899d159e0b3889505b1dc
This is probably mostly a problem for ios, since it seems the directory moves between updates, so you could only find the previous directory using the stored basename of the dirPath, not the current name of the wallet as we were doing in decred. This caused a bug where the internal wallet just disappeared.