Skip to content

Commit

Permalink
add error message to wallet initialization error
Browse files Browse the repository at this point in the history
  • Loading branch information
refi93 committed Jan 30, 2019
1 parent 4fd6b81 commit 2e681c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/frontend/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ module.exports = ({setState, getState}) => {
setState({
walletLoadingError: {
code: 'WalletInitializationError',
params: {
message:
e.name === 'NetworkError'
? 'failed to fetch data from blockchain explorer'
: undefined,
},
},
loading: false,
})
Expand Down
3 changes: 2 additions & 1 deletion app/frontend/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const translations = {
SendAmountIsTooBig: () =>
`Invalid format: Amount cannot exceed ${printAda(Number.MAX_SAFE_INTEGER)}`,
InvalidMnemonic: () => 'Invalid mnemonic, check your mnemonic for typos and try again.',
WalletInitializationError: () => 'Error during wallet initialization',
WalletInitializationError: ({message}) =>
`Error during wallet initialization${message ? `: ${message}` : ''}`,
TransactionRejectedByNetwork: () => 'Submitting the transaction into Cardano network failed.',
TransactionRejected: () => 'Transaction rejected while signing.',
TrezorRejected: () => 'Operation rejected by the Trezor hardware wallet.',
Expand Down

0 comments on commit 2e681c0

Please sign in to comment.