Skip to content

Commit

Permalink
fix: adjust out of sync node errors (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvarley100 authored Mar 21, 2021
1 parent 5e426e0 commit d2e53e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/shared/lib/walletApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ const handleError = (type: ErrorType | ValidatorErrorTypes, error: string): { ty
if (error.includes('message history and balance')) {
return ('error.account.empty')
}
if (error.includes('No synced node')) {
return ('error.node.noSynced')
}

return getErrorMessage(type)
}
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@
"invalid": "Please enter a valid URL.",
"https": "HTTPS is required. Set up a developer profile to use unsecured HTTP connections.",
"duplicate": "This node has already been added.",
"unsynced": "The node you are trying to add is not synced."
"unsynced": "The node is not in sync.",
"noSynced": "No synced nodes are available."
},
"global": {
"generic": "Something went wrong."
Expand Down

0 comments on commit d2e53e9

Please sign in to comment.