This repository was archived by the owner on Oct 22, 2024. It is now read-only.
Connection status active in the desktop app while extension presents connection error #292
Merged
vinistevam merged 7 commits intomain-desktopfrom Dec 12, 2022
Conversation
ec2efed to
3c2a36c
Compare
Contributor
There was a problem hiding this comment.
There is no need to always validate isPairingKeyPresent.. IMO it becomes easier to read if we do that on the top. Something like:
if (!isPairingKeyPresent(testResult)) {
if (!testResult.isConnected) {
history.push(DESKTOP_ERROR_NOT_FOUND_ROUTE);
return;
}
if (!testResult.versionCheck?.isExtensionVersionValid) {
history.push(DESKTOP_ERROR_EXTENSION_OUTDATED_ROUTE);
return;
}
if (!testResult.versionCheck?.isDesktopVersionValid) {
history.push(DESKTOP_ERROR_DESKTOP_OUTDATED_ROUTE);
return;
}
}
if (process.env.SKIP_OTP_PAIRING_FLOW) {
showLoader();
setDesktopEnabled(true);
// Wait for new state to persist before restarting
setTimeout(() => {
restart();
}, SKIP_PAIRING_RESTART_DELAY);
return;
}
if (isPairingKeyPresent(testResult)) {
setDisplayWarning(t('desktopPairedWarningDeepLink'));
}
history.push(DESKTOP_PAIRING_ROUTE);what do you think?
Contributor
Author
There was a problem hiding this comment.
Good point @cryptotavares I'm pushing this change.
4972f6f to
9e35c17
Compare
f190005 to
ddddce3
Compare
ddddce3 to
ec3a5c9
Compare
cryptotavares
approved these changes
Dec 12, 2022
…ktop-extension-error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Whenever the Desktop app is paired with extension "1" and extension "2" tries to access the OTP screen it triggers a test connection that should not remain active if the pairing key does not match. It should throw an error that activates a warning to the user as explained in the example below:
Changes
Extension
SynctoPairas we are using pairing in the notification and also through the codeIssues
Resolves #261 #135 #294