-
Notifications
You must be signed in to change notification settings - Fork 237
dcr: Always fetch the current dir path. #2242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This currently seems to break android. The wallet name is different/wrong suddenly when going from main to this. |
what is the difference in path? |
Main is saving the wallet at a random name whenever I restore. I restored a wallet called "Dreary Domain" but it saved it at "/data/user/0/com.cakewallet.cake_wallet/app_flutter/wallets/decred/Enlightened Cone" and thats what is in the walletInfo.dirPath It looks like |
This is a separate issue that is being worked on currently. |
I realized I'm restoring the same wallet with the same seed, so not sure if its wrong atm actually. |
I'm not sure why decred is creating a different directory in addition to new one but this behavior exists both with current main and with this PR. when fixing it we also need to make sure that people who created wallet previously can still open it on android |
It looks like it is being fed a bad directory from higher up? Should I look into that? |
Moving the old wallets. I suppose this will panic if the dest dir is not empty... Should I handle that? It's unlikely. https://github.com/cake-tech/cake_wallet/compare/9ee811c6e8953342cb1b4843e927412b77856bd7..9f44cb702da1f6b3c38d87a26d1e6e65d9b6b0e1 |
rename should just do this as well I think, I don't think the wallet name matters to the wallet. |
c25c5cc
to
3c46a10
Compare
Maybe this name isn't being supplied, so its making another. Not yet sure where that is: cake_wallet/lib/view_model/wallet_creation_vm.dart Lines 73 to 75 in 4448adb
|
I made an issue with my assessment of this "bug" #2243 |
ios is broken again, will fix tomorrow |
8315093
to
76013b9
Compare
Rebased. Should be ok now on both ios and android. |
be7a294
to
4b572ab
Compare
Renaming files now rather than copying. |
I want to stick a libwallet version bump in here, we found an unrelated bug. |
The libwallet change is only this decred/libwallet#27 We were not re encrypting the seed on password change. |
Something still isn't quite right. Please don't merge yet. |
02e0003
to
3a76600
Compare
So using dirPath doesn't work because it might have been updated with the correct name but still pointing to a nonexistant directory. just path is untouched so using that instead. Another odd thing that only seems to happen in certain circumstances on ios, deleting the directory errors with not existing, even if I add a check one line above. Will happen if I start on a wallet created without seed, then open a restored wallet from there. Unsure what that is about... anyway, tested more now and I think the current changes are good https://github.com/cake-tech/cake_wallet/compare/02e00034e7dbbd7e40eb4a1e046698eb532e1e26..3a76600bf02d470e60808b5463d0cbf738c04d83 |
On ios devices the path will change between updates breaking decred. Never save the path and always check to ensure it is up to date. Previous wallets were also not creating a directory in the correct place. Move those when found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine on iOS
On ios devices the path will change between updates breaking decred. Never save the path and always check to ensure it is up to date.
closes #2162