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
[DDW-970] Prevent creation of new wallet during address verification #2906
Conversation
…ncorrect passphrase during pairing
584f81e
to
a5d885c
Compare
source/renderer/app/components/hardware-wallet/HardwareWalletStatus.tsx
Outdated
Show resolved
Hide resolved
source/renderer/app/components/hardware-wallet/HardwareWalletStatus.tsx
Outdated
Show resolved
Hide resolved
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.
@szymonmaslowski 💯 Nice improvements and code / flow is much more cleaner now.
Please check my comments...
const recognizedSoftwareWallet = await this._recognizeSoftwareWalletByExtendedPublicKey( | ||
{ extendedPublicKey } | ||
); | ||
|
||
if (recognizedSoftwareWallet) { | ||
await this._handleIdentifiedSoftwareWallet({ | ||
recognizedSoftwareWallet, | ||
extendedPublicKey, | ||
forcedPath: devicePath, | ||
walletId, | ||
address, | ||
}); |
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.
@szymonmaslowski following to the above comment. Now you have 2 functions that are connected to identifying / recognizing. It is better to say "ok, now get me an extended public key and then recognize"
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.
Sorry I didn't get your comment. By two functions do you mean the _handleIdentifiedSoftwareWallet
and _identifyAndHandleSoftwareWallet
? The _handleIdentifiedSoftwareWallet
method is responsible only for the case when the wallet was found. On the other hand the _identifyAndHandleSoftwareWallet
method encapsulates all steps including the extended public key request, finding the device and handling it accordingly, and it is there for a reduction of code duplication, but I believe with further refactoring it may be broken to few less generic code blocks and distributed to the proper places in the logic (for example part regarding the transaction to the transaction logic etc.).
}; | ||
|
||
@action | ||
_proceedWithTransactionAfterConnectingDevice = ({ |
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.
@szymonmaslowski maybe we should call this _reinitiate... or _recover...
? What do you think?
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 would say this is rather a continuation of the transaction process as there is the _signTransactionTrezor
method called at the end of this method. Am I right?
@alexander-rukin Could you check again? Styling issues shouldn't be there anymore. I fixed it in a little different way than your suggestion, but I think I achieved the same result. |
@szymonmaslowski pls make sure that your fix didn't affect scrollbar position as now it ends too early (not with the end of content) |
…ace of previous INCORRECT_PASSPHRASE_PROVIDED status
23dff70
to
ea8ad7e
Compare
@szymonmaslowski I found a specific scenario where the message is different from the one on the screenshots:
|
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.
Good job, lgtm!
Notes:
- The issue on my previous comment is going to be addressed on this card: DDW-1090.
- Please do not merge until we have at least one additional approval from the rest of @input-output-hk/daedalus-qa
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.
LGTM. Great job @szymonmaslowski 👍 . Tested on 21656
@danielmain Additional QA review is required after resolving the conflicts. So please do not merge before further notice. |
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.
Looks good @szymonmaslowski 👍
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.
LGTM. Tested on 21788. Great work @szymonmaslowski 👍
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.
Amazing job @szymonmaslowski
This PR
Unfortunately, this PR requires full regression testing of hardware wallet cases
Diagram representing part of the logic covered by the refactoring:
Todos
Screenshots
Testing Checklist
Review Checklist
Basics
input-output-hk/daedalus-dev
andinput-output-hk/daedalus-qa
assigned as PR reviewersrun Chromatic
label to PR to trigger the run)release-vNext
,feature
/bug
/chore
,WIP
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review