This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Remove error toast after autoupdate - Closes #1062 #1068
Merged
Merged
Conversation
This file contains 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
Because lower-case l in core 1.0 is no longer allowed
because it doesn't tell the user what exactly is wrong with the url and because it causes issues in auto updater #1062
reyraa
reviewed
May 17, 2018
src/utils/externalLinks.js
Outdated
|
||
export default { | ||
init: () => { | ||
const { ipc } = window; | ||
|
||
if (ipc) { | ||
ipc.on('openUrl', (action, url) => { | ||
const normalizedUrl = url.toLowerCase().replace('lisk://', '/'); |
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.
If you click on Lisk://main/transactions
this won't find the route. any IM may correct the URL from lisk://
to Lisk://
src/utils/externalLinks.js
Outdated
const route = routesReg.find(item => item.regex.test(normalizedUrl)); | ||
if (route !== undefined) { | ||
history.push(normalizedUrl); | ||
} else { | ||
store.dispatch(errorToastDisplayed({ label: i18next.t('The URL was invalid') })); |
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.
Please be aware that removing this line, we won't be notifying the user about probable mistakes in URL. for example, lisk://mai/transactions
or lisk://main/transaction
will result in no action and can be confusing.
... and display error toast only if lisk:// launch protocol and invalid URL was detected
reyraa
approved these changes
May 17, 2018
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 Vit
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.
What was the problem?
See #1062
How did I fix it?
Removed the error toast
How to test it?
That's close to impossible because you need the change to be released.
Review checklist