diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-03-06 11:15:27 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-03-07 13:48:30 +0100 |
| commit | 07c3a6f1c07d776686fbb8842b677424bdec8fca (patch) | |
| tree | 420bf01ed88317a3c6e3501307e4bc4f393dacf6 /gui/src/renderer/components | |
| parent | 8c4673bbf71924ae321db08d8a9b413ff06dfb50 (diff) | |
| download | mullvadvpn-07c3a6f1c07d776686fbb8842b677424bdec8fca.tar.xz mullvadvpn-07c3a6f1c07d776686fbb8842b677424bdec8fca.zip | |
Refactor AuthFailureError into parseAuthFailure()
Diffstat (limited to 'gui/src/renderer/components')
| -rw-r--r-- | gui/src/renderer/components/Connect.tsx | 2 | ||||
| -rw-r--r-- | gui/src/renderer/components/NotificationArea.tsx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gui/src/renderer/components/Connect.tsx b/gui/src/renderer/components/Connect.tsx index a0ebe53820..657d030c6b 100644 --- a/gui/src/renderer/components/Connect.tsx +++ b/gui/src/renderer/components/Connect.tsx @@ -3,7 +3,7 @@ import { Component, Styles, View } from 'reactxp'; import { links } from '../../config.json'; import { ITunnelEndpoint, parseSocketAddress } from '../../shared/daemon-rpc-types'; import AccountExpiry from '../lib/account-expiry'; -import { AuthFailureError, AuthFailureKind } from '../lib/auth-failure'; +import { AuthFailureKind, parseAuthFailure } from '../lib/auth-failure'; import { IConnectionReduxState } from '../redux/connection/reducers'; import { IVersionReduxState } from '../redux/version/reducers'; import ExpiredAccountErrorView, { RecoveryAction } from './ExpiredAccountErrorView'; diff --git a/gui/src/renderer/components/NotificationArea.tsx b/gui/src/renderer/components/NotificationArea.tsx index 8d831bf3c3..033067df8a 100644 --- a/gui/src/renderer/components/NotificationArea.tsx +++ b/gui/src/renderer/components/NotificationArea.tsx @@ -16,7 +16,7 @@ import { import { BlockReason, TunnelStateTransition } from '../../shared/daemon-rpc-types'; import AccountExpiry from '../lib/account-expiry'; -import { AuthFailureError } from '../lib/auth-failure'; +import { parseAuthFailure } from '../lib/auth-failure'; import { IVersionReduxState } from '../redux/version/reducers'; interface IProps { @@ -43,7 +43,7 @@ type State = NotificationAreaPresentation & { function getBlockReasonMessage(blockReason: BlockReason): string { switch (blockReason.reason) { case 'auth_failed': - return new AuthFailureError(blockReason.details).message; + return parseAuthFailure(blockReason.details).message; case 'ipv6_unavailable': return pgettext( 'in-app-notifications', |
