-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Check for appropriate keystore file type on upload #646
Conversation
@@ -18,11 +19,17 @@ function isPassRequired(file: string): boolean { | |||
return passReq; | |||
} | |||
|
|||
function isValidFile(rawFile: any): boolean { |
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.
I tried finding the rawFile expected type for file uploads, but couldn't find it either. Would be nice to have the proper typing, but any
can do for now.
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.
Is it not part of the FileReader
interface?
const fileType = rawFile.type; | ||
return fileType === '' || fileType === 'application/json'; | ||
} | ||
|
||
export default class KeystoreDecrypt extends Component { | ||
public props: { |
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.
We use the Component<>
pattern for specifying props. Mind updating to match?
@aitrean Are you planning on updating the |
Apologies, meant to add that and it slipped by me. One moment. |
Thank you for the contribution @aitrean! :) |
Closes MyEtherWallet/MyEtherWallet#590