stakwork / sphinx-ios

Client app for communication over the lightning network.
MIT License
18 stars 11 forks source link

Unable to restore backups keys from iOS keychain #331

Open tomsmith8 opened 1 year ago

tomsmith8 commented 1 year ago

Expected behaviour

Current behaviour

Image

https://github.com/stakwork/sphinx-ios/assets/142233216/7504ac1e-cb6d-40b2-820d-5adcf20ec30c

Steps to recreate

tomastiminskas commented 1 year ago

That seems to happen because some values can't be retrieved from keychain (it's hard to know why). I will fix it so we show an error alert to the user. I would recommend a restore from backuped keys in this case

tomsmith8 commented 1 year ago

@tomastiminskas We shouldn't offer a way to save backups in Keychain if we can't always save certain values and therefore it never work.

Backing up keys and making the UX is important. What options do we have to improve this?

tomastiminskas commented 1 year ago

@tomsmith8 as far as I know it works. I use that option often and never had issues. But checking at the code I could infer that for some reason the user reporting this couldn't restore because some of the keys were missing.

I would suggest to do some changes so we check if all the info is saved before building the list of pub keys available for restore from keychain and then we show them. Or show those with are corrupted with an error signed and when pressed we show an alert recommending to restore using backup string