-
-
Notifications
You must be signed in to change notification settings - Fork 252
Support QR hardware #685
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
Support QR hardware #685
Conversation
d6ff421
to
e0e5c41
Compare
Hi @gantunesr , I will be on holidays next week, so I just raised this PR (which is not fully tested) to talk about the API definition and code style. Please have a look when you get time. Besides, I have a question about |
Hey @soralit, to answer your question regarding |
a2f53e8
to
a6d13d4
Compare
fc75371
to
0e9d52b
Compare
ca1cd1b
to
e5c0eef
Compare
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 took a look at this PR. I am a bit wary of these changes because it feels like it expands the responsibilities of KeyringController in a way that doesn't feel quite right. After this change, there will be some methods that are designed to work with our Keyring objects, and there will be some methods that are designed to work with yours.
That said, we know that our existing keyring code could use work. In this case, it doesn't help that our keyring modules are untyped. We plan on addressing these and other concerns in future updates, so I'm okay with this now with the knowledge that these changes are fairly self-contained and that we have plans for improvement later.
With that in mind I made some suggestions for how we could improve this code.
44bbc2f
to
fab77d7
Compare
Hi @mcmire , thanks for your review and comments. I will look into your suggestions and update the code ASAP. |
54536d1
to
f2a5777
Compare
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.
Just a few more code improvement suggestions.
Crucially I noticed that there don't seem to be any unit tests for the new methods you've added to the controller. Would you be willing to add that to this file?
Hi @mcmire , thanks for your suggestions. I will append a commit to add unit tests later. |
44521ff
to
b3e9b03
Compare
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 few more things. Also — would you mind adding return types to each method? I know TypeScript can fill these in automatically but I think it's better if we are explicit as 1) it forces the author to think about what the return type should be and 2) it removes one step for the reader to understand what the expected return type of the methods are.
1b59c55
to
8a2bd9e
Compare
Hi @mcmire , sorry for the late reply. I'm working on the bug fixing on mobile side these days. I just resolved the code issues and add types for new methods. I will append the unit tests tomorrow. |
8f15b52
to
ee0ef9e
Compare
Hi @mcmire , just update the unit tests and rebased the code, please have a review when you have time. |
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.
Just a few more minor things. Everything generally looks good to me otherwise (although I'll ping some other people to get some second opinions).
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'm leaving some more comments to get the opinion of the other devs related to this development.
@soralit looks like your PR is not meeting the code coverage requirement
|
@gantunesr The existing coverage is very close to the threshold, so any small changes could send it over the edge. I agree we should double-check the test coverage but I have a PR here that should make this better: #736. |
8b79c43
to
594eab9
Compare
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.
Thanks for putting up with all of our comments! I'm quite happy with this. Nice work!
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.
🚀 🚀 🚀 🚀
…dd type for KeyringController new methods
594eab9
to
fa40eb3
Compare
Add QR hardware support
Description
CHANGED:
signTypedMessage
method to support QR hardware.ADDED:
Checklist