Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Remove error toast after autoupdate - Closes #1062 #1068

Merged
merged 3 commits into from
May 17, 2018

Conversation

slaweet
Copy link
Contributor

@slaweet slaweet commented May 15, 2018

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

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
@slaweet slaweet self-assigned this May 15, 2018
@slaweet slaweet requested a review from reyraa May 16, 2018 07:05

export default {
init: () => {
const { ipc } = window;

if (ipc) {
ipc.on('openUrl', (action, url) => {
const normalizedUrl = url.toLowerCase().replace('lisk://', '/');
Copy link
Contributor

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://

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') }));
Copy link
Contributor

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
Copy link
Contributor

@reyraa reyraa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Vit

@slaweet slaweet merged commit 49d1cfa into 2.0.0 May 17, 2018
@slaweet slaweet deleted the 1062-remove-error-toast-after-autoupdate branch May 17, 2018 09:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants