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

feat: Added secure store for the wallet key #21

Merged
merged 3 commits into from
Jun 16, 2023
Merged

Conversation

Tommylans
Copy link
Member

No description provided.

@Tommylans Tommylans force-pushed the feature/AW-50 branch 2 times, most recently from ce0b6ec to b0d7c6f Compare June 14, 2023 13:27
@Tommylans Tommylans requested a review from TimoGlastra June 14, 2023 13:28
Copy link
Contributor

@janrtvld janrtvld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Do we need error handling for this? Or what happens when the key can not be found when a user already has a wallet? Or is this not actually possible?

@Tommylans
Copy link
Member Author

@janrxyz
When the key isn't found there will be a new one generated and stored in the secure keystore. And if the user already has a wallet with the wallet id.

There will be a error when the key for the wallet is incorrect. But I'm not really sure what we want to do in that case.

Comment on lines 40 to 43
const agent = await initializeAgent(walletKey).catch(() => {
toast.show('Could not initialize agent.')
})
if (!agent) return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of a dead end. What does the UI look like? I think we should show at least a warning to the user like "Could not establish a secure environment. The current device is not supported." and show that indefinitely (as otherwise it will show a white screen or something?).

Also, in which case will secure store not be available?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secret store should always be available on iOS and Android devices.

I added some text when the agent failed initialization:

image

@Tommylans Tommylans requested a review from TimoGlastra June 16, 2023 08:10
@TimoGlastra TimoGlastra merged commit 996e2ec into main Jun 16, 2023
@TimoGlastra TimoGlastra deleted the feature/AW-50 branch June 16, 2023 08:17
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 this pull request may close these issues.

3 participants