Skip to content
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

Import error on iOS #1587

Closed
CarolineLCa opened this issue Sep 25, 2023 · 3 comments · Fixed by #1593
Closed

Import error on iOS #1587

CarolineLCa opened this issue Sep 25, 2023 · 3 comments · Fixed by #1593

Comments

@CarolineLCa
Copy link

Hello,

I'm testing import function but I noticed that when we put the wrong backup password all the wallet stops working.

The import function calls react-native-fs copyFile, but for iOS the copyFile function returns an error when the destination file already exists as mentioned in their Readme.

[WalletError: Error importing wallet 'walletId': “walletName.awlt” couldn’t be copied to “walletId” because an item with the same name already exists.]

Thanks!

@TimoGlastra
Copy link
Contributor

Thanks for opening the issue @CarolineLCa.

Copying a wallet to a destination that already exists should fail, but maybe we need to improve the error handling for this.

Do you have an expected outcome of how this should work?

@CarolineLCa
Copy link
Author

Hi @TimoGlastra

I have tested the import function on Android and the file is overwritten by the new file being imported. The import function does this action using the copyFile method.

But on iOS it returns that error because copyFile can’t overwrite files there.

So, I was expecting that iOS would work the same way as Android.

@genaris
Copy link
Contributor

genaris commented Sep 28, 2023

Discussed in today's AFJ WG call. For that case it should throw an error in all platforms.

We have also to make sure that if a wrong password is submitted, no wallet files are created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants