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

Fix login page after-migration differences - Closes #624 #673

Merged
merged 8 commits into from
Aug 29, 2017
Merged

Fix login page after-migration differences - Closes #624 #673

merged 8 commits into from
Aug 29, 2017

Conversation

alepop
Copy link
Contributor

@alepop alepop commented Aug 28, 2017

@@ -30,7 +31,7 @@ const loginMiddleware = store => next => (action) => {
store.dispatch(accountLoggedIn(Object.assign({}, accountData, accountBasics,
{ delegate: {}, isDelegate: false })));
}),
);
).catch(res => store.dispatch(activePeerUpdate({ online: false, code: res.error.code })));
Copy link
Contributor

Choose a reason for hiding this comment

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

When I click login with invalid node address, then I get the error toast, but if I try to log in again, I no longer get the toast.

Also when I finally enter a valid address and can log in, I get a success toast "Connection re-established", which doesn't make sense if I were not connected in the first place.

This should rather dispatch directly store.dispatch(errorToastDisplayed({ label: 'Unable to connect to the node' })).

return `Failed to connect to node ${optData}`;
case 'EPARSE':
return 'Make sure that you are using the latest version of Lisk Nano.';
default: return '';
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some differences to the pre-migration logic of this

  • The default error message used to be also Failed to connect to node ${address}.
  • the EUNAVAILABLE error message is Failed to connect: Node ${address} is not active, not Failed to connect to node ${address}.
  • the EPARSE error message is appended to the default (notice +=)

https://github.com/LiskHQ/lisk-nano/blob/bb27b7470cc739390e6f9744e0e46d705272d9a7/src/services/api/peers.js#L118-L126

@slaweet slaweet merged commit 1e2e9fa into LiskArchive:development Aug 29, 2017
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.

Fix login page after-migration differences
2 participants