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
Fix login page after-migration differences - Closes #624 #673
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
slaweet
suggested changes
Aug 29, 2017
src/store/middlewares/login.js
Outdated
@@ -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 }))); |
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.
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' }))
.
src/store/middlewares/offline.js
Outdated
return `Failed to connect to node ${optData}`; | ||
case 'EPARSE': | ||
return 'Make sure that you are using the latest version of Lisk Nano.'; | ||
default: return ''; |
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.
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 isFailed to connect: Node ${address} is not active
, notFailed to connect to node ${address}.
- the
EPARSE
error message is appended to the default (notice+=
)
slaweet
approved these changes
Aug 29, 2017
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.
closes Fix login page after-migration differences #624