cake_wallet icon indicating copy to clipboard operation
cake_wallet copied to clipboard

wallet_restore_page: Credentials supplied to restored wallets have a path with random basename.

Open JoeGruffins opened this issue 6 months ago • 1 comments

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

  1. Put some prints in to see what values are return when doing any restoreFromSeed
  2. Restore a wallet.
  3. Compare credentials.walletInfo!.dirPath and credentials.walletInfo!.path to 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

JoeGruffins avatar May 01 '25 10:05 JoeGruffins

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.

JoeGruffins avatar May 02 '25 04:05 JoeGruffins