summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2019-03-04 18:14:53 +0100
committerAndrej Mihajlov <and@mullvad.net>2019-03-04 18:14:53 +0100
commit804bf4c49fab3c132f15f0bba4d0cece8b24b110 (patch)
tree7eca03c44e0deffd764c491a05e3bb4e06f15b92 /gui/src
parentc8b52f145dd47f4d011fdef77ab75a4c2898b46f (diff)
parente73fc128cd34546aaf76bf1d41ac5dbdcf01bf01 (diff)
downloadmullvadvpn-804bf4c49fab3c132f15f0bba4d0cece8b24b110.tar.xz
mullvadvpn-804bf4c49fab3c132f15f0bba4d0cece8b24b110.zip
Merge branch 'fix-missing-out-ip'
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/renderer/redux/connection/actions.ts18
-rw-r--r--gui/src/renderer/redux/connection/reducers.ts3
2 files changed, 9 insertions, 12 deletions
diff --git a/gui/src/renderer/redux/connection/actions.ts b/gui/src/renderer/redux/connection/actions.ts
index f24d080a57..ff34b20e11 100644
--- a/gui/src/renderer/redux/connection/actions.ts
+++ b/gui/src/renderer/redux/connection/actions.ts
@@ -1,4 +1,9 @@
-import { AfterDisconnect, BlockReason, ITunnelEndpoint } from '../../../shared/daemon-rpc-types';
+import {
+ AfterDisconnect,
+ BlockReason,
+ ILocation,
+ ITunnelEndpoint,
+} from '../../../shared/daemon-rpc-types';
interface IConnectingAction {
type: 'CONNECTING';
@@ -26,14 +31,7 @@ interface IBlockedAction {
interface INewLocationAction {
type: 'NEW_LOCATION';
- newLocation: {
- country: string;
- city?: string;
- latitude: number;
- longitude: number;
- mullvadExitIp: boolean;
- hostname?: string;
- };
+ newLocation: ILocation;
}
interface IOnlineAction {
@@ -88,7 +86,7 @@ function blocked(reason: BlockReason): IBlockedAction {
};
}
-function newLocation(location: INewLocationAction['newLocation']): INewLocationAction {
+function newLocation(location: ILocation): INewLocationAction {
return {
type: 'NEW_LOCATION',
newLocation: location,
diff --git a/gui/src/renderer/redux/connection/reducers.ts b/gui/src/renderer/redux/connection/reducers.ts
index bd22a6f110..af92e0fd6f 100644
--- a/gui/src/renderer/redux/connection/reducers.ts
+++ b/gui/src/renderer/redux/connection/reducers.ts
@@ -31,8 +31,7 @@ export default function(
): IConnectionReduxState {
switch (action.type) {
case 'NEW_LOCATION':
- const { hostname, latitude, longitude, city, country } = action.newLocation;
- return { ...state, hostname, latitude, longitude, city, country };
+ return { ...state, ...action.newLocation };
case 'CONNECTING':
return {