diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2017-11-23 16:09:21 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2017-12-05 13:13:03 +0100 |
| commit | a09bd1a77a0962b2b223b7c41570daf9def4fd85 (patch) | |
| tree | 3b3065dfe650b9ba672859f201d161496efdcd95 | |
| parent | 3369b58e5eb5c636a7945c8a8c3d4eb14bbbe29a (diff) | |
| download | mullvadvpn-a09bd1a77a0962b2b223b7c41570daf9def4fd85.tar.xz mullvadvpn-a09bd1a77a0962b2b223b7c41570daf9def4fd85.zip | |
Remove unused connection.serverAddress
| -rw-r--r-- | app/lib/backend.js | 2 | ||||
| -rw-r--r-- | app/redux/connection/actions.js | 10 | ||||
| -rw-r--r-- | app/redux/connection/reducers.js | 4 | ||||
| -rw-r--r-- | test/components/Connect.spec.js | 1 | ||||
| -rw-r--r-- | test/connect.spec.js | 1 |
5 files changed, 3 insertions, 15 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js index 900f5b8799..fac9e25438 100644 --- a/app/lib/backend.js +++ b/app/lib/backend.js @@ -273,7 +273,7 @@ export class Backend { }, }; - this._store.dispatch(connectionActions.connectingTo(host)); + this._store.dispatch(connectionActions.connecting()); return this._ensureAuthenticated() .then(() => this._ipc.updateRelaySettings(newRelaySettings)) diff --git a/app/redux/connection/actions.js b/app/redux/connection/actions.js index fb4320bf3a..023c7fc24c 100644 --- a/app/redux/connection/actions.js +++ b/app/redux/connection/actions.js @@ -25,7 +25,6 @@ const copyIPAddress = (): ReduxThunk => { type ConnectingAction = { type: 'CONNECTING', - host?: string, }; type ConnectedAction = { type: 'CONNECTED', @@ -66,13 +65,6 @@ export type ConnectionAction = NewPublicIpAction | OnlineAction | OfflineAction; -function connectingTo(host: string): ConnectingAction { - return { - type: 'CONNECTING', - host: host, - }; -} - function connecting(): ConnectingAction { return { type: 'CONNECTING', @@ -118,5 +110,5 @@ function offline(): OfflineAction { } -export default { connect, disconnect, copyIPAddress, newPublicIp, newLocation, connectingTo, connecting, connected, disconnected, online, offline }; +export default { connect, disconnect, copyIPAddress, newPublicIp, newLocation, connecting, connected, disconnected, online, offline }; diff --git a/app/redux/connection/reducers.js b/app/redux/connection/reducers.js index 48177fc5b6..52c1d648c1 100644 --- a/app/redux/connection/reducers.js +++ b/app/redux/connection/reducers.js @@ -7,7 +7,6 @@ export type ConnectionState = 'disconnected' | 'connecting' | 'connected'; export type ConnectionReduxState = { status: ConnectionState, isOnline: boolean, - serverAddress: ?string, clientIp: ?string, location: ?Coordinate2d, country: ?string, @@ -17,7 +16,6 @@ export type ConnectionReduxState = { const initialState: ConnectionReduxState = { status: 'disconnected', isOnline: true, - serverAddress: null, clientIp: null, location: null, country: null, @@ -38,7 +36,7 @@ export default function(state: ConnectionReduxState = initialState, action: Redu return { ...state, ...action.newLocation }; case 'CONNECTING': - return { ...state, ...{ status: 'connecting', serverAddress: action.host }}; + return { ...state, ...{ status: 'connecting' }}; case 'CONNECTED': return { ...state, ...{ status: 'connected' }}; diff --git a/test/components/Connect.spec.js b/test/components/Connect.spec.js index d672aa77d6..c3a5ad5f65 100644 --- a/test/components/Connect.spec.js +++ b/test/components/Connect.spec.js @@ -170,7 +170,6 @@ const defaultServer = { const defaultConnection = { status: 'disconnected', isOnline: true, - serverAddress: null, clientIp: null, location: null, country: null, diff --git a/test/connect.spec.js b/test/connect.spec.js index a7f991ec50..6e9eb2e493 100644 --- a/test/connect.spec.js +++ b/test/connect.spec.js @@ -56,7 +56,6 @@ describe('connect', () => { .then( () => { const state = store.getState().connection; expect(state.status).to.equal('connecting'); - expect(state.serverAddress).to.equal('www.example.com'); }); }); |
