-
Notifications
You must be signed in to change notification settings - Fork 191
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: keystore import #8442
base: develop
Are you sure you want to change the base?
feat: keystore import #8442
Conversation
|
||
const hoverSx = { borderColor: 'blue.500' } | ||
|
||
// TODO(gomes): use https://www.chakra-ui.com/docs/components/file-upload if/when we migrate to chakra@3 |
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.
Logic very much stolen from there
if (!keystoreFile) { | ||
throw new Error('No keystore uploaded') | ||
} |
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.
a.k.a "this should never happen, but..."
setError('mnemonic', { | ||
type: 'manual', | ||
message: 'walletProvider.shapeShift.import.invalidKeystore', | ||
}) |
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.
Probably fine to ditch this one as we never end up there - but prefer to keep it in case we manage to detect the imported file as being a keystore or not, in which case we could move this catch and reach this error-handling
<VStack spacing={6}> | ||
<FileUpload onFileSelect={handleFileSelect} /> | ||
|
||
{keystoreFile && ( |
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.
Hide password field until selected
Description
Does what it says on the box - web wire-up following shapeshift/hdwallet#703
Issue (if applicable)
Risk
Low - isolated to keystore imports
Testing
Engineering
Operations
Screenshots (if applicable)
https://jam.dev/c/a8c50a0f-b6f3-44ca-b38d-415b71588991